@posthog/agent 1.24.0 → 1.24.2
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/LICENSE +33 -0
- package/dist/index.d.ts +11 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/src/adapters/claude/claude-adapter.d.ts +3 -3
- package/dist/src/adapters/claude/claude-adapter.d.ts.map +1 -1
- package/dist/src/adapters/claude/claude-adapter.js +111 -156
- package/dist/src/adapters/claude/claude-adapter.js.map +1 -1
- package/dist/src/adapters/claude/tool-mapper.d.ts +1 -1
- package/dist/src/adapters/claude/tool-mapper.d.ts.map +1 -1
- package/dist/src/adapters/claude/tool-mapper.js.map +1 -1
- package/dist/src/adapters/types.d.ts +1 -1
- package/dist/src/adapters/types.d.ts.map +1 -1
- package/dist/src/agent.d.ts +7 -7
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +85 -143
- package/dist/src/agent.js.map +1 -1
- package/dist/src/agents/execution.js.map +1 -1
- package/dist/src/agents/planning.js.map +1 -1
- package/dist/src/agents/research.js.map +1 -1
- package/dist/src/file-manager.d.ts +4 -4
- package/dist/src/file-manager.d.ts.map +1 -1
- package/dist/src/file-manager.js +58 -59
- package/dist/src/file-manager.js.map +1 -1
- package/dist/src/git-manager.d.ts +1 -1
- package/dist/src/git-manager.d.ts.map +1 -1
- package/dist/src/git-manager.js +70 -87
- package/dist/src/git-manager.js.map +1 -1
- package/dist/src/posthog-api.d.ts +3 -2
- package/dist/src/posthog-api.d.ts.map +1 -1
- package/dist/src/posthog-api.js +22 -22
- package/dist/src/posthog-api.js.map +1 -1
- package/dist/src/prompt-builder.d.ts +3 -3
- package/dist/src/prompt-builder.d.ts.map +1 -1
- package/dist/src/prompt-builder.js +93 -123
- package/dist/src/prompt-builder.js.map +1 -1
- package/dist/src/task-manager.d.ts +4 -4
- package/dist/src/task-manager.d.ts.map +1 -1
- package/dist/src/task-manager.js +18 -19
- package/dist/src/task-manager.js.map +1 -1
- package/dist/src/task-progress-reporter.d.ts +4 -3
- package/dist/src/task-progress-reporter.d.ts.map +1 -1
- package/dist/src/task-progress-reporter.js +54 -59
- package/dist/src/task-progress-reporter.js.map +1 -1
- package/dist/src/template-manager.d.ts +1 -1
- package/dist/src/template-manager.d.ts.map +1 -1
- package/dist/src/template-manager.js +28 -30
- package/dist/src/template-manager.js.map +1 -1
- package/dist/src/todo-manager.d.ts +3 -3
- package/dist/src/todo-manager.d.ts.map +1 -1
- package/dist/src/todo-manager.js +24 -29
- package/dist/src/todo-manager.js.map +1 -1
- package/dist/src/tools/registry.d.ts +1 -1
- package/dist/src/tools/registry.js +60 -60
- package/dist/src/tools/registry.js.map +1 -1
- package/dist/src/tools/types.d.ts +31 -31
- package/dist/src/types.d.ts +33 -33
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/logger.d.ts +4 -4
- package/dist/src/utils/logger.d.ts.map +1 -1
- package/dist/src/utils/logger.js +8 -8
- package/dist/src/utils/logger.js.map +1 -1
- package/dist/src/workflow/config.d.ts +1 -1
- package/dist/src/workflow/config.d.ts.map +1 -1
- package/dist/src/workflow/config.js +18 -18
- package/dist/src/workflow/config.js.map +1 -1
- package/dist/src/workflow/steps/build.d.ts +1 -1
- package/dist/src/workflow/steps/build.d.ts.map +1 -1
- package/dist/src/workflow/steps/build.js +38 -46
- package/dist/src/workflow/steps/build.js.map +1 -1
- package/dist/src/workflow/steps/finalize.d.ts +1 -1
- package/dist/src/workflow/steps/finalize.d.ts.map +1 -1
- package/dist/src/workflow/steps/finalize.js +48 -54
- package/dist/src/workflow/steps/finalize.js.map +1 -1
- package/dist/src/workflow/steps/plan.d.ts +1 -1
- package/dist/src/workflow/steps/plan.d.ts.map +1 -1
- package/dist/src/workflow/steps/plan.js +46 -58
- package/dist/src/workflow/steps/plan.js.map +1 -1
- package/dist/src/workflow/steps/research.d.ts +1 -1
- package/dist/src/workflow/steps/research.d.ts.map +1 -1
- package/dist/src/workflow/steps/research.js +56 -68
- package/dist/src/workflow/steps/research.js.map +1 -1
- package/dist/src/workflow/types.d.ts +12 -12
- package/dist/src/workflow/types.d.ts.map +1 -1
- package/dist/src/workflow/utils.d.ts +1 -1
- package/dist/src/workflow/utils.d.ts.map +1 -1
- package/dist/src/workflow/utils.js +4 -7
- package/dist/src/workflow/utils.js.map +1 -1
- package/package.json +6 -6
- package/src/adapters/claude/claude-adapter.ts +168 -220
- package/src/adapters/claude/tool-mapper.ts +2 -2
- package/src/adapters/types.ts +1 -1
- package/src/agent.ts +444 -579
- package/src/agents/execution.ts +1 -1
- package/src/agents/planning.ts +1 -1
- package/src/agents/research.ts +1 -0
- package/src/file-manager.ts +63 -64
- package/src/git-manager.ts +88 -144
- package/src/posthog-api.ts +82 -122
- package/src/prompt-builder.ts +135 -180
- package/src/task-manager.ts +30 -38
- package/src/task-progress-reporter.ts +59 -70
- package/src/template-manager.ts +45 -98
- package/src/todo-manager.ts +30 -35
- package/src/tools/registry.ts +62 -62
- package/src/tools/types.ts +36 -36
- package/src/types.ts +71 -93
- package/src/utils/logger.ts +56 -62
- package/src/workflow/config.ts +48 -48
- package/src/workflow/steps/build.ts +113 -122
- package/src/workflow/steps/finalize.ts +182 -214
- package/src/workflow/steps/plan.ts +131 -151
- package/src/workflow/steps/research.ts +186 -205
- package/src/workflow/types.ts +36 -38
- package/src/workflow/utils.ts +34 -37
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { promises } from 'node:fs';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
1
|
import { Logger } from './utils/logger.js';
|
|
2
|
+
import { promises } from 'fs';
|
|
3
|
+
import { join } from 'path';
|
|
4
4
|
|
|
5
5
|
class PromptBuilder {
|
|
6
6
|
getTaskFiles;
|
|
@@ -11,8 +11,7 @@ class PromptBuilder {
|
|
|
11
11
|
this.getTaskFiles = deps.getTaskFiles;
|
|
12
12
|
this.generatePlanTemplate = deps.generatePlanTemplate;
|
|
13
13
|
this.posthogClient = deps.posthogClient;
|
|
14
|
-
this.logger =
|
|
15
|
-
deps.logger || new Logger({ debug: false, prefix: "[PromptBuilder]" });
|
|
14
|
+
this.logger = deps.logger || new Logger({ debug: false, prefix: '[PromptBuilder]' });
|
|
16
15
|
}
|
|
17
16
|
/**
|
|
18
17
|
* Extract file paths from XML tags in description
|
|
@@ -22,10 +21,8 @@ class PromptBuilder {
|
|
|
22
21
|
const fileTagRegex = /<file\s+path="([^"]+)"\s*\/>/g;
|
|
23
22
|
const paths = [];
|
|
24
23
|
let match;
|
|
25
|
-
match = fileTagRegex.exec(description)
|
|
26
|
-
while (match !== null) {
|
|
24
|
+
while ((match = fileTagRegex.exec(description)) !== null) {
|
|
27
25
|
paths.push(match[1]);
|
|
28
|
-
match = fileTagRegex.exec(description);
|
|
29
26
|
}
|
|
30
27
|
return paths;
|
|
31
28
|
}
|
|
@@ -35,13 +32,11 @@ class PromptBuilder {
|
|
|
35
32
|
async readFileContent(repositoryPath, filePath) {
|
|
36
33
|
try {
|
|
37
34
|
const fullPath = join(repositoryPath, filePath);
|
|
38
|
-
const content = await promises.readFile(fullPath,
|
|
35
|
+
const content = await promises.readFile(fullPath, 'utf8');
|
|
39
36
|
return content;
|
|
40
37
|
}
|
|
41
38
|
catch (error) {
|
|
42
|
-
this.logger.warn(`Failed to read referenced file: ${filePath}`, {
|
|
43
|
-
error,
|
|
44
|
-
});
|
|
39
|
+
this.logger.warn(`Failed to read referenced file: ${filePath}`, { error });
|
|
45
40
|
return null;
|
|
46
41
|
}
|
|
47
42
|
}
|
|
@@ -54,28 +49,24 @@ class PromptBuilder {
|
|
|
54
49
|
// PostHog resource mentions: <error id="..." />, <experiment id="..." />, etc.
|
|
55
50
|
const resourceRegex = /<(error|experiment|insight|feature_flag)\s+id="([^"]+)"\s*\/>/g;
|
|
56
51
|
let match;
|
|
57
|
-
match = resourceRegex.exec(description)
|
|
58
|
-
while (match !== null) {
|
|
52
|
+
while ((match = resourceRegex.exec(description)) !== null) {
|
|
59
53
|
const [, type, id] = match;
|
|
60
54
|
mentions.push({
|
|
61
|
-
url:
|
|
55
|
+
url: '', // Will be reconstructed if needed
|
|
62
56
|
type: type,
|
|
63
57
|
id,
|
|
64
|
-
label: this.generateUrlLabel(
|
|
58
|
+
label: this.generateUrlLabel('', type),
|
|
65
59
|
});
|
|
66
|
-
match = resourceRegex.exec(description);
|
|
67
60
|
}
|
|
68
61
|
// Generic URL mentions: <url href="..." />
|
|
69
62
|
const urlRegex = /<url\s+href="([^"]+)"\s*\/>/g;
|
|
70
|
-
match = urlRegex.exec(description)
|
|
71
|
-
while (match !== null) {
|
|
63
|
+
while ((match = urlRegex.exec(description)) !== null) {
|
|
72
64
|
const [, url] = match;
|
|
73
65
|
mentions.push({
|
|
74
66
|
url,
|
|
75
|
-
type:
|
|
76
|
-
label: this.generateUrlLabel(url,
|
|
67
|
+
type: 'generic',
|
|
68
|
+
label: this.generateUrlLabel(url, 'generic'),
|
|
77
69
|
});
|
|
78
|
-
match = urlRegex.exec(description);
|
|
79
70
|
}
|
|
80
71
|
return mentions;
|
|
81
72
|
}
|
|
@@ -86,24 +77,22 @@ class PromptBuilder {
|
|
|
86
77
|
try {
|
|
87
78
|
const urlObj = new URL(url);
|
|
88
79
|
switch (type) {
|
|
89
|
-
case
|
|
80
|
+
case 'error':
|
|
90
81
|
const errorMatch = url.match(/error_tracking\/([a-f0-9-]+)/);
|
|
91
|
-
return errorMatch ? `Error ${errorMatch[1].slice(0, 8)}...` :
|
|
92
|
-
|
|
93
|
-
case "experiment": {
|
|
82
|
+
return errorMatch ? `Error ${errorMatch[1].slice(0, 8)}...` : 'Error';
|
|
83
|
+
case 'experiment':
|
|
94
84
|
const expMatch = url.match(/experiments\/(\d+)/);
|
|
95
|
-
return expMatch ? `Experiment #${expMatch[1]}` :
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return "Feature Flag";
|
|
85
|
+
return expMatch ? `Experiment #${expMatch[1]}` : 'Experiment';
|
|
86
|
+
case 'insight':
|
|
87
|
+
return 'Insight';
|
|
88
|
+
case 'feature_flag':
|
|
89
|
+
return 'Feature Flag';
|
|
101
90
|
default:
|
|
102
91
|
return urlObj.hostname;
|
|
103
92
|
}
|
|
104
93
|
}
|
|
105
94
|
catch {
|
|
106
|
-
return
|
|
95
|
+
return 'URL';
|
|
107
96
|
}
|
|
108
97
|
}
|
|
109
98
|
/**
|
|
@@ -122,15 +111,13 @@ class PromptBuilder {
|
|
|
122
111
|
referencedResources.push(resource);
|
|
123
112
|
}
|
|
124
113
|
catch (error) {
|
|
125
|
-
this.logger.warn(`Failed to fetch resource from URL: ${mention.url}`, {
|
|
126
|
-
error,
|
|
127
|
-
});
|
|
114
|
+
this.logger.warn(`Failed to fetch resource from URL: ${mention.url}`, { error });
|
|
128
115
|
// Add a placeholder resource for failed fetches
|
|
129
116
|
referencedResources.push({
|
|
130
117
|
type: mention.type,
|
|
131
|
-
id: mention.id ||
|
|
118
|
+
id: mention.id || '',
|
|
132
119
|
url: mention.url,
|
|
133
|
-
title: mention.label ||
|
|
120
|
+
title: mention.label || 'Unknown Resource',
|
|
134
121
|
content: `Failed to fetch resource from ${mention.url}: ${error}`,
|
|
135
122
|
metadata: {},
|
|
136
123
|
});
|
|
@@ -139,18 +126,16 @@ class PromptBuilder {
|
|
|
139
126
|
// Replace URL tags with just the label for readability
|
|
140
127
|
let processedDescription = description;
|
|
141
128
|
for (const mention of urlMentions) {
|
|
142
|
-
if (mention.type ===
|
|
129
|
+
if (mention.type === 'generic') {
|
|
143
130
|
// Generic URLs: <url href="..." />
|
|
144
|
-
const escapedUrl = mention.url.replace(/[.*+?^${}()|[\]\\]/g,
|
|
145
|
-
processedDescription = processedDescription.replace(new RegExp(`<url\\s+href="${escapedUrl}"\\s*/>`,
|
|
131
|
+
const escapedUrl = mention.url.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
132
|
+
processedDescription = processedDescription.replace(new RegExp(`<url\\s+href="${escapedUrl}"\\s*/>`, 'g'), `@${mention.label}`);
|
|
146
133
|
}
|
|
147
134
|
else {
|
|
148
135
|
// PostHog resources: <error id="..." />, <experiment id="..." />, etc.
|
|
149
|
-
const escapedType = mention.type.replace(/[.*+?^${}()|[\]\\]/g,
|
|
150
|
-
const escapedId = mention.id
|
|
151
|
-
|
|
152
|
-
: "";
|
|
153
|
-
processedDescription = processedDescription.replace(new RegExp(`<${escapedType}\\s+id="${escapedId}"\\s*/>`, "g"), `@${mention.label}`);
|
|
136
|
+
const escapedType = mention.type.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
137
|
+
const escapedId = mention.id ? mention.id.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') : '';
|
|
138
|
+
processedDescription = processedDescription.replace(new RegExp(`<${escapedType}\\s+id="${escapedId}"\\s*/>`, 'g'), `@${mention.label}`);
|
|
154
139
|
}
|
|
155
140
|
}
|
|
156
141
|
return { description: processedDescription, referencedResources };
|
|
@@ -175,8 +160,8 @@ class PromptBuilder {
|
|
|
175
160
|
// Replace file tags with just the filename for readability
|
|
176
161
|
let processedDescription = description;
|
|
177
162
|
for (const filePath of filePaths) {
|
|
178
|
-
const fileName = filePath.split(
|
|
179
|
-
processedDescription = processedDescription.replace(new RegExp(`<file\\s+path="${filePath.replace(/[.*+?^${}()|[\]\\]/g,
|
|
163
|
+
const fileName = filePath.split('/').pop() || filePath;
|
|
164
|
+
processedDescription = processedDescription.replace(new RegExp(`<file\\s+path="${filePath.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}"\\s*/>`, 'g'), `@${fileName}`);
|
|
180
165
|
}
|
|
181
166
|
return { description: processedDescription, referencedFiles };
|
|
182
167
|
}
|
|
@@ -185,47 +170,45 @@ class PromptBuilder {
|
|
|
185
170
|
const { description: descriptionAfterFiles, referencedFiles } = await this.processFileReferences(task.description, repositoryPath);
|
|
186
171
|
// Process URL references in description
|
|
187
172
|
const { description: processedDescription, referencedResources } = await this.processUrlReferences(descriptionAfterFiles);
|
|
188
|
-
let prompt =
|
|
173
|
+
let prompt = '<task>\n';
|
|
189
174
|
prompt += `<title>${task.title}</title>\n`;
|
|
190
175
|
prompt += `<description>${processedDescription}</description>\n`;
|
|
191
176
|
if (task.primary_repository) {
|
|
192
177
|
prompt += `<repository>${task.primary_repository}</repository>\n`;
|
|
193
178
|
}
|
|
194
|
-
prompt +=
|
|
179
|
+
prompt += '</task>\n';
|
|
195
180
|
// Add referenced files from @ mentions
|
|
196
181
|
if (referencedFiles.length > 0) {
|
|
197
|
-
prompt +=
|
|
182
|
+
prompt += '\n<referenced_files>\n';
|
|
198
183
|
for (const file of referencedFiles) {
|
|
199
184
|
prompt += `<file path="${file.path}">\n\`\`\`\n${file.content}\n\`\`\`\n</file>\n`;
|
|
200
185
|
}
|
|
201
|
-
prompt +=
|
|
186
|
+
prompt += '</referenced_files>\n';
|
|
202
187
|
}
|
|
203
188
|
// Add referenced resources from URL mentions
|
|
204
189
|
if (referencedResources.length > 0) {
|
|
205
|
-
prompt +=
|
|
190
|
+
prompt += '\n<referenced_resources>\n';
|
|
206
191
|
for (const resource of referencedResources) {
|
|
207
192
|
prompt += `<resource type="${resource.type}" url="${resource.url}">\n`;
|
|
208
193
|
prompt += `<title>${resource.title}</title>\n`;
|
|
209
194
|
prompt += `<content>${resource.content}</content>\n`;
|
|
210
|
-
prompt +=
|
|
195
|
+
prompt += '</resource>\n';
|
|
211
196
|
}
|
|
212
|
-
prompt +=
|
|
197
|
+
prompt += '</referenced_resources>\n';
|
|
213
198
|
}
|
|
214
199
|
try {
|
|
215
200
|
const taskFiles = await this.getTaskFiles(task.id);
|
|
216
|
-
const contextFiles = taskFiles.filter((f) => f.type ===
|
|
201
|
+
const contextFiles = taskFiles.filter((f) => f.type === 'context' || f.type === 'reference');
|
|
217
202
|
if (contextFiles.length > 0) {
|
|
218
|
-
prompt +=
|
|
203
|
+
prompt += '\n<supporting_files>\n';
|
|
219
204
|
for (const file of contextFiles) {
|
|
220
205
|
prompt += `<file name="${file.name}" type="${file.type}">\n${file.content}\n</file>\n`;
|
|
221
206
|
}
|
|
222
|
-
prompt +=
|
|
207
|
+
prompt += '</supporting_files>\n';
|
|
223
208
|
}
|
|
224
209
|
}
|
|
225
|
-
catch (
|
|
226
|
-
this.logger.debug(
|
|
227
|
-
taskId: task.id,
|
|
228
|
-
});
|
|
210
|
+
catch (error) {
|
|
211
|
+
this.logger.debug('No existing task files found for research', { taskId: task.id });
|
|
229
212
|
}
|
|
230
213
|
return prompt;
|
|
231
214
|
}
|
|
@@ -234,63 +217,60 @@ class PromptBuilder {
|
|
|
234
217
|
const { description: descriptionAfterFiles, referencedFiles } = await this.processFileReferences(task.description, repositoryPath);
|
|
235
218
|
// Process URL references in description
|
|
236
219
|
const { description: processedDescription, referencedResources } = await this.processUrlReferences(descriptionAfterFiles);
|
|
237
|
-
let prompt =
|
|
220
|
+
let prompt = '<task>\n';
|
|
238
221
|
prompt += `<title>${task.title}</title>\n`;
|
|
239
222
|
prompt += `<description>${processedDescription}</description>\n`;
|
|
240
223
|
if (task.primary_repository) {
|
|
241
224
|
prompt += `<repository>${task.primary_repository}</repository>\n`;
|
|
242
225
|
}
|
|
243
|
-
prompt +=
|
|
226
|
+
prompt += '</task>\n';
|
|
244
227
|
// Add referenced files from @ mentions
|
|
245
228
|
if (referencedFiles.length > 0) {
|
|
246
|
-
prompt +=
|
|
229
|
+
prompt += '\n<referenced_files>\n';
|
|
247
230
|
for (const file of referencedFiles) {
|
|
248
231
|
prompt += `<file path="${file.path}">\n\`\`\`\n${file.content}\n\`\`\`\n</file>\n`;
|
|
249
232
|
}
|
|
250
|
-
prompt +=
|
|
233
|
+
prompt += '</referenced_files>\n';
|
|
251
234
|
}
|
|
252
235
|
// Add referenced resources from URL mentions
|
|
253
236
|
if (referencedResources.length > 0) {
|
|
254
|
-
prompt +=
|
|
237
|
+
prompt += '\n<referenced_resources>\n';
|
|
255
238
|
for (const resource of referencedResources) {
|
|
256
239
|
prompt += `<resource type="${resource.type}" url="${resource.url}">\n`;
|
|
257
240
|
prompt += `<title>${resource.title}</title>\n`;
|
|
258
241
|
prompt += `<content>${resource.content}</content>\n`;
|
|
259
|
-
prompt +=
|
|
242
|
+
prompt += '</resource>\n';
|
|
260
243
|
}
|
|
261
|
-
prompt +=
|
|
244
|
+
prompt += '</referenced_resources>\n';
|
|
262
245
|
}
|
|
263
246
|
try {
|
|
264
247
|
const taskFiles = await this.getTaskFiles(task.id);
|
|
265
|
-
const contextFiles = taskFiles.filter((f) => f.type ===
|
|
248
|
+
const contextFiles = taskFiles.filter((f) => f.type === 'context' || f.type === 'reference');
|
|
266
249
|
if (contextFiles.length > 0) {
|
|
267
|
-
prompt +=
|
|
250
|
+
prompt += '\n<supporting_files>\n';
|
|
268
251
|
for (const file of contextFiles) {
|
|
269
252
|
prompt += `<file name="${file.name}" type="${file.type}">\n${file.content}\n</file>\n`;
|
|
270
253
|
}
|
|
271
|
-
prompt +=
|
|
254
|
+
prompt += '</supporting_files>\n';
|
|
272
255
|
}
|
|
273
256
|
}
|
|
274
|
-
catch (
|
|
275
|
-
this.logger.debug(
|
|
276
|
-
taskId: task.id,
|
|
277
|
-
});
|
|
257
|
+
catch (error) {
|
|
258
|
+
this.logger.debug('No existing task files found for planning', { taskId: task.id });
|
|
278
259
|
}
|
|
279
260
|
const templateVariables = {
|
|
280
261
|
task_id: task.id,
|
|
281
262
|
task_title: task.title,
|
|
282
263
|
task_description: processedDescription,
|
|
283
|
-
date: new Date().toISOString().split(
|
|
284
|
-
repository: (task.primary_repository ||
|
|
264
|
+
date: new Date().toISOString().split('T')[0],
|
|
265
|
+
repository: (task.primary_repository || ''),
|
|
285
266
|
};
|
|
286
267
|
const planTemplate = await this.generatePlanTemplate(templateVariables);
|
|
287
|
-
prompt +=
|
|
288
|
-
prompt +=
|
|
289
|
-
|
|
290
|
-
prompt +=
|
|
291
|
-
prompt += "<plan_template>\n";
|
|
268
|
+
prompt += '\n<instructions>\n';
|
|
269
|
+
prompt += 'Analyze the codebase and create a detailed implementation plan. Use the template structure below, filling each section with specific, actionable information.\n';
|
|
270
|
+
prompt += '</instructions>\n\n';
|
|
271
|
+
prompt += '<plan_template>\n';
|
|
292
272
|
prompt += planTemplate;
|
|
293
|
-
prompt +=
|
|
273
|
+
prompt += '\n</plan_template>';
|
|
294
274
|
return prompt;
|
|
295
275
|
}
|
|
296
276
|
async buildExecutionPrompt(task, repositoryPath) {
|
|
@@ -298,96 +278,86 @@ class PromptBuilder {
|
|
|
298
278
|
const { description: descriptionAfterFiles, referencedFiles } = await this.processFileReferences(task.description, repositoryPath);
|
|
299
279
|
// Process URL references in description
|
|
300
280
|
const { description: processedDescription, referencedResources } = await this.processUrlReferences(descriptionAfterFiles);
|
|
301
|
-
let prompt =
|
|
281
|
+
let prompt = '<task>\n';
|
|
302
282
|
prompt += `<title>${task.title}</title>\n`;
|
|
303
283
|
prompt += `<description>${processedDescription}</description>\n`;
|
|
304
284
|
if (task.primary_repository) {
|
|
305
285
|
prompt += `<repository>${task.primary_repository}</repository>\n`;
|
|
306
286
|
}
|
|
307
|
-
prompt +=
|
|
287
|
+
prompt += '</task>\n';
|
|
308
288
|
// Add referenced files from @ mentions
|
|
309
289
|
if (referencedFiles.length > 0) {
|
|
310
|
-
prompt +=
|
|
290
|
+
prompt += '\n<referenced_files>\n';
|
|
311
291
|
for (const file of referencedFiles) {
|
|
312
292
|
prompt += `<file path="${file.path}">\n\`\`\`\n${file.content}\n\`\`\`\n</file>\n`;
|
|
313
293
|
}
|
|
314
|
-
prompt +=
|
|
294
|
+
prompt += '</referenced_files>\n';
|
|
315
295
|
}
|
|
316
296
|
// Add referenced resources from URL mentions
|
|
317
297
|
if (referencedResources.length > 0) {
|
|
318
|
-
prompt +=
|
|
298
|
+
prompt += '\n<referenced_resources>\n';
|
|
319
299
|
for (const resource of referencedResources) {
|
|
320
300
|
prompt += `<resource type="${resource.type}" url="${resource.url}">\n`;
|
|
321
301
|
prompt += `<title>${resource.title}</title>\n`;
|
|
322
302
|
prompt += `<content>${resource.content}</content>\n`;
|
|
323
|
-
prompt +=
|
|
303
|
+
prompt += '</resource>\n';
|
|
324
304
|
}
|
|
325
|
-
prompt +=
|
|
305
|
+
prompt += '</referenced_resources>\n';
|
|
326
306
|
}
|
|
327
307
|
try {
|
|
328
308
|
const taskFiles = await this.getTaskFiles(task.id);
|
|
329
|
-
const hasPlan = taskFiles.some((f) => f.type ===
|
|
330
|
-
const todosFile = taskFiles.find((f) => f.name ===
|
|
309
|
+
const hasPlan = taskFiles.some((f) => f.type === 'plan');
|
|
310
|
+
const todosFile = taskFiles.find((f) => f.name === 'todos.json');
|
|
331
311
|
if (taskFiles.length > 0) {
|
|
332
|
-
prompt +=
|
|
312
|
+
prompt += '\n<context>\n';
|
|
333
313
|
for (const file of taskFiles) {
|
|
334
|
-
if (file.type ===
|
|
314
|
+
if (file.type === 'plan') {
|
|
335
315
|
prompt += `<plan>\n${file.content}\n</plan>\n`;
|
|
336
316
|
}
|
|
337
|
-
else if (file.name ===
|
|
317
|
+
else if (file.name === 'todos.json') {
|
|
318
|
+
// skip - we do this below
|
|
319
|
+
continue;
|
|
338
320
|
}
|
|
339
321
|
else {
|
|
340
322
|
prompt += `<file name="${file.name}" type="${file.type}">\n${file.content}\n</file>\n`;
|
|
341
323
|
}
|
|
342
324
|
}
|
|
343
|
-
prompt +=
|
|
325
|
+
prompt += '</context>\n';
|
|
344
326
|
}
|
|
345
327
|
// Add todos context if resuming work
|
|
346
328
|
if (todosFile) {
|
|
347
329
|
try {
|
|
348
330
|
const todos = JSON.parse(todosFile.content);
|
|
349
331
|
if (todos.items && todos.items.length > 0) {
|
|
350
|
-
prompt +=
|
|
351
|
-
prompt +=
|
|
352
|
-
"You previously created the following todo list for this task:\n\n";
|
|
332
|
+
prompt += '\n<previous_todos>\n';
|
|
333
|
+
prompt += 'You previously created the following todo list for this task:\n\n';
|
|
353
334
|
for (const item of todos.items) {
|
|
354
|
-
const statusIcon = item.status ===
|
|
355
|
-
? "✓"
|
|
356
|
-
: item.status === "in_progress"
|
|
357
|
-
? "▶"
|
|
358
|
-
: "○";
|
|
335
|
+
const statusIcon = item.status === 'completed' ? '✓' : item.status === 'in_progress' ? '▶' : '○';
|
|
359
336
|
prompt += `${statusIcon} [${item.status}] ${item.content}\n`;
|
|
360
337
|
}
|
|
361
338
|
prompt += `\nProgress: ${todos.metadata.completed}/${todos.metadata.total} completed\n`;
|
|
362
|
-
prompt +=
|
|
363
|
-
|
|
364
|
-
prompt += "</previous_todos>\n";
|
|
339
|
+
prompt += '\nYou can reference this list when resuming work or create an updated list as needed.\n';
|
|
340
|
+
prompt += '</previous_todos>\n';
|
|
365
341
|
}
|
|
366
342
|
}
|
|
367
343
|
catch (error) {
|
|
368
|
-
this.logger.debug(
|
|
369
|
-
error,
|
|
370
|
-
});
|
|
344
|
+
this.logger.debug('Failed to parse todos.json for context', { error });
|
|
371
345
|
}
|
|
372
346
|
}
|
|
373
|
-
prompt +=
|
|
347
|
+
prompt += '\n<instructions>\n';
|
|
374
348
|
if (hasPlan) {
|
|
375
|
-
prompt +=
|
|
376
|
-
"Implement the changes described in the execution plan. Follow the plan step-by-step and make the necessary file modifications.\n";
|
|
349
|
+
prompt += 'Implement the changes described in the execution plan. Follow the plan step-by-step and make the necessary file modifications.\n';
|
|
377
350
|
}
|
|
378
351
|
else {
|
|
379
|
-
prompt +=
|
|
380
|
-
"Implement the changes described in the task. Make the necessary file modifications to complete the task.\n";
|
|
352
|
+
prompt += 'Implement the changes described in the task. Make the necessary file modifications to complete the task.\n';
|
|
381
353
|
}
|
|
382
|
-
prompt +=
|
|
354
|
+
prompt += '</instructions>';
|
|
383
355
|
}
|
|
384
|
-
catch (
|
|
385
|
-
this.logger.debug(
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
prompt +=
|
|
389
|
-
prompt += "Implement the changes described in the task.\n";
|
|
390
|
-
prompt += "</instructions>";
|
|
356
|
+
catch (error) {
|
|
357
|
+
this.logger.debug('No supporting files found for execution', { taskId: task.id });
|
|
358
|
+
prompt += '\n<instructions>\n';
|
|
359
|
+
prompt += 'Implement the changes described in the task.\n';
|
|
360
|
+
prompt += '</instructions>';
|
|
391
361
|
}
|
|
392
362
|
return prompt;
|
|
393
363
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-builder.js","sources":["../../src/prompt-builder.ts"],"sourcesContent":["import { promises as fs } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { TemplateVariables } from \"./template-manager.js\";\nimport type { PostHogResource, Task, UrlMention } from \"./types.js\";\nimport { Logger } from \"./utils/logger.js\";\n\nexport interface PromptBuilderDeps {\n getTaskFiles: (taskId: string) => Promise<any[]>;\n generatePlanTemplate: (vars: TemplateVariables) => Promise<string>;\n posthogClient?: {\n fetchResourceByUrl: (mention: UrlMention) => Promise<PostHogResource>;\n };\n logger?: Logger;\n}\n\nexport class PromptBuilder {\n private getTaskFiles: PromptBuilderDeps[\"getTaskFiles\"];\n private generatePlanTemplate: PromptBuilderDeps[\"generatePlanTemplate\"];\n private posthogClient?: PromptBuilderDeps[\"posthogClient\"];\n private logger: Logger;\n\n constructor(deps: PromptBuilderDeps) {\n this.getTaskFiles = deps.getTaskFiles;\n this.generatePlanTemplate = deps.generatePlanTemplate;\n this.posthogClient = deps.posthogClient;\n this.logger =\n deps.logger || new Logger({ debug: false, prefix: \"[PromptBuilder]\" });\n }\n\n /**\n * Extract file paths from XML tags in description\n * Format: <file path=\"relative/path.ts\" />\n */\n private extractFilePaths(description: string): string[] {\n const fileTagRegex = /<file\\s+path=\"([^\"]+)\"\\s*\\/>/g;\n const paths: string[] = [];\n let match: RegExpExecArray | null;\n\n match = fileTagRegex.exec(description);\n while (match !== null) {\n paths.push(match[1]);\n match = fileTagRegex.exec(description);\n }\n\n return paths;\n }\n\n /**\n * Read file contents from repository\n */\n private async readFileContent(\n repositoryPath: string,\n filePath: string,\n ): Promise<string | null> {\n try {\n const fullPath = join(repositoryPath, filePath);\n const content = await fs.readFile(fullPath, \"utf8\");\n return content;\n } catch (error) {\n this.logger.warn(`Failed to read referenced file: ${filePath}`, {\n error,\n });\n return null;\n }\n }\n\n /**\n * Extract URL mentions from XML tags in description\n * Formats: <error id=\"...\" />, <experiment id=\"...\" />, <url href=\"...\" />\n */\n private extractUrlMentions(description: string): UrlMention[] {\n const mentions: UrlMention[] = [];\n\n // PostHog resource mentions: <error id=\"...\" />, <experiment id=\"...\" />, etc.\n const resourceRegex =\n /<(error|experiment|insight|feature_flag)\\s+id=\"([^\"]+)\"\\s*\\/>/g;\n let match: RegExpExecArray | null;\n\n match = resourceRegex.exec(description);\n while (match !== null) {\n const [, type, id] = match;\n mentions.push({\n url: \"\", // Will be reconstructed if needed\n type: type as any,\n id,\n label: this.generateUrlLabel(\"\", type as any),\n });\n match = resourceRegex.exec(description);\n }\n\n // Generic URL mentions: <url href=\"...\" />\n const urlRegex = /<url\\s+href=\"([^\"]+)\"\\s*\\/>/g;\n match = urlRegex.exec(description);\n while (match !== null) {\n const [, url] = match;\n mentions.push({\n url,\n type: \"generic\",\n label: this.generateUrlLabel(url, \"generic\"),\n });\n match = urlRegex.exec(description);\n }\n\n return mentions;\n }\n\n /**\n * Generate a display label for a URL mention\n */\n private generateUrlLabel(url: string, type: string): string {\n try {\n const urlObj = new URL(url);\n switch (type) {\n case \"error\": {\n const errorMatch = url.match(/error_tracking\\/([a-f0-9-]+)/);\n return errorMatch ? `Error ${errorMatch[1].slice(0, 8)}...` : \"Error\";\n }\n case \"experiment\": {\n const expMatch = url.match(/experiments\\/(\\d+)/);\n return expMatch ? `Experiment #${expMatch[1]}` : \"Experiment\";\n }\n case \"insight\":\n return \"Insight\";\n case \"feature_flag\":\n return \"Feature Flag\";\n default:\n return urlObj.hostname;\n }\n } catch {\n return \"URL\";\n }\n }\n\n /**\n * Process URL references and fetch their content\n */\n private async processUrlReferences(\n description: string,\n ): Promise<{ description: string; referencedResources: PostHogResource[] }> {\n const urlMentions = this.extractUrlMentions(description);\n const referencedResources: PostHogResource[] = [];\n\n if (urlMentions.length === 0 || !this.posthogClient) {\n return { description, referencedResources };\n }\n\n // Fetch all referenced resources\n for (const mention of urlMentions) {\n try {\n const resource = await this.posthogClient.fetchResourceByUrl(mention);\n referencedResources.push(resource);\n } catch (error) {\n this.logger.warn(`Failed to fetch resource from URL: ${mention.url}`, {\n error,\n });\n // Add a placeholder resource for failed fetches\n referencedResources.push({\n type: mention.type,\n id: mention.id || \"\",\n url: mention.url,\n title: mention.label || \"Unknown Resource\",\n content: `Failed to fetch resource from ${mention.url}: ${error}`,\n metadata: {},\n });\n }\n }\n\n // Replace URL tags with just the label for readability\n let processedDescription = description;\n for (const mention of urlMentions) {\n if (mention.type === \"generic\") {\n // Generic URLs: <url href=\"...\" />\n const escapedUrl = mention.url.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n processedDescription = processedDescription.replace(\n new RegExp(`<url\\\\s+href=\"${escapedUrl}\"\\\\s*/>`, \"g\"),\n `@${mention.label}`,\n );\n } else {\n // PostHog resources: <error id=\"...\" />, <experiment id=\"...\" />, etc.\n const escapedType = mention.type.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n const escapedId = mention.id\n ? mention.id.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")\n : \"\";\n processedDescription = processedDescription.replace(\n new RegExp(`<${escapedType}\\\\s+id=\"${escapedId}\"\\\\s*/>`, \"g\"),\n `@${mention.label}`,\n );\n }\n }\n\n return { description: processedDescription, referencedResources };\n }\n\n /**\n * Process description to extract file tags and read contents\n * Returns processed description and referenced file contents\n */\n private async processFileReferences(\n description: string,\n repositoryPath?: string,\n ): Promise<{\n description: string;\n referencedFiles: Array<{ path: string; content: string }>;\n }> {\n const filePaths = this.extractFilePaths(description);\n const referencedFiles: Array<{ path: string; content: string }> = [];\n\n if (filePaths.length === 0 || !repositoryPath) {\n return { description, referencedFiles };\n }\n\n // Read all referenced files\n for (const filePath of filePaths) {\n const content = await this.readFileContent(repositoryPath, filePath);\n if (content !== null) {\n referencedFiles.push({ path: filePath, content });\n }\n }\n\n // Replace file tags with just the filename for readability\n let processedDescription = description;\n for (const filePath of filePaths) {\n const fileName = filePath.split(\"/\").pop() || filePath;\n processedDescription = processedDescription.replace(\n new RegExp(\n `<file\\\\s+path=\"${filePath.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")}\"\\\\s*/>`,\n \"g\",\n ),\n `@${fileName}`,\n );\n }\n\n return { description: processedDescription, referencedFiles };\n }\n\n async buildResearchPrompt(\n task: Task,\n repositoryPath?: string,\n ): Promise<string> {\n // Process file references in description\n const { description: descriptionAfterFiles, referencedFiles } =\n await this.processFileReferences(task.description, repositoryPath);\n\n // Process URL references in description\n const { description: processedDescription, referencedResources } =\n await this.processUrlReferences(descriptionAfterFiles);\n\n let prompt = \"<task>\\n\";\n prompt += `<title>${task.title}</title>\\n`;\n prompt += `<description>${processedDescription}</description>\\n`;\n\n if ((task as any).primary_repository) {\n prompt += `<repository>${(task as any).primary_repository}</repository>\\n`;\n }\n prompt += \"</task>\\n\";\n\n // Add referenced files from @ mentions\n if (referencedFiles.length > 0) {\n prompt += \"\\n<referenced_files>\\n\";\n for (const file of referencedFiles) {\n prompt += `<file path=\"${file.path}\">\\n\\`\\`\\`\\n${file.content}\\n\\`\\`\\`\\n</file>\\n`;\n }\n prompt += \"</referenced_files>\\n\";\n }\n\n // Add referenced resources from URL mentions\n if (referencedResources.length > 0) {\n prompt += \"\\n<referenced_resources>\\n\";\n for (const resource of referencedResources) {\n prompt += `<resource type=\"${resource.type}\" url=\"${resource.url}\">\\n`;\n prompt += `<title>${resource.title}</title>\\n`;\n prompt += `<content>${resource.content}</content>\\n`;\n prompt += \"</resource>\\n\";\n }\n prompt += \"</referenced_resources>\\n\";\n }\n\n try {\n const taskFiles = await this.getTaskFiles(task.id);\n const contextFiles = taskFiles.filter(\n (f: any) => f.type === \"context\" || f.type === \"reference\",\n );\n if (contextFiles.length > 0) {\n prompt += \"\\n<supporting_files>\\n\";\n for (const file of contextFiles) {\n prompt += `<file name=\"${file.name}\" type=\"${file.type}\">\\n${file.content}\\n</file>\\n`;\n }\n prompt += \"</supporting_files>\\n\";\n }\n } catch (_error) {\n this.logger.debug(\"No existing task files found for research\", {\n taskId: task.id,\n });\n }\n\n return prompt;\n }\n\n async buildPlanningPrompt(\n task: Task,\n repositoryPath?: string,\n ): Promise<string> {\n // Process file references in description\n const { description: descriptionAfterFiles, referencedFiles } =\n await this.processFileReferences(task.description, repositoryPath);\n\n // Process URL references in description\n const { description: processedDescription, referencedResources } =\n await this.processUrlReferences(descriptionAfterFiles);\n\n let prompt = \"<task>\\n\";\n prompt += `<title>${task.title}</title>\\n`;\n prompt += `<description>${processedDescription}</description>\\n`;\n\n if ((task as any).primary_repository) {\n prompt += `<repository>${(task as any).primary_repository}</repository>\\n`;\n }\n prompt += \"</task>\\n\";\n\n // Add referenced files from @ mentions\n if (referencedFiles.length > 0) {\n prompt += \"\\n<referenced_files>\\n\";\n for (const file of referencedFiles) {\n prompt += `<file path=\"${file.path}\">\\n\\`\\`\\`\\n${file.content}\\n\\`\\`\\`\\n</file>\\n`;\n }\n prompt += \"</referenced_files>\\n\";\n }\n\n // Add referenced resources from URL mentions\n if (referencedResources.length > 0) {\n prompt += \"\\n<referenced_resources>\\n\";\n for (const resource of referencedResources) {\n prompt += `<resource type=\"${resource.type}\" url=\"${resource.url}\">\\n`;\n prompt += `<title>${resource.title}</title>\\n`;\n prompt += `<content>${resource.content}</content>\\n`;\n prompt += \"</resource>\\n\";\n }\n prompt += \"</referenced_resources>\\n\";\n }\n\n try {\n const taskFiles = await this.getTaskFiles(task.id);\n const contextFiles = taskFiles.filter(\n (f: any) => f.type === \"context\" || f.type === \"reference\",\n );\n if (contextFiles.length > 0) {\n prompt += \"\\n<supporting_files>\\n\";\n for (const file of contextFiles) {\n prompt += `<file name=\"${file.name}\" type=\"${file.type}\">\\n${file.content}\\n</file>\\n`;\n }\n prompt += \"</supporting_files>\\n\";\n }\n } catch (_error) {\n this.logger.debug(\"No existing task files found for planning\", {\n taskId: task.id,\n });\n }\n\n const templateVariables = {\n task_id: task.id,\n task_title: task.title,\n task_description: processedDescription,\n date: new Date().toISOString().split(\"T\")[0],\n repository: ((task as any).primary_repository || \"\") as string,\n };\n\n const planTemplate = await this.generatePlanTemplate(templateVariables);\n\n prompt += \"\\n<instructions>\\n\";\n prompt +=\n \"Analyze the codebase and create a detailed implementation plan. Use the template structure below, filling each section with specific, actionable information.\\n\";\n prompt += \"</instructions>\\n\\n\";\n prompt += \"<plan_template>\\n\";\n prompt += planTemplate;\n prompt += \"\\n</plan_template>\";\n\n return prompt;\n }\n\n async buildExecutionPrompt(\n task: Task,\n repositoryPath?: string,\n ): Promise<string> {\n // Process file references in description\n const { description: descriptionAfterFiles, referencedFiles } =\n await this.processFileReferences(task.description, repositoryPath);\n\n // Process URL references in description\n const { description: processedDescription, referencedResources } =\n await this.processUrlReferences(descriptionAfterFiles);\n\n let prompt = \"<task>\\n\";\n prompt += `<title>${task.title}</title>\\n`;\n prompt += `<description>${processedDescription}</description>\\n`;\n\n if ((task as any).primary_repository) {\n prompt += `<repository>${(task as any).primary_repository}</repository>\\n`;\n }\n prompt += \"</task>\\n\";\n\n // Add referenced files from @ mentions\n if (referencedFiles.length > 0) {\n prompt += \"\\n<referenced_files>\\n\";\n for (const file of referencedFiles) {\n prompt += `<file path=\"${file.path}\">\\n\\`\\`\\`\\n${file.content}\\n\\`\\`\\`\\n</file>\\n`;\n }\n prompt += \"</referenced_files>\\n\";\n }\n\n // Add referenced resources from URL mentions\n if (referencedResources.length > 0) {\n prompt += \"\\n<referenced_resources>\\n\";\n for (const resource of referencedResources) {\n prompt += `<resource type=\"${resource.type}\" url=\"${resource.url}\">\\n`;\n prompt += `<title>${resource.title}</title>\\n`;\n prompt += `<content>${resource.content}</content>\\n`;\n prompt += \"</resource>\\n\";\n }\n prompt += \"</referenced_resources>\\n\";\n }\n\n try {\n const taskFiles = await this.getTaskFiles(task.id);\n const hasPlan = taskFiles.some((f: any) => f.type === \"plan\");\n const todosFile = taskFiles.find((f: any) => f.name === \"todos.json\");\n\n if (taskFiles.length > 0) {\n prompt += \"\\n<context>\\n\";\n for (const file of taskFiles) {\n if (file.type === \"plan\") {\n prompt += `<plan>\\n${file.content}\\n</plan>\\n`;\n } else if (file.name === \"todos.json\") {\n } else {\n prompt += `<file name=\"${file.name}\" type=\"${file.type}\">\\n${file.content}\\n</file>\\n`;\n }\n }\n prompt += \"</context>\\n\";\n }\n\n // Add todos context if resuming work\n if (todosFile) {\n try {\n const todos = JSON.parse(todosFile.content);\n if (todos.items && todos.items.length > 0) {\n prompt += \"\\n<previous_todos>\\n\";\n prompt +=\n \"You previously created the following todo list for this task:\\n\\n\";\n for (const item of todos.items) {\n const statusIcon =\n item.status === \"completed\"\n ? \"✓\"\n : item.status === \"in_progress\"\n ? \"▶\"\n : \"○\";\n prompt += `${statusIcon} [${item.status}] ${item.content}\\n`;\n }\n prompt += `\\nProgress: ${todos.metadata.completed}/${todos.metadata.total} completed\\n`;\n prompt +=\n \"\\nYou can reference this list when resuming work or create an updated list as needed.\\n\";\n prompt += \"</previous_todos>\\n\";\n }\n } catch (error) {\n this.logger.debug(\"Failed to parse todos.json for context\", {\n error,\n });\n }\n }\n\n prompt += \"\\n<instructions>\\n\";\n if (hasPlan) {\n prompt +=\n \"Implement the changes described in the execution plan. Follow the plan step-by-step and make the necessary file modifications.\\n\";\n } else {\n prompt +=\n \"Implement the changes described in the task. Make the necessary file modifications to complete the task.\\n\";\n }\n prompt += \"</instructions>\";\n } catch (_error) {\n this.logger.debug(\"No supporting files found for execution\", {\n taskId: task.id,\n });\n prompt += \"\\n<instructions>\\n\";\n prompt += \"Implement the changes described in the task.\\n\";\n prompt += \"</instructions>\";\n }\n\n return prompt;\n }\n}\n"],"names":["fs"],"mappings":";;;;MAea,aAAa,CAAA;AAChB,IAAA,YAAY;AACZ,IAAA,oBA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C,QAAQ,CAAC,KAAK,cAAc;wBACvF,MAAM;AACJ,4BAAA,yFAAyF;wBAC3F,MAAM,IAAI,qBAAqB;oBACjC;gBACF;gBAAE,OAAO,KAAK,EAAE;AACd,oBAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAwC,EAAE;wBAC1D,KAAK;AACN,qBAAA,CAAC;gBACJ;YACF;YAEA,MAAM,IAAI,oBAAoB;YAC9B,IAAI,OAAO,EAAE;gBACX,MAAM;AACJ,oBAAA,kIAAkI;YACtI;iBAAO;gBACL,MAAM;AACJ,oBAAA,4GAA4G;YAChH;YACA,MAAM,IAAI,iBAAiB;QAC7B;QAAE,OAAO,MAAM,EAAE;AACf,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yCAAyC,EAAE;gBAC3D,MAAM,EAAE,IAAI,CAAC,EAAE;AAChB,aAAA,CAAC;YACF,MAAM,IAAI,oBAAoB;YAC9B,MAAM,IAAI,gDAAgD;YAC1D,MAAM,IAAI,iBAAiB;QAC7B;AAEA,QAAA,OAAO,MAAM;IACf;AACD;;;;"}
|
|
1
|
+
{"version":3,"file":"prompt-builder.js","sources":["../../src/prompt-builder.ts"],"sourcesContent":["import type { Task, UrlMention, PostHogResource } from './types.js';\nimport type { TemplateVariables } from './template-manager.js';\nimport { Logger } from './utils/logger.js';\nimport { promises as fs } from 'fs';\nimport { join } from 'path';\n\nexport interface PromptBuilderDeps {\n getTaskFiles: (taskId: string) => Promise<any[]>;\n generatePlanTemplate: (vars: TemplateVariables) => Promise<string>;\n posthogClient?: { fetchResourceByUrl: (mention: UrlMention) => Promise<PostHogResource> };\n logger?: Logger;\n}\n\nexport class PromptBuilder {\n private getTaskFiles: PromptBuilderDeps['getTaskFiles'];\n private generatePlanTemplate: PromptBuilderDeps['generatePlanTemplate'];\n private posthogClient?: PromptBuilderDeps['posthogClient'];\n private logger: Logger;\n\n constructor(deps: PromptBuilderDeps) {\n this.getTaskFiles = deps.getTaskFiles;\n this.generatePlanTemplate = deps.generatePlanTemplate;\n this.posthogClient = deps.posthogClient;\n this.logger = deps.logger || new Logger({ debug: false, prefix: '[PromptBuilder]' });\n }\n\n /**\n * Extract file paths from XML tags in description\n * Format: <file path=\"relative/path.ts\" />\n */\n private extractFilePaths(description: string): string[] {\n const fileTagRegex = /<file\\s+path=\"([^\"]+)\"\\s*\\/>/g;\n const paths: string[] = [];\n let match: RegExpExecArray | null;\n\n while ((match = fileTagRegex.exec(description)) !== null) {\n paths.push(match[1]);\n }\n\n return paths;\n }\n\n /**\n * Read file contents from repository\n */\n private async readFileContent(repositoryPath: string, filePath: string): Promise<string | null> {\n try {\n const fullPath = join(repositoryPath, filePath);\n const content = await fs.readFile(fullPath, 'utf8');\n return content;\n } catch (error) {\n this.logger.warn(`Failed to read referenced file: ${filePath}`, { error });\n return null;\n }\n }\n\n /**\n * Extract URL mentions from XML tags in description\n * Formats: <error id=\"...\" />, <experiment id=\"...\" />, <url href=\"...\" />\n */\n private extractUrlMentions(description: string): UrlMention[] {\n const mentions: UrlMention[] = [];\n \n // PostHog resource mentions: <error id=\"...\" />, <experiment id=\"...\" />, etc.\n const resourceRegex = /<(error|experiment|insight|feature_flag)\\s+id=\"([^\"]+)\"\\s*\\/>/g;\n let match: RegExpExecArray | null;\n\n while ((match = resourceRegex.exec(description)) !== null) {\n const [, type, id] = match;\n mentions.push({\n url: '', // Will be reconstructed if needed\n type: type as any,\n id,\n label: this.generateUrlLabel('', type as any),\n });\n }\n\n // Generic URL mentions: <url href=\"...\" />\n const urlRegex = /<url\\s+href=\"([^\"]+)\"\\s*\\/>/g;\n while ((match = urlRegex.exec(description)) !== null) {\n const [, url] = match;\n mentions.push({\n url,\n type: 'generic',\n label: this.generateUrlLabel(url, 'generic'),\n });\n }\n\n return mentions;\n }\n\n /**\n * Generate a display label for a URL mention\n */\n private generateUrlLabel(url: string, type: string): string {\n try {\n const urlObj = new URL(url);\n switch (type) {\n case 'error':\n const errorMatch = url.match(/error_tracking\\/([a-f0-9-]+)/);\n return errorMatch ? `Error ${errorMatch[1].slice(0, 8)}...` : 'Error';\n case 'experiment':\n const expMatch = url.match(/experiments\\/(\\d+)/);\n return expMatch ? `Experiment #${expMatch[1]}` : 'Experiment';\n case 'insight':\n return 'Insight';\n case 'feature_flag':\n return 'Feature Flag';\n default:\n return urlObj.hostname;\n }\n } catch {\n return 'URL';\n }\n }\n\n /**\n * Process URL references and fetch their content\n */\n private async processUrlReferences(\n description: string\n ): Promise<{ description: string; referencedResources: PostHogResource[] }> {\n const urlMentions = this.extractUrlMentions(description);\n const referencedResources: PostHogResource[] = [];\n\n if (urlMentions.length === 0 || !this.posthogClient) {\n return { description, referencedResources };\n }\n\n // Fetch all referenced resources\n for (const mention of urlMentions) {\n try {\n const resource = await this.posthogClient.fetchResourceByUrl(mention);\n referencedResources.push(resource);\n } catch (error) {\n this.logger.warn(`Failed to fetch resource from URL: ${mention.url}`, { error });\n // Add a placeholder resource for failed fetches\n referencedResources.push({\n type: mention.type,\n id: mention.id || '',\n url: mention.url,\n title: mention.label || 'Unknown Resource',\n content: `Failed to fetch resource from ${mention.url}: ${error}`,\n metadata: {},\n });\n }\n }\n\n // Replace URL tags with just the label for readability\n let processedDescription = description;\n for (const mention of urlMentions) {\n if (mention.type === 'generic') {\n // Generic URLs: <url href=\"...\" />\n const escapedUrl = mention.url.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n processedDescription = processedDescription.replace(\n new RegExp(`<url\\\\s+href=\"${escapedUrl}\"\\\\s*/>`, 'g'),\n `@${mention.label}`\n );\n } else {\n // PostHog resources: <error id=\"...\" />, <experiment id=\"...\" />, etc.\n const escapedType = mention.type.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n const escapedId = mention.id ? mention.id.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&') : '';\n processedDescription = processedDescription.replace(\n new RegExp(`<${escapedType}\\\\s+id=\"${escapedId}\"\\\\s*/>`, 'g'),\n `@${mention.label}`\n );\n }\n }\n\n return { description: processedDescription, referencedResources };\n }\n\n /**\n * Process description to extract file tags and read contents\n * Returns processed description and referenced file contents\n */\n private async processFileReferences(\n description: string,\n repositoryPath?: string\n ): Promise<{ description: string; referencedFiles: Array<{ path: string; content: string }> }> {\n const filePaths = this.extractFilePaths(description);\n const referencedFiles: Array<{ path: string; content: string }> = [];\n\n if (filePaths.length === 0 || !repositoryPath) {\n return { description, referencedFiles };\n }\n\n // Read all referenced files\n for (const filePath of filePaths) {\n const content = await this.readFileContent(repositoryPath, filePath);\n if (content !== null) {\n referencedFiles.push({ path: filePath, content });\n }\n }\n\n // Replace file tags with just the filename for readability\n let processedDescription = description;\n for (const filePath of filePaths) {\n const fileName = filePath.split('/').pop() || filePath;\n processedDescription = processedDescription.replace(\n new RegExp(`<file\\\\s+path=\"${filePath.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}\"\\\\s*/>`, 'g'),\n `@${fileName}`\n );\n }\n\n return { description: processedDescription, referencedFiles };\n }\n\n async buildResearchPrompt(task: Task, repositoryPath?: string): Promise<string> {\n // Process file references in description\n const { description: descriptionAfterFiles, referencedFiles } = await this.processFileReferences(\n task.description,\n repositoryPath\n );\n\n // Process URL references in description\n const { description: processedDescription, referencedResources } = await this.processUrlReferences(\n descriptionAfterFiles\n );\n\n let prompt = '<task>\\n';\n prompt += `<title>${task.title}</title>\\n`;\n prompt += `<description>${processedDescription}</description>\\n`;\n\n if ((task as any).primary_repository) {\n prompt += `<repository>${(task as any).primary_repository}</repository>\\n`;\n }\n prompt += '</task>\\n';\n\n // Add referenced files from @ mentions\n if (referencedFiles.length > 0) {\n prompt += '\\n<referenced_files>\\n';\n for (const file of referencedFiles) {\n prompt += `<file path=\"${file.path}\">\\n\\`\\`\\`\\n${file.content}\\n\\`\\`\\`\\n</file>\\n`;\n }\n prompt += '</referenced_files>\\n';\n }\n\n // Add referenced resources from URL mentions\n if (referencedResources.length > 0) {\n prompt += '\\n<referenced_resources>\\n';\n for (const resource of referencedResources) {\n prompt += `<resource type=\"${resource.type}\" url=\"${resource.url}\">\\n`;\n prompt += `<title>${resource.title}</title>\\n`;\n prompt += `<content>${resource.content}</content>\\n`;\n prompt += '</resource>\\n';\n }\n prompt += '</referenced_resources>\\n';\n }\n\n try {\n const taskFiles = await this.getTaskFiles(task.id);\n const contextFiles = taskFiles.filter((f: any) => f.type === 'context' || f.type === 'reference');\n if (contextFiles.length > 0) {\n prompt += '\\n<supporting_files>\\n';\n for (const file of contextFiles) {\n prompt += `<file name=\"${file.name}\" type=\"${file.type}\">\\n${file.content}\\n</file>\\n`;\n }\n prompt += '</supporting_files>\\n';\n }\n } catch (error) {\n this.logger.debug('No existing task files found for research', { taskId: task.id });\n }\n\n return prompt;\n }\n\n async buildPlanningPrompt(task: Task, repositoryPath?: string): Promise<string> {\n // Process file references in description\n const { description: descriptionAfterFiles, referencedFiles } = await this.processFileReferences(\n task.description,\n repositoryPath\n );\n\n // Process URL references in description\n const { description: processedDescription, referencedResources } = await this.processUrlReferences(\n descriptionAfterFiles\n );\n\n let prompt = '<task>\\n';\n prompt += `<title>${task.title}</title>\\n`;\n prompt += `<description>${processedDescription}</description>\\n`;\n\n if ((task as any).primary_repository) {\n prompt += `<repository>${(task as any).primary_repository}</repository>\\n`;\n }\n prompt += '</task>\\n';\n\n // Add referenced files from @ mentions\n if (referencedFiles.length > 0) {\n prompt += '\\n<referenced_files>\\n';\n for (const file of referencedFiles) {\n prompt += `<file path=\"${file.path}\">\\n\\`\\`\\`\\n${file.content}\\n\\`\\`\\`\\n</file>\\n`;\n }\n prompt += '</referenced_files>\\n';\n }\n\n // Add referenced resources from URL mentions\n if (referencedResources.length > 0) {\n prompt += '\\n<referenced_resources>\\n';\n for (const resource of referencedResources) {\n prompt += `<resource type=\"${resource.type}\" url=\"${resource.url}\">\\n`;\n prompt += `<title>${resource.title}</title>\\n`;\n prompt += `<content>${resource.content}</content>\\n`;\n prompt += '</resource>\\n';\n }\n prompt += '</referenced_resources>\\n';\n }\n\n try {\n const taskFiles = await this.getTaskFiles(task.id);\n const contextFiles = taskFiles.filter((f: any) => f.type === 'context' || f.type === 'reference');\n if (contextFiles.length > 0) {\n prompt += '\\n<supporting_files>\\n';\n for (const file of contextFiles) {\n prompt += `<file name=\"${file.name}\" type=\"${file.type}\">\\n${file.content}\\n</file>\\n`;\n }\n prompt += '</supporting_files>\\n';\n }\n } catch (error) {\n this.logger.debug('No existing task files found for planning', { taskId: task.id });\n }\n\n const templateVariables = {\n task_id: task.id,\n task_title: task.title,\n task_description: processedDescription,\n date: new Date().toISOString().split('T')[0],\n repository: ((task as any).primary_repository || '') as string,\n };\n\n const planTemplate = await this.generatePlanTemplate(templateVariables);\n\n prompt += '\\n<instructions>\\n';\n prompt += 'Analyze the codebase and create a detailed implementation plan. Use the template structure below, filling each section with specific, actionable information.\\n';\n prompt += '</instructions>\\n\\n';\n prompt += '<plan_template>\\n';\n prompt += planTemplate;\n prompt += '\\n</plan_template>';\n\n return prompt;\n }\n\n async buildExecutionPrompt(task: Task, repositoryPath?: string): Promise<string> {\n // Process file references in description\n const { description: descriptionAfterFiles, referencedFiles } = await this.processFileReferences(\n task.description,\n repositoryPath\n );\n\n // Process URL references in description\n const { description: processedDescription, referencedResources } = await this.processUrlReferences(\n descriptionAfterFiles\n );\n\n let prompt = '<task>\\n';\n prompt += `<title>${task.title}</title>\\n`;\n prompt += `<description>${processedDescription}</description>\\n`;\n\n if ((task as any).primary_repository) {\n prompt += `<repository>${(task as any).primary_repository}</repository>\\n`;\n }\n prompt += '</task>\\n';\n\n // Add referenced files from @ mentions\n if (referencedFiles.length > 0) {\n prompt += '\\n<referenced_files>\\n';\n for (const file of referencedFiles) {\n prompt += `<file path=\"${file.path}\">\\n\\`\\`\\`\\n${file.content}\\n\\`\\`\\`\\n</file>\\n`;\n }\n prompt += '</referenced_files>\\n';\n }\n\n // Add referenced resources from URL mentions\n if (referencedResources.length > 0) {\n prompt += '\\n<referenced_resources>\\n';\n for (const resource of referencedResources) {\n prompt += `<resource type=\"${resource.type}\" url=\"${resource.url}\">\\n`;\n prompt += `<title>${resource.title}</title>\\n`;\n prompt += `<content>${resource.content}</content>\\n`;\n prompt += '</resource>\\n';\n }\n prompt += '</referenced_resources>\\n';\n }\n\n try {\n const taskFiles = await this.getTaskFiles(task.id);\n const hasPlan = taskFiles.some((f: any) => f.type === 'plan');\n const todosFile = taskFiles.find((f: any) => f.name === 'todos.json');\n\n if (taskFiles.length > 0) {\n prompt += '\\n<context>\\n';\n for (const file of taskFiles) {\n if (file.type === 'plan') {\n prompt += `<plan>\\n${file.content}\\n</plan>\\n`;\n } else if (file.name === 'todos.json') {\n // skip - we do this below\n continue;\n } else {\n prompt += `<file name=\"${file.name}\" type=\"${file.type}\">\\n${file.content}\\n</file>\\n`;\n }\n }\n prompt += '</context>\\n';\n }\n\n // Add todos context if resuming work\n if (todosFile) {\n try {\n const todos = JSON.parse(todosFile.content);\n if (todos.items && todos.items.length > 0) {\n prompt += '\\n<previous_todos>\\n';\n prompt += 'You previously created the following todo list for this task:\\n\\n';\n for (const item of todos.items) {\n const statusIcon = item.status === 'completed' ? '✓' : item.status === 'in_progress' ? '▶' : '○';\n prompt += `${statusIcon} [${item.status}] ${item.content}\\n`;\n }\n prompt += `\\nProgress: ${todos.metadata.completed}/${todos.metadata.total} completed\\n`;\n prompt += '\\nYou can reference this list when resuming work or create an updated list as needed.\\n';\n prompt += '</previous_todos>\\n';\n }\n } catch (error) {\n this.logger.debug('Failed to parse todos.json for context', { error });\n }\n }\n\n prompt += '\\n<instructions>\\n';\n if (hasPlan) {\n prompt += 'Implement the changes described in the execution plan. Follow the plan step-by-step and make the necessary file modifications.\\n';\n } else {\n prompt += 'Implement the changes described in the task. Make the necessary file modifications to complete the task.\\n';\n }\n prompt += '</instructions>';\n } catch (error) {\n this.logger.debug('No supporting files found for execution', { taskId: task.id });\n prompt += '\\n<instructions>\\n';\n prompt += 'Implement the changes described in the task.\\n';\n prompt += '</instructions>';\n }\n\n return promp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,wCAAwC,EAAE,EAAE,KAAK,EAAE,CAAC;gBACxE;YACF;YAEA,MAAM,IAAI,oBAAoB;YAC9B,IAAI,OAAO,EAAE;gBACX,MAAM,IAAI,kIAAkI;YAC9I;iBAAO;gBACL,MAAM,IAAI,4GAA4G;YACxH;YACA,MAAM,IAAI,iBAAiB;QAC7B;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yCAAyC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;YACjF,MAAM,IAAI,oBAAoB;YAC9B,MAAM,IAAI,gDAAgD;YAC1D,MAAM,IAAI,iBAAiB;QAC7B;AAEA,QAAA,OAAO,MAAM;IACf;AACD;;;;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export interface TaskExecutionState {
|
|
2
2
|
taskId: string;
|
|
3
|
-
status:
|
|
4
|
-
mode:
|
|
3
|
+
status: 'running' | 'completed' | 'failed' | 'canceled' | 'timeout';
|
|
4
|
+
mode: 'plan_only' | 'plan_and_build' | 'build_only';
|
|
5
5
|
result?: any;
|
|
6
6
|
startedAt: number;
|
|
7
7
|
completedAt?: number;
|
|
8
8
|
abortController?: AbortController;
|
|
9
9
|
}
|
|
10
10
|
export declare class TaskManager {
|
|
11
|
-
executionStates
|
|
11
|
+
private executionStates;
|
|
12
12
|
private defaultTimeout;
|
|
13
13
|
generateExecutionId(): string;
|
|
14
|
-
startExecution(taskId: string, mode:
|
|
14
|
+
startExecution(taskId: string, mode: 'plan_only' | 'plan_and_build' | 'build_only', executionId?: string): TaskExecutionState;
|
|
15
15
|
waitForCompletion(executionId: string): Promise<any>;
|
|
16
16
|
completeExecution(executionId: string, result: any): void;
|
|
17
17
|
failExecution(executionId: string, error: Error): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-manager.d.ts","sourceRoot":"","sources":["../../src/task-manager.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,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