bugzero 0.0.11 → 0.0.13
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/.turbo/turbo-build.log +4 -4
- package/dist/index.js +33 -2
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> bugzero@0.0.
|
|
2
|
+
> bugzero@0.0.13 build D:\WD projects\OpsPilot\packages\cli
|
|
3
3
|
> tsup src/index.ts --format cjs --dts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
[34mCLI[39m tsup v8.5.1
|
|
8
8
|
[34mCLI[39m Target: es2022
|
|
9
9
|
[34mCJS[39m Build start
|
|
10
|
-
[32mCJS[39m [1mdist\index.js [22m[
|
|
11
|
-
[32mCJS[39m ⚡️ Build success in
|
|
10
|
+
[32mCJS[39m [1mdist\index.js [22m[32m50.76 KB[39m
|
|
11
|
+
[32mCJS[39m ⚡️ Build success in 63ms
|
|
12
12
|
[34mDTS[39m Build start
|
|
13
|
-
[32mDTS[39m ⚡️ Build success in
|
|
13
|
+
[32mDTS[39m ⚡️ Build success in 1156ms
|
|
14
14
|
[32mDTS[39m [1mdist\index.d.ts [22m[32m20.00 B[39m
|
package/dist/index.js
CHANGED
|
@@ -692,13 +692,28 @@ var require_dist4 = __commonJS({
|
|
|
692
692
|
});
|
|
693
693
|
module2.exports = __toCommonJS(index_exports);
|
|
694
694
|
function buildAnalysisPrompt(errorOutput, cwd) {
|
|
695
|
+
const warningMarker = "\u26A0\uFE0F [BugZero System Warning]";
|
|
696
|
+
let compilerLogs = errorOutput;
|
|
697
|
+
let historySection = "";
|
|
698
|
+
if (errorOutput.includes(warningMarker)) {
|
|
699
|
+
const parts = errorOutput.split(warningMarker);
|
|
700
|
+
compilerLogs = parts[0].trim();
|
|
701
|
+
const warnings = parts.slice(1).map((w) => w.trim());
|
|
702
|
+
historySection = `
|
|
703
|
+
|
|
704
|
+
### \u26A0\uFE0F Previous Failed Attempts:
|
|
705
|
+
${warnings.map((w, idx) => `Failed Attempt ${idx + 1}:
|
|
706
|
+
${w}`).join("\n\n")}
|
|
707
|
+
|
|
708
|
+
**CRITICAL RULE:** Do NOT suggest modifying or creating the files listed under "Previous Failed Attempts" if they failed with a "File not found" or "Search string not found" error. You must inspect the compiler error logs below to find the actual file that exists and contains the error.`;
|
|
709
|
+
}
|
|
695
710
|
return `You are an expert software engineer specialising in fixing build, lint, and test failures.
|
|
696
711
|
|
|
697
712
|
A project located at "${cwd}" failed to build. Here is the complete error output:
|
|
698
713
|
|
|
699
714
|
\`\`\`
|
|
700
|
-
${
|
|
701
|
-
|
|
715
|
+
${compilerLogs}
|
|
716
|
+
\`\`\`${historySection}
|
|
702
717
|
|
|
703
718
|
Your task:
|
|
704
719
|
1. Identify the root cause.
|
|
@@ -906,12 +921,28 @@ var require_dist6 = __commonJS({
|
|
|
906
921
|
const result = (0, import_patcher.applyPatch)(absolutePath, search, replace);
|
|
907
922
|
if (!result.success) {
|
|
908
923
|
console.error(`[BugZero] Patch failed: ${result.error}`);
|
|
924
|
+
const updatedLogs = `${state.logs}
|
|
925
|
+
|
|
926
|
+
\u26A0\uFE0F [BugZero System Warning] Your previous patch suggestion for "${filePath}" failed with the following error:
|
|
927
|
+
- ${result.error}
|
|
928
|
+
|
|
929
|
+
Please check if the file path is correct relative to the project root and make sure you target the correct file that contains the build error.`;
|
|
930
|
+
return {
|
|
931
|
+
logs: updatedLogs
|
|
932
|
+
};
|
|
909
933
|
} else {
|
|
910
934
|
console.log(`[BugZero] Backup saved to: ${result.backupPath}`);
|
|
911
935
|
}
|
|
912
936
|
return {};
|
|
913
937
|
}
|
|
914
938
|
async function verifyNode(state) {
|
|
939
|
+
if (state.logs.includes("[BugZero System Warning]")) {
|
|
940
|
+
console.log("[BugZero] Skipping validation pipeline because the patch failed to apply.");
|
|
941
|
+
return {
|
|
942
|
+
success: false,
|
|
943
|
+
logs: state.logs
|
|
944
|
+
};
|
|
945
|
+
}
|
|
915
946
|
console.log("[BugZero] Re-running validation pipeline to verify fix\u2026");
|
|
916
947
|
const result = await (0, import_analyzers.runValidationPipeline)(state.cwd);
|
|
917
948
|
if (result.success) {
|