edsger 0.3.2 → 0.3.3
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.
|
@@ -56,10 +56,6 @@ export declare function fetchPRReviews(octokit: Octokit, owner: string, repo: st
|
|
|
56
56
|
* Fetch PR review comments
|
|
57
57
|
*/
|
|
58
58
|
export declare function fetchPRReviewComments(octokit: Octokit, owner: string, repo: string, prNumber: number, verbose?: boolean): Promise<PRReviewComment[]>;
|
|
59
|
-
/**
|
|
60
|
-
* Fetch technical design via MCP
|
|
61
|
-
*/
|
|
62
|
-
export declare function fetchTechnicalDesign(mcpServerUrl: string, mcpToken: string, featureId: string, verbose?: boolean): Promise<string | undefined>;
|
|
63
59
|
/**
|
|
64
60
|
* Fetch user stories via MCP
|
|
65
61
|
*/
|
|
@@ -54,51 +54,6 @@ export async function fetchPRReviewComments(octokit, owner, repo, prNumber, verb
|
|
|
54
54
|
}
|
|
55
55
|
return comments;
|
|
56
56
|
}
|
|
57
|
-
/**
|
|
58
|
-
* Fetch technical design via MCP
|
|
59
|
-
*/
|
|
60
|
-
export async function fetchTechnicalDesign(mcpServerUrl, mcpToken, featureId, verbose) {
|
|
61
|
-
try {
|
|
62
|
-
if (verbose) {
|
|
63
|
-
console.log(`📐 Fetching technical design for ${featureId}...`);
|
|
64
|
-
}
|
|
65
|
-
const response = await fetch(`${mcpServerUrl}/mcp`, {
|
|
66
|
-
method: 'POST',
|
|
67
|
-
headers: {
|
|
68
|
-
'Content-Type': 'application/json',
|
|
69
|
-
Authorization: `Bearer ${mcpToken}`,
|
|
70
|
-
},
|
|
71
|
-
body: JSON.stringify({
|
|
72
|
-
jsonrpc: '2.0',
|
|
73
|
-
id: 1,
|
|
74
|
-
method: 'technical-design/get',
|
|
75
|
-
params: {
|
|
76
|
-
feature_id: featureId,
|
|
77
|
-
},
|
|
78
|
-
}),
|
|
79
|
-
});
|
|
80
|
-
if (!response.ok) {
|
|
81
|
-
if (verbose) {
|
|
82
|
-
console.log(`⚠️ Could not fetch technical design: ${response.status}`);
|
|
83
|
-
}
|
|
84
|
-
return undefined;
|
|
85
|
-
}
|
|
86
|
-
const data = await response.json();
|
|
87
|
-
if (data.error || !data.result) {
|
|
88
|
-
if (verbose) {
|
|
89
|
-
console.log(`⚠️ Technical design not available`);
|
|
90
|
-
}
|
|
91
|
-
return undefined;
|
|
92
|
-
}
|
|
93
|
-
return data.result.technical_design;
|
|
94
|
-
}
|
|
95
|
-
catch (error) {
|
|
96
|
-
if (verbose) {
|
|
97
|
-
console.log(`⚠️ Error fetching technical design: ${error}`);
|
|
98
|
-
}
|
|
99
|
-
return undefined;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
57
|
/**
|
|
103
58
|
* Fetch user stories via MCP
|
|
104
59
|
*/
|
|
@@ -116,7 +71,7 @@ export async function fetchUserStories(mcpServerUrl, mcpToken, featureId, verbos
|
|
|
116
71
|
body: JSON.stringify({
|
|
117
72
|
jsonrpc: '2.0',
|
|
118
73
|
id: 1,
|
|
119
|
-
method: '
|
|
74
|
+
method: 'user_stories/list',
|
|
120
75
|
params: {
|
|
121
76
|
feature_id: featureId,
|
|
122
77
|
},
|
|
@@ -161,7 +116,7 @@ export async function fetchTestCases(mcpServerUrl, mcpToken, featureId, verbose)
|
|
|
161
116
|
body: JSON.stringify({
|
|
162
117
|
jsonrpc: '2.0',
|
|
163
118
|
id: 1,
|
|
164
|
-
method: '
|
|
119
|
+
method: 'test_cases/list',
|
|
165
120
|
params: {
|
|
166
121
|
feature_id: featureId,
|
|
167
122
|
},
|
|
@@ -209,10 +164,9 @@ export async function fetchCodeRefineContext(mcpServerUrl, mcpToken, featureId,
|
|
|
209
164
|
auth: githubToken,
|
|
210
165
|
});
|
|
211
166
|
// Fetch PR reviews and comments
|
|
212
|
-
const [reviews, reviewComments,
|
|
167
|
+
const [reviews, reviewComments, userStories, testCases] = await Promise.all([
|
|
213
168
|
fetchPRReviews(octokit, owner, repo, prNumber, verbose),
|
|
214
169
|
fetchPRReviewComments(octokit, owner, repo, prNumber, verbose),
|
|
215
|
-
fetchTechnicalDesign(mcpServerUrl, mcpToken, featureId, verbose),
|
|
216
170
|
fetchUserStories(mcpServerUrl, mcpToken, featureId, verbose),
|
|
217
171
|
fetchTestCases(mcpServerUrl, mcpToken, featureId, verbose),
|
|
218
172
|
]);
|
|
@@ -226,7 +180,7 @@ export async function fetchCodeRefineContext(mcpServerUrl, mcpToken, featureId,
|
|
|
226
180
|
repo,
|
|
227
181
|
reviews,
|
|
228
182
|
reviewComments,
|
|
229
|
-
technicalDesign,
|
|
183
|
+
technicalDesign: feature.technical_design,
|
|
230
184
|
userStories,
|
|
231
185
|
testCases,
|
|
232
186
|
};
|