edsger 0.2.8 → 0.2.9

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.
@@ -1,6 +1,7 @@
1
1
  import { logInfo, logError } from '../../utils/logger.js';
2
2
  import { processChecklistItemResultsFromResponse, } from '../../services/checklist.js';
3
3
  import { verifyTechnicalDesignCompliance, } from '../technical-design-verification/index.js';
4
+ import { resolveFeedbacks, } from '../../services/feedbacks.js';
4
5
  import { createTechnicalDesignImprovementPrompt } from '../../prompts/technical-design-improvement.js';
5
6
  import { logFeatureVerificationEvent } from '../../services/audit-logs.js';
6
7
  /**
@@ -56,6 +57,16 @@ export async function performVerificationCycle(technicalDesign, checklistContext
56
57
  notes: item.verification_reason || undefined,
57
58
  }));
58
59
  await processChecklistItemResultsFromResponse({ featureId, mcpServerUrl, mcpToken }, 'technical_design', checklistItemResults, verbose);
60
+ // Mark confirmed feedbacks as resolved
61
+ if (verificationResult.feedback_verifications &&
62
+ verificationResult.feedback_verifications.length > 0) {
63
+ const confirmedFeedbackIds = verificationResult.feedback_verifications
64
+ .filter((fb) => fb.verification_status === 'confirmed')
65
+ .map((fb) => fb.feedback_id);
66
+ if (confirmedFeedbackIds.length > 0) {
67
+ await resolveFeedbacks({ featureId, mcpServerUrl, mcpToken }, confirmedFeedbackIds, verbose);
68
+ }
69
+ }
59
70
  return { passed: true, verificationResult };
60
71
  }
61
72
  // Verification failed
@@ -33,3 +33,8 @@ export declare function getFeedbacksForPhase(options: PipelinePhaseOptions, phas
33
33
  * Format feedbacks context as string for LLM consumption
34
34
  */
35
35
  export declare function formatFeedbacksForContext(context: FeedbacksContext): string;
36
+ /**
37
+ * Mark feedbacks as resolved
38
+ * Used after successful verification to track which feedbacks have been addressed
39
+ */
40
+ export declare function resolveFeedbacks(options: PipelinePhaseOptions, feedbackIds: string[], verbose?: boolean): Promise<void>;
@@ -127,6 +127,45 @@ function getPriorityBadge(priority) {
127
127
  return '🟢'; // Low
128
128
  return '⚪'; // Minimal
129
129
  }
130
+ /**
131
+ * Mark feedbacks as resolved
132
+ * Used after successful verification to track which feedbacks have been addressed
133
+ */
134
+ export async function resolveFeedbacks(options, feedbackIds, verbose) {
135
+ const { mcpServerUrl, mcpToken } = options;
136
+ if (!feedbackIds || feedbackIds.length === 0) {
137
+ return;
138
+ }
139
+ if (verbose) {
140
+ console.log(`✅ Marking ${feedbackIds.length} feedbacks as resolved: ${feedbackIds.join(', ')}`);
141
+ }
142
+ const response = await fetch(`${mcpServerUrl}/mcp`, {
143
+ method: 'POST',
144
+ headers: {
145
+ 'Content-Type': 'application/json',
146
+ Authorization: `Bearer ${mcpToken}`,
147
+ },
148
+ body: JSON.stringify({
149
+ jsonrpc: '2.0',
150
+ id: 1,
151
+ method: 'feedbacks/resolve',
152
+ params: {
153
+ feedback_ids: feedbackIds,
154
+ },
155
+ }),
156
+ });
157
+ if (!response.ok) {
158
+ const errorText = await response.text();
159
+ throw new Error(`Failed to resolve feedbacks: ${response.status} ${response.statusText}. Response: ${errorText}`);
160
+ }
161
+ const data = await response.json();
162
+ if (data.error) {
163
+ throw new Error(`MCP Error resolving feedbacks: ${data.error.message || JSON.stringify(data.error)}`);
164
+ }
165
+ if (verbose) {
166
+ console.log(`✅ Successfully marked ${data.result?.count || 0} feedbacks as resolved`);
167
+ }
168
+ }
130
169
  /**
131
170
  * Group array of objects by a key
132
171
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edsger",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {