repoburg 1.3.134 → 1.3.135
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/.playwright-mcp/console-2026-05-14T23-58-12-858Z.log +28 -0
- package/.playwright-mcp/console-2026-05-15T00-15-00-760Z.log +81 -0
- package/.playwright-mcp/page-2026-05-14T23-58-13-064Z.yml +3 -0
- package/.playwright-mcp/page-2026-05-14T23-58-33-500Z.yml +1561 -0
- package/.playwright-mcp/page-2026-05-15T00-15-00-945Z.yml +3 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-context-snippets.handler.d.ts +18 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-context-snippets.handler.js +224 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-context-snippets.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-context-templates.handler.d.ts +20 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-context-templates.handler.js +309 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-context-templates.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-custom-snippets.handler.d.ts +19 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-custom-snippets.handler.js +249 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-custom-snippets.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-custom-variables.handler.d.ts +17 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-custom-variables.handler.js +227 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-custom-variables.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-mcp-servers.handler.d.ts +18 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-mcp-servers.handler.js +246 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-mcp-servers.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-sub-agents.handler.d.ts +19 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-sub-agents.handler.js +297 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-sub-agents.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-system-prompts.handler.d.ts +27 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-system-prompts.handler.js +493 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-system-prompts.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-tool-hooks.handler.d.ts +20 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-tool-hooks.handler.js +313 -0
- package/backend/dist/src/llm-orchestration/action-handlers/manage-tool-hooks.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.js +41 -1
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.js.map +1 -1
- package/backend/dist/src/seeding/data/sub-agents/config-manager.d.ts +4 -0
- package/backend/dist/src/seeding/data/sub-agents/config-manager.js +25 -0
- package/backend/dist/src/seeding/data/sub-agents/config-manager.js.map +1 -0
- package/backend/dist/src/seeding/data/system-prompts/config-manager-agent.d.ts +3 -0
- package/backend/dist/src/seeding/data/system-prompts/config-manager-agent.js +78 -0
- package/backend/dist/src/seeding/data/system-prompts/config-manager-agent.js.map +1 -0
- package/backend/dist/src/system-prompts/system-prompts.service.js +8 -0
- package/backend/dist/src/system-prompts/system-prompts.service.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
package/backend/dist/src/llm-orchestration/action-handlers/manage-context-snippets.handler.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ActionHandler } from './action-handler.interface';
|
|
2
|
+
import { ActionExecutionResult, PlanExecutionContext, ToolMetadata } from '../llm-orchestration.interfaces';
|
|
3
|
+
import { ContextSnippetsService } from '../../context-snippets/context-snippets.service';
|
|
4
|
+
export type ContextSnippetAction = 'list' | 'get' | 'create' | 'update' | 'delete';
|
|
5
|
+
export declare class ManageContextSnippetsHandler implements ActionHandler {
|
|
6
|
+
private readonly contextSnippetsService;
|
|
7
|
+
readonly toolName = "manage_context_snippets";
|
|
8
|
+
private readonly logger;
|
|
9
|
+
constructor(contextSnippetsService: ContextSnippetsService);
|
|
10
|
+
getMetadata(): ToolMetadata;
|
|
11
|
+
getDefinition(): string;
|
|
12
|
+
execute(args: Record<string, any>, _context: PlanExecutionContext): Promise<ActionExecutionResult>;
|
|
13
|
+
private handleList;
|
|
14
|
+
private handleGet;
|
|
15
|
+
private handleCreate;
|
|
16
|
+
private handleUpdate;
|
|
17
|
+
private handleDelete;
|
|
18
|
+
}
|
|
@@ -0,0 +1,224 @@
|
|
|
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 ManageContextSnippetsHandler_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.ManageContextSnippetsHandler = void 0;
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const context_snippets_service_1 = require("../../context-snippets/context-snippets.service");
|
|
16
|
+
let ManageContextSnippetsHandler = ManageContextSnippetsHandler_1 = class ManageContextSnippetsHandler {
|
|
17
|
+
constructor(contextSnippetsService) {
|
|
18
|
+
this.contextSnippetsService = contextSnippetsService;
|
|
19
|
+
this.toolName = 'manage_context_snippets';
|
|
20
|
+
this.logger = new common_1.Logger(ManageContextSnippetsHandler_1.name);
|
|
21
|
+
}
|
|
22
|
+
getMetadata() {
|
|
23
|
+
return {
|
|
24
|
+
name: this.toolName,
|
|
25
|
+
description: 'Manage RepoBurg context snippets — reusable Eta template blocks accessible via it.snippets.handle in context templates.',
|
|
26
|
+
arguments: [
|
|
27
|
+
{
|
|
28
|
+
name: 'action',
|
|
29
|
+
type: 'string',
|
|
30
|
+
description: 'Operation: list|get|create|update|delete',
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'id',
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: 'UUID of the context snippet (required for get/update/delete)',
|
|
37
|
+
required: false,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'data',
|
|
41
|
+
type: 'object',
|
|
42
|
+
description: 'Fields for create/update. Keys: handle (required for create, unique), description, template_content (required for create, Eta syntax).',
|
|
43
|
+
required: false,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
getDefinition() {
|
|
49
|
+
return `## manage_context_snippets
|
|
50
|
+
|
|
51
|
+
Manage RepoBurg context snippets — reusable Eta template blocks accessible via \`it.snippets.handle\` in context templates. Use snippets for frequently-needed context like git status, package info, etc.
|
|
52
|
+
|
|
53
|
+
### Actions:
|
|
54
|
+
|
|
55
|
+
- **list** — List all context snippets (returns id, handle, description)
|
|
56
|
+
- **get** — Get full details of a snippet by ID
|
|
57
|
+
- **create** — Create a new snippet. Provide \`data\` with: handle (required, unique identifier), description, template_content (required, Eta template)
|
|
58
|
+
- **update** — Update a snippet. Provide \`id\` and \`data\` with fields to change (handle, description, template_content)
|
|
59
|
+
- **delete** — Delete a snippet by ID
|
|
60
|
+
|
|
61
|
+
### Parameters:
|
|
62
|
+
- **action** (required): Operation to perform
|
|
63
|
+
- **id** (optional): UUID of the context snippet
|
|
64
|
+
- **data** (optional): Object with snippet fields
|
|
65
|
+
|
|
66
|
+
### Examples:
|
|
67
|
+
|
|
68
|
+
List all snippets:
|
|
69
|
+
\`\`\`typescript
|
|
70
|
+
tool: manage_context_snippets
|
|
71
|
+
args: { action: "list" }
|
|
72
|
+
\`\`\`
|
|
73
|
+
|
|
74
|
+
Create a snippet:
|
|
75
|
+
\`\`\`typescript
|
|
76
|
+
tool: manage_context_snippets
|
|
77
|
+
args: { action: "create", data: { handle: "git-status", description: "Current git branch and recent commits", template_content: "<%= await it.runCommand('git log --oneline -5') %>" } }
|
|
78
|
+
\`\`\``;
|
|
79
|
+
}
|
|
80
|
+
async execute(args, _context) {
|
|
81
|
+
const { action } = args;
|
|
82
|
+
try {
|
|
83
|
+
switch (action) {
|
|
84
|
+
case 'list':
|
|
85
|
+
return await this.handleList();
|
|
86
|
+
case 'get':
|
|
87
|
+
return await this.handleGet(args.id);
|
|
88
|
+
case 'create':
|
|
89
|
+
return await this.handleCreate(args.data);
|
|
90
|
+
case 'update':
|
|
91
|
+
return await this.handleUpdate(args.id, args.data);
|
|
92
|
+
case 'delete':
|
|
93
|
+
return await this.handleDelete(args.id);
|
|
94
|
+
default:
|
|
95
|
+
return {
|
|
96
|
+
status: 'FAILURE',
|
|
97
|
+
summary: `Unknown action "${action}". Valid actions: list, get, create, update, delete`,
|
|
98
|
+
error_message: `Unknown action: ${action}`,
|
|
99
|
+
execution_log: {
|
|
100
|
+
output: '',
|
|
101
|
+
error_message: `Unknown action: ${action}`,
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
this.logger.error(`manage_context_snippets error: ${error.message}`, error.stack);
|
|
108
|
+
return {
|
|
109
|
+
status: 'FAILURE',
|
|
110
|
+
summary: `Failed to ${action} context snippet: ${error.message}`,
|
|
111
|
+
error_message: error.message,
|
|
112
|
+
execution_log: { output: '', error_message: error.message },
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
async handleList() {
|
|
117
|
+
const snippets = await this.contextSnippetsService.findAll();
|
|
118
|
+
const summary = snippets.map((s) => ({
|
|
119
|
+
id: s.id,
|
|
120
|
+
handle: s.handle,
|
|
121
|
+
description: s.description,
|
|
122
|
+
}));
|
|
123
|
+
return {
|
|
124
|
+
status: 'SUCCESS',
|
|
125
|
+
summary: `Found ${snippets.length} context snippet(s).`,
|
|
126
|
+
execution_log: {
|
|
127
|
+
output: JSON.stringify(summary, null, 2),
|
|
128
|
+
error_message: '',
|
|
129
|
+
},
|
|
130
|
+
persisted_args: {},
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
async handleGet(id) {
|
|
134
|
+
if (!id) {
|
|
135
|
+
return {
|
|
136
|
+
status: 'FAILURE',
|
|
137
|
+
summary: 'id is required for get action',
|
|
138
|
+
error_message: 'Missing id',
|
|
139
|
+
execution_log: { output: '', error_message: 'Missing id' },
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
const snippet = await this.contextSnippetsService.findOne(id);
|
|
143
|
+
return {
|
|
144
|
+
status: 'SUCCESS',
|
|
145
|
+
summary: `Context snippet "${snippet.handle}"`,
|
|
146
|
+
execution_log: {
|
|
147
|
+
output: JSON.stringify(snippet, null, 2),
|
|
148
|
+
error_message: '',
|
|
149
|
+
},
|
|
150
|
+
persisted_args: {},
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
async handleCreate(data) {
|
|
154
|
+
if (!data || !data.handle || !data.template_content) {
|
|
155
|
+
return {
|
|
156
|
+
status: 'FAILURE',
|
|
157
|
+
summary: 'data.handle and data.template_content are required for create',
|
|
158
|
+
error_message: 'Missing required fields',
|
|
159
|
+
execution_log: { output: '', error_message: 'Missing required fields' },
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
const snippet = await this.contextSnippetsService.create({
|
|
163
|
+
handle: data.handle,
|
|
164
|
+
description: data.description,
|
|
165
|
+
template_content: data.template_content,
|
|
166
|
+
});
|
|
167
|
+
const result = { id: snippet.id, handle: snippet.handle };
|
|
168
|
+
return {
|
|
169
|
+
status: 'SUCCESS',
|
|
170
|
+
summary: `Context snippet "${snippet.handle}" created with ID ${snippet.id}`,
|
|
171
|
+
execution_log: {
|
|
172
|
+
output: JSON.stringify(result, null, 2),
|
|
173
|
+
error_message: '',
|
|
174
|
+
},
|
|
175
|
+
persisted_args: {},
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
async handleUpdate(id, data) {
|
|
179
|
+
if (!id || !data) {
|
|
180
|
+
return {
|
|
181
|
+
status: 'FAILURE',
|
|
182
|
+
summary: 'id and data are required for update action',
|
|
183
|
+
error_message: 'Missing parameters',
|
|
184
|
+
execution_log: { output: '', error_message: 'Missing parameters' },
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
const snippet = await this.contextSnippetsService.update(id, data);
|
|
188
|
+
return {
|
|
189
|
+
status: 'SUCCESS',
|
|
190
|
+
summary: `Context snippet "${snippet.handle}" updated`,
|
|
191
|
+
execution_log: {
|
|
192
|
+
output: JSON.stringify({ id: snippet.id, handle: snippet.handle }, null, 2),
|
|
193
|
+
error_message: '',
|
|
194
|
+
},
|
|
195
|
+
persisted_args: {},
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
async handleDelete(id) {
|
|
199
|
+
if (!id) {
|
|
200
|
+
return {
|
|
201
|
+
status: 'FAILURE',
|
|
202
|
+
summary: 'id is required for delete action',
|
|
203
|
+
error_message: 'Missing id',
|
|
204
|
+
execution_log: { output: '', error_message: 'Missing id' },
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
await this.contextSnippetsService.remove(id);
|
|
208
|
+
return {
|
|
209
|
+
status: 'SUCCESS',
|
|
210
|
+
summary: `Context snippet ${id} deleted`,
|
|
211
|
+
execution_log: {
|
|
212
|
+
output: JSON.stringify({ deleted: true, id }),
|
|
213
|
+
error_message: '',
|
|
214
|
+
},
|
|
215
|
+
persisted_args: {},
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
exports.ManageContextSnippetsHandler = ManageContextSnippetsHandler;
|
|
220
|
+
exports.ManageContextSnippetsHandler = ManageContextSnippetsHandler = ManageContextSnippetsHandler_1 = __decorate([
|
|
221
|
+
(0, common_1.Injectable)(),
|
|
222
|
+
__metadata("design:paramtypes", [context_snippets_service_1.ContextSnippetsService])
|
|
223
|
+
], ManageContextSnippetsHandler);
|
|
224
|
+
//# sourceMappingURL=manage-context-snippets.handler.js.map
|
package/backend/dist/src/llm-orchestration/action-handlers/manage-context-snippets.handler.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manage-context-snippets.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/manage-context-snippets.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AAQpD,8FAAyF;AAUlF,IAAM,4BAA4B,oCAAlC,MAAM,4BAA4B;IAIvC,YACmB,sBAA8C;QAA9C,2BAAsB,GAAtB,sBAAsB,CAAwB;QAJxD,aAAQ,GAAG,yBAAyB,CAAC;QAC7B,WAAM,GAAG,IAAI,eAAM,CAAC,8BAA4B,CAAC,IAAI,CAAC,CAAC;IAIrE,CAAC;IAEJ,WAAW;QACT,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,QAAQ;YACnB,WAAW,EACT,yHAAyH;YAC3H,SAAS,EAAE;gBACT;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,QAAiB;oBACvB,WAAW,EAAE,0CAA0C;oBACvD,QAAQ,EAAE,IAAI;iBACf;gBACD;oBACE,IAAI,EAAE,IAAI;oBACV,IAAI,EAAE,QAAiB;oBACvB,WAAW,EACT,8DAA8D;oBAChE,QAAQ,EAAE,KAAK;iBAChB;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,QAAiB;oBACvB,WA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;GALtD,4BAA4B,CAsOxC"}
|
package/backend/dist/src/llm-orchestration/action-handlers/manage-context-templates.handler.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ActionHandler } from './action-handler.interface';
|
|
2
|
+
import { ActionExecutionResult, PlanExecutionContext, ToolMetadata } from '../llm-orchestration.interfaces';
|
|
3
|
+
import { ContextTemplatesService } from '../../context-templates/context-templates.service';
|
|
4
|
+
export type ContextTemplateAction = 'list' | 'get' | 'create' | 'update' | 'delete' | 'duplicate' | 'set_default_initial' | 'set_default_followup' | 'set_default_condensed';
|
|
5
|
+
export declare class ManageContextTemplatesHandler implements ActionHandler {
|
|
6
|
+
private readonly contextTemplatesService;
|
|
7
|
+
readonly toolName = "manage_context_templates";
|
|
8
|
+
private readonly logger;
|
|
9
|
+
constructor(contextTemplatesService: ContextTemplatesService);
|
|
10
|
+
getMetadata(): ToolMetadata;
|
|
11
|
+
getDefinition(): string;
|
|
12
|
+
execute(args: Record<string, any>, _context: PlanExecutionContext): Promise<ActionExecutionResult>;
|
|
13
|
+
private handleList;
|
|
14
|
+
private handleGet;
|
|
15
|
+
private handleCreate;
|
|
16
|
+
private handleUpdate;
|
|
17
|
+
private handleDelete;
|
|
18
|
+
private handleDuplicate;
|
|
19
|
+
private handleSetDefault;
|
|
20
|
+
}
|
package/backend/dist/src/llm-orchestration/action-handlers/manage-context-templates.handler.js
ADDED
|
@@ -0,0 +1,309 @@
|
|
|
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 ManageContextTemplatesHandler_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.ManageContextTemplatesHandler = void 0;
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const context_templates_service_1 = require("../../context-templates/context-templates.service");
|
|
16
|
+
let ManageContextTemplatesHandler = ManageContextTemplatesHandler_1 = class ManageContextTemplatesHandler {
|
|
17
|
+
constructor(contextTemplatesService) {
|
|
18
|
+
this.contextTemplatesService = contextTemplatesService;
|
|
19
|
+
this.toolName = 'manage_context_templates';
|
|
20
|
+
this.logger = new common_1.Logger(ManageContextTemplatesHandler_1.name);
|
|
21
|
+
}
|
|
22
|
+
getMetadata() {
|
|
23
|
+
return {
|
|
24
|
+
name: this.toolName,
|
|
25
|
+
description: 'Manage RepoBurg context templates — Eta templates that define how context (files, folders, tools) is assembled for LLM prompts.',
|
|
26
|
+
arguments: [
|
|
27
|
+
{
|
|
28
|
+
name: 'action',
|
|
29
|
+
type: 'string',
|
|
30
|
+
description: 'Operation: list|get|create|update|delete|duplicate|set_default_initial|set_default_followup|set_default_condensed',
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'id',
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: 'UUID of the context template (required for most actions)',
|
|
37
|
+
required: false,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'data',
|
|
41
|
+
type: 'object',
|
|
42
|
+
description: 'Fields for create/update. Keys: template_name, template_content (Eta), context_definition (JSON string), template_type ("main"|"partial").',
|
|
43
|
+
required: false,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'type',
|
|
47
|
+
type: 'string',
|
|
48
|
+
description: 'Filter for list action: "main" or "partial"',
|
|
49
|
+
required: false,
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
getDefinition() {
|
|
55
|
+
return `## manage_context_templates
|
|
56
|
+
|
|
57
|
+
Manage RepoBurg context templates — Eta templates that define how context (files, folders, tools) is assembled for LLM prompts. Templates use Eta syntax and have access to \`it.files\`, \`it.folders\`, \`it.tools\`, \`it.snippets\`, and \`it.variables\`.
|
|
58
|
+
|
|
59
|
+
### Actions:
|
|
60
|
+
|
|
61
|
+
- **list** — List all context templates. Optionally filter by type ("main" or "partial")
|
|
62
|
+
- **get** — Get full details of a template by ID
|
|
63
|
+
- **create** — Create a new template. Provide \`data\` with: template_name (required), template_content (required), context_definition, template_type ("main"|"partial")
|
|
64
|
+
- **update** — Update a template. Provide \`id\` and \`data\` with fields to change. Built-in templates cannot be updated.
|
|
65
|
+
- **delete** — Delete a template by ID. Built-in templates cannot be deleted.
|
|
66
|
+
- **duplicate** — Duplicate a template (works for built-in too)
|
|
67
|
+
- **set_default_initial** — Set as default for initial prompts
|
|
68
|
+
- **set_default_followup** — Set as default for follow-up prompts
|
|
69
|
+
- **set_default_condensed** — Set as default for condensed history
|
|
70
|
+
|
|
71
|
+
### Parameters:
|
|
72
|
+
- **action** (required): Operation to perform
|
|
73
|
+
- **id** (optional): UUID of the context template
|
|
74
|
+
- **data** (optional): Object with template fields
|
|
75
|
+
- **type** (optional): Filter type for list action
|
|
76
|
+
|
|
77
|
+
### Examples:
|
|
78
|
+
|
|
79
|
+
List all main templates:
|
|
80
|
+
\`\`\`typescript
|
|
81
|
+
tool: manage_context_templates
|
|
82
|
+
args: { action: "list", type: "main" }
|
|
83
|
+
\`\`\`
|
|
84
|
+
|
|
85
|
+
Create a new template:
|
|
86
|
+
\`\`\`typescript
|
|
87
|
+
tool: manage_context_templates
|
|
88
|
+
args: { action: "create", data: { template_name: "My Template", template_content: "<%= it.files %>", template_type: "main" } }
|
|
89
|
+
\`\`\``;
|
|
90
|
+
}
|
|
91
|
+
async execute(args, _context) {
|
|
92
|
+
const { action } = args;
|
|
93
|
+
try {
|
|
94
|
+
switch (action) {
|
|
95
|
+
case 'list':
|
|
96
|
+
return await this.handleList(args.type);
|
|
97
|
+
case 'get':
|
|
98
|
+
return await this.handleGet(args.id);
|
|
99
|
+
case 'create':
|
|
100
|
+
return await this.handleCreate(args.data);
|
|
101
|
+
case 'update':
|
|
102
|
+
return await this.handleUpdate(args.id, args.data);
|
|
103
|
+
case 'delete':
|
|
104
|
+
return await this.handleDelete(args.id);
|
|
105
|
+
case 'duplicate':
|
|
106
|
+
return await this.handleDuplicate(args.id);
|
|
107
|
+
case 'set_default_initial':
|
|
108
|
+
return await this.handleSetDefault(args.id, 'initial');
|
|
109
|
+
case 'set_default_followup':
|
|
110
|
+
return await this.handleSetDefault(args.id, 'followup');
|
|
111
|
+
case 'set_default_condensed':
|
|
112
|
+
return await this.handleSetDefault(args.id, 'condensed');
|
|
113
|
+
default:
|
|
114
|
+
return {
|
|
115
|
+
status: 'FAILURE',
|
|
116
|
+
summary: `Unknown action "${action}". Valid actions: list, get, create, update, delete, duplicate, set_default_initial, set_default_followup, set_default_condensed`,
|
|
117
|
+
error_message: `Unknown action: ${action}`,
|
|
118
|
+
execution_log: {
|
|
119
|
+
output: '',
|
|
120
|
+
error_message: `Unknown action: ${action}`,
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
this.logger.error(`manage_context_templates error: ${error.message}`, error.stack);
|
|
127
|
+
return {
|
|
128
|
+
status: 'FAILURE',
|
|
129
|
+
summary: `Failed to ${action} context template: ${error.message}`,
|
|
130
|
+
error_message: error.message,
|
|
131
|
+
execution_log: { output: '', error_message: error.message },
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
async handleList(type) {
|
|
136
|
+
const templateType = type === 'main' || type === 'partial'
|
|
137
|
+
? type
|
|
138
|
+
: undefined;
|
|
139
|
+
const templates = await this.contextTemplatesService.findAll(templateType);
|
|
140
|
+
const summary = templates.map((t) => ({
|
|
141
|
+
id: t.id,
|
|
142
|
+
template_name: t.template_name,
|
|
143
|
+
template_type: t.template_type,
|
|
144
|
+
is_default_initial: t.is_default_initial,
|
|
145
|
+
is_default_followup: t.is_default_followup,
|
|
146
|
+
is_default_condensed: t.is_default_condensed,
|
|
147
|
+
is_builtin: t.is_builtin,
|
|
148
|
+
builtin_key: t.builtin_key,
|
|
149
|
+
}));
|
|
150
|
+
return {
|
|
151
|
+
status: 'SUCCESS',
|
|
152
|
+
summary: `Found ${templates.length} context template(s).`,
|
|
153
|
+
execution_log: {
|
|
154
|
+
output: JSON.stringify(summary, null, 2),
|
|
155
|
+
error_message: '',
|
|
156
|
+
},
|
|
157
|
+
persisted_args: {},
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
async handleGet(id) {
|
|
161
|
+
if (!id) {
|
|
162
|
+
return {
|
|
163
|
+
status: 'FAILURE',
|
|
164
|
+
summary: 'id is required for get action',
|
|
165
|
+
error_message: 'Missing id',
|
|
166
|
+
execution_log: { output: '', error_message: 'Missing id' },
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
const template = await this.contextTemplatesService.findOne(id);
|
|
170
|
+
return {
|
|
171
|
+
status: 'SUCCESS',
|
|
172
|
+
summary: `Context template "${template.template_name}"`,
|
|
173
|
+
execution_log: {
|
|
174
|
+
output: JSON.stringify(template, null, 2),
|
|
175
|
+
error_message: '',
|
|
176
|
+
},
|
|
177
|
+
persisted_args: {},
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
async handleCreate(data) {
|
|
181
|
+
if (!data || !data.template_name || !data.template_content) {
|
|
182
|
+
return {
|
|
183
|
+
status: 'FAILURE',
|
|
184
|
+
summary: 'data.template_name and data.template_content are required for create',
|
|
185
|
+
error_message: 'Missing required fields',
|
|
186
|
+
execution_log: { output: '', error_message: 'Missing required fields' },
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
const template = await this.contextTemplatesService.create({
|
|
190
|
+
template_name: data.template_name,
|
|
191
|
+
template_content: data.template_content,
|
|
192
|
+
context_definition: data.context_definition,
|
|
193
|
+
template_type: data.template_type,
|
|
194
|
+
});
|
|
195
|
+
const result = {
|
|
196
|
+
id: template.id,
|
|
197
|
+
template_name: template.template_name,
|
|
198
|
+
template_type: template.template_type,
|
|
199
|
+
};
|
|
200
|
+
return {
|
|
201
|
+
status: 'SUCCESS',
|
|
202
|
+
summary: `Context template "${template.template_name}" created with ID ${template.id}`,
|
|
203
|
+
execution_log: {
|
|
204
|
+
output: JSON.stringify(result, null, 2),
|
|
205
|
+
error_message: '',
|
|
206
|
+
},
|
|
207
|
+
persisted_args: {},
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
async handleUpdate(id, data) {
|
|
211
|
+
if (!id || !data) {
|
|
212
|
+
return {
|
|
213
|
+
status: 'FAILURE',
|
|
214
|
+
summary: 'id and data are required for update action',
|
|
215
|
+
error_message: 'Missing parameters',
|
|
216
|
+
execution_log: { output: '', error_message: 'Missing parameters' },
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
const template = await this.contextTemplatesService.update(id, data);
|
|
220
|
+
return {
|
|
221
|
+
status: 'SUCCESS',
|
|
222
|
+
summary: `Context template "${template.template_name}" updated`,
|
|
223
|
+
execution_log: {
|
|
224
|
+
output: JSON.stringify({ id: template.id, template_name: template.template_name }, null, 2),
|
|
225
|
+
error_message: '',
|
|
226
|
+
},
|
|
227
|
+
persisted_args: {},
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
async handleDelete(id) {
|
|
231
|
+
if (!id) {
|
|
232
|
+
return {
|
|
233
|
+
status: 'FAILURE',
|
|
234
|
+
summary: 'id is required for delete action',
|
|
235
|
+
error_message: 'Missing id',
|
|
236
|
+
execution_log: { output: '', error_message: 'Missing id' },
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
await this.contextTemplatesService.remove(id);
|
|
240
|
+
return {
|
|
241
|
+
status: 'SUCCESS',
|
|
242
|
+
summary: `Context template ${id} deleted`,
|
|
243
|
+
execution_log: {
|
|
244
|
+
output: JSON.stringify({ deleted: true, id }),
|
|
245
|
+
error_message: '',
|
|
246
|
+
},
|
|
247
|
+
persisted_args: {},
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
async handleDuplicate(id) {
|
|
251
|
+
if (!id) {
|
|
252
|
+
return {
|
|
253
|
+
status: 'FAILURE',
|
|
254
|
+
summary: 'id is required for duplicate action',
|
|
255
|
+
error_message: 'Missing id',
|
|
256
|
+
execution_log: { output: '', error_message: 'Missing id' },
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
const template = await this.contextTemplatesService.duplicate(id);
|
|
260
|
+
return {
|
|
261
|
+
status: 'SUCCESS',
|
|
262
|
+
summary: `Context template duplicated as "${template.template_name}"`,
|
|
263
|
+
execution_log: {
|
|
264
|
+
output: JSON.stringify({ id: template.id, template_name: template.template_name }, null, 2),
|
|
265
|
+
error_message: '',
|
|
266
|
+
},
|
|
267
|
+
persisted_args: {},
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
async handleSetDefault(id, type) {
|
|
271
|
+
if (!id) {
|
|
272
|
+
return {
|
|
273
|
+
status: 'FAILURE',
|
|
274
|
+
summary: 'id is required for set_default action',
|
|
275
|
+
error_message: 'Missing id',
|
|
276
|
+
execution_log: { output: '', error_message: 'Missing id' },
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
let template;
|
|
280
|
+
if (type === 'initial') {
|
|
281
|
+
template = await this.contextTemplatesService.setDefaultInitial(id);
|
|
282
|
+
}
|
|
283
|
+
else if (type === 'followup') {
|
|
284
|
+
template = await this.contextTemplatesService.setDefaultFollowup(id);
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
template = await this.contextTemplatesService.setDefaultCondensed(id);
|
|
288
|
+
}
|
|
289
|
+
return {
|
|
290
|
+
status: 'SUCCESS',
|
|
291
|
+
summary: `Context template "${template.template_name}" set as default ${type}`,
|
|
292
|
+
execution_log: {
|
|
293
|
+
output: JSON.stringify({
|
|
294
|
+
id: template.id,
|
|
295
|
+
template_name: template.template_name,
|
|
296
|
+
default_type: type,
|
|
297
|
+
}, null, 2),
|
|
298
|
+
error_message: '',
|
|
299
|
+
},
|
|
300
|
+
persisted_args: {},
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
exports.ManageContextTemplatesHandler = ManageContextTemplatesHandler;
|
|
305
|
+
exports.ManageContextTemplatesHandler = ManageContextTemplatesHandler = ManageContextTemplatesHandler_1 = __decorate([
|
|
306
|
+
(0, common_1.Injectable)(),
|
|
307
|
+
__metadata("design:paramtypes", [context_templates_service_1.ContextTemplatesService])
|
|
308
|
+
], ManageContextTemplatesHandler);
|
|
309
|
+
//# sourceMappingURL=manage-context-templates.handler.js.map
|
package/backend/dist/src/llm-orchestration/action-handlers/manage-context-templates.handler.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manage-context-templates.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/manage-context-templates.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AAQpD,iGAA4F;AAerF,IAAM,6BAA6B,qCAAnC,MAAM,6BAA6B;IAIxC,YACmB,uBAAgD;QAAhD,4BAAuB,GAAvB,uBAAuB,CAAyB;QAJ1D,aAAQ,GAAG,0BAA0B,CAAC;QAC9B,WAAM,GAAG,IAAI,eAAM,CAAC,+BAA6B,CAAC,IAAI,CAAC,CAAC;IAItE,CAAC;IAEJ,WAAW;QACT,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,QAAQ;YACnB,WAAW,EACT,iIAAiI;YACnI,SAAS,EAAE;gBACT;oBACE,IAAI,EAAE,QAAQ;oBACd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,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC;QACxE,CAAC;QACD,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,qBAAqB,QAAQ,CAAC,aAAa,oBAAoB,IAAI,EAAE;YAC9E,aAAa,EAAE;gBACb,MAAM,EAAE,IAAI,CAAC,SAAS,CACpB;oBACE,EAAE,EAAE,QAAQ,CAAC,EAAE;oBACf,aAAa,EAAE,QAAQ,CAAC,aAAa;oBACrC,YAAY,EAAE,IAAI;iBACnB,EACD,IAAI,EACJ,CAAC,CACF;gBACD,aAAa,EAAE,EAAE;aAClB;YACD,cAAc,EAAE,EAAE;SACnB,CAAC;IACJ,CAAC;CACF,CAAA;AAxUY,sEAA6B;wCAA7B,6BAA6B;IADzC,IAAA,mBAAU,GAAE;qCAMiC,mDAAuB;GALxD,6BAA6B,CAwUzC"}
|
package/backend/dist/src/llm-orchestration/action-handlers/manage-custom-snippets.handler.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ActionHandler } from './action-handler.interface';
|
|
2
|
+
import { ActionExecutionResult, PlanExecutionContext, ToolMetadata } from '../llm-orchestration.interfaces';
|
|
3
|
+
import { CustomSnippetsService } from '../../custom-snippets/custom-snippets.service';
|
|
4
|
+
export type CustomSnippetAction = 'list' | 'get' | 'create' | 'update' | 'delete' | 'duplicate';
|
|
5
|
+
export declare class ManageCustomSnippetsHandler implements ActionHandler {
|
|
6
|
+
private readonly customSnippetsService;
|
|
7
|
+
readonly toolName = "manage_custom_snippets";
|
|
8
|
+
private readonly logger;
|
|
9
|
+
constructor(customSnippetsService: CustomSnippetsService);
|
|
10
|
+
getMetadata(): ToolMetadata;
|
|
11
|
+
getDefinition(): string;
|
|
12
|
+
execute(args: Record<string, any>, _context: PlanExecutionContext): Promise<ActionExecutionResult>;
|
|
13
|
+
private handleList;
|
|
14
|
+
private handleGet;
|
|
15
|
+
private handleCreate;
|
|
16
|
+
private handleUpdate;
|
|
17
|
+
private handleDelete;
|
|
18
|
+
private handleDuplicate;
|
|
19
|
+
}
|