repoburg 1.3.6 → 1.3.8
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/ai-actions/ai-actions.service.d.ts +1 -0
- package/backend/dist/src/ai-actions/ai-actions.service.js +4 -2
- package/backend/dist/src/ai-actions/ai-actions.service.js.map +1 -1
- package/backend/dist/src/llm-orchestration/action-handlers/apply-diff.handler.js +5 -1
- package/backend/dist/src/llm-orchestration/action-handlers/apply-diff.handler.js.map +1 -1
- package/backend/dist/src/seeding/data/system-prompts/experimental_master-agent.d.ts +1 -1
- package/backend/dist/src/seeding/data/system-prompts/experimental_master-agent.js +195 -4
- package/backend/dist/src/seeding/data/system-prompts/experimental_master-agent.js.map +1 -1
- package/backend/dist/src/session-inputs/session-inputs.service.js +18 -2
- package/backend/dist/src/session-inputs/session-inputs.service.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -46,6 +46,7 @@ var AIActionType;
|
|
|
46
46
|
AIActionType["FINAL"] = "final";
|
|
47
47
|
AIActionType["USE_MCP_TOOL"] = "use_mcp_tool";
|
|
48
48
|
AIActionType["QUICK_EDIT"] = "quick_edit";
|
|
49
|
+
AIActionType["APPLY_DIFF"] = "apply_diff";
|
|
49
50
|
AIActionType["NEW_SESSION"] = "new_session";
|
|
50
51
|
})(AIActionType || (exports.AIActionType = AIActionType = {}));
|
|
51
52
|
let AIActionsService = AIActionsService_1 = class AIActionsService {
|
|
@@ -202,15 +203,16 @@ let AIActionsService = AIActionsService_1 = class AIActionsService {
|
|
|
202
203
|
revertSucceeded = true;
|
|
203
204
|
break;
|
|
204
205
|
case 'edit_file':
|
|
206
|
+
case 'apply_diff':
|
|
205
207
|
if (!action.file_path)
|
|
206
|
-
throw new Error(
|
|
208
|
+
throw new Error(`Missing file_path for ${action.action_type} revert.`);
|
|
207
209
|
if (action.original_content_for_revert !== null) {
|
|
208
210
|
await this.editFile(action.file_path, action.original_content_for_revert);
|
|
209
211
|
revertOutcomeMessage = `File "${action.file_path}" content reverted to original.`;
|
|
210
212
|
}
|
|
211
213
|
else {
|
|
212
214
|
await this.deleteFile(action.file_path);
|
|
213
|
-
revertOutcomeMessage = `File "${action.file_path}" (created by
|
|
215
|
+
revertOutcomeMessage = `File "${action.file_path}" (created by ${action.action_type}) was deleted.`;
|
|
214
216
|
}
|
|
215
217
|
revertSucceeded = true;
|
|
216
218
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-actions.service.js","sourceRoot":"","sources":["../../../src/ai-actions/ai-actions.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAMwB;AACxB,6CAAmD;AACnD,qCAAqC;AACrC,kCAAkC;AAClC,6BAA6B;AAC7B,oDAAwE;AACxE,qFAAgF;AAChF,oCAAiC;AACjC,6DAAyD;AAGzD,IAAY,cAWX;AAXD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,uDAAqC,CAAA;IACrC,yDAAuC,CAAA;IACvC,2DAAyC,CAAA;IACzC,iEAA+C,CAAA;IAC/C,mEAAiD,CAAA;IACjD,mDAAiC,CAAA;IACjC,2DAAyC,CAAA;IACzC,uDAAqC,CAAA;IACrC,iDAA+B,CAAA;AACjC,CAAC,EAXW,cAAc,8BAAd,cAAc,QAWzB;AAGD,IAAY,YAUX;AAVD,WAAY,YAAY;IACtB,2CAA2B,CAAA;IAC3B,uCAAuB,CAAA;IACvB,2CAA2B,CAAA;IAC3B,2CAA2B,CAAA;IAC3B,mDAAmC,CAAA;IACnC,+BAAe,CAAA;IACf,6CAA6B,CAAA;IAC7B,yCAAyB,CAAA;IACzB,2CAA2B,CAAA;AAC7B,CAAC,EAVW,YAAY,4BAAZ,YAAY,QAUvB;AAmBM,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAK3B,YAEE,mBAAiD,EAEjD,uBAAyD,EACjD,oBAA0C,EACjC,aAA4B;QAJrC,wB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;;;qDAYP;AAGK;IADL,IAAA,aAAK,GAAE;;;;qDAeP;AAGK;IADL,IAAA,aAAK,GAAE;;;;yDAeP;AAGK;IADL,IAAA,aAAK,GAAE;;;;oDAuIP;AAGK;IADL,IAAA,aAAK,GAAE;;;;0DAWP;2BAtVU,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAOR,WAAA,IAAA,0BAAgB,EAAC,wBAAQ,CAAC,CAAA;IAE1B,WAAA,IAAA,0BAAgB,EAAC,4BAAY,CAAC,CAAA;qCADF,oBAAU;QAEN,oBAAU;QACb,6CAAoB;QAClB,8BAAa;GAXpC,gBAAgB,CAuV5B"}
|
|
1
|
+
{"version":3,"file":"ai-actions.service.js","sourceRoot":"","sources":["../../../src/ai-actions/ai-actions.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAMwB;AACxB,6CAAmD;AACnD,qCAAqC;AACrC,kCAAkC;AAClC,6BAA6B;AAC7B,oDAAwE;AACxE,qFAAgF;AAChF,oCAAiC;AACjC,6DAAyD;AAGzD,IAAY,cAWX;AAXD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,uDAAqC,CAAA;IACrC,yDAAuC,CAAA;IACvC,2DAAyC,CAAA;IACzC,iEAA+C,CAAA;IAC/C,mEAAiD,CAAA;IACjD,mDAAiC,CAAA;IACjC,2DAAyC,CAAA;IACzC,uDAAqC,CAAA;IACrC,iDAA+B,CAAA;AACjC,CAAC,EAXW,cAAc,8BAAd,cAAc,QAWzB;AAGD,IAAY,YAWX;AAXD,WAAY,YAAY;IACtB,2CAA2B,CAAA;IAC3B,uCAAuB,CAAA;IACvB,2CAA2B,CAAA;IAC3B,2CAA2B,CAAA;IAC3B,mDAAmC,CAAA;IACnC,+BAAe,CAAA;IACf,6CAA6B,CAAA;IAC7B,yCAAyB,CAAA;IACzB,yCAAyB,CAAA;IACzB,2CAA2B,CAAA;AAC7B,CAAC,EAXW,YAAY,4BAAZ,YAAY,QAWvB;AAmBM,IAAM,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CACF,CAAA;AA1VY,4CAAgB;AAqFrB;IADL,IAAA,aAAK,GAAE;;;;2DA8BP;AAGK;IADL,IAAA,aAAK,GAAE;;;;wDAgBP;AAGK;IADL,IAAA,aAAK,GAAE;;;;+CAUP;AAGK;IADL,IAAA,aAAK,GAAE;;;;qDAYP;AAGK;IADL,IAAA,aAAK,GAAE;;;;qDAeP;AAGK;IADL,IAAA,aAAK,GAAE;;;;yDAeP;AAGK;IADL,IAAA,aAAK,GAAE;;;;oDA0IP;AAGK;IADL,IAAA,aAAK,GAAE;;;;0DAWP;2BAzVU,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAOR,WAAA,IAAA,0BAAgB,EAAC,wBAAQ,CAAC,CAAA;IAE1B,WAAA,IAAA,0BAAgB,EAAC,4BAAY,CAAC,CAAA;qCADF,oBAAU;QAEN,oBAAU;QACb,6CAAoB;QAClB,8BAAa;GAXpC,gBAAgB,CA0V5B"}
|
|
@@ -174,7 +174,11 @@ let ApplyDiffHandler = ApplyDiffHandler_1 = class ApplyDiffHandler {
|
|
|
174
174
|
}
|
|
175
175
|
catch (error) {
|
|
176
176
|
this.logger.error(`Failed to apply diff for ${file_path}: ${error.message}`);
|
|
177
|
-
|
|
177
|
+
let errorMessage = `Failed to apply diff for "${file_path}": ${error.message}`;
|
|
178
|
+
if (error instanceof common_1.BadRequestException &&
|
|
179
|
+
error.message.startsWith('Anchor validation failed')) {
|
|
180
|
+
errorMessage += `\n\n**CORRECTION HINT:** The file content has changed. Use \`request_context\` on \`'${file_path}'\` to get the latest version.`;
|
|
181
|
+
}
|
|
178
182
|
context.feedback.validationErrors.push({
|
|
179
183
|
tool_name: this.toolName,
|
|
180
184
|
error: errorMessage,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-diff.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/apply-diff.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAyE;AACzE,kCAAkC;AAClC,6BAA6B;AAC7B,yDAAiD;AACjD,qDAA2C;AAM3C,iFAA4E;AAC5E,mEAA6D;
|
|
1
|
+
{"version":3,"file":"apply-diff.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/apply-diff.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAyE;AACzE,kCAAkC;AAClC,6BAA6B;AAC7B,yDAAiD;AACjD,qDAA2C;AAM3C,iFAA4E;AAC5E,mEAA6D;AA0DtD,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAAtB;QACI,aAAQ,GAAG,YAAY,CAAC;QAChB,WAAM,GAAG,IAAI,eAAM,CAAC,kBAAgB,CAAC,IAAI,CAAC,CAAC;QAC3C,gBAAW,GAC1B,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IA0OvD,CAAC;IAxOS,sBAAsB,CAAC,UAAkB;QAC/C,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAClD,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,mCAAmC,UAAU,EAAE,CAChD,CAAC;QACJ,CAAC;QACD,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QACpE,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/C,MAAM,IAAI,4BAAmB,CAC3B,kCAAkC,UAAU,EAAE,CAC/C,CAAC;QACJ,CAAC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;IAEO,UAAU,CAAC,KAAa;QAC9B,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,YAAY,GAAG,sCAAsC,CAAC;QA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,CAAC;YACF,IAAI,YAAY,GAAG,6BAA6B,SAAS,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;YAC/E,IACE,KAAK,YAAY,4BAAmB;gBACpC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,0BAA0B,CAAC,EACpD,CAAC;gBACD,YAAY,IAAI,wFAAwF,SAAS,gCAAgC,CAAC;YACpJ,CAAC;YACD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBACrC,SAAS,EAAE,IAAI,CAAC,QAAQ;gBACxB,KAAK,EAAE,YAAY;aACpB,CAAC,CAAC;YACH,OAAO;gBACL,MAAM,EAAE,SAAS;gBACjB,OAAO,EAAE,kBAAkB,SAAS,aAAa,KAAK,CAAC,OAAO,EAAE;gBAChE,aAAa,EAAE,YAAY;gBAC3B,cAAc,EAAE,aAAa;aAC9B,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AA9OY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;GACA,gBAAgB,CA8O5B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "Master Agent (apply_diff)";
|
|
2
|
-
export declare const content = "<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 <tone>be very concise in your response</tone>\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 if you propose a change on something make sure you requested its context before.\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 3 tools for file operations:\n 1- `create_file`: can create new files.\n 2- `delete_file`: can delete existing files.\n 3- `apply_diff`: can apply a set of line-based changes to an existing file using a patch.\n\n\n - rule: NEVER MODIFY A FILE BEFORE REQUESTING CONTEXT. if you don't have the file content,\n 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\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 these tools: `create_file`, `delete_file`, `apply_diff`, `request_context` and `run_command`.\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 <GROUP-file-tools>\n\n Based on the user request, you must generate a numbered list of action items for file operations.\n Each action item represents modifications for a *single* file and is enclosed within `\u00A7ACTION_ITEM_START\u00A7`\n and `\u00A7ACTION_ITEM_END\u00A7` markers.\n\n **1. `create_file`**\n * `\u00A6tool_name\u00A6`: `create_file`\n * `\u00A6file_path\u00A6`: The path for the new file.\n * `\u00A6content\u00A6`: The full content of the new file.\n\n **2. `delete_file`**\n * `\u00A6tool_name\u00A6`: `delete_file`\n * `\u00A6file_path\u00A6`: The path of the file to delete.\n\n **3. `apply_diff`**\n * `\u00A6tool_name\u00A6`: `apply_diff`\n * `\u00A6file_path\u00A6`: The path of the file to modify.\n * `\u00A6patch\u00A6`: A string containing one or more patch commands.\n\n This action applies a patch to a file using a custom diff format inspired by `diff`.\n\n The patch format consists of one or more change commands. Each command\n must be on its own line and start with '@'.\n\n The command syntax is: `@<start_line>,<end_line><operation>|ANCHOR='<substring>'`\n\n - `<start_line>`: The 1-based line number in the original file to start the operation.\n - `<end_line>`: The 1-based ending line number for the operation. For single-line operations, this must be the same as `<start_line>`.\n - `<operation>`: A single character indicating the operation:\n - 'a' (add): Adds new content after `<start_line>`. For 'a' operations, `<start_line>` must equal `<end_line>`. The anchor is validated against the content of `<start_line>`.\n - 'c' (change): Replaces lines from `<start_line>` to `<end_line>`. The anchor is validated against the content of `<start_line>`.\n - 'd' (delete): Deletes lines from `<start_line>` to `<end_line>`. The anchor is validated against the content of `<start_line>`.\n - `|ANCHOR='<substring>'`: A mandatory substring that must be present on the `<start_line>` for the operation to proceed. For adding to an empty file (`@0,0a`), the anchor must be `|ANCHOR=''`.\n\n <example>\n TITLE_START Refactor user authentication TITLE_END\n\n Explanation of the changes:\n 1. Create a new validation utility in `src/utils/validation.ts`.\n 2. Refactor `AuthService.ts` to use the new utility, remove a deprecated method, and add a new import.\n 3. Delete the old, unused `auth-helper.ts`.\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 create_file\n \u00A6file_path\u00A6 src/utils/validation.ts\n \u00A6content\u00A6\n ```typescript\n export function validateCredentials(user, pass) {\n return user && pass && pass.length >= 8;\n }\n ```\n \u00A7ACTION_ITEM_END\u00A7\n ---\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 apply_diff\n \u00A6file_path\u00A6 src/services/AuthService.ts\n \u00A6patch\u00A6\n ```\n @1,1a|ANCHOR='import { Injectable } from \"@nestjs/common\";'\n import { validateCredentials } from '../utils/validation';\n @5,10c|ANCHOR='login(user, pass) {'\n login(user, pass) {\n if (!validateCredentials(user, pass)) {\n throw new Error('Invalid credentials');\n }\n // New login logic...\n }\n @25,30d|ANCHOR='someOldMethod() {'\n ```\n \u00A7ACTION_ITEM_END\u00A7\n ---\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 delete_file\n \u00A6file_path\u00A6 src/helpers/auth-helper.ts\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n TITLE_START Update logging service TITLE_END\n Explanation of the changes:\n 1. Modify `src/services/Logger.ts` to update initialization and remove a deprecated method.\n 2. Replace full `Logger` class block (lines 40-52) to modernize configuration API.\n 3. Replace entire `DEFAULT_CONFIG` object (lines 60-65) to add rotation and max size.\n 4. Add new `LEVEL_MAP` object after line 70 for fast numeric comparison.\n 5. Replace full factory function (lines 75-82) to use new configuration flow.\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 apply_diff\n \u00A6file_path\u00A6 src/services/Logger.ts\n \u00A6patch\u00A6\n ```typescript\n @1,1a|ANCHOR='import { Injectable } from \"some-lib\";'\n import { createWriteStream } from 'fs';\n @5,12c|ANCHOR='init(config) {'\n init(config) {\n this.stream = createWriteStream(config.path, { flags: 'a' });\n this.level = config.level ?? 'info';\n }\n @30,34d|ANCHOR='// some comment about deprecated method'\n @40,52c|ANCHOR='class Logger {'\n class Logger {\n constructor() {\n this.level = 'info';\n this.stream = null;\n this.rotate = false;\n this.maxSize = 0;\n }\n configure(options) {\n const {\n path,\n level = 'info',\n rotate = false,\n maxSize = 10 * 1024 * 1024\n } = options;\n this.stream = createWriteStream(path, { flags: 'a' });\n this.level = level;\n this.rotate = rotate;\n this.maxSize = maxSize;\n }\n log(level, message) {\n if (!LEVEL_MAP[level]) return;\n // write logic...\n }\n }\n @60,65c|ANCHOR='export const DEFAULT_CONFIG = {'\n export const DEFAULT_CONFIG = {\n level: 'info',\n path: '/var/log/app.log',\n rotate: false,\n maxSize: 10 * 1024 * 1024\n };\n @70,70a|ANCHOR='};'\n const LEVEL_MAP = {\n debug: 0,\n info: 1,\n warn: 2,\n error: 3\n };\n @75,82c|ANCHOR='export function createLogger(config = DEFAULT_CONFIG) {'\n export function createLogger(config = DEFAULT_CONFIG) {\n const logger = new Logger();\n logger.configure(config);\n return logger;\n }\n ```\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n TITLE_START Overhaul settings file TITLE_END\n\n Explanation of the changes:\n 1. Completely rewrite `src/config/settings.json` to conform to a new schema, replacing all existing content.\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 apply_diff\n \u00A6file_path\u00A6 src/config/settings.json\n \u00A6patch\u00A6\n ```\n @1,5c|ANCHOR='{'\n {\n \"ui\": {\n \"theme\": \"dark_mode\",\n \"fontSize\": 14\n },\n \"features\": {\n \"beta\": false\n }\n }\n ```\n ACTION_ITEM_END\n </example>\n\n\n you must request context before editing a file. if you never read the file content, request it first.\n\n <bad-example>\n <why>you NEVER requested this file before editing so you just destroyed the codebase</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 apply_diff\n \u00A6file_path\u00A6 src/some-existing-file-you-did-not-request-its-content.tsx\n \u00A6content\u00A6\n ```typescript\n some stupid code changes\n half of the content is deleted\n because you did not request the file content\n ```\n \u00A7ACTION_ITEM_END\u00A7\n </bad-example>\n\n\n do not use + or - for diff.\n\n\n </GROUP-file-tools>\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 * `\u00A6tool_name\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\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 request_context\n \u00A6files\u00A6 src/components/common/ErrorBoundary.tsx, src/components/common/ErrorBanner.tsx\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 request_context\n \u00A6folders\u00A6 src/components/common\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 \u00A6tool_name\u00A6 request_context\n \u00A6folders\u00A6 somefolder1\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 \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 rg --files . | head -n 20\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 \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 rg 'ErrorBoundary' .\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 ls -R src/components/common\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 tree -L 2 src/components\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 find src/components -type d -name 'common'\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 \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 some command 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 <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 * `\u00A6tool_name\u00A6`: Always `use_mcp_tool`.\n * `\u00A6server_name\u00A6`: The name of the MCP server providing the tool.\n * `\u00A6mcp_tool_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 \u00A6tool_name\u00A6 use_mcp_tool\n \u00A6server_name\u00A6 linter-server\n \u00A6mcp_tool_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 \u00A6tool_name\u00A6 use_mcp_tool\n \u00A6server_name\u00A6 linter-server\n \u00A6mcp_tool_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";
|
|
2
|
+
export declare const content = "<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 <tone>be very concise in your response</tone>\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 if you propose a change on something make sure you requested its context before.\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 3 tools for file operations:\n 1- `create_file`: can create new files.\n 2- `delete_file`: can delete existing files.\n 3- `apply_diff`: can apply a set of line-based changes to an existing file using a patch.\n\n\n - rule: NEVER MODIFY A FILE BEFORE REQUESTING CONTEXT. if you don't have the file content,\n 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\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 these tools: `create_file`, `delete_file`, `apply_diff`, `request_context` and `run_command`.\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 <GROUP-file-tools>\n\n Based on the user request, you must generate a numbered list of action items for file operations.\n Each action item represents modifications for a *single* file and is enclosed within `\u00A7ACTION_ITEM_START\u00A7`\n and `\u00A7ACTION_ITEM_END\u00A7` markers.\n\n **1. `create_file`**\n * `\u00A6tool_name\u00A6`: `create_file`\n * `\u00A6file_path\u00A6`: The path for the new file.\n * `\u00A6content\u00A6`: The full content of the new file.\n\n **2. `delete_file`**\n * `\u00A6tool_name\u00A6`: `delete_file`\n * `\u00A6file_path\u00A6`: The path of the file to delete.\n\n **3. `apply_diff`**\n * `\u00A6tool_name\u00A6`: `apply_diff`\n * `\u00A6file_path\u00A6`: The path of the file to modify.\n * `\u00A6patch\u00A6`: A string containing one or more patch commands.\n\n This action applies a patch to a file using a custom diff format inspired by `diff`.\n\n The patch format consists of one or more change commands. Each command\n must be on its own line and start with '@'.\n\n The command syntax is: `@<start_line>,<end_line><operation>|ANCHOR='<substring>'`\n\n - `<start_line>`: The 1-based line number in the original file to start the operation.\n - `<end_line>`: The 1-based ending line number for the operation. For single-line operations, this must be the same as `<start_line>`.\n - `<operation>`: A single character indicating the operation:\n - 'a' (add): Adds new content after `<start_line>`. For 'a' operations, `<start_line>` must equal `<end_line>`. The anchor is validated against the content of `<start_line>`.\n - 'c' (change): Replaces lines from `<start_line>` to `<end_line>`. The anchor is validated against the content of `<start_line>`.\n - 'd' (delete): Deletes lines from `<start_line>` to `<end_line>`. The anchor is validated against the content of `<start_line>`.\n - `|ANCHOR='<substring>'`: A mandatory substring that must be present on the `<start_line>` for the operation to proceed. For adding to an empty file (`@0,0a`), the anchor must be `|ANCHOR=''`.\n\n <example>\n TITLE_START Refactor user authentication TITLE_END\n\n Explanation of the changes:\n 1. Create a new validation utility in `src/utils/validation.ts`.\n 2. Refactor `AuthService.ts` to use the new utility, remove a deprecated method, and add a new import.\n 3. Delete the old, unused `auth-helper.ts`.\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 create_file\n \u00A6file_path\u00A6 src/utils/validation.ts\n \u00A6content\u00A6\n ```typescript\n export function validateCredentials(user, pass) {\n return user && pass && pass.length >= 8;\n }\n ```\n \u00A7ACTION_ITEM_END\u00A7\n ---\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 apply_diff\n \u00A6file_path\u00A6 src/services/AuthService.ts\n \u00A6patch\u00A6\n ```\n @1,1a|ANCHOR='import { Injectable } from \"@nestjs/common\";'\n import { validateCredentials } from '../utils/validation';\n @5,10c|ANCHOR='login(user, pass) {'\n login(user, pass) {\n if (!validateCredentials(user, pass)) {\n throw new Error('Invalid credentials');\n }\n // New login logic...\n }\n @25,30d|ANCHOR='someOldMethod() {'\n ```\n \u00A7ACTION_ITEM_END\u00A7\n ---\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 delete_file\n \u00A6file_path\u00A6 src/helpers/auth-helper.ts\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n TITLE_START Update logging service TITLE_END\n Explanation of the changes:\n 1. Modify `src/services/Logger.ts` to update initialization and remove a deprecated method.\n 2. Replace full `Logger` class block (lines 40-53) to modernize configuration API.\n 3. Replace entire `DEFAULT_CONFIG` object (lines 60-65) to add rotation and max size.\n 4. Add new `LEVEL_MAP` object after line 70 for fast numeric comparison.\n 5. Replace full factory function (lines 75-82) to use new configuration flow.\n\n <original_file>\n **Original File: `src/services/Logger.ts`**\n ```typescript\n 1: import { Injectable } from \"some-lib\";\n 2: import * as fs from 'fs';\n 3:\n 4: @Injectable()\n 5: export class LegacyLogger {\n 6: private config: any;\n 7: private stream: fs.WriteStream;\n 8:\n 9: init(config) {\n 10: // very basic init\n 11: this.config = config;\n 12: if(!config.path) {\n 13: throw new Error('Path is required');\n 14: }\n 15: this.stream = fs.createWriteStream(config.path);\n 16: }\n 17:\n 18: log(message: string) {\n 19: this.stream.write(message + '\\n');\n 20: }\n 21:\n 22: private helperFunction() {\n 23: // internal logic\n 24: }\n 25:\n 26: anotherMethod() {\n 27: return true;\n 28: }\n 29:\n 30: // some comment about deprecated method\n 31: oldMethod() {\n 32: // This is being removed\n 33: return false;\n 34: }\n 35: }\n 36:\n 37: // A separate, older logger implementation that will be completely replaced.\n 38: const SEPARATOR = '---';\n 39:\n 40: class Logger {\n 41: constructor() {\n 42: this.level = 'info';\n 43: this.stream = null;\n 44: }\n 45:\n 46: configure(options) {\n 47: this.level = options.level;\n 48: }\n 49:\n 50: log(level, message) {\n 51: // old simple log logic\n 52: }\n 53: }\n 54:\n 55: export const METADATA = {\n 56: version: '1.0.0',\n 57: author: 'System'\n 58: };\n 59:\n 60: export const DEFAULT_CONFIG = {\n 61: level: 'info',\n 62: path: '/var/log/app.log'\n 63:\n 64:\n 65: };\n 66:\n 67: // An unrelated object that happens to end on line 70\n 68: const OTHER_SETTINGS = {\n 69: retries: 3\n 70: };\n 71:\n 72: function utility() {\n 73: // unrelated utility function\n 74: }\n 75: export function createLogger(config = DEFAULT_CONFIG) {\n 76: const logger = new Logger();\n 77: logger.configure(config);\n 78: return logger;\n 79:\n 80:\n 81:\n 82: }\n ```\n </original_file>\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 apply_diff\n \u00A6file_path\u00A6 src/services/Logger.ts\n \u00A6patch\u00A6\n ```typescript\n @1,1a|ANCHOR='import { Injectable } from \"some-lib\";'\n import { createWriteStream } from 'fs';\n @9,16c|ANCHOR='init(config) {'\n init(config) {\n this.stream = createWriteStream(config.path, { flags: 'a' });\n this.level = config.level ?? 'info';\n }\n @30,34d|ANCHOR='// some comment about deprecated method'\n @40,53c|ANCHOR='class Logger {'\n class Logger {\n constructor() {\n this.level = 'info';\n this.stream = null;\n this.rotate = false;\n this.maxSize = 0;\n }\n configure(options) {\n const {\n path,\n level = 'info',\n rotate = false,\n maxSize = 10 * 1024 * 1024\n } = options;\n this.stream = createWriteStream(path, { flags: 'a' });\n this.level = level;\n this.rotate = rotate;\n this.maxSize = maxSize;\n }\n log(level, message) {\n if (!LEVEL_MAP[level]) return;\n // write logic...\n }\n }\n @60,65c|ANCHOR='export const DEFAULT_CONFIG = {'\n export const DEFAULT_CONFIG = {\n level: 'info',\n path: '/var/log/app.log',\n rotate: false,\n maxSize: 10 * 1024 * 1024\n };\n @70,70a|ANCHOR='};'\n const LEVEL_MAP = {\n debug: 0,\n info: 1,\n warn: 2,\n error: 3\n };\n @75,82c|ANCHOR='export function createLogger(config = DEFAULT_CONFIG) {'\n export function createLogger(config = DEFAULT_CONFIG) {\n const logger = new Logger();\n logger.configure(config);\n return logger;\n }\n ```\n \u00A7ACTION_ITEM_END\u00A7\n\n <file_after_patch>\n **File After Patch: `src/services/Logger.ts`**\n ```typescript\n 1: import { Injectable } from \"some-lib\";\n 2: import { createWriteStream } from 'fs';\n 3: import * as fs from 'fs';\n 4:\n 5: @Injectable()\n 6: export class LegacyLogger {\n 7: private config: any;\n 8: private stream: fs.WriteStream;\n 9:\n 10: init(config) {\n 11: this.stream = createWriteStream(config.path, { flags: 'a' });\n 12: this.level = config.level ?? 'info';\n 13: }\n 14:\n 15: log(message: string) {\n 16: this.stream.write(message + '\\n');\n 17: }\n 18:\n 19: private helperFunction() {\n 20: // internal logic\n 21: }\n 22:\n 23: anotherMethod() {\n 24: return true;\n 25: }\n 26: }\n 27:\n 28: // A separate, older logger implementation that will be completely replaced.\n 29: const SEPARATOR = '---';\n 30:\n 31: class Logger {\n 32: constructor() {\n 33: this.level = 'info';\n 34: this.stream = null;\n 35: this.rotate = false;\n 36: this.maxSize = 0;\n 37: }\n 38: configure(options) {\n 39: const {\n 40: path,\n 41: level = 'info',\n 42: rotate = false,\n 43: maxSize = 10 * 1024 * 1024\n 44: } = options;\n 45: this.stream = createWriteStream(path, { flags: 'a' });\n 46: this.level = level;\n 47: this.rotate = rotate;\n 48: this.maxSize = maxSize;\n 49: }\n 50: log(level, message) {\n 51: if (!LEVEL_MAP[level]) return;\n 52: // write logic...\n 53: }\n 54: }\n 55:\n 56: export const METADATA = {\n 57: version: '1.0.0',\n 58: author: 'System'\n 59: };\n 60:\n 61: export const DEFAULT_CONFIG = {\n 62: level: 'info',\n 63: path: '/var/log/app.log',\n 64: rotate: false,\n 65: maxSize: 10 * 1024 * 1024\n 66: };\n 67:\n 68: // An unrelated object that happens to end on line 70\n 69: const OTHER_SETTINGS = {\n 70: retries: 3\n 71: };\n 72: const LEVEL_MAP = {\n 73: debug: 0,\n 74: info: 1,\n 75: warn: 2,\n 76: error: 3\n 77: };\n 78:\n 79: function utility() {\n 80: // unrelated utility function\n 81: }\n 82: export function createLogger(config = DEFAULT_CONFIG) {\n 83: const logger = new Logger();\n 84: logger.configure(config);\n 85: return logger;\n 86: }\n ```\n </file_after_patch>\n\n </example>\n\n <example>\n TITLE_START Overhaul settings file TITLE_END\n\n Explanation of the changes:\n 1. Completely rewrite `src/config/settings.json` to conform to a new schema, replacing all existing content.\n\n **Original File: `src/config/settings.json`**\n ```json\n 1: {\n 2: \"theme\": \"light\",\n 3: \"fontSize\": 12,\n 4: \"beta_features_enabled\": true\n 5: }\n ```\n\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 apply_diff\n \u00A6file_path\u00A6 src/config/settings.json\n \u00A6patch\u00A6\n ```\n @1,5c|ANCHOR='{'\n {\n \"ui\": {\n \"theme\": \"dark_mode\",\n \"fontSize\": 14\n },\n \"features\": {\n \"beta\": false\n }\n }\n ```\n ACTION_ITEM_END\n </example>\n\n\n you must request context before editing a file. if you never read the file content, request it first.\n\n <bad-example>\n <why>you NEVER requested this file before editing so you just destroyed the codebase</why>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 apply_diff\n \u00A6file_path\u00A6 src/some-existing-file-you-did-not-request-its-content.tsx\n \u00A6content\u00A6\n ```typescript\n some stupid code changes\n half of the content is deleted\n because you did not request 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 </GROUP-file-tools>\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 * `\u00A6tool_name\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\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 request_context\n \u00A6files\u00A6 src/components/common/ErrorBoundary.tsx, src/components/common/ErrorBanner.tsx\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 request_context\n \u00A6folders\u00A6 src/components/common\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 \u00A6tool_name\u00A6 request_context\n \u00A6folders\u00A6 somefolder1\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 \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 rg --files . | head -n 20\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 \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 rg 'ErrorBoundary' .\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 ls -R src/components/common\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 tree -L 2 src/components\n \u00A7ACTION_ITEM_END\u00A7\n </example>\n\n <example>\n \u00A7ACTION_ITEM_START\u00A7\n \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 find src/components -type d -name 'common'\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 \u00A6tool_name\u00A6 run_command\n \u00A6command_string\u00A6 some command 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 <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 * `\u00A6tool_name\u00A6`: Always `use_mcp_tool`.\n * `\u00A6server_name\u00A6`: The name of the MCP server providing the tool.\n * `\u00A6mcp_tool_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 \u00A6tool_name\u00A6 use_mcp_tool\n \u00A6server_name\u00A6 linter-server\n \u00A6mcp_tool_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 \u00A6tool_name\u00A6 use_mcp_tool\n \u00A6server_name\u00A6 linter-server\n \u00A6mcp_tool_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";
|
|
@@ -172,10 +172,99 @@ exports.content = `<ai>
|
|
|
172
172
|
TITLE_START Update logging service TITLE_END
|
|
173
173
|
Explanation of the changes:
|
|
174
174
|
1. Modify \`src/services/Logger.ts\` to update initialization and remove a deprecated method.
|
|
175
|
-
2. Replace full \`Logger\` class block (lines 40-
|
|
175
|
+
2. Replace full \`Logger\` class block (lines 40-53) to modernize configuration API.
|
|
176
176
|
3. Replace entire \`DEFAULT_CONFIG\` object (lines 60-65) to add rotation and max size.
|
|
177
177
|
4. Add new \`LEVEL_MAP\` object after line 70 for fast numeric comparison.
|
|
178
178
|
5. Replace full factory function (lines 75-82) to use new configuration flow.
|
|
179
|
+
|
|
180
|
+
<original_file>
|
|
181
|
+
**Original File: \`src/services/Logger.ts\`**
|
|
182
|
+
\`\`\`typescript
|
|
183
|
+
1: import { Injectable } from "some-lib";
|
|
184
|
+
2: import * as fs from 'fs';
|
|
185
|
+
3:
|
|
186
|
+
4: @Injectable()
|
|
187
|
+
5: export class LegacyLogger {
|
|
188
|
+
6: private config: any;
|
|
189
|
+
7: private stream: fs.WriteStream;
|
|
190
|
+
8:
|
|
191
|
+
9: init(config) {
|
|
192
|
+
10: // very basic init
|
|
193
|
+
11: this.config = config;
|
|
194
|
+
12: if(!config.path) {
|
|
195
|
+
13: throw new Error('Path is required');
|
|
196
|
+
14: }
|
|
197
|
+
15: this.stream = fs.createWriteStream(config.path);
|
|
198
|
+
16: }
|
|
199
|
+
17:
|
|
200
|
+
18: log(message: string) {
|
|
201
|
+
19: this.stream.write(message + '\\n');
|
|
202
|
+
20: }
|
|
203
|
+
21:
|
|
204
|
+
22: private helperFunction() {
|
|
205
|
+
23: // internal logic
|
|
206
|
+
24: }
|
|
207
|
+
25:
|
|
208
|
+
26: anotherMethod() {
|
|
209
|
+
27: return true;
|
|
210
|
+
28: }
|
|
211
|
+
29:
|
|
212
|
+
30: // some comment about deprecated method
|
|
213
|
+
31: oldMethod() {
|
|
214
|
+
32: // This is being removed
|
|
215
|
+
33: return false;
|
|
216
|
+
34: }
|
|
217
|
+
35: }
|
|
218
|
+
36:
|
|
219
|
+
37: // A separate, older logger implementation that will be completely replaced.
|
|
220
|
+
38: const SEPARATOR = '---';
|
|
221
|
+
39:
|
|
222
|
+
40: class Logger {
|
|
223
|
+
41: constructor() {
|
|
224
|
+
42: this.level = 'info';
|
|
225
|
+
43: this.stream = null;
|
|
226
|
+
44: }
|
|
227
|
+
45:
|
|
228
|
+
46: configure(options) {
|
|
229
|
+
47: this.level = options.level;
|
|
230
|
+
48: }
|
|
231
|
+
49:
|
|
232
|
+
50: log(level, message) {
|
|
233
|
+
51: // old simple log logic
|
|
234
|
+
52: }
|
|
235
|
+
53: }
|
|
236
|
+
54:
|
|
237
|
+
55: export const METADATA = {
|
|
238
|
+
56: version: '1.0.0',
|
|
239
|
+
57: author: 'System'
|
|
240
|
+
58: };
|
|
241
|
+
59:
|
|
242
|
+
60: export const DEFAULT_CONFIG = {
|
|
243
|
+
61: level: 'info',
|
|
244
|
+
62: path: '/var/log/app.log'
|
|
245
|
+
63:
|
|
246
|
+
64:
|
|
247
|
+
65: };
|
|
248
|
+
66:
|
|
249
|
+
67: // An unrelated object that happens to end on line 70
|
|
250
|
+
68: const OTHER_SETTINGS = {
|
|
251
|
+
69: retries: 3
|
|
252
|
+
70: };
|
|
253
|
+
71:
|
|
254
|
+
72: function utility() {
|
|
255
|
+
73: // unrelated utility function
|
|
256
|
+
74: }
|
|
257
|
+
75: export function createLogger(config = DEFAULT_CONFIG) {
|
|
258
|
+
76: const logger = new Logger();
|
|
259
|
+
77: logger.configure(config);
|
|
260
|
+
78: return logger;
|
|
261
|
+
79:
|
|
262
|
+
80:
|
|
263
|
+
81:
|
|
264
|
+
82: }
|
|
265
|
+
\`\`\`
|
|
266
|
+
</original_file>
|
|
267
|
+
|
|
179
268
|
§ACTION_ITEM_START§
|
|
180
269
|
¦tool_name¦ apply_diff
|
|
181
270
|
¦file_path¦ src/services/Logger.ts
|
|
@@ -183,13 +272,13 @@ exports.content = `<ai>
|
|
|
183
272
|
\`\`\`typescript
|
|
184
273
|
@1,1a|ANCHOR='import { Injectable } from "some-lib";'
|
|
185
274
|
import { createWriteStream } from 'fs';
|
|
186
|
-
@
|
|
275
|
+
@9,16c|ANCHOR='init(config) {'
|
|
187
276
|
init(config) {
|
|
188
277
|
this.stream = createWriteStream(config.path, { flags: 'a' });
|
|
189
278
|
this.level = config.level ?? 'info';
|
|
190
279
|
}
|
|
191
280
|
@30,34d|ANCHOR='// some comment about deprecated method'
|
|
192
|
-
@40,
|
|
281
|
+
@40,53c|ANCHOR='class Logger {'
|
|
193
282
|
class Logger {
|
|
194
283
|
constructor() {
|
|
195
284
|
this.level = 'info';
|
|
@@ -236,6 +325,99 @@ exports.content = `<ai>
|
|
|
236
325
|
}
|
|
237
326
|
\`\`\`
|
|
238
327
|
§ACTION_ITEM_END§
|
|
328
|
+
|
|
329
|
+
<file_after_patch>
|
|
330
|
+
**File After Patch: \`src/services/Logger.ts\`**
|
|
331
|
+
\`\`\`typescript
|
|
332
|
+
1: import { Injectable } from "some-lib";
|
|
333
|
+
2: import { createWriteStream } from 'fs';
|
|
334
|
+
3: import * as fs from 'fs';
|
|
335
|
+
4:
|
|
336
|
+
5: @Injectable()
|
|
337
|
+
6: export class LegacyLogger {
|
|
338
|
+
7: private config: any;
|
|
339
|
+
8: private stream: fs.WriteStream;
|
|
340
|
+
9:
|
|
341
|
+
10: init(config) {
|
|
342
|
+
11: this.stream = createWriteStream(config.path, { flags: 'a' });
|
|
343
|
+
12: this.level = config.level ?? 'info';
|
|
344
|
+
13: }
|
|
345
|
+
14:
|
|
346
|
+
15: log(message: string) {
|
|
347
|
+
16: this.stream.write(message + '\\n');
|
|
348
|
+
17: }
|
|
349
|
+
18:
|
|
350
|
+
19: private helperFunction() {
|
|
351
|
+
20: // internal logic
|
|
352
|
+
21: }
|
|
353
|
+
22:
|
|
354
|
+
23: anotherMethod() {
|
|
355
|
+
24: return true;
|
|
356
|
+
25: }
|
|
357
|
+
26: }
|
|
358
|
+
27:
|
|
359
|
+
28: // A separate, older logger implementation that will be completely replaced.
|
|
360
|
+
29: const SEPARATOR = '---';
|
|
361
|
+
30:
|
|
362
|
+
31: class Logger {
|
|
363
|
+
32: constructor() {
|
|
364
|
+
33: this.level = 'info';
|
|
365
|
+
34: this.stream = null;
|
|
366
|
+
35: this.rotate = false;
|
|
367
|
+
36: this.maxSize = 0;
|
|
368
|
+
37: }
|
|
369
|
+
38: configure(options) {
|
|
370
|
+
39: const {
|
|
371
|
+
40: path,
|
|
372
|
+
41: level = 'info',
|
|
373
|
+
42: rotate = false,
|
|
374
|
+
43: maxSize = 10 * 1024 * 1024
|
|
375
|
+
44: } = options;
|
|
376
|
+
45: this.stream = createWriteStream(path, { flags: 'a' });
|
|
377
|
+
46: this.level = level;
|
|
378
|
+
47: this.rotate = rotate;
|
|
379
|
+
48: this.maxSize = maxSize;
|
|
380
|
+
49: }
|
|
381
|
+
50: log(level, message) {
|
|
382
|
+
51: if (!LEVEL_MAP[level]) return;
|
|
383
|
+
52: // write logic...
|
|
384
|
+
53: }
|
|
385
|
+
54: }
|
|
386
|
+
55:
|
|
387
|
+
56: export const METADATA = {
|
|
388
|
+
57: version: '1.0.0',
|
|
389
|
+
58: author: 'System'
|
|
390
|
+
59: };
|
|
391
|
+
60:
|
|
392
|
+
61: export const DEFAULT_CONFIG = {
|
|
393
|
+
62: level: 'info',
|
|
394
|
+
63: path: '/var/log/app.log',
|
|
395
|
+
64: rotate: false,
|
|
396
|
+
65: maxSize: 10 * 1024 * 1024
|
|
397
|
+
66: };
|
|
398
|
+
67:
|
|
399
|
+
68: // An unrelated object that happens to end on line 70
|
|
400
|
+
69: const OTHER_SETTINGS = {
|
|
401
|
+
70: retries: 3
|
|
402
|
+
71: };
|
|
403
|
+
72: const LEVEL_MAP = {
|
|
404
|
+
73: debug: 0,
|
|
405
|
+
74: info: 1,
|
|
406
|
+
75: warn: 2,
|
|
407
|
+
76: error: 3
|
|
408
|
+
77: };
|
|
409
|
+
78:
|
|
410
|
+
79: function utility() {
|
|
411
|
+
80: // unrelated utility function
|
|
412
|
+
81: }
|
|
413
|
+
82: export function createLogger(config = DEFAULT_CONFIG) {
|
|
414
|
+
83: const logger = new Logger();
|
|
415
|
+
84: logger.configure(config);
|
|
416
|
+
85: return logger;
|
|
417
|
+
86: }
|
|
418
|
+
\`\`\`
|
|
419
|
+
</file_after_patch>
|
|
420
|
+
|
|
239
421
|
</example>
|
|
240
422
|
|
|
241
423
|
<example>
|
|
@@ -244,6 +426,15 @@ exports.content = `<ai>
|
|
|
244
426
|
Explanation of the changes:
|
|
245
427
|
1. Completely rewrite \`src/config/settings.json\` to conform to a new schema, replacing all existing content.
|
|
246
428
|
|
|
429
|
+
**Original File: \`src/config/settings.json\`**
|
|
430
|
+
\`\`\`json
|
|
431
|
+
1: {
|
|
432
|
+
2: "theme": "light",
|
|
433
|
+
3: "fontSize": 12,
|
|
434
|
+
4: "beta_features_enabled": true
|
|
435
|
+
5: }
|
|
436
|
+
\`\`\`
|
|
437
|
+
|
|
247
438
|
§ACTION_ITEM_START§
|
|
248
439
|
¦tool_name¦ apply_diff
|
|
249
440
|
¦file_path¦ src/config/settings.json
|
|
@@ -281,7 +472,7 @@ exports.content = `<ai>
|
|
|
281
472
|
</bad-example>
|
|
282
473
|
|
|
283
474
|
|
|
284
|
-
do not use + or - for diff.
|
|
475
|
+
do not use + or - for diff, just use the whole content of the file.
|
|
285
476
|
|
|
286
477
|
|
|
287
478
|
</GROUP-file-tools>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experimental_master-agent.js","sourceRoot":"","sources":["../../../../../src/seeding/data/system-prompts/experimental_master-agent.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,2BAA2B,CAAC;AACnC,QAAA,OAAO,GAAG
|
|
1
|
+
{"version":3,"file":"experimental_master-agent.js","sourceRoot":"","sources":["../../../../../src/seeding/data/system-prompts/experimental_master-agent.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,2BAA2B,CAAC;AACnC,QAAA,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmnBtB,CAAC"}
|
|
@@ -24,6 +24,22 @@ const session_input_context_service_1 = require("./session-input-context.service
|
|
|
24
24
|
const application_state_service_1 = require("../application-state/application-state.service");
|
|
25
25
|
const chat_service_1 = require("../interactive-chat/chat.service");
|
|
26
26
|
const llm_responses_service_1 = require("../llm-responses/llm-responses.service");
|
|
27
|
+
function formatActionStatusForLLM(status) {
|
|
28
|
+
switch (status) {
|
|
29
|
+
case ai_actions_service_1.AIActionStatus.CONFIRMED_KEPT:
|
|
30
|
+
return 'The user confirmed and kept the changes.';
|
|
31
|
+
case ai_actions_service_1.AIActionStatus.CONFIRMED_REVERTED:
|
|
32
|
+
return 'The user chose to revert the changes.';
|
|
33
|
+
case ai_actions_service_1.AIActionStatus.REJECTED_BEFORE_APPLY:
|
|
34
|
+
return 'The action was rejected by the user before being applied.';
|
|
35
|
+
case ai_actions_service_1.AIActionStatus.EXECUTION_FAILED:
|
|
36
|
+
return 'The action failed to execute.';
|
|
37
|
+
case ai_actions_service_1.AIActionStatus.REVERT_FAILED:
|
|
38
|
+
return 'Reverting the action failed.';
|
|
39
|
+
default:
|
|
40
|
+
return `The action's final status was '${status}'.`;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
27
43
|
let SessionInputsService = SessionInputsService_1 = class SessionInputsService {
|
|
28
44
|
constructor(sessionsRepository, sessionInputsRepository, contextTemplatesRepository, aiActionsService, systemPromptsService, sessionInputContextService, applicationStateService, chatService, llmResponsesService) {
|
|
29
45
|
this.sessionsRepository = sessionsRepository;
|
|
@@ -58,9 +74,9 @@ let SessionInputsService = SessionInputsService_1 = class SessionInputsService {
|
|
|
58
74
|
if (finalActions.length === 0) {
|
|
59
75
|
return '';
|
|
60
76
|
}
|
|
61
|
-
return ('Summary of previous
|
|
77
|
+
return ('Summary of the results from your previous plan:\n' +
|
|
62
78
|
finalActions
|
|
63
|
-
.map((action) => `-
|
|
79
|
+
.map((action) => `- For the action \`${action.action_type}\` on \`${action.file_path || action.command_string || 'N/A'}\`: ${formatActionStatusForLLM(action.status)}`)
|
|
64
80
|
.join('\n'));
|
|
65
81
|
}
|
|
66
82
|
async create(sessionId, createSessionInputDto) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-inputs.service.js","sourceRoot":"","sources":["../../../src/session-inputs/session-inputs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAMwB;AACxB,6CAAmD;AACnD,qCAAqC;AACrC,oDAK0B;AAE1B,yEAG0C;AAC1C,qFAAgF;AAChF,mFAA6E;AAC7E,8FAAyF;AAEzF,mEAA+D;AAC/D,kFAA6E;
|
|
1
|
+
{"version":3,"file":"session-inputs.service.js","sourceRoot":"","sources":["../../../src/session-inputs/session-inputs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAMwB;AACxB,6CAAmD;AACnD,qCAAqC;AACrC,oDAK0B;AAE1B,yEAG0C;AAC1C,qFAAgF;AAChF,mFAA6E;AAC7E,8FAAyF;AAEzF,mEAA+D;AAC/D,kFAA6E;AAE7E,SAAS,wBAAwB,CAAC,MAAsB;IACtD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,mCAAc,CAAC,cAAc;YAChC,OAAO,0CAA0C,CAAC;QACpD,KAAK,mCAAc,CAAC,kBAAkB;YACpC,OAAO,uCAAuC,CAAC;QACjD,KAAK,mCAAc,CAAC,qBAAqB;YACvC,OAAO,2DAA2D,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