repoburg 1.1.10 → 1.2.0
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/backend/dist/src/action-execution/action-execution.module.js +2 -0
- package/backend/dist/src/action-execution/action-execution.module.js.map +1 -1
- package/backend/dist/src/action-execution/action-execution.service.d.ts +7 -0
- package/backend/dist/src/action-execution/action-execution.service.js +22 -2
- package/backend/dist/src/action-execution/action-execution.service.js.map +1 -1
- package/backend/dist/src/ai-actions/ai-action-batch.service.js +18 -0
- package/backend/dist/src/ai-actions/ai-action-batch.service.js.map +1 -1
- package/backend/dist/src/ai-actions/ai-action-creation.service.js +34 -2
- package/backend/dist/src/ai-actions/ai-action-creation.service.js.map +1 -1
- package/backend/dist/src/ai-actions/ai-actions.module.js +2 -0
- package/backend/dist/src/ai-actions/ai-actions.module.js.map +1 -1
- package/backend/dist/src/app.module.js +4 -0
- package/backend/dist/src/app.module.js.map +1 -1
- package/backend/dist/src/core-entities/ai-action.entity.d.ts +3 -0
- package/backend/dist/src/core-entities/ai-action.entity.js +12 -0
- package/backend/dist/src/core-entities/ai-action.entity.js.map +1 -1
- package/backend/dist/src/core-entities/index.d.ts +2 -0
- package/backend/dist/src/core-entities/index.js +2 -0
- package/backend/dist/src/core-entities/index.js.map +1 -1
- package/backend/dist/src/core-entities/mcp-config.entity.d.ts +8 -0
- package/backend/dist/src/core-entities/mcp-config.entity.js +42 -0
- package/backend/dist/src/core-entities/mcp-config.entity.js.map +1 -0
- package/backend/dist/src/core-entities/mcp-tool.entity.d.ts +8 -0
- package/backend/dist/src/core-entities/mcp-tool.entity.js +44 -0
- package/backend/dist/src/core-entities/mcp-tool.entity.js.map +1 -0
- package/backend/dist/src/llm-response-parser/dto/ai-action.dto.d.ts +6 -1
- package/backend/dist/src/llm-response-parser/dto/ai-action.dto.js +28 -0
- package/backend/dist/src/llm-response-parser/dto/ai-action.dto.js.map +1 -1
- package/backend/dist/src/llm-response-parser/llm-response-parser.service.js +18 -2
- package/backend/dist/src/llm-response-parser/llm-response-parser.service.js.map +1 -1
- package/backend/dist/src/llm-response-parser/parsing.constants.d.ts +3 -0
- package/backend/dist/src/llm-response-parser/parsing.constants.js +4 -1
- package/backend/dist/src/llm-response-parser/parsing.constants.js.map +1 -1
- package/backend/dist/src/llm-responses/llm-responses.module.js +2 -0
- package/backend/dist/src/llm-responses/llm-responses.module.js.map +1 -1
- package/backend/dist/src/llm-responses/llm-responses.service.d.ts +3 -1
- package/backend/dist/src/llm-responses/llm-responses.service.js +8 -5
- package/backend/dist/src/llm-responses/llm-responses.service.js.map +1 -1
- package/backend/dist/src/mcp/dto/batch-update-mcp-tools.dto.d.ts +4 -0
- package/backend/dist/src/mcp/dto/batch-update-mcp-tools.dto.js +28 -0
- package/backend/dist/src/mcp/dto/batch-update-mcp-tools.dto.js.map +1 -0
- package/backend/dist/src/mcp/dto/create-mcp-config.dto.d.ts +3 -0
- package/backend/dist/src/mcp/dto/create-mcp-config.dto.js +23 -0
- package/backend/dist/src/mcp/dto/create-mcp-config.dto.js.map +1 -0
- package/backend/dist/src/mcp/dto/update-mcp-config.dto.d.ts +3 -0
- package/backend/dist/src/mcp/dto/update-mcp-config.dto.js +22 -0
- package/backend/dist/src/mcp/dto/update-mcp-config.dto.js.map +1 -0
- package/backend/dist/src/mcp/mcp.controller.d.ts +16 -0
- package/backend/dist/src/mcp/mcp.controller.js +91 -0
- package/backend/dist/src/mcp/mcp.controller.js.map +1 -0
- package/backend/dist/src/mcp/mcp.module.d.ts +2 -0
- package/backend/dist/src/mcp/mcp.module.js +26 -0
- package/backend/dist/src/mcp/mcp.module.js.map +1 -0
- package/backend/dist/src/mcp/mcp.service.d.ts +27 -0
- package/backend/dist/src/mcp/mcp.service.js +263 -0
- package/backend/dist/src/mcp/mcp.service.js.map +1 -0
- package/backend/dist/src/seeding/data/context-templates/open-pr-command.d.ts +1 -1
- package/backend/dist/src/seeding/data/context-templates/open-pr-command.js +1 -1
- package/backend/dist/src/seeding/data/mcp-configs/default-configs.d.ts +1 -0
- package/backend/dist/src/seeding/data/mcp-configs/default-configs.js +5 -0
- package/backend/dist/src/seeding/data/mcp-configs/default-configs.js.map +1 -0
- package/backend/dist/src/seeding/data/system-prompts/default_master-agent.d.ts +1 -1
- package/backend/dist/src/seeding/data/system-prompts/default_master-agent.js +126 -41
- package/backend/dist/src/seeding/data/system-prompts/default_master-agent.js.map +1 -1
- package/backend/dist/src/seeding/mcp-config-seeding.service.d.ts +8 -0
- package/backend/dist/src/seeding/mcp-config-seeding.service.js +50 -0
- package/backend/dist/src/seeding/mcp-config-seeding.service.js.map +1 -0
- package/backend/dist/src/seeding/seeding.module.js +10 -1
- package/backend/dist/src/seeding/seeding.module.js.map +1 -1
- package/backend/dist/src/seeding/seeding.service.d.ts +3 -1
- package/backend/dist/src/seeding/seeding.service.js +6 -2
- package/backend/dist/src/seeding/seeding.service.js.map +1 -1
- package/backend/dist/src/system-prompts/system-prompts.controller.d.ts +1 -0
- package/backend/dist/src/system-prompts/system-prompts.controller.js +10 -0
- package/backend/dist/src/system-prompts/system-prompts.controller.js.map +1 -1
- package/backend/dist/src/system-prompts/system-prompts.module.js +2 -1
- package/backend/dist/src/system-prompts/system-prompts.module.js.map +1 -1
- package/backend/dist/src/system-prompts/system-prompts.service.d.ts +5 -1
- package/backend/dist/src/system-prompts/system-prompts.service.js +52 -8
- package/backend/dist/src/system-prompts/system-prompts.service.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var McpService_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.McpService = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
19
|
+
const typeorm_2 = require("typeorm");
|
|
20
|
+
const core_entities_1 = require("../core-entities");
|
|
21
|
+
const index_js_1 = require("@modelcontextprotocol/sdk/client/index.js");
|
|
22
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/client/stdio.js");
|
|
23
|
+
let McpService = McpService_1 = class McpService {
|
|
24
|
+
constructor(mcpConfigRepository, mcpToolRepository) {
|
|
25
|
+
this.mcpConfigRepository = mcpConfigRepository;
|
|
26
|
+
this.mcpToolRepository = mcpToolRepository;
|
|
27
|
+
this.logger = new common_1.Logger(McpService_1.name);
|
|
28
|
+
this.activeClients = new Map();
|
|
29
|
+
}
|
|
30
|
+
async onModuleInit() {
|
|
31
|
+
this.logger.log('Initializing MCP connections...');
|
|
32
|
+
const configs = await this.mcpConfigRepository.find({
|
|
33
|
+
where: { is_active: true },
|
|
34
|
+
});
|
|
35
|
+
if (configs.length === 0) {
|
|
36
|
+
this.logger.warn('No active MCP configurations found. MCP tools will be unavailable.');
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
for (const config of configs) {
|
|
40
|
+
await this.connectToServer(config);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
async onModuleDestroy() {
|
|
44
|
+
this.logger.log('Closing all active MCP connections...');
|
|
45
|
+
await Promise.all(Array.from(this.activeClients.keys()).map((serverName) => this.disconnectFromServer(serverName)));
|
|
46
|
+
}
|
|
47
|
+
async connectToServer(config) {
|
|
48
|
+
const { server_name, command, args, env } = config;
|
|
49
|
+
if (this.activeClients.has(server_name)) {
|
|
50
|
+
this.logger.log(`Already connected to ${server_name}. Skipping.`);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
this.logger.log(`Attempting to connect to MCP server: ${server_name}`);
|
|
54
|
+
try {
|
|
55
|
+
const transport = new stdio_js_1.StdioClientTransport({ command, args, env });
|
|
56
|
+
const client = new index_js_1.Client({
|
|
57
|
+
name: `repoburg-backend-${server_name}`,
|
|
58
|
+
version: '1.0.0',
|
|
59
|
+
});
|
|
60
|
+
client.connect(transport);
|
|
61
|
+
const toolsResult = await client.listTools();
|
|
62
|
+
if (!toolsResult || !toolsResult.tools) {
|
|
63
|
+
throw new Error('Invalid or empty tool list received from server.');
|
|
64
|
+
}
|
|
65
|
+
this.logger.log(`Connected to ${server_name}. Discovered ${toolsResult.tools.length} tools.`);
|
|
66
|
+
this.activeClients.set(server_name, client);
|
|
67
|
+
await this.syncToolsToDb(server_name, toolsResult.tools);
|
|
68
|
+
}
|
|
69
|
+
catch (e) {
|
|
70
|
+
this.logger.error(`Failed to connect to MCP server "${server_name}": ${e.message}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
async disconnectFromServer(serverName) {
|
|
74
|
+
const client = this.activeClients.get(serverName);
|
|
75
|
+
if (client) {
|
|
76
|
+
try {
|
|
77
|
+
await client.close();
|
|
78
|
+
this.activeClients.delete(serverName);
|
|
79
|
+
this.logger.log(`Disconnected from ${serverName}`);
|
|
80
|
+
}
|
|
81
|
+
catch (e) {
|
|
82
|
+
this.logger.error(`Error disconnecting from ${serverName}: ${e.message}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
async syncToolsToDb(serverName, tools) {
|
|
87
|
+
this.logger.log(`Syncing tools for server: ${serverName}`);
|
|
88
|
+
const validTools = tools.filter((tool) => !!tool.name);
|
|
89
|
+
const existingTools = await this.mcpToolRepository.find({
|
|
90
|
+
where: { server_name: serverName },
|
|
91
|
+
});
|
|
92
|
+
const existingToolsMap = new Map(existingTools.map((t) => [t.tool_name, t]));
|
|
93
|
+
const toolsToSave = [];
|
|
94
|
+
for (const sdkTool of validTools) {
|
|
95
|
+
const existingTool = existingToolsMap.get(sdkTool.name);
|
|
96
|
+
if (existingTool) {
|
|
97
|
+
existingTool.description = sdkTool.description || '';
|
|
98
|
+
existingTool.input_schema = sdkTool.inputSchema || {};
|
|
99
|
+
toolsToSave.push(existingTool);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
toolsToSave.push(this.mcpToolRepository.create({
|
|
103
|
+
server_name: serverName,
|
|
104
|
+
tool_name: sdkTool.name,
|
|
105
|
+
description: sdkTool.description || '',
|
|
106
|
+
input_schema: sdkTool.inputSchema || {},
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
await this.mcpToolRepository.save(toolsToSave);
|
|
111
|
+
const newToolNames = validTools.map((t) => t.name);
|
|
112
|
+
const toolsToDelete = existingTools.filter((t) => !newToolNames.includes(t.tool_name));
|
|
113
|
+
if (toolsToDelete.length > 0) {
|
|
114
|
+
await this.mcpToolRepository.remove(toolsToDelete);
|
|
115
|
+
}
|
|
116
|
+
this.logger.log(`Successfully synced tools for ${serverName}. Saved: ${toolsToSave.length}, Deleted: ${toolsToDelete.length}`);
|
|
117
|
+
}
|
|
118
|
+
async createMcpConfig(configJson) {
|
|
119
|
+
let parsedConfig;
|
|
120
|
+
try {
|
|
121
|
+
parsedConfig = JSON.parse(configJson);
|
|
122
|
+
}
|
|
123
|
+
catch (e) {
|
|
124
|
+
throw new common_1.BadRequestException('Invalid JSON format.');
|
|
125
|
+
}
|
|
126
|
+
const serverName = Object.keys(parsedConfig)[0];
|
|
127
|
+
if (!serverName) {
|
|
128
|
+
throw new common_1.BadRequestException('JSON must have a root key as the server name.');
|
|
129
|
+
}
|
|
130
|
+
const configData = parsedConfig[serverName];
|
|
131
|
+
if (!configData || !configData.command || !configData.args) {
|
|
132
|
+
throw new common_1.BadRequestException('Configuration must include "command" and "args" properties.');
|
|
133
|
+
}
|
|
134
|
+
const existingConfig = await this.mcpConfigRepository.findOneBy({
|
|
135
|
+
server_name: serverName,
|
|
136
|
+
});
|
|
137
|
+
if (existingConfig) {
|
|
138
|
+
throw new common_1.BadRequestException(`A configuration for "${serverName}" already exists.`);
|
|
139
|
+
}
|
|
140
|
+
const newConfig = this.mcpConfigRepository.create({
|
|
141
|
+
server_name: serverName,
|
|
142
|
+
command: configData.command,
|
|
143
|
+
args: configData.args,
|
|
144
|
+
env: configData.env || {},
|
|
145
|
+
is_active: true,
|
|
146
|
+
});
|
|
147
|
+
const savedConfig = await this.mcpConfigRepository.save(newConfig);
|
|
148
|
+
await this.connectToServer(savedConfig);
|
|
149
|
+
return savedConfig;
|
|
150
|
+
}
|
|
151
|
+
async updateMcpConfigStatus(serverName, isActive) {
|
|
152
|
+
const config = await this.mcpConfigRepository.findOneBy({
|
|
153
|
+
server_name: serverName,
|
|
154
|
+
});
|
|
155
|
+
if (!config) {
|
|
156
|
+
throw new common_1.NotFoundException(`MCP configuration for "${serverName}" not found.`);
|
|
157
|
+
}
|
|
158
|
+
config.is_active = isActive;
|
|
159
|
+
await this.mcpConfigRepository.save(config);
|
|
160
|
+
if (isActive) {
|
|
161
|
+
await this.connectToServer(config);
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
await this.disconnectFromServer(serverName);
|
|
165
|
+
}
|
|
166
|
+
return config;
|
|
167
|
+
}
|
|
168
|
+
async deleteMcpConfig(serverName) {
|
|
169
|
+
const config = await this.mcpConfigRepository.findOneBy({
|
|
170
|
+
server_name: serverName,
|
|
171
|
+
});
|
|
172
|
+
if (!config) {
|
|
173
|
+
throw new common_1.NotFoundException(`MCP configuration for "${serverName}" not found.`);
|
|
174
|
+
}
|
|
175
|
+
await this.disconnectFromServer(serverName);
|
|
176
|
+
await this.mcpToolRepository.delete({ server_name: serverName });
|
|
177
|
+
await this.mcpConfigRepository.remove(config);
|
|
178
|
+
}
|
|
179
|
+
async batchUpdateToolStatus(toolIds, isActive) {
|
|
180
|
+
if (toolIds.length === 0) {
|
|
181
|
+
return { affected: 0 };
|
|
182
|
+
}
|
|
183
|
+
const result = await this.mcpToolRepository.update({ id: (0, typeorm_2.In)(toolIds) }, { is_active: isActive });
|
|
184
|
+
return { affected: result.affected || 0 };
|
|
185
|
+
}
|
|
186
|
+
async getMcpServers() {
|
|
187
|
+
const configs = await this.mcpConfigRepository.find({
|
|
188
|
+
order: { server_name: 'ASC' },
|
|
189
|
+
});
|
|
190
|
+
const tools = await this.mcpToolRepository.find({
|
|
191
|
+
order: { tool_name: 'ASC' },
|
|
192
|
+
});
|
|
193
|
+
const toolsByServer = new Map();
|
|
194
|
+
for (const tool of tools) {
|
|
195
|
+
if (!toolsByServer.has(tool.server_name)) {
|
|
196
|
+
toolsByServer.set(tool.server_name, []);
|
|
197
|
+
}
|
|
198
|
+
toolsByServer.get(tool.server_name).push({
|
|
199
|
+
id: tool.id,
|
|
200
|
+
tool_name: tool.tool_name,
|
|
201
|
+
description: tool.description,
|
|
202
|
+
input_schema: tool.input_schema,
|
|
203
|
+
is_active: tool.is_active,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
return configs.map((config) => ({
|
|
207
|
+
server_name: config.server_name,
|
|
208
|
+
description: `Tools available from the ${config.server_name} server.`,
|
|
209
|
+
is_active: config.is_active,
|
|
210
|
+
tools: toolsByServer.get(config.server_name) || [],
|
|
211
|
+
}));
|
|
212
|
+
}
|
|
213
|
+
async executeMcpTool(serverName, toolName, args) {
|
|
214
|
+
this.logger.log(`Executing MCP tool: ${serverName}.${toolName} with args: ${JSON.stringify(args)}`);
|
|
215
|
+
const client = this.activeClients.get(serverName);
|
|
216
|
+
if (!client) {
|
|
217
|
+
const errorMsg = `No active MCP connection found for server: ${serverName}`;
|
|
218
|
+
this.logger.error(errorMsg);
|
|
219
|
+
return { stdout: '', stderr: errorMsg };
|
|
220
|
+
}
|
|
221
|
+
try {
|
|
222
|
+
const result = await client.callTool({ name: toolName, arguments: args });
|
|
223
|
+
const stdout = JSON.stringify(result, null, 2);
|
|
224
|
+
return { stdout, stderr: '' };
|
|
225
|
+
}
|
|
226
|
+
catch (e) {
|
|
227
|
+
this.logger.error(`Error calling tool ${toolName} on ${serverName}: ${e.message}`);
|
|
228
|
+
return { stdout: '', stderr: e.message };
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
async getMcpToolsDefinition() {
|
|
232
|
+
const servers = await this.getMcpServers();
|
|
233
|
+
const activeServers = servers.filter((s) => s.is_active);
|
|
234
|
+
if (activeServers.length === 0) {
|
|
235
|
+
return 'No active MCP servers are currently connected.';
|
|
236
|
+
}
|
|
237
|
+
let definition = '';
|
|
238
|
+
for (const server of activeServers) {
|
|
239
|
+
const activeTools = server.tools.filter((t) => t.is_active);
|
|
240
|
+
if (activeTools.length === 0)
|
|
241
|
+
continue;
|
|
242
|
+
definition += `### Server: ${server.server_name}\n`;
|
|
243
|
+
definition += `Description: ${server.description}\n`;
|
|
244
|
+
definition += 'Tools:\n';
|
|
245
|
+
for (const tool of activeTools) {
|
|
246
|
+
definition += `- **${tool.tool_name}**\n`;
|
|
247
|
+
definition += ` - Description: ${tool.description}\n`;
|
|
248
|
+
definition += ` - Input Schema: \`${JSON.stringify(tool.input_schema)}\`\n`;
|
|
249
|
+
}
|
|
250
|
+
definition += '\n';
|
|
251
|
+
}
|
|
252
|
+
return definition;
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
exports.McpService = McpService;
|
|
256
|
+
exports.McpService = McpService = McpService_1 = __decorate([
|
|
257
|
+
(0, common_1.Injectable)(),
|
|
258
|
+
__param(0, (0, typeorm_1.InjectRepository)(core_entities_1.McpConfig)),
|
|
259
|
+
__param(1, (0, typeorm_1.InjectRepository)(core_entities_1.McpTool)),
|
|
260
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
261
|
+
typeorm_2.Repository])
|
|
262
|
+
], McpService);
|
|
263
|
+
//# sourceMappingURL=mcp.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.service.js","sourceRoot":"","sources":["../../../src/mcp/mcp.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAOwB;AACxB,6CAAmD;AACnD,qCAAyC;AACzC,oDAAsD;AACtD,wEAAmE;AACnE,wEAAiF;AAW1E,IAAM,UAAU,kBAAhB,MAAM,UAAU;IAIrB,YAEE,mBAA2D,EAE3D,iBAAuD;QAFtC,wBAAmB,GAAnB,mBAAmB,CAAuB;QAE1C,sBAAiB,GAAjB,iBAAiB,CAAqB;QAPxC,WAAM,GAAG,IAAI,eAAM,CAAC,YAAU,CAAC,IAAI,CAAC,CAAC;QACrC,kBAAa,GAAG,IAAI,GAAG,EAAkB,CAAC;IAOxD,CAAC;IAEJ,KAAK,CAAC,YAAY;QAChB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;QACnD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC;YAClD,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;SAC3B,CAAC,CAAC;QACH,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,oEAAoE,CACrE,CAAC;YACF,OAAO;QACT,CAAC;QAED,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IAED,KAAK,CA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CAClB,MAAM,CAAC;YACV,CAAC;YACD,UAAU,IAAI,IAAI,CAAC;QACrB,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAA;AAnUY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;IAMR,WAAA,IAAA,0BAAgB,EAAC,yBAAS,CAAC,CAAA;IAE3B,WAAA,IAAA,0BAAgB,EAAC,uBAAO,CAAC,CAAA;qCADY,oBAAU;QAEZ,oBAAU;GARrC,UAAU,CAmUtB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const template_name = "Open PR";
|
|
2
|
-
export declare const template_content = "You are a Pull-Request Assistant. Your job is to:\n\n1. Read the diff and infer the intent and impact of the changes.\n\nHere is the diff:\n\n------------DIFF STARTS HERE------------------\n\n<%~ await it.gitDiff('main') %>\n\n------------DIFF ENDS HERE------------------\n\nThen, based on the inferred intent and impact, generate a Pull Request (PR) description and title that clearly communicates the changes made. The PR should be structured, concise, and easy to understand for reviewers.\n\n2. Produce a PR title:\n \u2022 \u226450 characters\n \u2022 Imperative, present tense (\u201CAdd X\u201D, not \u201CAdded X\u201D)\n \u2022 Prefixed with a Conventional Commit type when relevant (feat:, fix:, refactor:, chore:)\n\n3. Produce a structured PR description with these sections (use Markdown headings):\n ### Context\n \u2013 Why the change was needed (max 3 bullets)\n ### What Changed\n \u2013 High-level summary of code changes (max 5 bullets)\n ### Testing\n \u2013 How to verify (max 5 bullets)\n ### Impact\n \u2013 Backward-compatibility concerns or side-effects (max 3 bullets)\n\nGuidelines:\n- Keep bullets concise.\n- Avoid internal jargon; write for someone new to the codebase.\n- If the diff is unclear or you need more info, ask the user a clarifying question before generating.\n\n\nACTION: run the command with proper values below with `run_command` tool call\n\n```\
|
|
2
|
+
export declare const template_content = "You are a Pull-Request Assistant. Your job is to:\n\n1. Read the diff and infer the intent and impact of the changes.\n\nHere is the diff:\n\n------------DIFF STARTS HERE------------------\n\n<%~ await it.gitDiff('main') %>\n\n------------DIFF ENDS HERE------------------\n\nThen, based on the inferred intent and impact, generate a Pull Request (PR) description and title that clearly communicates the changes made. The PR should be structured, concise, and easy to understand for reviewers.\n\n2. Produce a PR title:\n \u2022 \u226450 characters\n \u2022 Imperative, present tense (\u201CAdd X\u201D, not \u201CAdded X\u201D)\n \u2022 Prefixed with a Conventional Commit type when relevant (feat:, fix:, refactor:, chore:)\n\n3. Produce a structured PR description with these sections (use Markdown headings):\n ### Context\n \u2013 Why the change was needed (max 3 bullets)\n ### What Changed\n \u2013 High-level summary of code changes (max 5 bullets)\n ### Testing\n \u2013 How to verify (max 5 bullets)\n ### Impact\n \u2013 Backward-compatibility concerns or side-effects (max 3 bullets)\n\nGuidelines:\n- Keep bullets concise.\n- Avoid internal jargon; write for someone new to the codebase.\n- If the diff is unclear or you need more info, ask the user a clarifying question before generating.\n\n\nACTION: run the command with proper values below with `run_command` tool call\n\n```\nsource ~/.zshrc && cat <<'EOF' | gh pr create --base main --title \"feat: some title\" --body-file -\n### Context\n- some context\n\n### What Changed\n- some changes\n\n### Testing\n- some testing\n\n### Impact\n- some impact\nEOF\n```\n";
|
|
@@ -40,7 +40,7 @@ Guidelines:
|
|
|
40
40
|
ACTION: run the command with proper values below with \`run_command\` tool call
|
|
41
41
|
|
|
42
42
|
\`\`\`
|
|
43
|
-
cat <<'EOF' | gh pr create --base main --title "feat: some title" --body-file -
|
|
43
|
+
source ~/.zshrc && cat <<'EOF' | gh pr create --base main --title "feat: some title" --body-file -
|
|
44
44
|
### Context
|
|
45
45
|
- some context
|
|
46
46
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defaultMcpConfigs: any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-configs.js","sourceRoot":"","sources":["../../../../../src/seeding/data/mcp-configs/default-configs.ts"],"names":[],"mappings":";;;AAGa,QAAA,iBAAiB,GAAG,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "Master Agent";
|
|
2
|
-
export declare const content = "\n<ai>\n <definition> you are a software developer AI agent. you're talking to a software developer. your task is implementing new feature, fixing bugs, explaining codebase or just helping to the user</definition>\n\n <preparation-phase-loop>\n\n <clear-the-request>\n user provides a request for code or software development task. and they might provide relevant context (code files, file/folder tree structure, docs or code snippets).\n first make sure you understand the request. if you don't understand, ask for clarification.\n </clear-the-request>\n\n <build-context>\n you're always working within a code repository. meticulously search codebase to find where to work and find relevant examples or documentations.\n you have 2 tools:\n 1- `request_context`: with this tool you can ask files and folders. you will get the content of files in response. if you ask folder you will get all the files content in that folder and its subfolders.\n 2- `run_command`: with this tool you can run any command line commands. for example rg, tree, ls, find etc.\n\n this step is a loop. you should use this step as exploration phase.\n never stop exploring until you are 100% sure you have all the context you need to work on the request.\n </build-context>\n\n <propose-changes>\n if you reach this phase you are 100% sure you have all the context you need to work on the request.\n now you should propose the changes you will make to fulfill the request.\n be concise in your proposal. explain with code snippets if needed.\n\n use `final` tool to explain your proposal.\n </propose-changes>\n\n\n <desicion-point>\n if user agrees with your proposal, you can move to implementation phase.\n if user disagrees or wants changes, go back to `clear-the-request` phase.\n\n </desicion-point>\n\n </preparation-phase-loop>\n\n <implementation-phase>\n you will modify the codebase to fulfill the request. you can create, update or delete files.\n you have 1 tools:\n 1- `modify_file`: with this tool you can create, edit or delete files.\n\n\n scope: only code what you propose and user agrees. do not refactor code or change anything that is not related to the request.\n file size: keep files are small as possible. if a file is getting too big, split it into smaller files.\n commenting: only use comments when you absolutely need to explain something. otherwise write self-explanatory code.\n\n </implementation-phase>\n\n\n <user-feedbck>\n if user is not satisfied with your implementation, go back to `clear-the-request` phase.\n if user says `yolo` in response, you can continue. if you're done, explain what you did with `final` tool.\n \n </user-feedbck>\n\n <tools>\n\n you have 3 tools: `modify_file`, `request_context` and `run_command`. you also have `final` tool to explain your proposal or explain the task you did.\n make sure to use only one tool per action item. never combine multiple tools in a single action item or never generate multiple action items for same tool.\n make sure to follow the instructions for each tool below.\n\n <modify_file>\n\n Based on the user request, you must generate a numbered list of action items.\n Each action item represents the *complete* set of modifications for a *single* file.\n Action items are ordered sequentially.\n Each action item should be enclosed within `\u00A7ACTION_ITEM_START\u00A7` and `\u00A7ACTION_ITEM_END\u00A7` markers and include the following details using the `\u00A6FieldName\u00A6 Value` format:\n\n\n \u00A7TITLE_START\u00A7 very brief title for entire chat history including previous prompt, if current title is fine then leave it (max 4 words) \u00A7TITLE_END\u00A7\n\n * `\u00A6ActionNumber\u00A6`: The sequential identifier for the task.\n * `\u00A6TaskDescription\u00A6`: A concise description of **all** changes to be made to this particular file.\n * `\u00A6FilePath\u00A6`: The file path where the modification will occur (ensure it aligns with the *Project Files from Structure*).\n * `\u00A6FileAction\u00A6`: The operation to perform: `create_file`, `edit_file`, `delete_file`\n * `\u00A6Code\u00A6`:\n * For `create_file`: Provide the complete content of the new file within a code block.\n * For `edit_file`: Provide the complete content with modifications of the new file within a code block.\n * For `delete_file`: Leave this section empty or provide an empty code block.\n\n\n <example>\n\n \u00A7TITLE_START\u00A7 Refactor react components \u00A7TITLE_END\u00A7\n\n Explanation of the changes:\n 1. Create `ErrorBanner.tsx` component in `src/components/common` to display error messages.\n 2. Modify `ErrorBoundary.tsx` component in `src/components/common` to catch unrecoverable errors and prevent UI crashes.\n 3. Delete unused svg\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 1\n \u00A6TaskDescription\u00A6 Create `ErrorBanner.tsx` component in `src/components/common` to display error messages.\n \u00A6FilePath\u00A6 src/components/common/ErrorBanner.tsx\n \u00A6FileAction\u00A6 create_file\n \u00A6Code\u00A6\n ```typescript\n import React from 'react';\n\n // full content of the file\n\n export default ErrorBanner;\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n ---\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 2\n \u00A6TaskDescription\u00A6 Modify `ErrorBoundary.tsx` component in `src/components/common` to catch unrecoverable errors and prevent UI crashes.\n \u00A6FilePath\u00A6 src/components/common/ErrorBoundary.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n import React, { Component, ReactNode } from 'react';\n\n // full content of the file\n\n export default ErrorBoundary;\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n ---\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 3\n \u00A6TaskDescription\u00A6 Delete unused svg file.\n \u00A6FilePath\u00A6 src/asset/common/some.svg\n \u00A6FileAction\u00A6 delete_file\n \u00A6Code\u00A6\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n\n 1 action item only for 1 file. never combine multiple files in a single action item or never generate multiple action items for same file.\n\n <bad-example>\n <why> same file multiple action </why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 1\n \u00A6TaskDescription\u00A6 some description\n \u00A6FilePath\u00A6 src/same-file.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n\n // full content of the file\n\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 2\n \u00A6TaskDescription\u00A6 some other description\n \u00A6FilePath\u00A6 src/same-file.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n\n // full content of the file\n\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n </bad-example>\n\n <bad-example>\n <why> one action multiple file </why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 1\n \u00A6TaskDescription\u00A6 some description\n \u00A6FilePath\u00A6 src/same-file.tsx, src/another-file.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n\n // full content of the file\n\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n\n </bad-example>\n\n <bad-example>\n <why> partial content generation</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 1\n \u00A6TaskDescription\u00A6 some description\n \u00A6FilePath\u00A6 src/some-file.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n import React from 'react';\n // partial content of the file\n // missing rest of the file content\n ```\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n\n do not use + or - for diff, just use the whole content of the file.\n\n\n </modify_file>\n\n <request_context>\n\n The action item should be enclosed within `\u00A7ACTION_ITEM_START\u00A7` and `\u00A7ACTION_ITEM_END\u00A7` markers and include the following details using the `\u00A6FieldName\u00A6 Value` format:\n\n * `\u00A6FileAction\u00A6`: Always `request_context`.\n * `\u00A6Files\u00A6`: (Optional) A comma-separated list of file paths you need to see.\n * `\u00A6Folders\u00A6`: (Optional) A comma-separated list of folder paths you need to see.\n * `\u00A6Reason\u00A6`: A clear and detailed explanation of why you need this context to proceed with your analysis. You can also mention what you plan to investigate after receiving this new information.\n\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 request_context\n \u00A6Files\u00A6 src/components/common/ErrorBoundary.tsx, src/components/common/ErrorBanner.tsx\n \u00A6Reason\u00A6 I need to understand how error handling is currently implemented in the project. By examining the ErrorBoundary component, I can see how it catches errors and what fallback UI it provides. Additionally, reviewing the ErrorBanner component will help me understand how error messages are displayed to users. This context is crucial for implementing a new feature that enhances error reporting and user experience.\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 request_context\n \u00A6Folders\u00A6 src/components/common\n \u00A6Reason\u00A6 I need to explore the common components used across the application to identify reusable elements and understand the overall structure. This will help me in proposing changes that align with existing design patterns and ensure consistency in the user interface.\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n\n <bad-example>\n <why>multiple action item with request_context </why>\n \u00A7ACTION_ITEM_START\u00A7\n xxx some stuff xxx\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 request_context\n \u00A6Folders\u00A6 somefolder1\n \u00A6Reason\u00A6 some explanation 2\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n you must generate only one action_item for `request_context`\n\n </request_context>\n\n <run_command>\n\n Use to execute safe, read-only shell commands for exploration (e.g., `ls`, `tree`, `rg`).\n if user tell you to run a command then you can run that command as well.\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 rg --files . | head -n 20\n \u00A6Reason\u00A6 I want to get a quick overview of the first 20 files in the repository to understand its structure and identify key files that might be relevant to the user's request.\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n - when you use rg command always use target path like . to restrict the search to the current directory. GOOD usage `rg -i \"xxx\" .` BAD usage `rg -i \"xxx\"`\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 rg 'ErrorBoundary' .\n \u00A6Reason\u00A6 I want to locate all occurrences of the 'ErrorBoundary' component in the codebase\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 ls -R src/components/common\n \u00A6Reason\u00A6 I want to list all files and directories within the `src/components/common\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 tree -L 2 src/components\n \u00A6Reason\u00A6 I want to understand the structure of the `src/components` directory\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 find src/components -type d -name 'common'\n \u00A6Reason\u00A6 I want to locate the `common` directory within `src/components`\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <bad-example>\n <why>multiple action item with run_command </why>\n \u00A7ACTION_ITEM_START\u00A7\n xxx some stuff xxx\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 some command 1\n \u00A6Reason\u00A6 some explanation 1\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n\n you must generate only one action_item for `run_command`\n you can use other cli commands as well, but avoid using any command that modifies the codebase.\n\n </run_command>\n\n\n <final>\n\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 final\n \u00A6plain\u00A6\n some explanation about the of the task.\n you can generate multiple lines if needed.\n \u00A7ACTION_ITEM_END\u00A7\n </final>\n\n </tools>\n</ai>\n\n";
|
|
2
|
+
export declare const content = "\n<ai>\n <definition>you are a software developer AI agent. you're talking to a software developer. your task is implementing\n new feature, fixing bugs, explaining codebase or just helping to the user\n </definition>\n\n <preparation-phase-loop>\n\n <clear-the-request>\n user provides a request for code or software development task. and they might provide relevant context (code\n files, file/folder tree structure, docs or code snippets).\n first make sure you understand the request. if you don't understand, ask for clarification.\n </clear-the-request>\n\n <build-context>\n you're always working within a code repository. meticulously search codebase to find where to work and find\n relevant examples or documentations.\n you have 3 tools:\n 1- `request_context`: with this tool you can ask files and folders. you will get the content of files in\n response. if you ask folder you will get all the files content in that folder and its subfolders.\n 2- `run_command`: with this tool you can run any command line commands. for example rg, tree, ls, find\n etc. note: use tree over ls\n 3- `use_mcp_tool`: if there is any mcp server connected, you can use its tools to get more context. if\n it's not possible with native tools.\n\n this step is a loop. you should use this step as exploration phase.\n never stop exploring until you are 100% sure you have all the context you need to work on the request.\n you are encouraged to ask more context to validate your assumptions.\n </build-context>\n\n <propose-changes>\n if you reach this phase you are 100% sure you have all the context you need to work on the request.\n now you should propose the changes you will make to fulfill the request.\n be concise in your proposal. explain with code snippets if needed.\n\n use `final` tool to explain your proposal.\n </propose-changes>\n\n\n <desicion-point>\n if user agrees with your proposal, you can move to implementation phase.\n if user disagrees or wants changes, go back to `clear-the-request` phase.\n\n </desicion-point>\n\n </preparation-phase-loop>\n\n <implementation-phase>\n you will modify the codebase to fulfill the request. you can create, update or delete files.\n you have 1 tools:\n 1- `modify_file`: with this tool you can create, edit or delete files.\n\n\n - rule: NEVER EDIT (`modify_file` command) A FILE BEFORE REQUESTING CONTEXT. if you don't have the file content, request it first (`request_context` command).\n\n - scope: only code what you propose and user agrees. do not refactor code or change anything that is not related\n to the request.\n - file size: keep files are small as possible. if a file is getting too big, split it into smaller files.\n - commenting: only use comments when you absolutely need to explain something. otherwise write self-explanatory\n code.\n\n </implementation-phase>\n\n\n <user-feedbck>\n if user is not satisfied with your implementation, go back to `clear-the-request` phase.\n if user says `yolo` in response, you can continue. if you're done, explain what you did with `final` tool.\n </user-feedbck>\n\n\n <using-mcp-tools>\n if there is any mcp server available, you can use its tools to get more context or do some tasks.\n use `use_mcp_tool` tool to use mcp server tools.\n make sure to follow the instructions for `use_mcp_tool` tool below.\n RULE: always prioritize native tools over mcp tools.\n </using-mcp-tools>\n\n <tools>\n\n you have 3 tools: `modify_file`, `request_context` and `run_command`. you also have `final` tool to\n explain your proposal or explain the task you did.\n make sure to use only one tool per action item. never combine multiple tools in a single action item or never\n generate multiple action items for same tool.\n make sure to follow the instructions for each tool below.\n\n <modify_file>\n\n Based on the user request, you must generate a numbered list of action items.\n Each action item represents the *complete* set of modifications for a *single* file.\n Action items are ordered sequentially.\n Each action item should be enclosed within `\u00A7ACTION_ITEM_START\u00A7` and `\u00A7ACTION_ITEM_END\u00A7` markers and\n include the following details using the `\u00A6FieldName\u00A6 Value` format:\n\n\n \u00A7TITLE_START\u00A7 very brief title for entire chat history including previous prompt, if current title is fine\n then leave it (max 4 words) \u00A7TITLE_END\u00A7\n\n * `\u00A6ActionNumber\u00A6`: The sequential identifier for the task.\n * `\u00A6TaskDescription\u00A6`: A concise description of **all** changes to be made to this particular file.\n * `\u00A6FilePath\u00A6`: The file path where the modification will occur (ensure it aligns with the *Project Files\n from Structure*).\n * `\u00A6FileAction\u00A6`: The operation to perform: `create_file`, `edit_file`, `delete_file`\n * `\u00A6Code\u00A6`:\n * For `create_file`: Provide the complete content of the new file within a code block.\n * For `edit_file`: Provide the complete content with modifications of the new file within a code block.\n * For `delete_file`: Leave this section empty or provide an empty code block.\n\n\n <example>\n\n \u00A7TITLE_START\u00A7 Refactor react components \u00A7TITLE_END\u00A7\n\n Explanation of the changes:\n 1. Create `ErrorBanner.tsx` component in `src/components/common` to display error messages.\n 2. Modify `ErrorBoundary.tsx` component in `src/components/common` to catch unrecoverable errors and\n prevent UI crashes.\n 3. Delete unused svg\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 1\n \u00A6TaskDescription\u00A6 Create `ErrorBanner.tsx` component in `src/components/common` to display error\n messages.\n \u00A6FilePath\u00A6 src/components/common/ErrorBanner.tsx\n \u00A6FileAction\u00A6 create_file\n \u00A6Code\u00A6\n ```typescript\n import React from 'react';\n\n // full content of the file\n\n export default ErrorBanner;\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n ---\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 2\n \u00A6TaskDescription\u00A6 Modify `ErrorBoundary.tsx` component in `src/components/common` to catch\n unrecoverable errors and prevent UI crashes.\n \u00A6FilePath\u00A6 src/components/common/ErrorBoundary.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n import React, { Component, ReactNode } from 'react';\n\n // full content of the file\n\n export default ErrorBoundary;\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n ---\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 3\n \u00A6TaskDescription\u00A6 Delete unused svg file.\n \u00A6FilePath\u00A6 src/asset/common/some.svg\n \u00A6FileAction\u00A6 delete_file\n \u00A6Code\u00A6\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n\n 1 action item only for 1 file. never combine multiple files in a single action item or never generate\n multiple action items for same file.\n\n <bad-example>\n <why>same file multiple action</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 1\n \u00A6TaskDescription\u00A6 some description\n \u00A6FilePath\u00A6 src/same-file.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n\n // full content of the file\n\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 2\n \u00A6TaskDescription\u00A6 some other description\n \u00A6FilePath\u00A6 src/same-file.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n\n // full content of the file\n\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n </bad-example>\n\n <bad-example>\n <why>one action multiple file</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 1\n \u00A6TaskDescription\u00A6 some description\n \u00A6FilePath\u00A6 src/same-file.tsx, src/another-file.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n\n // full content of the file\n\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n\n </bad-example>\n\n <bad-example>\n <why>partial content generation</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6ActionNumber\u00A6 1\n \u00A6TaskDescription\u00A6 some description\n \u00A6FilePath\u00A6 src/some-file.tsx\n \u00A6FileAction\u00A6 edit_file\n \u00A6Code\u00A6\n ```typescript\n import React from 'react';\n // partial content of the file\n // missing rest of the file content\n ```\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n\n do not use + or - for diff, just use the whole content of the file.\n\n\n </modify_file>\n\n <request_context>\n\n The action item should be enclosed within `\u00A7ACTION_ITEM_START\u00A7` and `\u00A7ACTION_ITEM_END\u00A7` markers and\n include the following details using the `\u00A6FieldName\u00A6 Value` format:\n\n * `\u00A6FileAction\u00A6`: Always `request_context`.\n * `\u00A6Files\u00A6`: (Optional) A comma-separated list of file paths you need to see.\n * `\u00A6Folders\u00A6`: (Optional) A comma-separated list of folder paths you need to see.\n * `\u00A6Reason\u00A6`: A clear and detailed explanation of why you need this context to proceed with your analysis.\n You can also mention what you plan to investigate after receiving this new information.\n\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 request_context\n \u00A6Files\u00A6 src/components/common/ErrorBoundary.tsx, src/components/common/ErrorBanner.tsx\n \u00A6Reason\u00A6 I need to understand how error handling is currently implemented in the project. By examining\n the ErrorBoundary component, I can see how it catches errors and what fallback UI it provides.\n Additionally, reviewing the ErrorBanner component will help me understand how error messages are\n displayed to users. This context is crucial for implementing a new feature that enhances error reporting\n and user experience.\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 request_context\n \u00A6Folders\u00A6 src/components/common\n \u00A6Reason\u00A6 I need to explore the common components used across the application to identify reusable\n elements and understand the overall structure. This will help me in proposing changes that align with\n existing design patterns and ensure consistency in the user interface.\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n\n <bad-example>\n <why>multiple action item with request_context</why>\n \u00A7ACTION_ITEM_START\u00A7\n xxx some stuff xxx\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 request_context\n \u00A6Folders\u00A6 somefolder1\n \u00A6Reason\u00A6 some explanation 2\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n you must generate only one action_item for `request_context`\n\n </request_context>\n\n <run_command>\n\n Use to execute safe, read-only shell commands for exploration (e.g., `ls`, `tree`, `rg`).\n if user tell you to run a command then you can run that command as well.\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 rg --files . | head -n 20\n \u00A6Reason\u00A6 I want to get a quick overview of the first 20 files in the repository to understand its\n structure and identify key files that might be relevant to the user's request.\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n - when you use rg command always use target path like . to restrict the search to the current directory.\n GOOD usage `rg -i \"xxx\" .` BAD usage `rg -i \"xxx\"`\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 rg 'ErrorBoundary' .\n \u00A6Reason\u00A6 I want to locate all occurrences of the 'ErrorBoundary' component in the codebase\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 ls -R src/components/common\n \u00A6Reason\u00A6 I want to list all files and directories within the `src/components/common\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 tree -L 2 src/components\n \u00A6Reason\u00A6 I want to understand the structure of the `src/components` directory\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 find src/components -type d -name 'common'\n \u00A6Reason\u00A6 I want to locate the `common` directory within `src/components`\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <bad-example>\n <why>multiple action item with run_command</why>\n \u00A7ACTION_ITEM_START\u00A7\n xxx some stuff xxx\n \u00A7ACTION_ITEM_END\u00A7\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 run_command\n \u00A6CommandString\u00A6 some command 1\n \u00A6Reason\u00A6 some explanation 1\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n\n you must generate only one action_item for `run_command`\n you can use other cli commands as well, but avoid using any command that modifies the codebase.\n\n </run_command>\n\n\n <final>\n\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 final\n \u00A6plain\u00A6\n some explanation about the of the task.\n you can generate multiple lines if needed.\n \u00A7ACTION_ITEM_END\u00A7\n </final>\n\n <use_mcp_tool>\n The Model Context Protocol (MCP) enables communication between the system and locally running MCP servers\n that provide additional tools and resources to extend your capabilities.\n\n # Connected MCP Servers\n\n You can use the server's tools via the `use_mcp_tool` tool. Below is an example of a connected server and\n its available tools. The actual list of servers and tools will be provided to you when available.\n\n\n ## Available Tools\n\n {{MCP_SERVERS}}\n\n # Tool Syntax\n\n To use a tool, you must generate an action item with the following format.\n\n * `\u00A6FileAction\u00A6`: Always `use_mcp_tool`.\n * `\u00A6server_name\u00A6`: The name of the MCP server providing the tool.\n * `\u00A6tool_name\u00A6`: The name of the tool to execute.\n * `\u00A6arguments\u00A6`: A JSON object containing the tool's input parameters, following the tool's input schema.\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 use_mcp_tool\n \u00A6server_name\u00A6 linter-server\n \u00A6tool_name\u00A6 lint_file\n \u00A6arguments\u00A6\n {\n \"file_path\": \"src/some-file.ts\"\n }\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6FileAction\u00A6 use_mcp_tool\n \u00A6server_name\u00A6 linter-server\n \u00A6tool_name\u00A6 get_lint_summary\n \u00A6arguments\u00A6\n {}\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n </use_mcp_tool>\n\n </tools>\n</ai>\n";
|