bangonit 0.5.2 → 0.5.4

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.
Files changed (66) hide show
  1. package/README.md +13 -2
  2. package/app/desktopapp/dist/main/index.js +14 -10
  3. package/app/desktopapp/dist/shared/args.js +1 -0
  4. package/app/replay/dist/replay.js +1 -1
  5. package/app/webapp/.next/standalone/app/webapp/.next/BUILD_ID +1 -1
  6. package/app/webapp/.next/standalone/app/webapp/.next/app-build-manifest.json +7 -7
  7. package/app/webapp/.next/standalone/app/webapp/.next/app-path-routes-manifest.json +1 -1
  8. package/app/webapp/.next/standalone/app/webapp/.next/build-manifest.json +3 -3
  9. package/app/webapp/.next/standalone/app/webapp/.next/prerender-manifest.json +1 -1
  10. package/app/webapp/.next/standalone/app/webapp/.next/required-server-files.json +1 -1
  11. package/app/webapp/.next/standalone/app/webapp/.next/server/app/_not-found/page.js +1 -1
  12. package/app/webapp/.next/standalone/app/webapp/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  13. package/app/webapp/.next/standalone/app/webapp/.next/server/app/_not-found.html +1 -1
  14. package/app/webapp/.next/standalone/app/webapp/.next/server/app/_not-found.rsc +1 -1
  15. package/app/webapp/.next/standalone/app/webapp/.next/server/app/api/chat/route.js +1 -1
  16. package/app/webapp/.next/standalone/app/webapp/.next/server/app/api/chat/route.js.nft.json +1 -1
  17. package/app/webapp/.next/standalone/app/webapp/.next/server/app/api/screenshot/route.js +1 -1
  18. package/app/webapp/.next/standalone/app/webapp/.next/server/app/api/screenshot/route.js.nft.json +1 -1
  19. package/app/webapp/.next/standalone/app/webapp/.next/server/app/app/page.js +6 -6
  20. package/app/webapp/.next/standalone/app/webapp/.next/server/app/app/page_client-reference-manifest.js +1 -1
  21. package/app/webapp/.next/standalone/app/webapp/.next/server/app/app.html +1 -1
  22. package/app/webapp/.next/standalone/app/webapp/.next/server/app/app.rsc +2 -2
  23. package/app/webapp/.next/standalone/app/webapp/.next/server/app/index.html +1 -1
  24. package/app/webapp/.next/standalone/app/webapp/.next/server/app/index.rsc +1 -1
  25. package/app/webapp/.next/standalone/app/webapp/.next/server/app/page.js +1 -1
  26. package/app/webapp/.next/standalone/app/webapp/.next/server/app/page_client-reference-manifest.js +1 -1
  27. package/app/webapp/.next/standalone/app/webapp/.next/server/app-paths-manifest.json +2 -2
  28. package/app/webapp/.next/standalone/app/webapp/.next/server/chunks/{708.js → 151.js} +9 -7
  29. package/app/webapp/.next/standalone/app/webapp/.next/server/chunks/679.js +1 -1
  30. package/app/webapp/.next/standalone/app/webapp/.next/server/middleware-build-manifest.js +1 -1
  31. package/app/webapp/.next/standalone/app/webapp/.next/server/pages/404.html +1 -1
  32. package/app/webapp/.next/standalone/app/webapp/.next/server/pages/500.html +1 -1
  33. package/app/webapp/.next/standalone/app/webapp/.next/server/pages-manifest.json +1 -1
  34. package/app/webapp/.next/standalone/app/webapp/.next/server/server-reference-manifest.json +1 -1
  35. package/app/webapp/.next/standalone/app/webapp/.next/static/chunks/793-be37f231ca512496.js +36 -0
  36. package/app/webapp/.next/standalone/app/webapp/.next/static/chunks/app/app/page-4c6dfbf12230aab7.js +1 -0
  37. package/app/webapp/.next/standalone/app/webapp/.next/static/chunks/app/layout-57acb80d8da0067a.js +1 -0
  38. package/app/webapp/.next/standalone/app/webapp/.next/static/chunks/{main-app-76384b941f0b51cb.js → main-app-106dd83f859b9dfa.js} +1 -1
  39. package/app/webapp/.next/standalone/app/webapp/package.json +1 -0
  40. package/app/webapp/.next/standalone/app/webapp/server.js +1 -1
  41. package/app/webapp/.next/standalone/package.json +2 -1
  42. package/app/webapp/.next/static/chunks/793-be37f231ca512496.js +36 -0
  43. package/app/webapp/.next/static/chunks/app/app/page-4c6dfbf12230aab7.js +1 -0
  44. package/app/webapp/.next/static/chunks/app/layout-57acb80d8da0067a.js +1 -0
  45. package/app/webapp/.next/static/chunks/{main-app-76384b941f0b51cb.js → main-app-106dd83f859b9dfa.js} +1 -1
  46. package/app/webapp/package.json +1 -0
  47. package/app/webapp/src/shared/api/chat.ts +13 -2
  48. package/app/webapp/src/shared/components/AppShell.tsx +15 -5
  49. package/app/webapp/src/shared/components/SessionView.tsx +10 -2
  50. package/app/webapp/src/shared/lib/browser/index.ts +2 -2
  51. package/app/webapp/src/shared/lib/browser/screenshot.ts +2 -2
  52. package/app/webapp/src/shared/lib/browser/snapshot.ts +107 -7
  53. package/app/webapp/src/shared/lib/browser/types.ts +1 -0
  54. package/bin/app/desktopapp/src/shared/args.js +1 -0
  55. package/bin/src/cli/bangonit.js +35 -25
  56. package/package.json +2 -1
  57. package/app/webapp/.next/standalone/app/webapp/.next/static/chunks/631-0edca788fa58159b.js +0 -36
  58. package/app/webapp/.next/standalone/app/webapp/.next/static/chunks/app/app/page-533a30559a8f39fa.js +0 -1
  59. package/app/webapp/.next/standalone/app/webapp/.next/static/chunks/app/layout-40f50d9380154ecf.js +0 -1
  60. package/app/webapp/.next/static/chunks/631-0edca788fa58159b.js +0 -36
  61. package/app/webapp/.next/static/chunks/app/app/page-533a30559a8f39fa.js +0 -1
  62. package/app/webapp/.next/static/chunks/app/layout-40f50d9380154ecf.js +0 -1
  63. /package/app/webapp/.next/standalone/app/webapp/.next/static/{kz1a_SRPtSly3Fe8wHKDq → 96Rcgc5VRl40T_EbDikOw}/_buildManifest.js +0 -0
  64. /package/app/webapp/.next/standalone/app/webapp/.next/static/{kz1a_SRPtSly3Fe8wHKDq → 96Rcgc5VRl40T_EbDikOw}/_ssgManifest.js +0 -0
  65. /package/app/webapp/.next/static/{kz1a_SRPtSly3Fe8wHKDq → 96Rcgc5VRl40T_EbDikOw}/_buildManifest.js +0 -0
  66. /package/app/webapp/.next/static/{kz1a_SRPtSly3Fe8wHKDq → 96Rcgc5VRl40T_EbDikOw}/_ssgManifest.js +0 -0
@@ -236,6 +236,20 @@ recordings_dir = "${recordingsDir}"
236
236
  const configOutPath = path.join(bangDir, "config.toml");
237
237
  fs.writeFileSync(configOutPath, toml);
238
238
  console.log(`\n ${c.green}Created${c.reset} .bangonit/config.toml`);
239
+ // --- System prompt script ---
240
+ const systemPromptPath = path.join(bangDir, "system_prompt.sh");
241
+ if (!fs.existsSync(systemPromptPath)) {
242
+ fs.writeFileSync(systemPromptPath, `#!/bin/bash
243
+ # This script is executed before each test run.
244
+ # Its stdout becomes the project-level system prompt.
245
+ # Environment variables are available for interpolation.
246
+
247
+ # Example:
248
+ # echo "The app is running on http://localhost:\${DEV_SERVER_PORT}"
249
+ `);
250
+ fs.chmodSync(systemPromptPath, 0o755);
251
+ console.log(` ${c.green}Created${c.reset} .bangonit/system_prompt.sh`);
252
+ }
239
253
  // --- Test plan directories ---
240
254
  const testplanBase = path.join(process.cwd(), testplans);
241
255
  const dirs = ["smoke", "acceptance", "regression"];
@@ -247,26 +261,12 @@ recordings_dir = "${recordingsDir}"
247
261
  fs.writeFileSync(gitkeep, "");
248
262
  console.log(` ${c.green}Created${c.reset} ${testplans}/${dir}/`);
249
263
  }
250
- // Write example smoke test
251
- const smokeExample = path.join(testplanBase, "smoke", "homepage.md");
252
- if (!fs.existsSync(smokeExample)) {
253
- fs.writeFileSync(smokeExample, `---
254
- name: Homepage loads
255
- ---
256
-
257
- ## Steps
258
- 1. Navigate to http://localhost:3000
259
- 2. Verify the page loads with a heading
260
- 3. Verify there are no console errors
261
- `);
262
- console.log(` ${c.green}Created${c.reset} ${testplans}/smoke/homepage.md`);
263
- }
264
264
  // --- Claude Code skills ---
265
265
  const claudeSkillsDir = path.join(process.cwd(), ".claude", "skills");
266
- const testSkillDir = path.join(claudeSkillsDir, "test");
266
+ const testSkillDir = path.join(claudeSkillsDir, "boi-test");
267
267
  fs.mkdirSync(testSkillDir, { recursive: true });
268
268
  fs.writeFileSync(path.join(testSkillDir, "SKILL.md"), `---
269
- name: test
269
+ name: boi-test
270
270
  description: Run Bang On It! E2E tests locally. Pass test plan files or a filter as $ARGUMENTS (e.g. "testplans/smoke/" or "-t login"). With no arguments, runs all test plans.
271
271
  tools: Bash, Read
272
272
  ---
@@ -298,11 +298,11 @@ Run Bang On It! end-to-end tests locally.
298
298
 
299
299
  5. If tests fail, read the test plan file and the output to diagnose the failure. Suggest whether the test plan needs updating or there's a real bug.
300
300
  `);
301
- console.log(` ${c.green}Created${c.reset} .claude/skills/test/SKILL.md`);
302
- const createTestSkillDir = path.join(claudeSkillsDir, "create-test");
301
+ console.log(` ${c.green}Created${c.reset} .claude/skills/boi-test/SKILL.md`);
302
+ const createTestSkillDir = path.join(claudeSkillsDir, "boi-create-test");
303
303
  fs.mkdirSync(createTestSkillDir, { recursive: true });
304
304
  fs.writeFileSync(path.join(createTestSkillDir, "SKILL.md"), `---
305
- name: create-test
305
+ name: boi-create-test
306
306
  description: Create new Bang On It! test plan(s). Pass a description of what to test as $ARGUMENTS, or omit to auto-generate from git changes.
307
307
  tools: Bash, Read, Write, Glob, Grep
308
308
  ---
@@ -357,7 +357,7 @@ Create new Bang On It! test plan files.
357
357
 
358
358
  6. Output the path to the created file.
359
359
  `);
360
- console.log(` ${c.green}Created${c.reset} .claude/skills/create-test/SKILL.md`);
360
+ console.log(` ${c.green}Created${c.reset} .claude/skills/boi-create-test/SKILL.md`);
361
361
  // --- CI setup ---
362
362
  console.log("");
363
363
  const setupCi = await p.askChoice("Set up GitHub Actions?", ["y", "n"], "y");
@@ -449,7 +449,7 @@ jobs:
449
449
 
450
450
  - uses: actions/setup-node@v4
451
451
  with:
452
- node-version: '20' # EDIT: your Node.js version
452
+ node-version: '24' # EDIT: your Node.js version
453
453
 
454
454
  - name: Install system dependencies
455
455
  run: |
@@ -564,7 +564,7 @@ jobs:
564
564
 
565
565
  - uses: actions/setup-node@v4
566
566
  with:
567
- node-version: '20' # EDIT: your Node.js version
567
+ node-version: '24' # EDIT: your Node.js version
568
568
 
569
569
  - name: Install system dependencies
570
570
  run: |
@@ -685,13 +685,14 @@ async function run(argv, config) {
685
685
  testPlanFiles: files,
686
686
  headless: argv.headless,
687
687
  exit: argv.exit,
688
+ keepOpen: argv.keepOpen,
688
689
  json: argv.json,
689
690
  console: argv.console,
690
691
  record: argv.record,
691
692
  retries: argv.retries ?? 0,
692
693
  output: argv.output ? path.resolve(process.cwd(), argv.output) : null,
693
694
  plan: argv.plan || null,
694
- prompt: argv.prompt || null,
695
+ prompt: argv.additionalSystemPrompt || null,
695
696
  concurrency: argv.concurrency ?? 1,
696
697
  timeout: argv.timeout ?? 0,
697
698
  cwd: process.cwd(),
@@ -837,7 +838,10 @@ const ciDefaults = is_ci_1.default ? { headless: true, exit: true } : {};
837
838
  .option("filter", { alias: "t", type: "string", describe: "Filter test plans by name substring" })
838
839
  .option("config", { type: "string", describe: "Path to config file (default: .bangonit/config.toml)" })
839
840
  .option("plan", { type: "string", describe: "Inline test plan (instead of file)" })
840
- .option("prompt", { type: "string", describe: "Additional instructions appended to test plan" })
841
+ .option("additional-system-prompt", {
842
+ type: "string",
843
+ describe: "Additional system prompt text appended to test plan",
844
+ })
841
845
  .option("record", { type: "boolean", default: false, describe: "Record session replay" })
842
846
  .option("retries", { type: "number", describe: "Retry failed tests N times (overrides test plan frontmatter)" })
843
847
  .option("headless", {
@@ -849,6 +853,11 @@ const ciDefaults = is_ci_1.default ? { headless: true, exit: true } : {};
849
853
  type: "boolean",
850
854
  default: ciDefaults.exit ?? false,
851
855
  describe: "Exit immediately after tests complete",
856
+ })
857
+ .option("keep-open", {
858
+ type: "boolean",
859
+ default: false,
860
+ describe: "Keep the browser window open after tests pass (for inspection)",
852
861
  })
853
862
  .option("json", { type: "boolean", default: false, describe: "Stream NDJSON events to stdout" })
854
863
  .option("console", { type: "boolean", default: false, describe: "Forward browser console logs to stdout" })
@@ -860,11 +869,12 @@ const ciDefaults = is_ci_1.default ? { headless: true, exit: true } : {};
860
869
  files: argv.files,
861
870
  filter: argv.filter,
862
871
  plan: argv.plan,
863
- prompt: argv.prompt,
872
+ additionalSystemPrompt: argv.additionalSystemPrompt,
864
873
  record: argv.record,
865
874
  retries: argv.retries,
866
875
  headless: argv.headless,
867
876
  exit: argv.exit,
877
+ keepOpen: argv.keepOpen,
868
878
  json: argv.json,
869
879
  console: argv.console,
870
880
  output: argv.output,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bangonit",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "AI-powered E2E testing tool",
5
5
  "bin": {
6
6
  "bangonit": "bin/src/cli/bangonit.js",
@@ -59,6 +59,7 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@iarna/toml": "^2.2.5",
62
+ "diff": "^8.0.3",
62
63
  "dotenv": "^17.3.1",
63
64
  "electron": "^40.8.0",
64
65
  "is-ci": "^4.1.0",