repoburg 1.0.36 → 1.0.38

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.
@@ -3,7 +3,8 @@ export declare enum AIActionType {
3
3
  EDIT_FILE = "edit_file",
4
4
  DELETE_FILE = "delete_file",
5
5
  RUN_COMMAND = "run_command",
6
- REQUEST_CONTEXT = "request_context"
6
+ REQUEST_CONTEXT = "request_context",
7
+ FINAL = "final"
7
8
  }
8
9
  export declare class AIActionDto {
9
10
  action_type: AIActionType;
@@ -18,6 +18,7 @@ var AIActionType;
18
18
  AIActionType["DELETE_FILE"] = "delete_file";
19
19
  AIActionType["RUN_COMMAND"] = "run_command";
20
20
  AIActionType["REQUEST_CONTEXT"] = "request_context";
21
+ AIActionType["FINAL"] = "final";
21
22
  })(AIActionType || (exports.AIActionType = AIActionType = {}));
22
23
  class AIActionDto {
23
24
  static validateFilePath(dto) {
@@ -1 +1 @@
1
- {"version":3,"file":"ai-action.dto.js","sourceRoot":"","sources":["../../../src/llm-response-parser/dto/ai-action.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAOyB;AAGzB,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,2CAA2B,CAAA;IAC3B,uCAAuB,CAAA;IACvB,2CAA2B,CAAA;IAC3B,2CAA2B,CAAA;IAC3B,mDAAmC,CAAA;AACrC,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AAED,MAAa,WAAW;IAmCR,AAAP,MAAM,CAAC,gBAAgB,CAAC,GAAgB;QAC7C,IACE,CAAC,GAAG,CAAC,WAAW,KAAK,YAAY,CAAC,WAAW;YAC3C,GAAG,CAAC,WAAW,KAAK,YAAY,CAAC,SAAS;YAC1C,GAAG,CAAC,WAAW,KAAK,YAAY,CAAC,WAAW,CAAC;YAC/C,CAAC,GAAG,CAAC,SAAS,EACd,CAAC;YACD,MAAM,IAAI,KAAK,CACb,0CAA0C,GAAG,CAAC,WAAW,EAAE,CAC5D,C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AAE;;qCACmB,WAAW;;yCAW9C;AAIa;IADb,IAAA,gCAAc,GAAE;;qCAC4B,WAAW;;kDAUvD;AAIa;IADb,IAAA,gCAAc,GAAE;;qCACwB,WAAW;;8CAMnD;AAIa;IADb,IAAA,gCAAc,GAAE;;qCACyB,WAAW;;+CAUpD"}
@@ -35,6 +35,8 @@ let LlmResponseParserService = LlmResponseParserService_1 = class LlmResponsePar
35
35
  return ai_action_dto_1.AIActionType.RUN_COMMAND;
36
36
  case 'request_context':
37
37
  return ai_action_dto_1.AIActionType.REQUEST_CONTEXT;
38
+ case 'final':
39
+ return ai_action_dto_1.AIActionType.FINAL;
38
40
  default:
39
41
  this.logger.warn(`Unsupported action type found: "${type}"`);
40
42
  return undefined;
@@ -80,6 +82,17 @@ let LlmResponseParserService = LlmResponseParserService_1 = class LlmResponsePar
80
82
  else {
81
83
  throw new parsing_error_1.ParsingError(`Malformed action block, missing an end marker like '${parsing_constants_1.ACTION_ITEM_END_TAG}'.`);
82
84
  }
85
+ if (/¦FileAction¦\s*final/.test(cleanBlock)) {
86
+ const plainSeparator = `¦${parsing_constants_1.FIELD_PLAIN}¦`;
87
+ const plainIndex = cleanBlock.indexOf(plainSeparator);
88
+ if (plainIndex !== -1) {
89
+ const plainContent = cleanBlock
90
+ .substring(plainIndex + plainSeparator.length)
91
+ .trim();
92
+ this.logger.log(`Parsed 'final' action with plain content. Returning as explanation.`);
93
+ return { dtos: [], explanation: plainContent };
94
+ }
95
+ }
83
96
  const actionData = {};
84
97
  const codeSeparator = `¦${parsing_constants_1.FIELD_CODE}¦`;
85
98
  const codeIndex = cleanBlock.indexOf(codeSeparator);
@@ -1 +1 @@
1
- {"version":3,"file":"llm-response-parser.service.js","sourceRoot":"","sources":["../../src/llm-response-parser/llm-response-parser.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AACpD,qDAA2C;AAC3C,uDAAgE;AAChE,0DAAsD;AACtD,2DAa6B;AAGtB,IAAM,wBAAwB,gCAA9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YACX,IAAI,CAAC,CAAC,kBAAkB,KAAK,SAAS;gBAAE,OAAO,CAAC,CAAC;YACjD,IAAI,CAAC,CAAC,kBAAkB,KAAK,SAAS;gBAAE,OAAO,CAAC,CAAC,CAAC;YAClD,OAAO,CAAC,CAAC,kBAAkB,GAAG,CAAC,CAAC,kBAAkB,CAAC;QACrD,CAAC,CAAC,CAAC;QAEH,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IAC/B,CAAC;CACF,CAAA;AA1MY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;GACA,wBAAwB,CA0MpC"}
1
+ {"version":3,"file":"llm-response-parser.service.js","sourceRoot":"","sources":["../../src/llm-response-parser/llm-response-parser.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AACpD,qDAA2C;AAC3C,uDAAgE;AAChE,0DAAsD;AACtD,2DAc6B;AAGtB,IAAM,wBAAwB,gCAA9B,MAAM,wBAAwB;IAA9B;QACY,WAAM,GAAG,IAAI,eAAM,CAAC,0BAAwB,CAAC,IAAI,CAAC,CAAC;IA0NtE,CAAC;IAxNS,aAAa,CAAC,IAAY;QAChC,IAAI,CAAC,IAAI;YAAE,OAAO,SAAS,CAAC;QAC5B,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;QAC5C,QAAQ,SAAS,EAAE,CAAC;YAClB,KAAK,QAAQ,CAAC;YACd,KAAK,aAAa;gBAChB,OAAO,4BAAY,CAAC,WAAW,CAAC;YAClC,KAAK,MAAM,CAAC;YACZ,KAAK,WAAW;gBACd,OAAO,4BAAY,CAAC,SAAS,CAAC;YAChC,KAAK,QAAQ,CAAC;YACd,KAAK,aAAa;gBAChB,OAAO,4BAAY,CAAC,WAAW,CAAC;YAClC,KAAK,aAAa;gBAChB,OAAO,4BAAY,CAAC,WAAW,CAAC;YAClC,KAAK,iBAAiB;gBACpB,OAAO,4BAAY,CAAC,eAAe,CAAC;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I,CAAC,CAAC,kBAAkB,KAAK,SAAS;gBAAE,OAAO,CAAC,CAAC,CAAC;YAClD,OAAO,CAAC,CAAC,kBAAkB,GAAG,CAAC,CAAC,kBAAkB,CAAC;QACrD,CAAC,CAAC,CAAC;QAEH,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IAC/B,CAAC;CACF,CAAA;AA3NY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;GACA,wBAAwB,CA2NpC"}
@@ -13,3 +13,4 @@ export declare const FIELD_COMMAND_STRING = "CommandString";
13
13
  export declare const FIELD_FILES_STRING = "Files";
14
14
  export declare const FIELD_FOLDERS_STRING = "Folders";
15
15
  export declare const FIELD_REASON_STRING = "Reason";
16
+ export declare const FIELD_PLAIN = "plain";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FIELD_REASON_STRING = exports.FIELD_FOLDERS_STRING = exports.FIELD_FILES_STRING = exports.FIELD_COMMAND_STRING = exports.FIELD_CODE = exports.FIELD_FILE_PATH = exports.FIELD_ACTION_TYPE = exports.FIELD_FILE_ACTION = exports.FIELD_TASK_DESCRIPTION = exports.FIELD_ACTION_NUMBER = exports.TITLE_END_TAG = exports.TITLE_START_TAG = exports.PARTIAL_ACTION_ITEM_END_TAG = exports.ACTION_ITEM_END_TAG = exports.ACTION_ITEM_START_TAG = void 0;
3
+ exports.FIELD_PLAIN = exports.FIELD_REASON_STRING = exports.FIELD_FOLDERS_STRING = exports.FIELD_FILES_STRING = exports.FIELD_COMMAND_STRING = exports.FIELD_CODE = exports.FIELD_FILE_PATH = exports.FIELD_ACTION_TYPE = exports.FIELD_FILE_ACTION = exports.FIELD_TASK_DESCRIPTION = exports.FIELD_ACTION_NUMBER = exports.TITLE_END_TAG = exports.TITLE_START_TAG = exports.PARTIAL_ACTION_ITEM_END_TAG = exports.ACTION_ITEM_END_TAG = exports.ACTION_ITEM_START_TAG = void 0;
4
4
  exports.ACTION_ITEM_START_TAG = '§ACTION_ITEM_START§';
5
5
  exports.ACTION_ITEM_END_TAG = '§ACTION_ITEM_END§';
6
6
  exports.PARTIAL_ACTION_ITEM_END_TAG = '§ACTION_ITEM_END';
@@ -16,4 +16,5 @@ exports.FIELD_COMMAND_STRING = 'CommandString';
16
16
  exports.FIELD_FILES_STRING = 'Files';
17
17
  exports.FIELD_FOLDERS_STRING = 'Folders';
18
18
  exports.FIELD_REASON_STRING = 'Reason';
19
+ exports.FIELD_PLAIN = 'plain';
19
20
  //# sourceMappingURL=parsing.constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parsing.constants.js","sourceRoot":"","sources":["../../src/llm-response-parser/parsing.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG,qBAAqB,CAAC;AAC9C,QAAA,mBAAmB,GAAG,mBAAmB,CAAC;AAC1C,QAAA,2BAA2B,GAAG,kBAAkB,CAAC;AAEjD,QAAA,eAAe,GAAG,eAAe,CAAC;AAClC,QAAA,aAAa,GAAG,aAAa,CAAC;AAE9B,QAAA,mBAAmB,GAAG,cAAc,CAAC;AACrC,QAAA,sBAAsB,GAAG,iBAAiB,CAAC;AAC3C,QAAA,iBAAiB,GAAG,YAAY,CAAC;AACjC,QAAA,iBAAiB,GAAG,YAAY,CAAC;AACjC,QAAA,eAAe,GAAG,UAAU,CAAC;AAC7B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,oBAAoB,GAAG,eAAe,CAAC;AACvC,QAAA,kBAAkB,GAAG,OAAO,CAAC;AAC7B,QAAA,oBAAoB,GAAG,SAAS,CAAC;AACjC,QAAA,mBAAmB,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"parsing.constants.js","sourceRoot":"","sources":["../../src/llm-response-parser/parsing.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG,qBAAqB,CAAC;AAC9C,QAAA,mBAAmB,GAAG,mBAAmB,CAAC;AAC1C,QAAA,2BAA2B,GAAG,kBAAkB,CAAC;AAEjD,QAAA,eAAe,GAAG,eAAe,CAAC;AAClC,QAAA,aAAa,GAAG,aAAa,CAAC;AAE9B,QAAA,mBAAmB,GAAG,cAAc,CAAC;AACrC,QAAA,sBAAsB,GAAG,iBAAiB,CAAC;AAC3C,QAAA,iBAAiB,GAAG,YAAY,CAAC;AACjC,QAAA,iBAAiB,GAAG,YAAY,CAAC;AACjC,QAAA,eAAe,GAAG,UAAU,CAAC;AAC7B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,oBAAoB,GAAG,eAAe,CAAC;AACvC,QAAA,kBAAkB,GAAG,OAAO,CAAC;AAC7B,QAAA,oBAAoB,GAAG,SAAS,CAAC;AACjC,QAAA,mBAAmB,GAAG,QAAQ,CAAC;AAC/B,QAAA,WAAW,GAAG,OAAO,CAAC"}
@@ -1,2 +1,2 @@
1
1
  export declare const name = "Codebase Exploration Agent";
2
- export declare const content = "\nCodebase Exploration Agent\nYou are a Codebase Exploration Agent. Your purpose is to analyze a user's request and the provided file structure to **iteratively** build an understanding of a codebase. You do not edit, create, or delete files. Your only action is to request more context in a conversational, step-by-step manner until you have a comprehensive understanding for the user's task.\n\n**Core Principles:**\n\n* **Analyze Requirements:** Deeply understand the user's request and their ultimate goal.\n* **Iterate and Refine:** Exploration is a multi-step process. Start with high-level files and progressively ask for more specific context in subsequent requests based on what you learn.\n* **Explore Strategically:** Based on the request and visible file structure, determine the most relevant files and folders for the *current step* of your investigation.\n* **Request Context:** Formulate a single, precise request for the information needed for your next step.\n* **Justify Your Request:** Clearly explain why you need the requested context and what it will help you understand next.\n\n---\n\n**Output Generation Strategy**\n\nBased on the user request and any previously gathered context, you must generate a single action item to request more information. Your response should always use the `request_context` action.\n\nThe 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\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`: Always `1` (as each response you generate contains only one action).\n* `\u00A6TaskDescription\u00A6`: A concise description of the context you are requesting for this step of the exploration.\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**Important Guidelines:**\n\n* **Embrace Iteration:** This is a conversation. Your first request might be for high-level configuration or entry-point files. In subsequent turns, use the context you've gained to ask for more specific modules, components, or utility files.\n* **One Action Per Turn:** You can only perform one action per turn: `request_context`.\n* **No Code Changes:** Do not attempt to guess file contents or suggest code changes. Your sole function is to explore and understand.\n* **Goal-Oriented Exploration:** Your primary goal is to gather enough information to either explain a part of the codebase to the user or to build sufficient context to hand off for a future coding task.\n* The entire output should follow the specified template format.\n\n**Example Output**\n\n<EXAMPLE OUTPUT STARTS HERE>\n\n\u00A7ACTION_ITEM_START\u00A7\n\u00A6ActionNumber\u00A6 1\n\u00A6TaskDescription\u00A6 Requesting initial context for backend services to understand how user authentication is handled.\n\u00A6FileAction\u00A6 request_context\n\u00A6Files\u00A6 backend/src/main.ts,backend/src/auth/auth.module.ts,backend/src/users/users.service.ts\n\u00A6Reason\u00A6 To understand the authentication flow, I need to start at the application's entry point (`main.ts`) and then examine the main authentication module (`auth.module.ts`) and the user service (`users.service.ts`), which likely handles user data. This will give me a high-level overview before I dive deeper into specific strategies or controllers.\n\u00A7ACTION_ITEM_END\u00A7\n\n</EXAMPLE OUTPUT ENDS HERE>\n";
2
+ export declare const content = "\n\nYou are a Codebase Exploration Agent. \nYour mission is to analyse a user\u2019s request and the provided file structure to **iteratively** build an understanding of a codebase. You never edit, create or delete files\u2014your only output is an action block that either asks for more context or delivers a final/plain response.\n\nCore Principles\n- Analyse Requirements: Understand the user\u2019s goal.\n- Iterate and Refine: Start broad, then request increasingly specific files/folders.\n- Explore Strategically: Ask only for what you need next.\n- Single Action per Turn: Every reply contains exactly one action block.\n- Justify Your Action: Explain why you need more context or why you are responding plainly.\n\nAction Types\n1. request_context \n - Use when you still need additional files or folders.\n\n2. plain \n - Use when you no longer need further context and are ready to summarise, clarify or close the exploration.\n\nOutput Format\nEach reply contains a title line followed by **one** action block bounded by the markers shown below.\n\nTitle (always present)\n\u00A7TITLE_START\u00A7 very brief chat title (max 4 words) \u00A7TITLE_END\u00A7\n\nAction Blocks\nA. request_context \u2014 long form only \n```\n\u00A7ACTION_ITEM_START\u00A7\n\u00A6ActionNumber\u00A6 1\n\u00A6TaskDescription\u00A6 <concise description>\n\u00A6FileAction\u00A6 request_context\n\u00A6Files\u00A6 <comma-separated list of files> (omit line if none)\n\u00A6Folders\u00A6 <comma-separated list of folders> (omit line if none)\n\u00A6Reason\u00A6 <why this context is required and what you\u2019ll do next>\n\u00A7ACTION_ITEM_END\u00A7\n```\n\nB. plain \u2014 shorthand **only** \n(No other fields are allowed in this block.)\n```\n\u00A7ACTION_ITEM_START\u00A7\n\u00A6FileAction\u00A6 final\n\u00A6plain\u00A6 <your concise plain-response content>\n\u00A7ACTION_ITEM_END\u00A7\n```\n\nRules\n- Never use the long form with `plain`; the shorthand form is mandatory.\n- Only one action block per reply.\n- Do not propose code changes\u2014focus on exploration and explanation.\n- Use \u2018-\u2019 for bullet lists; avoid other bullet symbols.\n- Wrap any mathematical expressions in LaTeX \\( \u2026 \\) or $$ \u2026 $$.\n- When including code, place it in a fenced Markdown block and format with Prettier (print width 80).\n\nExamples\n\n1. Requesting more context\n```\n\u00A7TITLE_START\u00A7 Auth Flow \u00A7TITLE_END\u00A7\n\u00A7ACTION_ITEM_START\u00A7\n\u00A6ActionNumber\u00A6 1\n\u00A6TaskDescription\u00A6 Need entry and auth files\n\u00A6FileAction\u00A6 request_context\n\u00A6Files\u00A6 backend/src/main.ts,backend/src/auth/auth.module.ts\n\u00A6Reason\u00A6 I must see the entry point and auth module to map the authentication flow before drilling deeper.\n\u00A7ACTION_ITEM_END\u00A7\n```\n\n2. Final plain response\n```\n\u00A7TITLE_START\u00A7 Summary \u00A7TITLE_END\u00A7\n\u00A7ACTION_ITEM_START\u00A7\n\u00A6FileAction\u00A6 final\n\u00A6plain\u00A6 All requested files reviewed; summarising architecture and suggesting next steps.\n\u00A7ACTION_ITEM_END\u00A7\n```\n\nFollow these rules strictly in every turn to iteratively explore the codebase or provide a concise final explanation.\n\n";
@@ -3,54 +3,84 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.content = exports.name = void 0;
4
4
  exports.name = 'Codebase Exploration Agent';
5
5
  exports.content = `
6
- Codebase Exploration Agent
7
- You are a Codebase Exploration Agent. Your purpose is to analyze a user's request and the provided file structure to **iteratively** build an understanding of a codebase. You do not edit, create, or delete files. Your only action is to request more context in a conversational, step-by-step manner until you have a comprehensive understanding for the user's task.
8
6
 
9
- **Core Principles:**
7
+ You are a Codebase Exploration Agent.
8
+ Your mission is to analyse a user’s request and the provided file structure to **iteratively** build an understanding of a codebase. You never edit, create or delete files—your only output is an action block that either asks for more context or delivers a final/plain response.
10
9
 
11
- * **Analyze Requirements:** Deeply understand the user's request and their ultimate goal.
12
- * **Iterate and Refine:** Exploration is a multi-step process. Start with high-level files and progressively ask for more specific context in subsequent requests based on what you learn.
13
- * **Explore Strategically:** Based on the request and visible file structure, determine the most relevant files and folders for the *current step* of your investigation.
14
- * **Request Context:** Formulate a single, precise request for the information needed for your next step.
15
- * **Justify Your Request:** Clearly explain why you need the requested context and what it will help you understand next.
10
+ Core Principles
11
+ - Analyse Requirements: Understand the user’s goal.
12
+ - Iterate and Refine: Start broad, then request increasingly specific files/folders.
13
+ - Explore Strategically: Ask only for what you need next.
14
+ - Single Action per Turn: Every reply contains exactly one action block.
15
+ - Justify Your Action: Explain why you need more context or why you are responding plainly.
16
16
 
17
- ---
17
+ Action Types
18
+ 1. request_context
19
+ - Use when you still need additional files or folders.
18
20
 
19
- **Output Generation Strategy**
21
+ 2. plain
22
+ - Use when you no longer need further context and are ready to summarise, clarify or close the exploration.
20
23
 
21
- Based on the user request and any previously gathered context, you must generate a single action item to request more information. Your response should always use the \`request_context\` action.
24
+ Output Format
25
+ Each reply contains a title line followed by **one** action block bounded by the markers shown below.
22
26
 
23
- The action item should be enclosed within \`§ACTION_ITEM_START§\` and \`§ACTION_ITEM_END§\` markers and include the following details using the \`¦FieldName¦ Value\` format:
27
+ Title (always present)
28
+ §TITLE_START§ very brief chat title (max 4 words) §TITLE_END§
24
29
 
25
- §TITLE_START§ very brief title for entire chat history including previous prompt, if current title is fine then leave it (max 4 words) §TITLE_END§
26
-
27
- * \`¦ActionNumber¦\`: Always \`1\` (as each response you generate contains only one action).
28
- * \`¦TaskDescription¦\`: A concise description of the context you are requesting for this step of the exploration.
29
- * \`¦FileAction¦\`: Always \`request_context\`.
30
- * \`¦Files¦\`: (Optional) A comma-separated list of file paths you need to see.
31
- * \`¦Folders¦\`: (Optional) A comma-separated list of folder paths you need to see.
32
- * \`¦Reason¦\`: 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.
33
-
34
- **Important Guidelines:**
30
+ Action Blocks
31
+ A. request_context — long form only
32
+ \`\`\`
33
+ §ACTION_ITEM_START§
34
+ ¦ActionNumber¦ 1
35
+ ¦TaskDescription¦ <concise description>
36
+ ¦FileAction¦ request_context
37
+ ¦Files¦ <comma-separated list of files> (omit line if none)
38
+ ¦Folders¦ <comma-separated list of folders> (omit line if none)
39
+ ¦Reason¦ <why this context is required and what you’ll do next>
40
+ §ACTION_ITEM_END§
41
+ \`\`\`
35
42
 
36
- * **Embrace Iteration:** This is a conversation. Your first request might be for high-level configuration or entry-point files. In subsequent turns, use the context you've gained to ask for more specific modules, components, or utility files.
37
- * **One Action Per Turn:** You can only perform one action per turn: \`request_context\`.
38
- * **No Code Changes:** Do not attempt to guess file contents or suggest code changes. Your sole function is to explore and understand.
39
- * **Goal-Oriented Exploration:** Your primary goal is to gather enough information to either explain a part of the codebase to the user or to build sufficient context to hand off for a future coding task.
40
- * The entire output should follow the specified template format.
43
+ B. plain shorthand **only**
44
+ (No other fields are allowed in this block.)
45
+ \`\`\`
46
+ §ACTION_ITEM_START§
47
+ ¦FileAction¦ final
48
+ ¦plain¦ <your concise plain-response content>
49
+ §ACTION_ITEM_END§
50
+ \`\`\`
41
51
 
42
- **Example Output**
52
+ Rules
53
+ - Never use the long form with \`plain\`; the shorthand form is mandatory.
54
+ - Only one action block per reply.
55
+ - Do not propose code changes—focus on exploration and explanation.
56
+ - Use ‘-’ for bullet lists; avoid other bullet symbols.
57
+ - Wrap any mathematical expressions in LaTeX \\( … \\) or $$ … $$.
58
+ - When including code, place it in a fenced Markdown block and format with Prettier (print width 80).
43
59
 
44
- <EXAMPLE OUTPUT STARTS HERE>
60
+ Examples
45
61
 
62
+ 1. Requesting more context
63
+ \`\`\`
64
+ §TITLE_START§ Auth Flow §TITLE_END§
46
65
  §ACTION_ITEM_START§
47
66
  ¦ActionNumber¦ 1
48
- ¦TaskDescription¦ Requesting initial context for backend services to understand how user authentication is handled.
67
+ ¦TaskDescription¦ Need entry and auth files
49
68
  ¦FileAction¦ request_context
50
- ¦Files¦ backend/src/main.ts,backend/src/auth/auth.module.ts,backend/src/users/users.service.ts
51
- ¦Reason¦ To understand the authentication flow, I need to start at the application's entry point (\`main.ts\`) and then examine the main authentication module (\`auth.module.ts\`) and the user service (\`users.service.ts\`), which likely handles user data. This will give me a high-level overview before I dive deeper into specific strategies or controllers.
69
+ ¦Files¦ backend/src/main.ts,backend/src/auth/auth.module.ts
70
+ ¦Reason¦ I must see the entry point and auth module to map the authentication flow before drilling deeper.
71
+ §ACTION_ITEM_END§
72
+ \`\`\`
73
+
74
+ 2. Final plain response
75
+ \`\`\`
76
+ §TITLE_START§ Summary §TITLE_END§
77
+ §ACTION_ITEM_START§
78
+ ¦FileAction¦ final
79
+ ¦plain¦ All requested files reviewed; summarising architecture and suggesting next steps.
52
80
  §ACTION_ITEM_END§
81
+ \`\`\`
82
+
83
+ Follow these rules strictly in every turn to iteratively explore the codebase or provide a concise final explanation.
53
84
 
54
- </EXAMPLE OUTPUT ENDS HERE>
55
85
  `;
56
86
  //# sourceMappingURL=codebase-explorer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"codebase-explorer.js","sourceRoot":"","sources":["../../../../src/seeding/data/system-prompts/codebase-explorer.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,4BAA4B,CAAC;AACpC,QAAA,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDtB,CAAC"}
1
+ {"version":3,"file":"codebase-explorer.js","sourceRoot":"","sources":["../../../../src/seeding/data/system-prompts/codebase-explorer.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,4BAA4B,CAAC;AACpC,QAAA,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFtB,CAAC"}
@@ -9,5 +9,8 @@ export declare class SystemPromptsController {
9
9
  findOne(id: string): Promise<SystemPrompt>;
10
10
  update(id: string, updateSystemPromptDto: UpdateSystemPromptDto): Promise<SystemPrompt>;
11
11
  setDefault(id: string): Promise<SystemPrompt>;
12
+ pushToStudio(id: string): Promise<{
13
+ success: boolean;
14
+ }>;
12
15
  remove(id: string): Promise<void>;
13
16
  }
@@ -35,6 +35,10 @@ let SystemPromptsController = class SystemPromptsController {
35
35
  async setDefault(id) {
36
36
  return this.systemPromptsService.setDefault(id);
37
37
  }
38
+ async pushToStudio(id) {
39
+ await this.systemPromptsService.pushToStudio(id);
40
+ return { success: true };
41
+ }
38
42
  async remove(id) {
39
43
  return this.systemPromptsService.remove(id);
40
44
  }
@@ -76,6 +80,14 @@ __decorate([
76
80
  __metadata("design:paramtypes", [String]),
77
81
  __metadata("design:returntype", Promise)
78
82
  ], SystemPromptsController.prototype, "setDefault", null);
83
+ __decorate([
84
+ (0, common_1.Post)(':id/push-to-studio'),
85
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
86
+ __param(0, (0, common_1.Param)('id', common_1.ParseUUIDPipe)),
87
+ __metadata("design:type", Function),
88
+ __metadata("design:paramtypes", [String]),
89
+ __metadata("design:returntype", Promise)
90
+ ], SystemPromptsController.prototype, "pushToStudio", null);
79
91
  __decorate([
80
92
  (0, common_1.Delete)(':id'),
81
93
  (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompts.controller.js","sourceRoot":"","sources":["../../src/system-prompts/system-prompts.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAWwB;AACxB,qEAAgE;AAChE,+DAGiC;AAI1B,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;IAAG,CAAC;IAGrE,AAAN,KAAK,CAAC,MAAM,CACF,qBAA4C;QAEpD,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;IACjE,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,CAAC;IAC7C,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAA6B,EAAU;QAClD,OAAO,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CACkB,EAAU,EAC9B,qBAA4C;QAEpD,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC;IACrE,CAAC;IAIK,AAAN,KAAK,CAAC,UAAU,CACc,EAAU;QAEtC,OAAO,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IAClD,CAAC;IAIK,AAAN,KAAK,CAAC,MAAM,CAA6B,EAAU;QACjD,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC9C,CAAC;CACF,CAAA;AAzCY,0DAAuB;AAI5B;IADL,IAAA,aAAI,GAAE;IAEJ,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAwB,yCAAqB;;qDAGrD;AAGK;IADL,IAAA,YAAG,GAAE;;;;sDAGL;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;IACI,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,sBAAa,CAAC,CAAA;;;;sDAExC;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;IAER,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,sBAAa,CAAC,CAAA;IAC1B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAwB,yCAAqB;;qDAGrD;AAIK;IAFL,IAAA,aAAI,EAAC,iBAAiB,CAAC;IACvB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IAErB,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,sBAAa,CAAC,CAAA;;;;yDAG5B;AAIK;IAFL,IAAA,eAAM,EAAC,KAAK,CAAC;IACb,IAAA,iBAAQ,EAAC,mBAAU,CAAC,UAAU,CAAC;IAClB,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,sBAAa,CAAC,CAAA;;;;qDAEvC;kCAxCU,uBAAuB;IADnC,IAAA,mBAAU,EAAC,gBAAgB,CAAC;qCAEwB,6CAAoB;GAD5D,uBAAuB,CAyCnC"}
1
+ {"version":3,"file":"system-prompts.controller.js","sourceRoot":"","sources":["../../src/system-prompts/system-prompts.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAWwB;AACxB,qEAAgE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A,YAAG,EAAC,KAAK,CAAC;IACI,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,sBAAa,CAAC,CAAA;;;;sDAExC;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;IAER,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,sBAAa,CAAC,CAAA;IAC1B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAwB,yCAAqB;;qDAGrD;AAIK;IAFL,IAAA,aAAI,EAAC,iBAAiB,CAAC;IACvB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IAErB,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,sBAAa,CAAC,CAAA;;;;yDAG5B;AAIK;IAFL,IAAA,aAAI,EAAC,oBAAoB,CAAC;IAC1B,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IAErB,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,sBAAa,CAAC,CAAA;;;;2DAI5B;AAIK;IAFL,IAAA,eAAM,EAAC,KAAK,CAAC;IACb,IAAA,iBAAQ,EAAC,mBAAU,CAAC,UAAU,CAAC;IAClB,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,sBAAa,CAAC,CAAA;;;;qDAEvC;kCAjDU,uBAAuB;IADnC,IAAA,mBAAU,EAAC,gBAAgB,CAAC;qCAEwB,6CAAoB;GAD5D,uBAAuB,CAkDnC"}
@@ -12,12 +12,13 @@ const typeorm_1 = require("@nestjs/typeorm");
12
12
  const core_entities_1 = require("../core-entities");
13
13
  const system_prompts_service_1 = require("./system-prompts.service");
14
14
  const system_prompts_controller_1 = require("./system-prompts.controller");
15
+ const events_module_1 = require("../events/events.module");
15
16
  let SystemPromptsModule = class SystemPromptsModule {
16
17
  };
17
18
  exports.SystemPromptsModule = SystemPromptsModule;
18
19
  exports.SystemPromptsModule = SystemPromptsModule = __decorate([
19
20
  (0, common_1.Module)({
20
- imports: [typeorm_1.TypeOrmModule.forFeature([core_entities_1.SystemPrompt])],
21
+ imports: [typeorm_1.TypeOrmModule.forFeature([core_entities_1.SystemPrompt]), events_module_1.EventsModule],
21
22
  controllers: [system_prompts_controller_1.SystemPromptsController],
22
23
  providers: [system_prompts_service_1.SystemPromptsService],
23
24
  exports: [system_prompts_service_1.SystemPromptsService],
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompts.module.js","sourceRoot":"","sources":["../../src/system-prompts/system-prompts.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,oDAAgD;AAChD,qEAAgE;AAChE,2EAAsE;AAQ/D,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAN/B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,4BAAY,CAAC,CAAC,CAAC;QACnD,WAAW,EAAE,CAAC,mDAAuB,CAAC;QACtC,SAAS,EAAE,CAAC,6CAAoB,CAAC;QACjC,OAAO,EAAE,CAAC,6CAAoB,CAAC;KAChC,CAAC;GACW,mBAAmB,CAAG"}
1
+ {"version":3,"file":"system-prompts.module.js","sourceRoot":"","sources":["../../src/system-prompts/system-prompts.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,oDAAgD;AAChD,qEAAgE;AAChE,2EAAsE;AACtE,2DAAuD;AAQhD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAN/B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,4BAAY,CAAC,CAAC,EAAE,4BAAY,CAAC;QACjE,WAAW,EAAE,CAAC,mDAAuB,CAAC;QACtC,SAAS,EAAE,CAAC,6CAAoB,CAAC;QACjC,OAAO,EAAE,CAAC,6CAAoB,CAAC;KAChC,CAAC;GACW,mBAAmB,CAAG"}
@@ -1,10 +1,12 @@
1
1
  import { Repository, DataSource } from 'typeorm';
2
2
  import { SystemPrompt } from '../core-entities';
3
3
  import { CreateSystemPromptDto, UpdateSystemPromptDto } from './dto/system-prompt.dto';
4
+ import { EventsGateway } from '../events/events.gateway';
4
5
  export declare class SystemPromptsService {
5
6
  private systemPromptsRepository;
6
7
  private dataSource;
7
- constructor(systemPromptsRepository: Repository<SystemPrompt>, dataSource: DataSource);
8
+ private readonly eventsGateway;
9
+ constructor(systemPromptsRepository: Repository<SystemPrompt>, dataSource: DataSource, eventsGateway: EventsGateway);
8
10
  create(createSystemPromptDto: CreateSystemPromptDto): Promise<SystemPrompt>;
9
11
  findAll(): Promise<SystemPrompt[]>;
10
12
  findOne(id: string): Promise<SystemPrompt>;
@@ -12,4 +14,5 @@ export declare class SystemPromptsService {
12
14
  update(id: string, updateSystemPromptDto: UpdateSystemPromptDto): Promise<SystemPrompt>;
13
15
  remove(id: string): Promise<void>;
14
16
  setDefault(id: string): Promise<SystemPrompt>;
17
+ pushToStudio(id: string): Promise<void>;
15
18
  }
@@ -17,10 +17,12 @@ const common_1 = require("@nestjs/common");
17
17
  const typeorm_1 = require("@nestjs/typeorm");
18
18
  const typeorm_2 = require("typeorm");
19
19
  const core_entities_1 = require("../core-entities");
20
+ const events_gateway_1 = require("../events/events.gateway");
20
21
  let SystemPromptsService = class SystemPromptsService {
21
- constructor(systemPromptsRepository, dataSource) {
22
+ constructor(systemPromptsRepository, dataSource, eventsGateway) {
22
23
  this.systemPromptsRepository = systemPromptsRepository;
23
24
  this.dataSource = dataSource;
25
+ this.eventsGateway = eventsGateway;
24
26
  }
25
27
  async create(createSystemPromptDto) {
26
28
  const prompt = this.systemPromptsRepository.create(createSystemPromptDto);
@@ -67,12 +69,19 @@ let SystemPromptsService = class SystemPromptsService {
67
69
  });
68
70
  return newDefaultPrompt;
69
71
  }
72
+ async pushToStudio(id) {
73
+ const prompt = await this.findOne(id);
74
+ this.eventsGateway.sendToAll('system-prompt-update', {
75
+ content: prompt.prompt_content,
76
+ });
77
+ }
70
78
  };
71
79
  exports.SystemPromptsService = SystemPromptsService;
72
80
  exports.SystemPromptsService = SystemPromptsService = __decorate([
73
81
  (0, common_1.Injectable)(),
74
82
  __param(0, (0, typeorm_1.InjectRepository)(core_entities_1.SystemPrompt)),
75
83
  __metadata("design:paramtypes", [typeorm_2.Repository,
76
- typeorm_2.DataSource])
84
+ typeorm_2.DataSource,
85
+ events_gateway_1.EventsGateway])
77
86
  ], SystemPromptsService);
78
87
  //# sourceMappingURL=system-prompts.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompts.service.js","sourceRoot":"","sources":["../../src/system-prompts/system-prompts.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+D;AAC/D,6CAAmD;AACnD,qCAAiD;AACjD,oDAAgD;AAOzC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAEU,uBAAiD,EACjD,UAAsB;QADtB,4BAAuB,GAAvB,uBAAuB,CAA0B;QACjD,eAAU,GAAV,UAAU,CAAY;IAC7B,CAAC;IAEJ,KAAK,CAAC,MAAM,CACV,qBAA4C;QAE5C,MAAM,MAAM,GAAG,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAC1E,OAAO,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAU;QACtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QACpE,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,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I,CAAC,cAAc,CAAC,CAAC;YACrC,CAAC;YAED,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC;gBACjC,gBAAgB,CAAC,UAAU,GAAG,IAAI,CAAC;gBACnC,MAAM,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACvC,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF,CAAA;AArEY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,4BAAY,CAAC,CAAA;qCACE,oBAAU;QACvB,oBAAU;GAJrB,oBAAoB,CAqEhC"}
1
+ {"version":3,"file":"system-prompts.service.js","sourceRoot":"","sources":["../../src/system-prompts/system-prompts.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+D;AAC/D,6CAAmD;AACnD,qCAAiD;AACjD,oDAAgD;AAKhD,6DAAyD;AAGlD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAEU,uBAAiD,EACjD,UAAsB,EACb,aAA4B;QAFrC,4BAAuB,GAAvB,uBAAuB,CAA0B;QACjD,eAAU,GAAV,UAAU,CAAY;QACb,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAEJ,KAAK,CAAC,MAAM,CACV,qBAA4C;QAE5C,MAAM,MAAM,GAAG,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAC1E,OAAO,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAU;QACtB,MAAM,MAAM,GAAG,MA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