bugzero 0.0.22 → 0.0.25

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,5 +1,5 @@
1
1
 
2
- > bugzero@0.0.22 build D:\WD projects\OpsPilot\packages\cli
2
+ > bugzero@0.0.25 build D:\WD projects\OpsPilot\packages\cli
3
3
  > tsup src/index.ts --format cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -7,8 +7,8 @@
7
7
  CLI tsup v8.5.1
8
8
  CLI Target: es2022
9
9
  CJS Build start
10
- CJS dist\index.js 62.73 KB
11
- CJS ⚡️ Build success in 118ms
10
+ CJS dist\index.js 62.76 KB
11
+ CJS ⚡️ Build success in 217ms
12
12
  DTS Build start
13
- DTS ⚡️ Build success in 2215ms
13
+ DTS ⚡️ Build success in 1999ms
14
14
  DTS dist\index.d.ts 20.00 B
package/dist/index.js CHANGED
@@ -659,8 +659,18 @@ var require_dist3 = __commonJS({
659
659
  \u274C [BugZero] OpenRouter API Error: ${msg}`);
660
660
  if (error.response?.status === 401) {
661
661
  console.error(`\u{1F449} Please check if your OPENROUTER_API_KEY is correct and active.`);
662
- } else if (error.response?.status === 429) {
663
- console.error(`\u{1F449} Rate limit exceeded or insufficient credits. Please check your OpenRouter balance.`);
662
+ } else if (error.response?.status === 429 || error.response?.status === 402 || /credit/i.test(msg) || /token/i.test(msg)) {
663
+ console.error(`
664
+ \u{1F449} You have insufficient OpenRouter credits (or too low balance) for the selected model.`);
665
+ console.error(`\u{1F449} We suggest using the 'bugzero vibe' command to change to a FREE model:`);
666
+ console.error(` 1. Run the command: npx bugzero@latest vibe (or bugzero vibe)`);
667
+ console.error(` 2. Select "Custom Model" and enter one of these free model IDs:`);
668
+ console.error(` - google/gemma-2-9b-it:free`);
669
+ console.error(` - meta-llama/llama-3-8b-instruct:free`);
670
+ console.error(` - mistralai/mistral-7b-instruct:free`);
671
+ console.error(` - microsoft/phi-3-medium-128k-instruct:free`);
672
+ console.error(` - nvidia/llama-3.1-nemotron-70b-instruct:free
673
+ `);
664
674
  }
665
675
  throw new Error(`OpenRouter API failed: ${msg}`);
666
676
  }
@@ -1194,6 +1204,11 @@ Generate the Markdown report directly. Do not wrap it in markdown block fences (
1194
1204
 
1195
1205
  ## \u274C Failed Checks & Error Output
1196
1206
  ${logs}
1207
+
1208
+ ---
1209
+ ### \u{1F50D} BugZero Hunt Metadata
1210
+ - **AI Brain (Model) used for Diagnosis:** *None (AI call failed)*
1211
+ - **Token Usage for Diagnosis:** *N/A (AI call failed: ${e.message})*
1197
1212
  `;
1198
1213
  }
1199
1214
  } else {
@@ -1358,27 +1373,11 @@ program.command("hunt").description("Run build, lint, and tests \u2014 report is
1358
1373
  console.log(` Framework: ${framework}
1359
1374
  `);
1360
1375
  const { build, lint, test } = await (0, import_core.orchestrate)({ cwd });
1361
- console.log("\u2500\u2500 Build \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
1362
- if (build.success) {
1363
- console.log(" \u2705 Passed");
1364
- } else {
1365
- console.log(" \u274C Failed\n");
1366
- console.log(build.output);
1367
- }
1368
- console.log("\n\u2500\u2500 Lint \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
1369
- if (lint.success) {
1370
- console.log(" \u2705 Passed");
1371
- } else {
1372
- console.log(" \u274C Failed\n");
1373
- console.log(lint.output);
1374
- }
1375
- console.log("\n\u2500\u2500 Tests \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
1376
- if (test.success) {
1377
- console.log(" \u2705 Passed");
1378
- } else {
1379
- console.log(" \u274C Failed\n");
1380
- console.log(test.output);
1381
- }
1376
+ console.log("\u2500\u2500 Pipeline Summary \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
1377
+ console.log(` Build: ${build.success ? "\u2705 Passed" : "\u274C Failed (see report)"}`);
1378
+ console.log(` Lint: ${lint.success ? "\u2705 Passed" : "\u274C Failed (see report)"}`);
1379
+ console.log(` Tests: ${test.success ? "\u2705 Passed" : "\u274C Failed (see report)"}`);
1380
+ console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
1382
1381
  const allPassed = build.success && lint.success && test.success;
1383
1382
  console.log(`
1384
1383
  ${allPassed ? "\u2705 All checks passed" : "\u274C Issues found \u2014 run 'bugzero rescue' to repair"}
@@ -1418,10 +1417,7 @@ program.command("rescue").description("Detect build failures and automatically a
1418
1417
  }
1419
1418
  if (result.error) console.log(` ${result.error}`);
1420
1419
  console.log(`
1421
- \u2500\u2500 Unresolved Error Output \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`);
1422
- console.log(result.finalOutput);
1423
- console.log(`\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
1424
- `);
1420
+ \u{1F449} Full unresolved error logs have been listed in the generated report.`);
1425
1421
  }
1426
1422
  console.log();
1427
1423
  process.exit(result.success ? 0 : 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bugzero",
3
- "version": "0.0.22",
3
+ "version": "0.0.25",
4
4
  "bin": {
5
5
  "bugzero": "dist/index.js"
6
6
  },
package/src/index.ts CHANGED
@@ -28,29 +28,11 @@ program
28
28
 
29
29
  const { build, lint, test } = await orchestrate({ cwd });
30
30
 
31
- console.log("── Build ──────────────────────────────────────");
32
- if (build.success) {
33
- console.log(" ✅ Passed");
34
- } else {
35
- console.log(" ❌ Failed\n");
36
- console.log(build.output);
37
- }
38
-
39
- console.log("\n── Lint ───────────────────────────────────────");
40
- if (lint.success) {
41
- console.log(" ✅ Passed");
42
- } else {
43
- console.log(" ❌ Failed\n");
44
- console.log(lint.output);
45
- }
46
-
47
- console.log("\n── Tests ──────────────────────────────────────");
48
- if (test.success) {
49
- console.log(" ✅ Passed");
50
- } else {
51
- console.log(" ❌ Failed\n");
52
- console.log(test.output);
53
- }
31
+ console.log("── Pipeline Summary ───────────────────────────");
32
+ console.log(` Build: ${build.success ? "✅ Passed" : "❌ Failed (see report)"}`);
33
+ console.log(` Lint: ${lint.success ? "✅ Passed" : "❌ Failed (see report)"}`);
34
+ console.log(` Tests: ${test.success ? "✅ Passed" : "❌ Failed (see report)"}`);
35
+ console.log("───────────────────────────────────────────────");
54
36
 
55
37
  const allPassed = build.success && lint.success && test.success;
56
38
  console.log(`\n${allPassed ? "✅ All checks passed" : "❌ Issues found — run 'bugzero rescue' to repair"}\n`);
@@ -98,9 +80,7 @@ program
98
80
  console.log(` Tokens: Prompt: ${result.promptTokens} | Completion: ${result.completionTokens} | Total: ${result.promptTokens + result.completionTokens}`);
99
81
  }
100
82
  if (result.error) console.log(` ${result.error}`);
101
- console.log(`\n── Unresolved Error Output ────────────────────────`);
102
- console.log(result.finalOutput);
103
- console.log(`───────────────────────────────────────────────────\n`);
83
+ console.log(`\n👉 Full unresolved error logs have been listed in the generated report.`);
104
84
  }
105
85
  console.log();
106
86