@lisa.ai/agent 2.0.0 → 2.0.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.
|
@@ -69,8 +69,11 @@ async function coverageCommand(command, modelProvider, attempt = 1, maxRetries =
|
|
|
69
69
|
// Node 21+ Deprecation Fix: When shell is true, pass the entire raw command string
|
|
70
70
|
// rather than explicitly escaping array arguments to bypass DEP0190.
|
|
71
71
|
const child = (0, child_process_1.spawn)(cmd, { shell: true, stdio: ['ignore', 'pipe', 'pipe'] });
|
|
72
|
+
let stdoutData = '';
|
|
73
|
+
let stderrData = '';
|
|
72
74
|
child.stdout?.on('data', (data) => {
|
|
73
75
|
const text = data.toString();
|
|
76
|
+
stdoutData += text;
|
|
74
77
|
if (printProgress) {
|
|
75
78
|
const lines = text.split('\n');
|
|
76
79
|
for (const line of lines) {
|
|
@@ -80,12 +83,15 @@ async function coverageCommand(command, modelProvider, attempt = 1, maxRetries =
|
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
85
|
});
|
|
86
|
+
child.stderr?.on('data', (data) => {
|
|
87
|
+
stderrData += data.toString();
|
|
88
|
+
});
|
|
83
89
|
child.on('close', (code) => {
|
|
84
90
|
if (code === 0) {
|
|
85
91
|
resolve();
|
|
86
92
|
}
|
|
87
93
|
else {
|
|
88
|
-
reject(
|
|
94
|
+
reject({ message: `Test process exited with code ${code}`, stdout: stdoutData, stderr: stderrData });
|
|
89
95
|
}
|
|
90
96
|
});
|
|
91
97
|
});
|
package/dist/commands/heal.js
CHANGED
|
@@ -205,7 +205,10 @@ async function healCommand(command, modelProvider, attempt = 1, healedFilePath =
|
|
|
205
205
|
}
|
|
206
206
|
catch (isolatedError) {
|
|
207
207
|
console.log(`❌ [Lisa.ai Micro-Heal] Isolated verification failed.`);
|
|
208
|
-
|
|
208
|
+
// CRITICAL FIX: Ensure `stdout` is aggressively extracted because Karma/Jest pump compiler failures into stdout, not stderr.
|
|
209
|
+
const fallbackStdout = isolatedError.stdout ? isolatedError.stdout.toString() : '';
|
|
210
|
+
const fallbackStderr = isolatedError.stderr ? isolatedError.stderr.toString() : '';
|
|
211
|
+
currentErrorLog = fallbackStderr + '\n' + fallbackStdout + '\n' + (isolatedError.message || '');
|
|
209
212
|
previousContext = `### Attempt ${localAttempt} Failed\n\`\`\`typescript\n${fixedCode}\n\`\`\`\n\n**New Error:**\n${currentErrorLog}`;
|
|
210
213
|
localAttempt++;
|
|
211
214
|
}
|