repoburg 1.1.11 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/backend/dist/src/action-execution/action-execution.module.js +2 -0
- package/backend/dist/src/action-execution/action-execution.module.js.map +1 -1
- package/backend/dist/src/action-execution/action-execution.service.d.ts +7 -0
- package/backend/dist/src/action-execution/action-execution.service.js +22 -2
- package/backend/dist/src/action-execution/action-execution.service.js.map +1 -1
- package/backend/dist/src/ai-actions/ai-action-batch.service.js +18 -0
- package/backend/dist/src/ai-actions/ai-action-batch.service.js.map +1 -1
- package/backend/dist/src/ai-actions/ai-action-creation.service.js +34 -2
- package/backend/dist/src/ai-actions/ai-action-creation.service.js.map +1 -1
- package/backend/dist/src/ai-actions/ai-actions.module.js +2 -0
- package/backend/dist/src/ai-actions/ai-actions.module.js.map +1 -1
- package/backend/dist/src/app.module.js +4 -0
- package/backend/dist/src/app.module.js.map +1 -1
- package/backend/dist/src/core-entities/ai-action.entity.d.ts +3 -0
- package/backend/dist/src/core-entities/ai-action.entity.js +12 -0
- package/backend/dist/src/core-entities/ai-action.entity.js.map +1 -1
- package/backend/dist/src/core-entities/index.d.ts +2 -0
- package/backend/dist/src/core-entities/index.js +2 -0
- package/backend/dist/src/core-entities/index.js.map +1 -1
- package/backend/dist/src/core-entities/mcp-config.entity.d.ts +8 -0
- package/backend/dist/src/core-entities/mcp-config.entity.js +42 -0
- package/backend/dist/src/core-entities/mcp-config.entity.js.map +1 -0
- package/backend/dist/src/core-entities/mcp-tool.entity.d.ts +8 -0
- package/backend/dist/src/core-entities/mcp-tool.entity.js +44 -0
- package/backend/dist/src/core-entities/mcp-tool.entity.js.map +1 -0
- package/backend/dist/src/llm-response-parser/dto/ai-action.dto.d.ts +6 -1
- package/backend/dist/src/llm-response-parser/dto/ai-action.dto.js +28 -0
- package/backend/dist/src/llm-response-parser/dto/ai-action.dto.js.map +1 -1
- package/backend/dist/src/llm-response-parser/llm-response-parser.service.js +13 -0
- package/backend/dist/src/llm-response-parser/llm-response-parser.service.js.map +1 -1
- package/backend/dist/src/llm-response-parser/parsing.constants.d.ts +3 -0
- package/backend/dist/src/llm-response-parser/parsing.constants.js +4 -1
- package/backend/dist/src/llm-response-parser/parsing.constants.js.map +1 -1
- package/backend/dist/src/llm-responses/llm-responses.module.js +3 -1
- package/backend/dist/src/llm-responses/llm-responses.module.js.map +1 -1
- package/backend/dist/src/llm-responses/llm-responses.service.d.ts +4 -3
- package/backend/dist/src/llm-responses/llm-responses.service.js +5 -7
- package/backend/dist/src/llm-responses/llm-responses.service.js.map +1 -1
- package/backend/dist/src/mcp/dto/batch-update-mcp-tools.dto.d.ts +4 -0
- package/backend/dist/src/mcp/dto/batch-update-mcp-tools.dto.js +28 -0
- package/backend/dist/src/mcp/dto/batch-update-mcp-tools.dto.js.map +1 -0
- package/backend/dist/src/mcp/dto/create-mcp-config.dto.d.ts +3 -0
- package/backend/dist/src/mcp/dto/create-mcp-config.dto.js +23 -0
- package/backend/dist/src/mcp/dto/create-mcp-config.dto.js.map +1 -0
- package/backend/dist/src/mcp/dto/update-mcp-config.dto.d.ts +3 -0
- package/backend/dist/src/mcp/dto/update-mcp-config.dto.js +22 -0
- package/backend/dist/src/mcp/dto/update-mcp-config.dto.js.map +1 -0
- package/backend/dist/src/mcp/mcp.controller.d.ts +16 -0
- package/backend/dist/src/mcp/mcp.controller.js +91 -0
- package/backend/dist/src/mcp/mcp.controller.js.map +1 -0
- package/backend/dist/src/mcp/mcp.module.d.ts +2 -0
- package/backend/dist/src/mcp/mcp.module.js +26 -0
- package/backend/dist/src/mcp/mcp.module.js.map +1 -0
- package/backend/dist/src/mcp/mcp.service.d.ts +27 -0
- package/backend/dist/src/mcp/mcp.service.js +263 -0
- package/backend/dist/src/mcp/mcp.service.js.map +1 -0
- package/backend/dist/src/seeding/data/mcp-configs/default-configs.d.ts +1 -0
- package/backend/dist/src/seeding/data/mcp-configs/default-configs.js +5 -0
- package/backend/dist/src/seeding/data/mcp-configs/default-configs.js.map +1 -0
- package/backend/dist/src/seeding/data/system-prompts/default_master-agent.d.ts +1 -1
- package/backend/dist/src/seeding/data/system-prompts/default_master-agent.js +126 -41
- package/backend/dist/src/seeding/data/system-prompts/default_master-agent.js.map +1 -1
- package/backend/dist/src/seeding/mcp-config-seeding.service.d.ts +8 -0
- package/backend/dist/src/seeding/mcp-config-seeding.service.js +50 -0
- package/backend/dist/src/seeding/mcp-config-seeding.service.js.map +1 -0
- package/backend/dist/src/seeding/seeding.module.js +10 -1
- package/backend/dist/src/seeding/seeding.module.js.map +1 -1
- package/backend/dist/src/seeding/seeding.service.d.ts +3 -1
- package/backend/dist/src/seeding/seeding.service.js +6 -2
- package/backend/dist/src/seeding/seeding.service.js.map +1 -1
- package/backend/dist/src/system-prompts/system-prompts.controller.d.ts +1 -0
- package/backend/dist/src/system-prompts/system-prompts.controller.js +10 -0
- package/backend/dist/src/system-prompts/system-prompts.controller.js.map +1 -1
- package/backend/dist/src/system-prompts/system-prompts.module.js +2 -1
- package/backend/dist/src/system-prompts/system-prompts.module.js.map +1 -1
- package/backend/dist/src/system-prompts/system-prompts.service.d.ts +5 -1
- package/backend/dist/src/system-prompts/system-prompts.service.js +52 -8
- package/backend/dist/src/system-prompts/system-prompts.service.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -2
|
@@ -4,23 +4,32 @@ exports.content = exports.name = void 0;
|
|
|
4
4
|
exports.name = 'Master Agent';
|
|
5
5
|
exports.content = `
|
|
6
6
|
<ai>
|
|
7
|
-
<definition>
|
|
7
|
+
<definition>you are a software developer AI agent. you're talking to a software developer. your task is implementing
|
|
8
|
+
new feature, fixing bugs, explaining codebase or just helping to the user
|
|
9
|
+
</definition>
|
|
8
10
|
|
|
9
11
|
<preparation-phase-loop>
|
|
10
12
|
|
|
11
13
|
<clear-the-request>
|
|
12
|
-
user provides a request for code or software development task. and they might provide relevant context (code
|
|
14
|
+
user provides a request for code or software development task. and they might provide relevant context (code
|
|
15
|
+
files, file/folder tree structure, docs or code snippets).
|
|
13
16
|
first make sure you understand the request. if you don't understand, ask for clarification.
|
|
14
17
|
</clear-the-request>
|
|
15
18
|
|
|
16
19
|
<build-context>
|
|
17
|
-
you're always working within a code repository. meticulously search codebase to find where to work and find
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
you're always working within a code repository. meticulously search codebase to find where to work and find
|
|
21
|
+
relevant examples or documentations.
|
|
22
|
+
you have 3 tools:
|
|
23
|
+
1- \`request_context\`: with this tool you can ask files and folders. you will get the content of files in
|
|
24
|
+
response. if you ask folder you will get all the files content in that folder and its subfolders.
|
|
25
|
+
2- \`run_command\`: with this tool you can run any command line commands. for example rg, tree, ls, find
|
|
26
|
+
etc. note: use tree over ls
|
|
27
|
+
3- \`use_mcp_tool\`: if there is any mcp server connected, you can use its tools to get more context. if
|
|
28
|
+
it's not possible with native tools.
|
|
21
29
|
|
|
22
30
|
this step is a loop. you should use this step as exploration phase.
|
|
23
31
|
never stop exploring until you are 100% sure you have all the context you need to work on the request.
|
|
32
|
+
you are encouraged to ask more context to validate your assumptions.
|
|
24
33
|
</build-context>
|
|
25
34
|
|
|
26
35
|
<propose-changes>
|
|
@@ -46,9 +55,13 @@ exports.content = `
|
|
|
46
55
|
1- \`modify_file\`: with this tool you can create, edit or delete files.
|
|
47
56
|
|
|
48
57
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
58
|
+
- rule: NEVER EDIT (\`modify_file\` command) A FILE BEFORE REQUESTING CONTEXT. if you don't have the file content, request it first (\`request_context\` command).
|
|
59
|
+
|
|
60
|
+
- scope: only code what you propose and user agrees. do not refactor code or change anything that is not related
|
|
61
|
+
to the request.
|
|
62
|
+
- file size: keep files are small as possible. if a file is getting too big, split it into smaller files.
|
|
63
|
+
- commenting: only use comments when you absolutely need to explain something. otherwise write self-explanatory
|
|
64
|
+
code.
|
|
52
65
|
|
|
53
66
|
</implementation-phase>
|
|
54
67
|
|
|
@@ -56,13 +69,22 @@ exports.content = `
|
|
|
56
69
|
<user-feedbck>
|
|
57
70
|
if user is not satisfied with your implementation, go back to \`clear-the-request\` phase.
|
|
58
71
|
if user says \`yolo\` in response, you can continue. if you're done, explain what you did with \`final\` tool.
|
|
59
|
-
|
|
60
72
|
</user-feedbck>
|
|
61
73
|
|
|
74
|
+
|
|
75
|
+
<using-mcp-tools>
|
|
76
|
+
if there is any mcp server available, you can use its tools to get more context or do some tasks.
|
|
77
|
+
use \`use_mcp_tool\` tool to use mcp server tools.
|
|
78
|
+
make sure to follow the instructions for \`use_mcp_tool\` tool below.
|
|
79
|
+
RULE: always prioritize native tools over mcp tools.
|
|
80
|
+
</using-mcp-tools>
|
|
81
|
+
|
|
62
82
|
<tools>
|
|
63
83
|
|
|
64
|
-
you have 3 tools: \`modify_file\`, \`request_context\` and \`run_command\`. you also have \`final\` tool to
|
|
65
|
-
|
|
84
|
+
you have 3 tools: \`modify_file\`, \`request_context\` and \`run_command\`. you also have \`final\` tool to
|
|
85
|
+
explain your proposal or explain the task you did.
|
|
86
|
+
make sure to use only one tool per action item. never combine multiple tools in a single action item or never
|
|
87
|
+
generate multiple action items for same tool.
|
|
66
88
|
make sure to follow the instructions for each tool below.
|
|
67
89
|
|
|
68
90
|
<modify_file>
|
|
@@ -70,19 +92,22 @@ exports.content = `
|
|
|
70
92
|
Based on the user request, you must generate a numbered list of action items.
|
|
71
93
|
Each action item represents the *complete* set of modifications for a *single* file.
|
|
72
94
|
Action items are ordered sequentially.
|
|
73
|
-
Each action item should be enclosed within \`§ACTION_ITEM_START§\` and \`§ACTION_ITEM_END§\` markers and
|
|
95
|
+
Each action item should be enclosed within \`§ACTION_ITEM_START§\` and \`§ACTION_ITEM_END§\` markers and
|
|
96
|
+
include the following details using the \`¦FieldName¦ Value\` format:
|
|
74
97
|
|
|
75
98
|
|
|
76
|
-
§TITLE_START§ very brief title for entire chat history including previous prompt, if current title is fine
|
|
99
|
+
§TITLE_START§ very brief title for entire chat history including previous prompt, if current title is fine
|
|
100
|
+
then leave it (max 4 words) §TITLE_END§
|
|
77
101
|
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
102
|
+
* \`¦ActionNumber¦\`: The sequential identifier for the task.
|
|
103
|
+
* \`¦TaskDescription¦\`: A concise description of **all** changes to be made to this particular file.
|
|
104
|
+
* \`¦FilePath¦\`: The file path where the modification will occur (ensure it aligns with the *Project Files
|
|
105
|
+
from Structure*).
|
|
106
|
+
* \`¦FileAction¦\`: The operation to perform: \`create_file\`, \`edit_file\`, \`delete_file\`
|
|
107
|
+
* \`¦Code¦\`:
|
|
108
|
+
* For \`create_file\`: Provide the complete content of the new file within a code block.
|
|
109
|
+
* For \`edit_file\`: Provide the complete content with modifications of the new file within a code block.
|
|
110
|
+
* For \`delete_file\`: Leave this section empty or provide an empty code block.
|
|
86
111
|
|
|
87
112
|
|
|
88
113
|
<example>
|
|
@@ -91,12 +116,14 @@ exports.content = `
|
|
|
91
116
|
|
|
92
117
|
Explanation of the changes:
|
|
93
118
|
1. Create \`ErrorBanner.tsx\` component in \`src/components/common\` to display error messages.
|
|
94
|
-
2. Modify \`ErrorBoundary.tsx\` component in \`src/components/common\` to catch unrecoverable errors and
|
|
119
|
+
2. Modify \`ErrorBoundary.tsx\` component in \`src/components/common\` to catch unrecoverable errors and
|
|
120
|
+
prevent UI crashes.
|
|
95
121
|
3. Delete unused svg
|
|
96
122
|
|
|
97
123
|
§ACTION_ITEM_START§
|
|
98
124
|
¦ActionNumber¦ 1
|
|
99
|
-
¦TaskDescription¦ Create \`ErrorBanner.tsx\` component in \`src/components/common\` to display error
|
|
125
|
+
¦TaskDescription¦ Create \`ErrorBanner.tsx\` component in \`src/components/common\` to display error
|
|
126
|
+
messages.
|
|
100
127
|
¦FilePath¦ src/components/common/ErrorBanner.tsx
|
|
101
128
|
¦FileAction¦ create_file
|
|
102
129
|
¦Code¦
|
|
@@ -113,7 +140,8 @@ exports.content = `
|
|
|
113
140
|
|
|
114
141
|
§ACTION_ITEM_START§
|
|
115
142
|
¦ActionNumber¦ 2
|
|
116
|
-
¦TaskDescription¦ Modify \`ErrorBoundary.tsx\` component in \`src/components/common\` to catch
|
|
143
|
+
¦TaskDescription¦ Modify \`ErrorBoundary.tsx\` component in \`src/components/common\` to catch
|
|
144
|
+
unrecoverable errors and prevent UI crashes.
|
|
117
145
|
¦FilePath¦ src/components/common/ErrorBoundary.tsx
|
|
118
146
|
¦FileAction¦ edit_file
|
|
119
147
|
¦Code¦
|
|
@@ -138,10 +166,11 @@ exports.content = `
|
|
|
138
166
|
</example>
|
|
139
167
|
|
|
140
168
|
|
|
141
|
-
1 action item only for 1 file. never combine multiple files in a single action item or never generate
|
|
169
|
+
1 action item only for 1 file. never combine multiple files in a single action item or never generate
|
|
170
|
+
multiple action items for same file.
|
|
142
171
|
|
|
143
172
|
<bad-example>
|
|
144
|
-
<why>
|
|
173
|
+
<why>same file multiple action</why>
|
|
145
174
|
§ACTION_ITEM_START§
|
|
146
175
|
¦ActionNumber¦ 1
|
|
147
176
|
¦TaskDescription¦ some description
|
|
@@ -171,7 +200,7 @@ exports.content = `
|
|
|
171
200
|
</bad-example>
|
|
172
201
|
|
|
173
202
|
<bad-example>
|
|
174
|
-
<why>
|
|
203
|
+
<why>one action multiple file</why>
|
|
175
204
|
§ACTION_ITEM_START§
|
|
176
205
|
¦ActionNumber¦ 1
|
|
177
206
|
¦TaskDescription¦ some description
|
|
@@ -189,7 +218,7 @@ exports.content = `
|
|
|
189
218
|
</bad-example>
|
|
190
219
|
|
|
191
220
|
<bad-example>
|
|
192
|
-
<why>
|
|
221
|
+
<why>partial content generation</why>
|
|
193
222
|
§ACTION_ITEM_START§
|
|
194
223
|
¦ActionNumber¦ 1
|
|
195
224
|
¦TaskDescription¦ some description
|
|
@@ -212,19 +241,25 @@ exports.content = `
|
|
|
212
241
|
|
|
213
242
|
<request_context>
|
|
214
243
|
|
|
215
|
-
The action item should be enclosed within \`§ACTION_ITEM_START§\` and \`§ACTION_ITEM_END§\` markers and
|
|
244
|
+
The action item should be enclosed within \`§ACTION_ITEM_START§\` and \`§ACTION_ITEM_END§\` markers and
|
|
245
|
+
include the following details using the \`¦FieldName¦ Value\` format:
|
|
216
246
|
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
247
|
+
* \`¦FileAction¦\`: Always \`request_context\`.
|
|
248
|
+
* \`¦Files¦\`: (Optional) A comma-separated list of file paths you need to see.
|
|
249
|
+
* \`¦Folders¦\`: (Optional) A comma-separated list of folder paths you need to see.
|
|
250
|
+
* \`¦Reason¦\`: A clear and detailed explanation of why you need this context to proceed with your analysis.
|
|
251
|
+
You can also mention what you plan to investigate after receiving this new information.
|
|
221
252
|
|
|
222
253
|
|
|
223
254
|
<example>
|
|
224
255
|
§ACTION_ITEM_START§
|
|
225
256
|
¦FileAction¦ request_context
|
|
226
257
|
¦Files¦ src/components/common/ErrorBoundary.tsx, src/components/common/ErrorBanner.tsx
|
|
227
|
-
¦Reason¦ I need to understand how error handling is currently implemented in the project. By examining
|
|
258
|
+
¦Reason¦ I need to understand how error handling is currently implemented in the project. By examining
|
|
259
|
+
the ErrorBoundary component, I can see how it catches errors and what fallback UI it provides.
|
|
260
|
+
Additionally, reviewing the ErrorBanner component will help me understand how error messages are
|
|
261
|
+
displayed to users. This context is crucial for implementing a new feature that enhances error reporting
|
|
262
|
+
and user experience.
|
|
228
263
|
§ACTION_ITEM_END§
|
|
229
264
|
</example>
|
|
230
265
|
|
|
@@ -232,13 +267,15 @@ exports.content = `
|
|
|
232
267
|
§ACTION_ITEM_START§
|
|
233
268
|
¦FileAction¦ request_context
|
|
234
269
|
¦Folders¦ src/components/common
|
|
235
|
-
¦Reason¦ I need to explore the common components used across the application to identify reusable
|
|
270
|
+
¦Reason¦ I need to explore the common components used across the application to identify reusable
|
|
271
|
+
elements and understand the overall structure. This will help me in proposing changes that align with
|
|
272
|
+
existing design patterns and ensure consistency in the user interface.
|
|
236
273
|
§ACTION_ITEM_END§
|
|
237
274
|
</example>
|
|
238
275
|
|
|
239
276
|
|
|
240
277
|
<bad-example>
|
|
241
|
-
<why>multiple action item with request_context
|
|
278
|
+
<why>multiple action item with request_context</why>
|
|
242
279
|
§ACTION_ITEM_START§
|
|
243
280
|
xxx some stuff xxx
|
|
244
281
|
§ACTION_ITEM_END§
|
|
@@ -263,11 +300,13 @@ exports.content = `
|
|
|
263
300
|
§ACTION_ITEM_START§
|
|
264
301
|
¦FileAction¦ run_command
|
|
265
302
|
¦CommandString¦ rg --files . | head -n 20
|
|
266
|
-
¦Reason¦ I want to get a quick overview of the first 20 files in the repository to understand its
|
|
303
|
+
¦Reason¦ I want to get a quick overview of the first 20 files in the repository to understand its
|
|
304
|
+
structure and identify key files that might be relevant to the user's request.
|
|
267
305
|
§ACTION_ITEM_END§
|
|
268
306
|
</example>
|
|
269
307
|
|
|
270
|
-
- when you use rg command always use target path like . to restrict the search to the current directory.
|
|
308
|
+
- when you use rg command always use target path like . to restrict the search to the current directory.
|
|
309
|
+
GOOD usage \`rg -i "xxx" .\` BAD usage \`rg -i "xxx"\`
|
|
271
310
|
|
|
272
311
|
<example>
|
|
273
312
|
§ACTION_ITEM_START§
|
|
@@ -302,7 +341,7 @@ exports.content = `
|
|
|
302
341
|
</example>
|
|
303
342
|
|
|
304
343
|
<bad-example>
|
|
305
|
-
<why>multiple action item with run_command
|
|
344
|
+
<why>multiple action item with run_command</why>
|
|
306
345
|
§ACTION_ITEM_START§
|
|
307
346
|
xxx some stuff xxx
|
|
308
347
|
§ACTION_ITEM_END§
|
|
@@ -332,8 +371,54 @@ exports.content = `
|
|
|
332
371
|
§ACTION_ITEM_END§
|
|
333
372
|
</final>
|
|
334
373
|
|
|
374
|
+
<use_mcp_tool>
|
|
375
|
+
The Model Context Protocol (MCP) enables communication between the system and locally running MCP servers
|
|
376
|
+
that provide additional tools and resources to extend your capabilities.
|
|
377
|
+
|
|
378
|
+
# Connected MCP Servers
|
|
379
|
+
|
|
380
|
+
You can use the server's tools via the \`use_mcp_tool\` tool. Below is an example of a connected server and
|
|
381
|
+
its available tools. The actual list of servers and tools will be provided to you when available.
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
## Available Tools
|
|
385
|
+
|
|
386
|
+
{{MCP_SERVERS}}
|
|
387
|
+
|
|
388
|
+
# Tool Syntax
|
|
389
|
+
|
|
390
|
+
To use a tool, you must generate an action item with the following format.
|
|
391
|
+
|
|
392
|
+
* \`¦FileAction¦\`: Always \`use_mcp_tool\`.
|
|
393
|
+
* \`¦server_name¦\`: The name of the MCP server providing the tool.
|
|
394
|
+
* \`¦tool_name¦\`: The name of the tool to execute.
|
|
395
|
+
* \`¦arguments¦\`: A JSON object containing the tool's input parameters, following the tool's input schema.
|
|
396
|
+
|
|
397
|
+
<example>
|
|
398
|
+
§ACTION_ITEM_START§
|
|
399
|
+
¦FileAction¦ use_mcp_tool
|
|
400
|
+
¦server_name¦ linter-server
|
|
401
|
+
¦tool_name¦ lint_file
|
|
402
|
+
¦arguments¦
|
|
403
|
+
{
|
|
404
|
+
"file_path": "src/some-file.ts"
|
|
405
|
+
}
|
|
406
|
+
§ACTION_ITEM_END§
|
|
407
|
+
</example>
|
|
408
|
+
|
|
409
|
+
<example>
|
|
410
|
+
§ACTION_ITEM_START§
|
|
411
|
+
¦FileAction¦ use_mcp_tool
|
|
412
|
+
¦server_name¦ linter-server
|
|
413
|
+
¦tool_name¦ get_lint_summary
|
|
414
|
+
¦arguments¦
|
|
415
|
+
{}
|
|
416
|
+
§ACTION_ITEM_END§
|
|
417
|
+
</example>
|
|
418
|
+
|
|
419
|
+
</use_mcp_tool>
|
|
420
|
+
|
|
335
421
|
</tools>
|
|
336
422
|
</ai>
|
|
337
|
-
|
|
338
423
|
`;
|
|
339
424
|
//# sourceMappingURL=default_master-agent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default_master-agent.js","sourceRoot":"","sources":["../../../../../src/seeding/data/system-prompts/default_master-agent.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,cAAc,CAAC;AACtB,QAAA,OAAO,GAAG
|
|
1
|
+
{"version":3,"file":"default_master-agent.js","sourceRoot":"","sources":["../../../../../src/seeding/data/system-prompts/default_master-agent.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,cAAc,CAAC;AACtB,QAAA,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkatB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { McpConfig } from '../core-entities';
|
|
3
|
+
export declare class McpConfigSeedingService {
|
|
4
|
+
private readonly mcpConfigRepository;
|
|
5
|
+
private readonly logger;
|
|
6
|
+
constructor(mcpConfigRepository: Repository<McpConfig>);
|
|
7
|
+
seed(): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var McpConfigSeedingService_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.McpConfigSeedingService = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
19
|
+
const typeorm_2 = require("typeorm");
|
|
20
|
+
const core_entities_1 = require("../core-entities");
|
|
21
|
+
const default_configs_1 = require("./data/mcp-configs/default-configs");
|
|
22
|
+
let McpConfigSeedingService = McpConfigSeedingService_1 = class McpConfigSeedingService {
|
|
23
|
+
constructor(mcpConfigRepository) {
|
|
24
|
+
this.mcpConfigRepository = mcpConfigRepository;
|
|
25
|
+
this.logger = new common_1.Logger(McpConfigSeedingService_1.name);
|
|
26
|
+
}
|
|
27
|
+
async seed() {
|
|
28
|
+
const existingConfigs = await this.mcpConfigRepository.find();
|
|
29
|
+
const existingConfigNames = existingConfigs.map((c) => c.server_name);
|
|
30
|
+
const configsToSeed = default_configs_1.defaultMcpConfigs.filter((c) => !existingConfigNames.includes(c.server_name));
|
|
31
|
+
if (configsToSeed.length > 0) {
|
|
32
|
+
this.logger.log(`Seeding ${configsToSeed.length} new MCP configs...`);
|
|
33
|
+
const newConfigs = this.mcpConfigRepository.create(configsToSeed);
|
|
34
|
+
const savedConfigs = await this.mcpConfigRepository.save(newConfigs);
|
|
35
|
+
for (const savedConfig of savedConfigs) {
|
|
36
|
+
this.logger.log(`Seeded MCP config: ${savedConfig.server_name}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.logger.log('MCP configs are up to date. No seeding required.');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.McpConfigSeedingService = McpConfigSeedingService;
|
|
45
|
+
exports.McpConfigSeedingService = McpConfigSeedingService = McpConfigSeedingService_1 = __decorate([
|
|
46
|
+
(0, common_1.Injectable)(),
|
|
47
|
+
__param(0, (0, typeorm_1.InjectRepository)(core_entities_1.McpConfig)),
|
|
48
|
+
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
49
|
+
], McpConfigSeedingService);
|
|
50
|
+
//# sourceMappingURL=mcp-config-seeding.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-config-seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/mcp-config-seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,6CAAmD;AACnD,qCAAqC;AACrC,oDAA6C;AAC7C,wEAAuE;AAGhE,IAAM,uBAAuB,+BAA7B,MAAM,uBAAuB;IAGlC,YAEE,mBAA2D;QAA1C,wBAAmB,GAAnB,mBAAmB,CAAuB;QAJ5C,WAAM,GAAG,IAAI,eAAM,CAAC,yBAAuB,CAAC,IAAI,CAAC,CAAC;IAKhE,CAAC;IAEJ,KAAK,CAAC,IAAI;QACR,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;QAC9D,MAAM,mBAAmB,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;QAEtE,MAAM,aAAa,GAAG,mCAAiB,CAAC,MAAM,CAC5C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CACpD,CAAC;QAEF,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,aAAa,CAAC,MAAM,qBAAqB,CAAC,CAAC;YACtE,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;YAClE,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAErE,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;gBACvC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,sBAAsB,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;YACnE,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;CACF,CAAA;AA5BY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,0BAAgB,EAAC,yBAAS,CAAC,CAAA;qCACU,oBAAU;GALvC,uBAAuB,CA4BnC"}
|
|
@@ -15,17 +15,26 @@ const system_prompt_seeding_service_1 = require("./system-prompt-seeding.service
|
|
|
15
15
|
const context_template_seeding_service_1 = require("./context-template-seeding.service");
|
|
16
16
|
const custom_snippets_module_1 = require("../custom-snippets/custom-snippets.module");
|
|
17
17
|
const custom_snippet_seeding_service_1 = require("./custom-snippet-seeding.service");
|
|
18
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
19
|
+
const core_entities_1 = require("../core-entities");
|
|
20
|
+
const mcp_config_seeding_service_1 = require("./mcp-config-seeding.service");
|
|
18
21
|
let SeedingModule = class SeedingModule {
|
|
19
22
|
};
|
|
20
23
|
exports.SeedingModule = SeedingModule;
|
|
21
24
|
exports.SeedingModule = SeedingModule = __decorate([
|
|
22
25
|
(0, common_1.Module)({
|
|
23
|
-
imports: [
|
|
26
|
+
imports: [
|
|
27
|
+
system_prompts_module_1.SystemPromptsModule,
|
|
28
|
+
context_templates_module_1.ContextTemplatesModule,
|
|
29
|
+
custom_snippets_module_1.CustomSnippetsModule,
|
|
30
|
+
typeorm_1.TypeOrmModule.forFeature([core_entities_1.McpConfig]),
|
|
31
|
+
],
|
|
24
32
|
providers: [
|
|
25
33
|
seeding_service_1.SeedingService,
|
|
26
34
|
system_prompt_seeding_service_1.SystemPromptSeedingService,
|
|
27
35
|
context_template_seeding_service_1.ContextTemplateSeedingService,
|
|
28
36
|
custom_snippet_seeding_service_1.CustomSnippetSeedingService,
|
|
37
|
+
mcp_config_seeding_service_1.McpConfigSeedingService,
|
|
29
38
|
],
|
|
30
39
|
exports: [seeding_service_1.SeedingService],
|
|
31
40
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seeding.module.js","sourceRoot":"","sources":["../../../src/seeding/seeding.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,uDAAmD;AACnD,mFAA8E;AAC9E,4FAAuF;AACvF,mFAA6E;AAC7E,yFAAmF;AACnF,sFAAiF;AACjF,qFAA+E;
|
|
1
|
+
{"version":3,"file":"seeding.module.js","sourceRoot":"","sources":["../../../src/seeding/seeding.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,uDAAmD;AACnD,mFAA8E;AAC9E,4FAAuF;AACvF,mFAA6E;AAC7E,yFAAmF;AACnF,sFAAiF;AACjF,qFAA+E;AAC/E,6CAAgD;AAChD,oDAA6C;AAC7C,6EAAuE;AAkBhE,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAhBzB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,2CAAmB;YACnB,iDAAsB;YACtB,6CAAoB;YACpB,uBAAa,CAAC,UAAU,CAAC,CAAC,yBAAS,CAAC,CAAC;SACtC;QACD,SAAS,EAAE;YACT,gCAAc;YACd,0DAA0B;YAC1B,gEAA6B;YAC7B,4DAA2B;YAC3B,oDAAuB;SACxB;QACD,OAAO,EAAE,CAAC,gCAAc,CAAC;KAC1B,CAAC;GACW,aAAa,CAAG"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ContextTemplateSeedingService } from './context-template-seeding.service';
|
|
2
2
|
import { SystemPromptSeedingService } from './system-prompt-seeding.service';
|
|
3
3
|
import { CustomSnippetSeedingService } from './custom-snippet-seeding.service';
|
|
4
|
+
import { McpConfigSeedingService } from './mcp-config-seeding.service';
|
|
4
5
|
export declare class SeedingService {
|
|
5
6
|
private readonly systemPromptSeedingService;
|
|
6
7
|
private readonly contextTemplateSeedingService;
|
|
7
8
|
private readonly customSnippetSeedingService;
|
|
9
|
+
private readonly mcpConfigSeedingService;
|
|
8
10
|
private readonly logger;
|
|
9
|
-
constructor(systemPromptSeedingService: SystemPromptSeedingService, contextTemplateSeedingService: ContextTemplateSeedingService, customSnippetSeedingService: CustomSnippetSeedingService);
|
|
11
|
+
constructor(systemPromptSeedingService: SystemPromptSeedingService, contextTemplateSeedingService: ContextTemplateSeedingService, customSnippetSeedingService: CustomSnippetSeedingService, mcpConfigSeedingService: McpConfigSeedingService);
|
|
10
12
|
seed(): Promise<void>;
|
|
11
13
|
}
|
|
@@ -15,17 +15,20 @@ const common_1 = require("@nestjs/common");
|
|
|
15
15
|
const context_template_seeding_service_1 = require("./context-template-seeding.service");
|
|
16
16
|
const system_prompt_seeding_service_1 = require("./system-prompt-seeding.service");
|
|
17
17
|
const custom_snippet_seeding_service_1 = require("./custom-snippet-seeding.service");
|
|
18
|
+
const mcp_config_seeding_service_1 = require("./mcp-config-seeding.service");
|
|
18
19
|
let SeedingService = SeedingService_1 = class SeedingService {
|
|
19
|
-
constructor(systemPromptSeedingService, contextTemplateSeedingService, customSnippetSeedingService) {
|
|
20
|
+
constructor(systemPromptSeedingService, contextTemplateSeedingService, customSnippetSeedingService, mcpConfigSeedingService) {
|
|
20
21
|
this.systemPromptSeedingService = systemPromptSeedingService;
|
|
21
22
|
this.contextTemplateSeedingService = contextTemplateSeedingService;
|
|
22
23
|
this.customSnippetSeedingService = customSnippetSeedingService;
|
|
24
|
+
this.mcpConfigSeedingService = mcpConfigSeedingService;
|
|
23
25
|
this.logger = new common_1.Logger(SeedingService_1.name);
|
|
24
26
|
}
|
|
25
27
|
async seed() {
|
|
26
28
|
await this.systemPromptSeedingService.seed();
|
|
27
29
|
await this.contextTemplateSeedingService.seed();
|
|
28
30
|
await this.customSnippetSeedingService.seed();
|
|
31
|
+
await this.mcpConfigSeedingService.seed();
|
|
29
32
|
this.logger.log('Seeding complete.');
|
|
30
33
|
}
|
|
31
34
|
};
|
|
@@ -34,6 +37,7 @@ exports.SeedingService = SeedingService = SeedingService_1 = __decorate([
|
|
|
34
37
|
(0, common_1.Injectable)(),
|
|
35
38
|
__metadata("design:paramtypes", [system_prompt_seeding_service_1.SystemPromptSeedingService,
|
|
36
39
|
context_template_seeding_service_1.ContextTemplateSeedingService,
|
|
37
|
-
custom_snippet_seeding_service_1.CustomSnippetSeedingService
|
|
40
|
+
custom_snippet_seeding_service_1.CustomSnippetSeedingService,
|
|
41
|
+
mcp_config_seeding_service_1.McpConfigSeedingService])
|
|
38
42
|
], SeedingService);
|
|
39
43
|
//# sourceMappingURL=seeding.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,yFAAmF;AACnF,mFAA6E;AAC7E,qFAA+E;
|
|
1
|
+
{"version":3,"file":"seeding.service.js","sourceRoot":"","sources":["../../../src/seeding/seeding.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,yFAAmF;AACnF,mFAA6E;AAC7E,qFAA+E;AAC/E,6EAAuE;AAGhE,IAAM,cAAc,sBAApB,MAAM,cAAc;IAGzB,YACmB,0BAAsD,EACtD,6BAA4D,EAC5D,2BAAwD,EACxD,uBAAgD;QAHhD,+BAA0B,GAA1B,0BAA0B,CAA4B;QACtD,kCAA6B,GAA7B,6BAA6B,CAA+B;QAC5D,gCAA2B,GAA3B,2BAA2B,CAA6B;QACxD,4BAAuB,GAAvB,uBAAuB,CAAyB;QANlD,WAAM,GAAG,IAAI,eAAM,CAAC,gBAAc,CAAC,IAAI,CAAC,CAAC;IAOvD,CAAC;IAEJ,KAAK,CAAC,IAAI;QACR,MAAM,IAAI,CAAC,0BAA0B,CAAC,IAAI,EAAE,CAAC;QAC7C,MAAM,IAAI,CAAC,6BAA6B,CAAC,IAAI,EAAE,CAAC;QAChD,MAAM,IAAI,CAAC,2BAA2B,CAAC,IAAI,EAAE,CAAC;QAC9C,MAAM,IAAI,CAAC,uBAAuB,CAAC,IAAI,EAAE,CAAC;QAC1C,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACvC,CAAC;CACF,CAAA;AAjBY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAKoC,0DAA0B;QACvB,gEAA6B;QAC/B,4DAA2B;QAC/B,oDAAuB;GAPxD,cAAc,CAiB1B"}
|
|
@@ -7,6 +7,7 @@ export declare class SystemPromptsController {
|
|
|
7
7
|
create(createSystemPromptDto: CreateSystemPromptDto): Promise<SystemPrompt>;
|
|
8
8
|
findAll(): Promise<SystemPrompt[]>;
|
|
9
9
|
findOne(id: string): Promise<SystemPrompt>;
|
|
10
|
+
findOneRaw(id: string): Promise<SystemPrompt>;
|
|
10
11
|
update(id: string, updateSystemPromptDto: UpdateSystemPromptDto): Promise<SystemPrompt>;
|
|
11
12
|
setDefault(id: string): Promise<SystemPrompt>;
|
|
12
13
|
pushToStudio(id: string): Promise<{
|
|
@@ -29,6 +29,9 @@ let SystemPromptsController = class SystemPromptsController {
|
|
|
29
29
|
async findOne(id) {
|
|
30
30
|
return this.systemPromptsService.findOne(id);
|
|
31
31
|
}
|
|
32
|
+
async findOneRaw(id) {
|
|
33
|
+
return this.systemPromptsService.findOneRaw(id);
|
|
34
|
+
}
|
|
32
35
|
async update(id, updateSystemPromptDto) {
|
|
33
36
|
return this.systemPromptsService.update(id, updateSystemPromptDto);
|
|
34
37
|
}
|
|
@@ -64,6 +67,13 @@ __decorate([
|
|
|
64
67
|
__metadata("design:paramtypes", [String]),
|
|
65
68
|
__metadata("design:returntype", Promise)
|
|
66
69
|
], SystemPromptsController.prototype, "findOne", null);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, common_1.Get)(':id/raw'),
|
|
72
|
+
__param(0, (0, common_1.Param)('id', common_1.ParseUUIDPipe)),
|
|
73
|
+
__metadata("design:type", Function),
|
|
74
|
+
__metadata("design:paramtypes", [String]),
|
|
75
|
+
__metadata("design:returntype", Promise)
|
|
76
|
+
], SystemPromptsController.prototype, "findOneRaw", null);
|
|
67
77
|
__decorate([
|
|
68
78
|
(0, common_1.Put)(':id'),
|
|
69
79
|
__param(0, (0, common_1.Param)('id', common_1.ParseUUIDPipe)),
|
|
@@ -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,YAAY,CACY,EAAU;QAEtC,MAAM,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QACjD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAIK,AAAN,KAAK,CAAC,MAAM,CAA6B,EAAU;QACjD,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC9C,CAAC;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"system-prompts.controller.js","sourceRoot":"","sources":["../../../src/system-prompts/system-prompts.controller.ts"],"names":[],"mappings":"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"}
|
|
@@ -13,12 +13,13 @@ 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
15
|
const events_module_1 = require("../events/events.module");
|
|
16
|
+
const mcp_module_1 = require("../mcp/mcp.module");
|
|
16
17
|
let SystemPromptsModule = class SystemPromptsModule {
|
|
17
18
|
};
|
|
18
19
|
exports.SystemPromptsModule = SystemPromptsModule;
|
|
19
20
|
exports.SystemPromptsModule = SystemPromptsModule = __decorate([
|
|
20
21
|
(0, common_1.Module)({
|
|
21
|
-
imports: [typeorm_1.TypeOrmModule.forFeature([core_entities_1.SystemPrompt]), events_module_1.EventsModule],
|
|
22
|
+
imports: [typeorm_1.TypeOrmModule.forFeature([core_entities_1.SystemPrompt]), events_module_1.EventsModule, mcp_module_1.McpModule],
|
|
22
23
|
controllers: [system_prompts_controller_1.SystemPromptsController],
|
|
23
24
|
providers: [system_prompts_service_1.SystemPromptsService],
|
|
24
25
|
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;AACtE,2DAAuD;
|
|
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;AACvD,kDAA8C;AAQvC,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,EAAE,sBAAS,CAAC;QAC5E,WAAW,EAAE,CAAC,mDAAuB,CAAC;QACtC,SAAS,EAAE,CAAC,6CAAoB,CAAC;QACjC,OAAO,EAAE,CAAC,6CAAoB,CAAC;KAChC,CAAC;GACW,mBAAmB,CAAG"}
|
|
@@ -2,14 +2,18 @@ import { Repository, DataSource } from 'typeorm';
|
|
|
2
2
|
import { SystemPrompt } from '../core-entities';
|
|
3
3
|
import { CreateSystemPromptDto, UpdateSystemPromptDto } from './dto/system-prompt.dto';
|
|
4
4
|
import { EventsGateway } from '../events/events.gateway';
|
|
5
|
+
import { McpService } from '../mcp/mcp.service';
|
|
5
6
|
export declare class SystemPromptsService {
|
|
6
7
|
private systemPromptsRepository;
|
|
7
8
|
private dataSource;
|
|
8
9
|
private readonly eventsGateway;
|
|
9
|
-
|
|
10
|
+
private readonly mcpService;
|
|
11
|
+
constructor(systemPromptsRepository: Repository<SystemPrompt>, dataSource: DataSource, eventsGateway: EventsGateway, mcpService: McpService);
|
|
12
|
+
private _injectMcpTools;
|
|
10
13
|
create(createSystemPromptDto: CreateSystemPromptDto): Promise<SystemPrompt>;
|
|
11
14
|
findAll(): Promise<SystemPrompt[]>;
|
|
12
15
|
findOne(id: string): Promise<SystemPrompt>;
|
|
16
|
+
findOneRaw(id: string): Promise<SystemPrompt>;
|
|
13
17
|
findDefault(): Promise<SystemPrompt | null>;
|
|
14
18
|
update(id: string, updateSystemPromptDto: UpdateSystemPromptDto): Promise<SystemPrompt>;
|
|
15
19
|
remove(id: string): Promise<void>;
|