@codebolt/agent 5.0.7 → 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 (160) hide show
  1. package/dist/processor-pieces/base/basePreToolCallProcessor.js +5 -2
  2. package/dist/processor-pieces/messageModifiers/argumentProcessorModifier.d.ts +1 -1
  3. package/dist/processor-pieces/messageModifiers/argumentProcessorModifier.js +2 -2
  4. package/dist/processor-pieces/messageModifiers/atFileProcessorModifier.js +24 -34
  5. package/dist/processor-pieces/messageModifiers/chatRecordingModifier.d.ts +1 -1
  6. package/dist/processor-pieces/messageModifiers/chatRecordingModifier.js +2 -2
  7. package/dist/processor-pieces/messageModifiers/coreSystemPromptModifier.d.ts +1 -1
  8. package/dist/processor-pieces/messageModifiers/coreSystemPromptModifier.js +2 -2
  9. package/dist/processor-pieces/messageModifiers/directoryContextModifier.d.ts +1 -1
  10. package/dist/processor-pieces/messageModifiers/directoryContextModifier.js +8 -3
  11. package/dist/processor-pieces/messageModifiers/environmentContextModifier.d.ts +1 -1
  12. package/dist/processor-pieces/messageModifiers/environmentContextModifier.js +1 -1
  13. package/dist/processor-pieces/messageModifiers/ideContextModifier.js +114 -17
  14. package/dist/processor-pieces/messageModifiers/memoryImportModifier.d.ts +1 -1
  15. package/dist/processor-pieces/messageModifiers/memoryImportModifier.js +13 -5
  16. package/dist/processor-pieces/messageModifiers/toolInjectionModifier.d.ts +5 -0
  17. package/dist/processor-pieces/messageModifiers/toolInjectionModifier.js +4 -0
  18. package/dist/processor-pieces/postInferenceProcessors/loopDetectionModifier.js +24 -8
  19. package/dist/processor-pieces/postToolCallProcessors/conversationCompactorModifier.d.ts +202 -5
  20. package/dist/processor-pieces/postToolCallProcessors/conversationCompactorModifier.js +826 -19
  21. package/dist/processor-pieces/postToolCallProcessors/index.d.ts +1 -1
  22. package/dist/processor-pieces/postToolCallProcessors/index.js +2 -1
  23. package/dist/processor-pieces/postToolCallProcessors/shellProcessorModifier.js +7 -4
  24. package/dist/processor-pieces/preInferenceProcessors/chatCompressionModifier.d.ts +1 -1
  25. package/dist/processor-pieces/preInferenceProcessors/chatCompressionModifier.js +12 -16
  26. package/dist/processor-pieces/pretoolCallProcessors/toolParameterModifier.d.ts +2 -3
  27. package/dist/processor-pieces/pretoolCallProcessors/toolParameterModifier.js +1 -2
  28. package/dist/processor-pieces/utils/messageModifierHelper.js +5 -2
  29. package/dist/types/InternalTypes.d.ts +8 -6
  30. package/dist/unified/agent/agent.js +1 -2
  31. package/dist/unified/agent/codeboltAgent.d.ts +23 -2
  32. package/dist/unified/agent/codeboltAgent.js +55 -12
  33. package/dist/unified/agent/tools.d.ts +7 -11
  34. package/dist/unified/agent/tools.js +12 -3
  35. package/dist/unified/agent/workflow.js +38 -20
  36. package/dist/unified/agent/workflowSteps.d.ts +1 -1
  37. package/dist/unified/agent/workflowSteps.js +58 -23
  38. package/dist/unified/base/agentStep.js +20 -1
  39. package/dist/unified/base/initialPromptGenerator.js +3 -1
  40. package/dist/unified/base/responseExecutor.d.ts +3 -0
  41. package/dist/unified/base/responseExecutor.js +47 -21
  42. package/dist/unified/index.d.ts +1 -0
  43. package/dist/unified/index.js +4 -1
  44. package/dist/unified/services/LoopDetectionService.d.ts +44 -0
  45. package/dist/unified/services/LoopDetectionService.js +79 -0
  46. package/dist/unified/utils/utils.d.ts +20 -1
  47. package/dist/unified/utils/utils.js +8 -4
  48. package/package.json +5 -5
  49. package/dist/agent.d.ts +0 -86
  50. package/dist/agent.js +0 -324
  51. package/dist/builderpattern/agent.d.ts +0 -86
  52. package/dist/builderpattern/agent.js +0 -324
  53. package/dist/builderpattern/followupquestionbuilder.d.ts +0 -75
  54. package/dist/builderpattern/followupquestionbuilder.js +0 -197
  55. package/dist/builderpattern/index.d.ts +0 -14
  56. package/dist/builderpattern/index.js +0 -23
  57. package/dist/builderpattern/llmoutputhandler.d.ts +0 -102
  58. package/dist/builderpattern/llmoutputhandler.js +0 -452
  59. package/dist/builderpattern/promptbuilder.d.ts +0 -382
  60. package/dist/builderpattern/promptbuilder.js +0 -805
  61. package/dist/builderpattern/systemprompt.d.ts +0 -20
  62. package/dist/builderpattern/systemprompt.js +0 -48
  63. package/dist/builderpattern/taskInstruction.d.ts +0 -37
  64. package/dist/builderpattern/taskInstruction.js +0 -57
  65. package/dist/builderpattern/usermessage.d.ts +0 -70
  66. package/dist/builderpattern/usermessage.js +0 -123
  67. package/dist/composablepattern/agent.d.ts +0 -169
  68. package/dist/composablepattern/agent.js +0 -598
  69. package/dist/composablepattern/codebolt-storage.d.ts +0 -67
  70. package/dist/composablepattern/codebolt-storage.js +0 -320
  71. package/dist/composablepattern/document.d.ts +0 -149
  72. package/dist/composablepattern/document.js +0 -405
  73. package/dist/composablepattern/examples/codebolt-integration-example.d.ts +0 -12
  74. package/dist/composablepattern/examples/codebolt-integration-example.js +0 -218
  75. package/dist/composablepattern/examples/codebolt-storage-example.d.ts +0 -40
  76. package/dist/composablepattern/examples/codebolt-storage-example.js +0 -223
  77. package/dist/composablepattern/examples/custom-steps-example.d.ts +0 -20
  78. package/dist/composablepattern/examples/custom-steps-example.js +0 -455
  79. package/dist/composablepattern/examples/document-agent.d.ts +0 -17
  80. package/dist/composablepattern/examples/document-agent.js +0 -107
  81. package/dist/composablepattern/examples/simple-codebolt-integration.d.ts +0 -8
  82. package/dist/composablepattern/examples/simple-codebolt-integration.js +0 -164
  83. package/dist/composablepattern/examples/weather-agent.d.ts +0 -18
  84. package/dist/composablepattern/examples/weather-agent.js +0 -86
  85. package/dist/composablepattern/examples/workflow-example.d.ts +0 -12
  86. package/dist/composablepattern/examples/workflow-example.js +0 -463
  87. package/dist/composablepattern/index.d.ts +0 -63
  88. package/dist/composablepattern/index.js +0 -115
  89. package/dist/composablepattern/memory.d.ts +0 -89
  90. package/dist/composablepattern/memory.js +0 -141
  91. package/dist/composablepattern/tool.d.ts +0 -84
  92. package/dist/composablepattern/tool.js +0 -260
  93. package/dist/composablepattern/types.d.ts +0 -194
  94. package/dist/composablepattern/types.js +0 -6
  95. package/dist/composablepattern/user-context.d.ts +0 -214
  96. package/dist/composablepattern/user-context.js +0 -275
  97. package/dist/composablepattern/workflow.d.ts +0 -388
  98. package/dist/composablepattern/workflow.js +0 -562
  99. package/dist/followupquestionbuilder.d.ts +0 -75
  100. package/dist/followupquestionbuilder.js +0 -197
  101. package/dist/index.d.ts +0 -14
  102. package/dist/index.js +0 -23
  103. package/dist/llmoutputhandler.d.ts +0 -102
  104. package/dist/llmoutputhandler.js +0 -452
  105. package/dist/processor/agent/agentStep.d.ts +0 -49
  106. package/dist/processor/agent/agentStep.js +0 -241
  107. package/dist/processor/agent/toolExecutor.d.ts +0 -19
  108. package/dist/processor/agent/toolExecutor.js +0 -90
  109. package/dist/processor/index.d.ts +0 -7
  110. package/dist/processor/index.js +0 -36
  111. package/dist/processor/messageModifiers/baseMessageModifier.d.ts +0 -20
  112. package/dist/processor/messageModifiers/baseMessageModifier.js +0 -55
  113. package/dist/processor/processors/baseProcessor.d.ts +0 -14
  114. package/dist/processor/processors/baseProcessor.js +0 -29
  115. package/dist/processor/tools/baseTool.d.ts +0 -10
  116. package/dist/processor/tools/baseTool.js +0 -20
  117. package/dist/processor/tools/toolList.d.ts +0 -9
  118. package/dist/processor/tools/toolList.js +0 -22
  119. package/dist/processor/types/interfaces.d.ts +0 -94
  120. package/dist/processor/types/interfaces.js +0 -2
  121. package/dist/processor-pieces/messageModifiers/addToolsListMessageModifier.d.ts +0 -22
  122. package/dist/processor-pieces/messageModifiers/addToolsListMessageModifier.js +0 -144
  123. package/dist/processor-pieces/messageModifiers/baseContextMessageModifier.d.ts +0 -15
  124. package/dist/processor-pieces/messageModifiers/baseContextMessageModifier.js +0 -75
  125. package/dist/processor-pieces/messageModifiers/baseSystemInstructionMessageModifier.d.ts +0 -11
  126. package/dist/processor-pieces/messageModifiers/baseSystemInstructionMessageModifier.js +0 -46
  127. package/dist/processor-pieces/messageModifiers/handleUrlMessageModifier.d.ts +0 -12
  128. package/dist/processor-pieces/messageModifiers/handleUrlMessageModifier.js +0 -60
  129. package/dist/processor-pieces/messageModifiers/imageAttachmentMessageModifier.d.ts +0 -18
  130. package/dist/processor-pieces/messageModifiers/imageAttachmentMessageModifier.js +0 -222
  131. package/dist/processor-pieces/messageModifiers/workingDirectoryMessageModifier.d.ts +0 -22
  132. package/dist/processor-pieces/messageModifiers/workingDirectoryMessageModifier.js +0 -194
  133. package/dist/processor-pieces/processors/advancedLoopDetectionProcessor.d.ts +0 -41
  134. package/dist/processor-pieces/processors/advancedLoopDetectionProcessor.js +0 -197
  135. package/dist/processor-pieces/processors/chatCompressionProcessor.d.ts +0 -26
  136. package/dist/processor-pieces/processors/chatCompressionProcessor.js +0 -90
  137. package/dist/processor-pieces/processors/chatRecordingProcessor.d.ts +0 -81
  138. package/dist/processor-pieces/processors/chatRecordingProcessor.js +0 -329
  139. package/dist/processor-pieces/processors/contextManagementProcessor.d.ts +0 -40
  140. package/dist/processor-pieces/processors/contextManagementProcessor.js +0 -305
  141. package/dist/processor-pieces/processors/loopDetectionProcessor.d.ts +0 -30
  142. package/dist/processor-pieces/processors/loopDetectionProcessor.js +0 -137
  143. package/dist/processor-pieces/processors/responseValidationProcessor.d.ts +0 -30
  144. package/dist/processor-pieces/processors/responseValidationProcessor.js +0 -228
  145. package/dist/processor-pieces/processors/telemetryProcessor.d.ts +0 -99
  146. package/dist/processor-pieces/processors/telemetryProcessor.js +0 -311
  147. package/dist/processor-pieces/processors/tokenManagementProcessor.d.ts +0 -37
  148. package/dist/processor-pieces/processors/tokenManagementProcessor.js +0 -178
  149. package/dist/processor-pieces/processors/toolExecutionProcessor.d.ts +0 -43
  150. package/dist/processor-pieces/processors/toolExecutionProcessor.js +0 -207
  151. package/dist/processor-pieces/tools/fileTools.d.ts +0 -26
  152. package/dist/processor-pieces/tools/fileTools.js +0 -162
  153. package/dist/promptbuilder.d.ts +0 -382
  154. package/dist/promptbuilder.js +0 -805
  155. package/dist/systemprompt.d.ts +0 -20
  156. package/dist/systemprompt.js +0 -48
  157. package/dist/taskInstruction.d.ts +0 -37
  158. package/dist/taskInstruction.js +0 -57
  159. package/dist/usermessage.d.ts +0 -70
  160. package/dist/usermessage.js +0 -123
@@ -1,20 +0,0 @@
1
- /**
2
- * SystemPrompt class for loading and managing system prompts from YAML files
3
- */
4
- declare class SystemPrompt {
5
- private filepath;
6
- private key;
7
- /**
8
- * Creates a SystemPrompt instance
9
- * @param {string} filepath - Path to the YAML file containing prompts
10
- * @param {string} key - Key identifier for the specific prompt
11
- */
12
- constructor(filepath?: string, key?: string);
13
- /**
14
- * Loads and returns the prompt text
15
- * @returns {string} The prompt text
16
- * @throws {Error} If file cannot be read or parsed
17
- */
18
- toPromptText(): string;
19
- }
20
- export { SystemPrompt };
@@ -1,48 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.SystemPrompt = void 0;
7
- const js_yaml_1 = __importDefault(require("js-yaml"));
8
- const fs_1 = __importDefault(require("fs"));
9
- const path_1 = __importDefault(require("path"));
10
- /**
11
- * SystemPrompt class for loading and managing system prompts from YAML files
12
- */
13
- class SystemPrompt {
14
- /**
15
- * Creates a SystemPrompt instance
16
- * @param {string} filepath - Path to the YAML file containing prompts
17
- * @param {string} key - Key identifier for the specific prompt
18
- */
19
- constructor(filepath = "", key = "") {
20
- this.filepath = filepath;
21
- this.key = key;
22
- }
23
- /**
24
- * Loads and returns the prompt text
25
- * @returns {string} The prompt text
26
- * @throws {Error} If file cannot be read or parsed
27
- */
28
- toPromptText() {
29
- try {
30
- const absolutePath = path_1.default.resolve(this.filepath);
31
- const fileContents = fs_1.default.readFileSync(absolutePath, 'utf8');
32
- const data = js_yaml_1.default.load(fileContents);
33
- if (!data || typeof data !== 'object') {
34
- throw new Error('Invalid YAML structure');
35
- }
36
- if (!data[this.key]) {
37
- throw new Error(`Prompt not found for key: ${this.key}`);
38
- }
39
- const promptData = data[this.key];
40
- return typeof promptData === 'string' ? promptData : promptData.prompt;
41
- }
42
- catch (error) {
43
- console.error(`SystemPrompt Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
44
- throw error; // Re-throw to allow caller handling
45
- }
46
- }
47
- }
48
- exports.SystemPrompt = SystemPrompt;
@@ -1,37 +0,0 @@
1
- import { UserMessage } from "./usermessage";
2
- import type { UserMessageContent } from "./types/libFunctionTypes";
3
- import type { Tools, UserMessages } from "./types/InternalTypes";
4
- /**
5
- * Class representing a task instruction.
6
- * Handles loading task data and converting it to prompts.
7
- */
8
- declare class TaskInstruction {
9
- /** Available tools for the task */
10
- tools: Tools;
11
- /** Messages from the user for this task */
12
- userMessages: UserMessageContent[];
13
- /** The user message object containing input */
14
- userMessage: UserMessage;
15
- /** Path to the YAML file with task instructions */
16
- filepath: string;
17
- /** The section reference within the YAML file */
18
- refsection: string;
19
- /**
20
- * Creates a new TaskInstruction instance.
21
- *
22
- * @param tools - Tools available for this task
23
- * @param userMessage - User message containing task instructions
24
- * @param filepath - Path to the YAML file with task data
25
- * @param refsection - Section name within the YAML file
26
- */
27
- constructor(tools: Tools | undefined, userMessage: UserMessage, filepath?: string, refsection?: string);
28
- /**
29
- * Converts the task instruction to a prompt format.
30
- * Loads data from YAML file and combines with user message.
31
- *
32
- * @returns Promise with an array of user message content blocks
33
- * @throws Error if there's an issue processing the task instruction
34
- */
35
- toPrompt(): Promise<UserMessages[]>;
36
- }
37
- export { TaskInstruction };
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TaskInstruction = void 0;
4
- /**
5
- * Encapsulates task instructions and their related metadata.
6
- * Handles loading and processing of task instructions from YAML files.
7
- */
8
- const yaml = require('js-yaml');
9
- const fs = require('fs');
10
- const path = require('path');
11
- /**
12
- * Class representing a task instruction.
13
- * Handles loading task data and converting it to prompts.
14
- */
15
- class TaskInstruction {
16
- /**
17
- * Creates a new TaskInstruction instance.
18
- *
19
- * @param tools - Tools available for this task
20
- * @param userMessage - User message containing task instructions
21
- * @param filepath - Path to the YAML file with task data
22
- * @param refsection - Section name within the YAML file
23
- */
24
- constructor(tools = {}, userMessage, filepath = "", refsection = "") {
25
- /** Messages from the user for this task */
26
- this.userMessages = [];
27
- this.tools = tools;
28
- this.userMessage = userMessage;
29
- this.filepath = filepath;
30
- this.refsection = refsection;
31
- }
32
- /**
33
- * Converts the task instruction to a prompt format.
34
- * Loads data from YAML file and combines with user message.
35
- *
36
- * @returns Promise with an array of user message content blocks
37
- * @throws Error if there's an issue processing the task instruction
38
- */
39
- async toPrompt() {
40
- try {
41
- this.userMessages = await this.userMessage.toPrompt();
42
- const fileContents = fs.readFileSync(path.resolve(this.filepath), 'utf8');
43
- const data = yaml.load(fileContents);
44
- const task = data[this.refsection];
45
- this.userMessages.push({
46
- type: "text",
47
- text: `Task Description: ${task.description}\nExpected Output: ${task.expected_output}`
48
- });
49
- return this.userMessages;
50
- }
51
- catch (error) {
52
- console.error(`Error processing task instruction: ${error}`);
53
- throw error;
54
- }
55
- }
56
- }
57
- exports.TaskInstruction = TaskInstruction;
@@ -1,70 +0,0 @@
1
- import type { UserMessageContent } from "./types/libFunctionTypes";
2
- import type { Agent } from "./types/commonTypes";
3
- import type { Message } from "./types/InternalTypes";
4
- /**
5
- * Class that processes and manages user messages.
6
- * Handles converting messages to prompts and extracting mentioned entities.
7
- */
8
- declare class UserMessage {
9
- /** The message content and metadata */
10
- message: Message;
11
- /** Whether to override the default prompt generation */
12
- promptOverride: boolean;
13
- /** Array of content blocks for the user message */
14
- userMessages: UserMessageContent[];
15
- /** List of MCP tools mentioned in the message */
16
- mentionedMCPs: {
17
- toolbox: string;
18
- toolName: string;
19
- }[];
20
- /**
21
- * Creates a new UserMessage instance.
22
- *
23
- * @param message - The message content and metadata
24
- * @param promptOverride - Whether to override default prompt generation
25
- */
26
- constructor(message: Message, promptOverride?: boolean);
27
- /**
28
- * Gets files mentioned in the message.
29
- * Currently a placeholder for implementation.
30
- */
31
- getFiles(): void;
32
- /**
33
- * Converts the user message to a prompt format.
34
- *
35
- * @param bAttachFiles - Whether to attach file contents
36
- * @param bAttachImages - Whether to attach images
37
- * @param bAttachEnvironment - Whether to attach environment details
38
- * @returns Promise with an array of content blocks for the prompt
39
- */
40
- toPrompt(bAttachFiles?: boolean, bAttachImages?: boolean, bAttachEnvironment?: boolean, supportRemix?: boolean): Promise<UserMessageContent[]>;
41
- /**
42
- * Gets agents mentioned in the message.
43
- *
44
- * @returns Array of agent objects
45
- */
46
- getMentionedAgents(): Agent[];
47
- /**
48
- * Gets MCP tools mentioned in the message.
49
- *
50
- * @returns Array of MCP tool names
51
- */
52
- getMentionedMcps(): {
53
- toolbox: string;
54
- toolName: string;
55
- }[];
56
- /**
57
- * Gets MCP tools in a format suitable for the LLM.
58
- *
59
- * @returns Promise with an array of MCP tools
60
- */
61
- getMentionedMcpsTools(): Promise<any[] | undefined>;
62
- /**
63
- * Gets environment details for the current working directory.
64
- *
65
- * @param cwd - The current working directory path
66
- * @returns Promise with a string containing environment details
67
- */
68
- private getEnvironmentDetail;
69
- }
70
- export { UserMessage };
@@ -1,123 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.UserMessage = void 0;
7
- const codeboltjs_1 = __importDefault(require("@codebolt/codeboltjs"));
8
- const { fs: cbfs, project, mcp } = codeboltjs_1.default;
9
- // All interfaces moved to appropriate type files
10
- /**
11
- * Class that processes and manages user messages.
12
- * Handles converting messages to prompts and extracting mentioned entities.
13
- */
14
- class UserMessage {
15
- /**
16
- * Creates a new UserMessage instance.
17
- *
18
- * @param message - The message content and metadata
19
- * @param promptOverride - Whether to override default prompt generation
20
- */
21
- constructor(message, promptOverride = false) {
22
- /**
23
- * Gets environment details for the current working directory.
24
- *
25
- * @param cwd - The current working directory path
26
- * @returns Promise with a string containing environment details
27
- */
28
- this.getEnvironmentDetail = async (cwd) => {
29
- let details = "";
30
- const { success, result } = await cbfs.listFile(cwd, true);
31
- details += `\n\n# Current Working Directory (${cwd}) Files\n${result}
32
- ? "\n(Note: Only top-level contents shown for Desktop by default. Use list_files to explore further if necessary.)"
33
- : ""
34
- }`;
35
- return `<environment_details>\n${details.trim()}\n</environment_details>`;
36
- };
37
- this.message = message;
38
- this.promptOverride = promptOverride;
39
- this.userMessages = [];
40
- this.mentionedMCPs = message.mentionedMCPs || [];
41
- }
42
- /**
43
- * Gets files mentioned in the message.
44
- * Currently a placeholder for implementation.
45
- */
46
- getFiles() {
47
- // Implementation to be added
48
- }
49
- /**
50
- * Converts the user message to a prompt format.
51
- *
52
- * @param bAttachFiles - Whether to attach file contents
53
- * @param bAttachImages - Whether to attach images
54
- * @param bAttachEnvironment - Whether to attach environment details
55
- * @returns Promise with an array of content blocks for the prompt
56
- */
57
- async toPrompt(bAttachFiles = true, bAttachImages = true, bAttachEnvironment = true, supportRemix = true) {
58
- var _a;
59
- if (bAttachFiles) {
60
- if (this.promptOverride) {
61
- // Use a rendering engine
62
- }
63
- else {
64
- let finalPrompt = `
65
- The user has sent the following query:
66
- <user_query> ${this.message.userMessage} </user_query>.
67
- `;
68
- if ((_a = this.message.mentionedFiles) === null || _a === void 0 ? void 0 : _a.length) {
69
- finalPrompt += `The Attached files are:`;
70
- for (const file of this.message.mentionedFiles) {
71
- let filedata = await cbfs.readFile(file);
72
- finalPrompt += `File Name: ${file}, File Path: ${file}, Filedata: ${filedata}`;
73
- }
74
- }
75
- this.userMessages.push({ type: "text", text: finalPrompt });
76
- }
77
- }
78
- if (bAttachEnvironment) {
79
- let { projectPath } = await project.getProjectPath();
80
- if (projectPath) {
81
- const environmentDetail = await this.getEnvironmentDetail(projectPath);
82
- this.userMessages.push({ type: "text", text: environmentDetail });
83
- }
84
- }
85
- if (supportRemix) {
86
- if (this.message.remixPrompt)
87
- this.userMessages.push({ type: "text", text: this.message.remixPrompt });
88
- }
89
- return this.userMessages;
90
- }
91
- /**
92
- * Gets agents mentioned in the message.
93
- *
94
- * @returns Array of agent objects
95
- */
96
- getMentionedAgents() {
97
- //TODO : get config in tool format if neede
98
- return this.message.mentionedAgents || [];
99
- }
100
- /**
101
- * Gets MCP tools mentioned in the message.
102
- *
103
- * @returns Array of MCP tool names
104
- */
105
- getMentionedMcps() {
106
- return this.message.mentionedMCPs || [];
107
- }
108
- /**
109
- * Gets MCP tools in a format suitable for the LLM.
110
- *
111
- * @returns Promise with an array of MCP tools
112
- */
113
- async getMentionedMcpsTools() {
114
- if (this.mentionedMCPs.length > 0) {
115
- const { data } = await mcp.getTools(this.mentionedMCPs);
116
- return data;
117
- }
118
- else {
119
- return [];
120
- }
121
- }
122
- }
123
- exports.UserMessage = UserMessage;