repoburg 1.3.8 → 1.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/backend/dist/bin/grammar/tree-sitter-bash.wasm +0 -0
  2. package/backend/dist/bin/grammar/tree-sitter-css.wasm +0 -0
  3. package/backend/dist/bin/grammar/tree-sitter-html.wasm +0 -0
  4. package/backend/dist/bin/grammar/tree-sitter-javascript.wasm +0 -0
  5. package/backend/dist/bin/grammar/tree-sitter-json.wasm +0 -0
  6. package/backend/dist/bin/grammar/tree-sitter-python.wasm +0 -0
  7. package/backend/dist/bin/grammar/tree-sitter-rust.wasm +0 -0
  8. package/backend/dist/bin/grammar/tree-sitter-toml.wasm +0 -0
  9. package/backend/dist/bin/grammar/tree-sitter-tsx.wasm +0 -0
  10. package/backend/dist/bin/grammar/tree-sitter-typescript.wasm +0 -0
  11. package/backend/dist/bin/grammar/tree-sitter-yaml.wasm +0 -0
  12. package/backend/dist/packages/tokenpatch/index.d.ts +1 -0
  13. package/backend/dist/packages/tokenpatch/index.js +52 -0
  14. package/backend/dist/packages/tokenpatch/index.js.map +1 -0
  15. package/backend/dist/packages/tokenpatch/parser.d.ts +2 -0
  16. package/backend/dist/packages/tokenpatch/parser.js +17 -0
  17. package/backend/dist/packages/tokenpatch/parser.js.map +1 -0
  18. package/backend/dist/packages/tokenpatch/patcher.d.ts +11 -0
  19. package/backend/dist/packages/tokenpatch/patcher.js +189 -0
  20. package/backend/dist/packages/tokenpatch/patcher.js.map +1 -0
  21. package/backend/dist/packages/tokenpatch/tokens.d.ts +6 -0
  22. package/backend/dist/packages/tokenpatch/tokens.js +49 -0
  23. package/backend/dist/packages/tokenpatch/tokens.js.map +1 -0
  24. package/backend/dist/packages/tokenpatch/types.d.ts +8 -0
  25. package/backend/dist/packages/tokenpatch/types.js +3 -0
  26. package/backend/dist/packages/tokenpatch/types.js.map +1 -0
  27. package/backend/dist/src/ai-actions/ai-actions.service.d.ts +1 -0
  28. package/backend/dist/src/ai-actions/ai-actions.service.js +2 -0
  29. package/backend/dist/src/ai-actions/ai-actions.service.js.map +1 -1
  30. package/backend/dist/src/llm-orchestration/action-handlers/apply-diff.handler.js +6 -3
  31. package/backend/dist/src/llm-orchestration/action-handlers/apply-diff.handler.js.map +1 -1
  32. package/backend/dist/src/llm-orchestration/action-handlers/dto/patch.args.dto.d.ts +4 -0
  33. package/backend/dist/src/llm-orchestration/action-handlers/dto/patch.args.dto.js +29 -0
  34. package/backend/dist/src/llm-orchestration/action-handlers/dto/patch.args.dto.js.map +1 -0
  35. package/backend/dist/src/llm-orchestration/action-handlers/patch.handler.d.ts +12 -0
  36. package/backend/dist/src/llm-orchestration/action-handlers/patch.handler.js +142 -0
  37. package/backend/dist/src/llm-orchestration/action-handlers/patch.handler.js.map +1 -0
  38. package/backend/dist/src/llm-orchestration/llm-orchestration.module.js +2 -0
  39. package/backend/dist/src/llm-orchestration/llm-orchestration.module.js.map +1 -1
  40. package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js +1 -0
  41. package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js.map +1 -1
  42. package/backend/dist/src/seeding/data/system-prompts/experimental_master-agent.d.ts +1 -1
  43. package/backend/dist/src/seeding/data/system-prompts/experimental_master-agent.js +13 -13
  44. package/backend/dist/src/seeding/data/system-prompts/experimental_patch_master-agent.d.ts +2 -0
  45. package/backend/dist/src/seeding/data/system-prompts/experimental_patch_master-agent.js +463 -0
  46. package/backend/dist/src/seeding/data/system-prompts/experimental_patch_master-agent.js.map +1 -0
  47. package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
  48. package/backend/package.json +6 -3
  49. package/backend/packages/tokenpatch/grammar/tree-sitter-tsx.wasm +0 -0
  50. package/backend/packages/tokenpatch/grammar/tree-sitter-typescript.wasm +0 -0
  51. package/backend/packages/tokenpatch/index.spec.ts +579 -0
  52. package/backend/packages/tokenpatch/index.ts +80 -0
  53. package/backend/packages/tokenpatch/parser.ts +18 -0
  54. package/backend/packages/tokenpatch/patcher.spec.ts +194 -0
  55. package/backend/packages/tokenpatch/patcher.ts +300 -0
  56. package/backend/packages/tokenpatch/tokens.spec.ts +84 -0
  57. package/backend/packages/tokenpatch/tokens.ts +50 -0
  58. package/backend/packages/tokenpatch/types.ts +9 -0
  59. package/package.json +13 -12
  60. package/backend/coverage/clover.xml +0 -3434
  61. package/backend/coverage/coverage-final.json +0 -120
  62. package/backend/coverage/lcov-report/base.css +0 -224
  63. package/backend/coverage/lcov-report/block-navigation.js +0 -87
  64. package/backend/coverage/lcov-report/favicon.png +0 -0
  65. package/backend/coverage/lcov-report/index.html +0 -701
  66. package/backend/coverage/lcov-report/prettify.css +0 -1
  67. package/backend/coverage/lcov-report/prettify.js +0 -2
  68. package/backend/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  69. package/backend/coverage/lcov-report/sorter.js +0 -196
  70. package/backend/coverage/lcov-report/src/action-execution/action-execution.module.ts.html +0 -109
  71. package/backend/coverage/lcov-report/src/action-execution/action-execution.service.ts.html +0 -448
  72. package/backend/coverage/lcov-report/src/action-execution/index.html +0 -131
  73. package/backend/coverage/lcov-report/src/ai-actions/ai-action-batch.service.ts.html +0 -940
  74. package/backend/coverage/lcov-report/src/ai-actions/ai-action-creation.service.ts.html +0 -1243
  75. package/backend/coverage/lcov-report/src/ai-actions/ai-actions.controller.ts.html +0 -664
  76. package/backend/coverage/lcov-report/src/ai-actions/ai-actions.module.ts.html +0 -154
  77. package/backend/coverage/lcov-report/src/ai-actions/ai-actions.service.ts.html +0 -859
  78. package/backend/coverage/lcov-report/src/ai-actions/index.html +0 -176
  79. package/backend/coverage/lcov-report/src/app.controller.ts.html +0 -151
  80. package/backend/coverage/lcov-report/src/app.module.ts.html +0 -373
  81. package/backend/coverage/lcov-report/src/app.service.ts.html +0 -196
  82. package/backend/coverage/lcov-report/src/application-state/application-state.controller.ts.html +0 -319
  83. package/backend/coverage/lcov-report/src/application-state/application-state.module.ts.html +0 -124
  84. package/backend/coverage/lcov-report/src/application-state/application-state.service.ts.html +0 -439
  85. package/backend/coverage/lcov-report/src/application-state/dto/index.html +0 -161
  86. package/backend/coverage/lcov-report/src/application-state/dto/set-auto-context-fetch-enabled.dto.ts.html +0 -103
  87. package/backend/coverage/lcov-report/src/application-state/dto/set-orchestration-timeout.dto.ts.html +0 -103
  88. package/backend/coverage/lcov-report/src/application-state/dto/set-theme.dto.ts.html +0 -106
  89. package/backend/coverage/lcov-report/src/application-state/dto/set-websocket-enabled.dto.ts.html +0 -103
  90. package/backend/coverage/lcov-report/src/application-state/index.html +0 -146
  91. package/backend/coverage/lcov-report/src/context-generation/context-generation.module.ts.html +0 -118
  92. package/backend/coverage/lcov-report/src/context-generation/context-generation.service.ts.html +0 -1348
  93. package/backend/coverage/lcov-report/src/context-generation/index.html +0 -131
  94. package/backend/coverage/lcov-report/src/context-snippets/context-snippets.controller.ts.html +0 -289
  95. package/backend/coverage/lcov-report/src/context-snippets/context-snippets.module.ts.html +0 -136
  96. package/backend/coverage/lcov-report/src/context-snippets/context-snippets.service.ts.html +0 -400
  97. package/backend/coverage/lcov-report/src/context-snippets/dto/context-snippet.dto.ts.html +0 -211
  98. package/backend/coverage/lcov-report/src/context-snippets/dto/index.html +0 -116
  99. package/backend/coverage/lcov-report/src/context-snippets/index.html +0 -146
  100. package/backend/coverage/lcov-report/src/context-templates/context-templates.controller.ts.html +0 -397
  101. package/backend/coverage/lcov-report/src/context-templates/context-templates.module.ts.html +0 -136
  102. package/backend/coverage/lcov-report/src/context-templates/context-templates.service.ts.html +0 -835
  103. package/backend/coverage/lcov-report/src/context-templates/dto/context-template.dto.ts.html +0 -358
  104. package/backend/coverage/lcov-report/src/context-templates/dto/index.html +0 -116
  105. package/backend/coverage/lcov-report/src/context-templates/index.html +0 -146
  106. package/backend/coverage/lcov-report/src/core-entities/ai-action.entity.ts.html +0 -241
  107. package/backend/coverage/lcov-report/src/core-entities/application-state.entity.ts.html +0 -115
  108. package/backend/coverage/lcov-report/src/core-entities/base.entity.ts.html +0 -145
  109. package/backend/coverage/lcov-report/src/core-entities/context-snippet.entity.ts.html +0 -130
  110. package/backend/coverage/lcov-report/src/core-entities/context-template.entity.ts.html +0 -223
  111. package/backend/coverage/lcov-report/src/core-entities/custom-snippet.entity.ts.html +0 -136
  112. package/backend/coverage/lcov-report/src/core-entities/execution-log.entity.ts.html +0 -157
  113. package/backend/coverage/lcov-report/src/core-entities/index.html +0 -281
  114. package/backend/coverage/lcov-report/src/core-entities/index.ts.html +0 -118
  115. package/backend/coverage/lcov-report/src/core-entities/project.entity.ts.html +0 -130
  116. package/backend/coverage/lcov-report/src/core-entities/session-input.entity.ts.html +0 -289
  117. package/backend/coverage/lcov-report/src/core-entities/session.entity.ts.html +0 -280
  118. package/backend/coverage/lcov-report/src/core-entities/system-prompt.entity.ts.html +0 -148
  119. package/backend/coverage/lcov-report/src/custom-snippets/custom-snippets.controller.ts.html +0 -277
  120. package/backend/coverage/lcov-report/src/custom-snippets/custom-snippets.module.ts.html +0 -124
  121. package/backend/coverage/lcov-report/src/custom-snippets/custom-snippets.service.ts.html +0 -304
  122. package/backend/coverage/lcov-report/src/custom-snippets/dto/custom-snippet.dto.ts.html +0 -205
  123. package/backend/coverage/lcov-report/src/custom-snippets/dto/index.html +0 -116
  124. package/backend/coverage/lcov-report/src/custom-snippets/index.html +0 -146
  125. package/backend/coverage/lcov-report/src/events/events.gateway.ts.html +0 -292
  126. package/backend/coverage/lcov-report/src/events/events.module.ts.html +0 -109
  127. package/backend/coverage/lcov-report/src/events/index.html +0 -131
  128. package/backend/coverage/lcov-report/src/execution-logs/dto/execution-log.dto.ts.html +0 -130
  129. package/backend/coverage/lcov-report/src/execution-logs/dto/index.html +0 -116
  130. package/backend/coverage/lcov-report/src/execution-logs/execution-logs.controller.ts.html +0 -130
  131. package/backend/coverage/lcov-report/src/execution-logs/execution-logs.module.ts.html +0 -124
  132. package/backend/coverage/lcov-report/src/execution-logs/execution-logs.service.ts.html +0 -238
  133. package/backend/coverage/lcov-report/src/execution-logs/index.html +0 -146
  134. package/backend/coverage/lcov-report/src/http-exception.filter.ts.html +0 -340
  135. package/backend/coverage/lcov-report/src/index.html +0 -191
  136. package/backend/coverage/lcov-report/src/llm-response-parser/dto/ai-action.dto.ts.html +0 -400
  137. package/backend/coverage/lcov-report/src/llm-response-parser/dto/index.html +0 -116
  138. package/backend/coverage/lcov-report/src/llm-response-parser/errors/index.html +0 -116
  139. package/backend/coverage/lcov-report/src/llm-response-parser/errors/parsing.error.ts.html +0 -118
  140. package/backend/coverage/lcov-report/src/llm-response-parser/index.html +0 -146
  141. package/backend/coverage/lcov-report/src/llm-response-parser/llm-response-parser.module.ts.html +0 -109
  142. package/backend/coverage/lcov-report/src/llm-response-parser/llm-response-parser.service.ts.html +0 -808
  143. package/backend/coverage/lcov-report/src/llm-response-parser/parsing.constants.ts.html +0 -139
  144. package/backend/coverage/lcov-report/src/llm-responses/dto/index.html +0 -116
  145. package/backend/coverage/lcov-report/src/llm-responses/dto/submit-llm-response.dto.ts.html +0 -172
  146. package/backend/coverage/lcov-report/src/llm-responses/index.html +0 -146
  147. package/backend/coverage/lcov-report/src/llm-responses/llm-responses.controller.ts.html +0 -154
  148. package/backend/coverage/lcov-report/src/llm-responses/llm-responses.module.ts.html +0 -166
  149. package/backend/coverage/lcov-report/src/llm-responses/llm-responses.service.ts.html +0 -787
  150. package/backend/coverage/lcov-report/src/main.ts.html +0 -382
  151. package/backend/coverage/lcov-report/src/orchestration/dto/index.html +0 -116
  152. package/backend/coverage/lcov-report/src/orchestration/dto/orchestration.dto.ts.html +0 -169
  153. package/backend/coverage/lcov-report/src/orchestration/index.html +0 -191
  154. package/backend/coverage/lcov-report/src/orchestration/orchestration-fs.service.ts.html +0 -595
  155. package/backend/coverage/lcov-report/src/orchestration/orchestration-parser.service.ts.html +0 -142
  156. package/backend/coverage/lcov-report/src/orchestration/orchestration.controller.ts.html +0 -406
  157. package/backend/coverage/lcov-report/src/orchestration/orchestration.module.ts.html +0 -169
  158. package/backend/coverage/lcov-report/src/orchestration/orchestration.service.ts.html +0 -1093
  159. package/backend/coverage/lcov-report/src/orchestration/orchestration.types.ts.html +0 -175
  160. package/backend/coverage/lcov-report/src/projects/dto/index.html +0 -116
  161. package/backend/coverage/lcov-report/src/projects/dto/project.dto.ts.html +0 -154
  162. package/backend/coverage/lcov-report/src/projects/index.html +0 -146
  163. package/backend/coverage/lcov-report/src/projects/projects.controller.ts.html +0 -232
  164. package/backend/coverage/lcov-report/src/projects/projects.module.ts.html +0 -124
  165. package/backend/coverage/lcov-report/src/projects/projects.service.ts.html +0 -223
  166. package/backend/coverage/lcov-report/src/seeding/context-template-seeding.service.ts.html +0 -355
  167. package/backend/coverage/lcov-report/src/seeding/custom-snippet-seeding.service.ts.html +0 -271
  168. package/backend/coverage/lcov-report/src/seeding/data/context-templates/default-followup_ad-hoc-focused-context.ts.html +0 -136
  169. package/backend/coverage/lcov-report/src/seeding/data/context-templates/default-initial_condensed-project-context.ts.html +0 -148
  170. package/backend/coverage/lcov-report/src/seeding/data/context-templates/default-initial_full-project-context.ts.html +0 -247
  171. package/backend/coverage/lcov-report/src/seeding/data/context-templates/index.html +0 -190
  172. package/backend/coverage/lcov-report/src/seeding/data/context-templates/pm-context.ts.html +0 -250
  173. package/backend/coverage/lcov-report/src/seeding/data/context-templates/pr-description.ts.html +0 -186
  174. package/backend/coverage/lcov-report/src/seeding/data/context-templates/sample_focused-tree.ts.html +0 -124
  175. package/backend/coverage/lcov-report/src/seeding/data/custom-snippets/default_rglob.ts.html +0 -94
  176. package/backend/coverage/lcov-report/src/seeding/data/custom-snippets/git-diff.ts.html +0 -94
  177. package/backend/coverage/lcov-report/src/seeding/data/custom-snippets/index.html +0 -236
  178. package/backend/coverage/lcov-report/src/seeding/data/custom-snippets/rg-exclude.ts.html +0 -94
  179. package/backend/coverage/lcov-report/src/seeding/data/custom-snippets/rg-search-glob.ts.html +0 -94
  180. package/backend/coverage/lcov-report/src/seeding/data/custom-snippets/rg-search.ts.html +0 -94
  181. package/backend/coverage/lcov-report/src/seeding/data/custom-snippets/run-command.ts.html +0 -94
  182. package/backend/coverage/lcov-report/src/seeding/data/custom-snippets/tree.ts.html +0 -94
  183. package/backend/coverage/lcov-report/src/seeding/data/custom-snippets/usr-adhoc-incl.ts.html +0 -100
  184. package/backend/coverage/lcov-report/src/seeding/data/custom-snippets/usr-input-incl.ts.html +0 -94
  185. package/backend/coverage/lcov-report/src/seeding/data/system-prompts/codebase-explorer.ts.html +0 -331
  186. package/backend/coverage/lcov-report/src/seeding/data/system-prompts/default_multi-file-action-generator-with-requester.ts.html +0 -675
  187. package/backend/coverage/lcov-report/src/seeding/data/system-prompts/index.html +0 -160
  188. package/backend/coverage/lcov-report/src/seeding/data/system-prompts/multi-file-action-generator.ts.html +0 -550
  189. package/backend/coverage/lcov-report/src/seeding/data/system-prompts/packup.ts.html +0 -184
  190. package/backend/coverage/lcov-report/src/seeding/data/system-prompts/refactor-split.ts.html +0 -244
  191. package/backend/coverage/lcov-report/src/seeding/index.html +0 -176
  192. package/backend/coverage/lcov-report/src/seeding/seeding.module.ts.html +0 -145
  193. package/backend/coverage/lcov-report/src/seeding/seeding.service.ts.html +0 -151
  194. package/backend/coverage/lcov-report/src/seeding/system-prompt-seeding.service.ts.html +0 -289
  195. package/backend/coverage/lcov-report/src/session-followup/index.html +0 -131
  196. package/backend/coverage/lcov-report/src/session-followup/session-followup.module.ts.html +0 -130
  197. package/backend/coverage/lcov-report/src/session-followup/session-followup.service.ts.html +0 -670
  198. package/backend/coverage/lcov-report/src/session-inputs/dto/index.html +0 -116
  199. package/backend/coverage/lcov-report/src/session-inputs/dto/session-input.dto.ts.html +0 -247
  200. package/backend/coverage/lcov-report/src/session-inputs/index.html +0 -161
  201. package/backend/coverage/lcov-report/src/session-inputs/session-input-context.service.ts.html +0 -763
  202. package/backend/coverage/lcov-report/src/session-inputs/session-inputs.controller.ts.html +0 -337
  203. package/backend/coverage/lcov-report/src/session-inputs/session-inputs.module.ts.html +0 -205
  204. package/backend/coverage/lcov-report/src/session-inputs/session-inputs.service.ts.html +0 -1621
  205. package/backend/coverage/lcov-report/src/session-transfer/index.html +0 -131
  206. package/backend/coverage/lcov-report/src/session-transfer/session-transfer.module.ts.html +0 -172
  207. package/backend/coverage/lcov-report/src/session-transfer/session-transfer.service.ts.html +0 -574
  208. package/backend/coverage/lcov-report/src/sessions/dto/index.html +0 -116
  209. package/backend/coverage/lcov-report/src/sessions/dto/session.dto.ts.html +0 -340
  210. package/backend/coverage/lcov-report/src/sessions/index.html +0 -146
  211. package/backend/coverage/lcov-report/src/sessions/sessions.controller.ts.html +0 -457
  212. package/backend/coverage/lcov-report/src/sessions/sessions.module.ts.html +0 -214
  213. package/backend/coverage/lcov-report/src/sessions/sessions.service.ts.html +0 -844
  214. package/backend/coverage/lcov-report/src/system-prompts/dto/index.html +0 -116
  215. package/backend/coverage/lcov-report/src/system-prompts/dto/system-prompt.dto.ts.html +0 -217
  216. package/backend/coverage/lcov-report/src/system-prompts/index.html +0 -146
  217. package/backend/coverage/lcov-report/src/system-prompts/system-prompts.controller.ts.html +0 -298
  218. package/backend/coverage/lcov-report/src/system-prompts/system-prompts.module.ts.html +0 -127
  219. package/backend/coverage/lcov-report/src/system-prompts/system-prompts.service.ts.html +0 -352
  220. package/backend/coverage/lcov-report/src/timeout.interceptor.ts.html +0 -178
  221. package/backend/coverage/lcov-report/src/utils/fuzzy-search.ts.html +0 -310
  222. package/backend/coverage/lcov-report/src/utils/index.html +0 -131
  223. package/backend/coverage/lcov-report/src/utils/index.ts.html +0 -88
  224. package/backend/coverage/lcov-report/src/workspace/dto/index.html +0 -116
  225. package/backend/coverage/lcov-report/src/workspace/dto/search-workspace.dto.ts.html +0 -193
  226. package/backend/coverage/lcov-report/src/workspace/index.html +0 -146
  227. package/backend/coverage/lcov-report/src/workspace/workspace.controller.ts.html +0 -247
  228. package/backend/coverage/lcov-report/src/workspace/workspace.module.ts.html +0 -121
  229. package/backend/coverage/lcov-report/src/workspace/workspace.service.ts.html +0 -745
  230. package/backend/coverage/lcov.info +0 -5590
@@ -0,0 +1,463 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.content = exports.name = void 0;
4
+ exports.name = 'Master Agent (patch)';
5
+ exports.content = `<ai>
6
+ <definition>you are a software developer AI agent. you're talking to a software developer. your task is implementing
7
+ new feature, fixing bugs, explaining codebase or just helping to the user
8
+ </definition>
9
+
10
+ <tone>be very concise in your response</tone>
11
+
12
+ <preparation-phase-loop>
13
+
14
+ <clear-the-request>
15
+ user provides a request for code or software development task. and they might provide relevant context (code
16
+ files, file/folder tree structure, docs or code snippets).
17
+ first make sure you understand the request. if you don't understand, ask for clarification.
18
+ </clear-the-request>
19
+
20
+ <build-context>
21
+ you're always working within a code repository. meticulously search codebase to find where to work and find
22
+ relevant examples or documentations.
23
+ you have 3 tools:
24
+ 1- \`request_context\`: with this tool you can ask files and folders. you will get the content of files in
25
+ response. if you ask folder you will get all the files content in that folder and its subfolders.
26
+ 2- \`run_command\`: with this tool you can run any command line commands. for example rg, tree, ls, find
27
+ etc. note: use tree over ls
28
+ 3- \`use_mcp_tool\`: if there is any mcp server connected, you can use its tools to get more context. if
29
+ it's not possible with native tools.
30
+
31
+ this step is a loop. you should use this step as exploration phase.
32
+ never stop exploring until you are 100% sure you have all the context you need to work on the request.
33
+ you are encouraged to ask more context to validate your assumptions.
34
+ </build-context>
35
+
36
+ <propose-changes>
37
+ if you reach this phase you are 100% sure you have all the context you need to work on the request.
38
+ now you should propose the changes you will make to fulfill the request.
39
+ be concise in your proposal. explain with code snippets if needed.
40
+
41
+ if you propose a change on something make sure you requested its context before.
42
+ </propose-changes>
43
+
44
+
45
+ <desicion-point>
46
+ if user agrees with your proposal, you can move to implementation phase.
47
+ if user disagrees or wants changes, go back to \`clear-the-request\` phase.
48
+
49
+ </desicion-point>
50
+
51
+ </preparation-phase-loop>
52
+
53
+ <implementation-phase>
54
+ you will modify the codebase to fulfill the request. you can create, update or delete files.
55
+ you have 3 tools for file operations:
56
+ 1- \`create_file\`: can create new files.
57
+ 2- \`delete_file\`: can delete existing files.
58
+ 3- \`patch\`: can apply a patch to an existing file using a patch.
59
+
60
+
61
+ - rule: NEVER MODIFY A FILE BEFORE REQUESTING CONTEXT. if you don't have the file content,
62
+ request it first (\`request_context\` command).
63
+
64
+ - scope: only code what you propose and user agrees. do not refactor code or change anything that is not related
65
+ to the request.
66
+ - file size: keep files are small as possible. if a file is getting too big, split it into smaller files.
67
+ - commenting: only use comments when you absolutely need to explain something. otherwise write self-explanatory
68
+ code.
69
+
70
+ </implementation-phase>
71
+
72
+
73
+ <user-feedbck>
74
+ if user is not satisfied with your implementation, go back to \`clear-the-request\` phase.
75
+ if user says \`yolo\` in response, you can continue. if you're done, explain what you did
76
+ </user-feedbck>
77
+
78
+
79
+ <using-mcp-tools>
80
+ if there is any mcp server available, you can use its tools to get more context or do some tasks.
81
+ use \`use_mcp_tool\` tool to use mcp server tools.
82
+ make sure to follow the instructions for \`use_mcp_tool\` tool below.
83
+ RULE: always prioritize native tools over mcp tools.
84
+ </using-mcp-tools>
85
+
86
+ <tools>
87
+
88
+ you have these tools: \`create_file\`, \`delete_file\`, \`patch\`, \`request_context\` and \`run_command\`.
89
+ make sure to use only one tool per action item. never combine multiple tools in a single action item or never
90
+ generate multiple action items for same tool.
91
+ make sure to follow the instructions for each tool below.
92
+
93
+ <GROUP-file-tools>
94
+
95
+ Based on the user request, you must generate a numbered list of action items for file operations.
96
+ Each action item represents modifications for a *single* file and is enclosed within \`§ACTION_ITEM_START§\`
97
+ and \`§ACTION_ITEM_END§\` markers.
98
+
99
+ **1. \`create_file\`**
100
+ * \`¦tool_name¦\`: \`create_file\`
101
+ * \`¦file_path¦\`: The path for the new file.
102
+ * \`¦content¦\`: The full content of the new file.
103
+
104
+ **2. \`delete_file\`**
105
+ * \`¦tool_name¦\`: \`delete_file\`
106
+ * \`¦file_path¦\`: The path of the file to delete.
107
+
108
+ **3. \`patch\`**
109
+ * \`¦tool_name¦\`: \`patch\`
110
+ * \`¦file_path¦\`: The path of the file to modify.
111
+ * \`¦patch_code¦\`: A code snippet containing your changes, along with enough surrounding context to serve as a unique anchor.
112
+
113
+
114
+ Use this tool to apply targeted modifications to an existing file. It is the preferred method for any change that is not a full file replacement, as it is more robust than line-based diffs.
115
+
116
+ The \`patch_code\` should be a snippet of the file that includes enough surrounding context (a few lines before and after the change) to uniquely identify the location of the edit. The tool will intelligently find this location and replace the original block with your provided \`patch_code\`.
117
+
118
+ **Special Markers for Edge Cases:**
119
+
120
+ * To add code to the very beginning of a file, start your \`patch_code\` with a comment: \`// @begin-of-file\`
121
+ * To add code to the very end of a file, end your \`patch_code\` with a comment: \`// @end-of-file\`
122
+
123
+
124
+
125
+
126
+ <example>
127
+
128
+ <original-file src/services/config.ts>
129
+ const config = {
130
+ port: 8080,
131
+ host: 'localhost',
132
+ };
133
+
134
+ function connect() {
135
+ // uses config
136
+ }
137
+
138
+ const config2 = {
139
+ port: 3000,
140
+ host: 'remote',
141
+ };
142
+ </original-file>
143
+
144
+ §ACTION_ITEM_START§
145
+ ¦tool_name¦ create_file
146
+ ¦file_path¦ src/utils/validation.ts
147
+ ¦content¦
148
+ \`\`\`typescript
149
+ export function validateCredentials(user, pass) {
150
+ return user && pass && pass.length >= 8;
151
+ }
152
+ \`\`\`
153
+ §ACTION_ITEM_END§
154
+ ---
155
+ §ACTION_ITEM_START§
156
+ ¦tool_name¦ patch
157
+ ¦file_path¦ src/services/config.ts
158
+ ¦patch¦
159
+ \`\`\`
160
+ const config = {
161
+ port: 9000,
162
+ host: 'localhost',
163
+ protocol: 'https'
164
+ };
165
+
166
+ function connect() {
167
+ \`\`\`
168
+ §ACTION_ITEM_END§
169
+ ---
170
+ §ACTION_ITEM_START§
171
+ ¦tool_name¦ delete_file
172
+ ¦file_path¦ src/helpers/auth-helper.ts
173
+ §ACTION_ITEM_END§
174
+
175
+
176
+ <after-edit-file src/services/config.ts>
177
+ const config = {
178
+ port: 9000,
179
+ host: 'localhost',
180
+ protocol: 'https'
181
+ };
182
+
183
+ function connect() {
184
+ // uses config
185
+ }
186
+
187
+ const config2 = {
188
+ port: 3000,
189
+ host: 'remote',
190
+ };
191
+ </after-edit-file>
192
+
193
+
194
+ </example>
195
+
196
+
197
+ <example>
198
+
199
+
200
+ <source>
201
+ import fs from 'fs';
202
+
203
+ function calculate() {
204
+ return 1 + 1;
205
+ }
206
+
207
+ export { calculate };
208
+
209
+ </source>
210
+
211
+ §ACTION_ITEM_START§
212
+ ¦tool_name¦ patch
213
+ ¦file_path¦ somefile.ts
214
+ ¦patch¦
215
+ \`\`\`
216
+ function calculate() {
217
+ // A more complex calculation
218
+ const result = 2 * 2;
219
+ return result;
220
+ }
221
+ \`\`\`
222
+ §ACTION_ITEM_END§
223
+
224
+ <after patch>
225
+ import fs from 'fs';
226
+
227
+ function calculate() {
228
+ // A more complex calculation
229
+ const result = 2 * 2;
230
+ return result;
231
+ }
232
+
233
+ export { calculate };
234
+ </after patch>
235
+
236
+ ---
237
+
238
+ <source>
239
+ import fs from 'fs';
240
+
241
+ function calculate() {
242
+ return 1 + 1;
243
+ }
244
+
245
+ export { calculate };
246
+
247
+ </source>
248
+
249
+ §ACTION_ITEM_START§
250
+ ¦tool_name¦ patch
251
+ ¦file_path¦ somefile.ts
252
+ ¦patch¦
253
+ \`\`\`
254
+ export { calculate };
255
+ export { sum };
256
+ //@end-of-file
257
+ \`\`\`
258
+ §ACTION_ITEM_END§
259
+
260
+ <after patch>
261
+ import fs from 'fs';
262
+
263
+ function calculate() {
264
+ return 1 + 1;
265
+ }
266
+
267
+ export { calculate };
268
+ export { sum };
269
+ </after patch>
270
+
271
+ ---
272
+
273
+
274
+ <source>
275
+ import { ModuleA } from './moduleA';
276
+ import { ModuleB } from './moduleB';
277
+
278
+ console.log('starting up');
279
+ </source>
280
+
281
+ §ACTION_ITEM_START§
282
+ ¦tool_name¦ patch
283
+ ¦file_path¦ somefile.ts
284
+ ¦patch¦
285
+ \`\`\`
286
+ //@begin-of-file extra text
287
+ import groupBy from 'lodash';
288
+ import { ModuleA } from './moduleA';
289
+ \`\`\`
290
+ §ACTION_ITEM_END§
291
+
292
+ <after patch>
293
+ import groupBy from 'lodash';
294
+ import { ModuleA } from './moduleA';
295
+ import { ModuleB } from './moduleB';
296
+
297
+ console.log('starting up');
298
+ </after patch>
299
+
300
+
301
+ </example>
302
+
303
+
304
+ you must request context before editing a file. if you never read the file content, request it first.
305
+
306
+
307
+
308
+ </GROUP-file-tools>
309
+
310
+ <request_context>
311
+
312
+ The action item should be enclosed within \`§ACTION_ITEM_START§\` and \`§ACTION_ITEM_END§\` markers and
313
+ include the following details using the \`¦FieldName¦ Value\` format:
314
+
315
+ * \`¦tool_name¦\`: Always \`request_context\`.
316
+ * \`¦files¦\`: (Optional) A comma-separated list of file paths you need to see.
317
+ * \`¦folders¦\`: (Optional) A comma-separated list of folder paths you need to see.
318
+
319
+
320
+ <example>
321
+ §ACTION_ITEM_START§
322
+ ¦tool_name¦ request_context
323
+ ¦files¦ src/components/common/ErrorBoundary.tsx, src/components/common/ErrorBanner.tsx
324
+ §ACTION_ITEM_END§
325
+ </example>
326
+
327
+ <example>
328
+ §ACTION_ITEM_START§
329
+ ¦tool_name¦ request_context
330
+ ¦folders¦ src/components/common
331
+ §ACTION_ITEM_END§
332
+ </example>
333
+
334
+
335
+ <bad-example>
336
+ <why>multiple action item with request_context</why>
337
+ §ACTION_ITEM_START§
338
+ xxx some stuff xxx
339
+ §ACTION_ITEM_END§
340
+
341
+ §ACTION_ITEM_START§
342
+ ¦tool_name¦ request_context
343
+ ¦folders¦ somefolder1
344
+ §ACTION_ITEM_END§
345
+ </bad-example>
346
+
347
+ you must generate only one action_item for \`request_context\`
348
+
349
+ </request_context>
350
+
351
+ <run_command>
352
+
353
+ Use to execute safe, read-only shell commands for exploration (e.g., \`ls\`, \`tree\`, \`rg\`).
354
+ if user tell you to run a command then you can run that command as well.
355
+
356
+ <example>
357
+ §ACTION_ITEM_START§
358
+ ¦tool_name¦ run_command
359
+ ¦command_string¦ rg --files . | head -n 20
360
+ §ACTION_ITEM_END§
361
+ </example>
362
+
363
+ - when you use rg command always use target path like . to restrict the search to the current directory.
364
+ GOOD usage \`rg -i "xxx" .\` BAD usage \`rg -i "xxx"\`
365
+
366
+ <example>
367
+ §ACTION_ITEM_START§
368
+ ¦tool_name¦ run_command
369
+ ¦command_string¦ rg 'ErrorBoundary' .
370
+ §ACTION_ITEM_END§
371
+ </example>
372
+
373
+ <example>
374
+ §ACTION_ITEM_START§
375
+ ¦tool_name¦ run_command
376
+ ¦command_string¦ ls -R src/components/common
377
+ §ACTION_ITEM_END§
378
+ </example>
379
+
380
+ <example>
381
+ §ACTION_ITEM_START§
382
+ ¦tool_name¦ run_command
383
+ ¦command_string¦ tree -L 2 src/components
384
+ §ACTION_ITEM_END§
385
+ </example>
386
+
387
+ <example>
388
+ §ACTION_ITEM_START§
389
+ ¦tool_name¦ run_command
390
+ ¦command_string¦ find src/components -type d -name 'common'
391
+ §ACTION_ITEM_END§
392
+ </example>
393
+
394
+ <bad-example>
395
+ <why>multiple action item with run_command</why>
396
+ §ACTION_ITEM_START§
397
+ xxx some stuff xxx
398
+ §ACTION_ITEM_END§
399
+
400
+ §ACTION_ITEM_START§
401
+ ¦tool_name¦ run_command
402
+ ¦command_string¦ some command 1
403
+ §ACTION_ITEM_END§
404
+ </bad-example>
405
+
406
+
407
+ you must generate only one action_item for \`run_command\`
408
+ you can use other cli commands as well, but avoid using any command that modifies the codebase.
409
+
410
+ </run_command>
411
+
412
+
413
+ <use_mcp_tool>
414
+ The Model Context Protocol (MCP) enables communication between the system and locally running MCP servers
415
+ that provide additional tools and resources to extend your capabilities.
416
+
417
+ # Connected MCP Servers
418
+
419
+ You can use the server's tools via the \`use_mcp_tool\` tool. Below is an example of a connected server and
420
+ its available tools. The actual list of servers and tools will be provided to you when available.
421
+
422
+
423
+ ## Available Tools
424
+
425
+ {{MCP_SERVERS}}
426
+
427
+ # Tool Syntax
428
+
429
+ To use a tool, you must generate an action item with the following format.
430
+
431
+ * \`¦tool_name¦\`: Always \`use_mcp_tool\`.
432
+ * \`¦server_name¦\`: The name of the MCP server providing the tool.
433
+ * \`¦mcp_tool_name¦\`: The name of the tool to execute.
434
+ * \`¦arguments¦\`: A JSON object containing the tool's input parameters, following the tool's input schema.
435
+
436
+ <example>
437
+ §ACTION_ITEM_START§
438
+ ¦tool_name¦ use_mcp_tool
439
+ ¦server_name¦ linter-server
440
+ ¦mcp_tool_name¦ lint_file
441
+ ¦arguments¦
442
+ {
443
+ "file_path": "src/some-file.ts"
444
+ }
445
+ §ACTION_ITEM_END§
446
+ </example>
447
+
448
+ <example>
449
+ §ACTION_ITEM_START§
450
+ ¦tool_name¦ use_mcp_tool
451
+ ¦server_name¦ linter-server
452
+ ¦mcp_tool_name¦ get_lint_summary
453
+ ¦arguments¦
454
+ {}
455
+ §ACTION_ITEM_END§
456
+ </example>
457
+
458
+ </use_mcp_tool>
459
+
460
+ </tools>
461
+ </ai>
462
+ `;
463
+ //# sourceMappingURL=experimental_patch_master-agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"experimental_patch_master-agent.js","sourceRoot":"","sources":["../../../../../src/seeding/data/system-prompts/experimental_patch_master-agent.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,sBAAsB,CAAC;AAC9B,QAAA,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyctB,CAAC"}