bonzai-burn 1.0.12 → 1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bonzai-burn",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Git branch-based cleanup tool with bburn, baccept, and brevert commands",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -1,6 +1,5 @@
1
1
  {
2
- "isClaude": false,
3
- "isCursor": true,
2
+ "provider": "cursor",
4
3
  "headlessClaude": true,
5
4
  "autoBurn": false,
6
5
  "lineLimit": {
package/src/baccept.js CHANGED
@@ -35,9 +35,6 @@ async function accept() {
35
35
  // Merge burn branch into original
36
36
  execVisible(`git merge ${burnBranch} -m "Accept bonzai burn from ${burnBranch}"`);
37
37
 
38
- // Delete burn branch
39
- execVisible(`git branch -D ${burnBranch}`);
40
-
41
38
  // If we made a WIP commit, we need to handle it
42
39
  // The merge already includes the burn changes on top of the WIP commit
43
40
  // So we can optionally squash or leave as-is
@@ -51,7 +48,8 @@ async function accept() {
51
48
  exec('git config --unset bonzai.madeWipCommit');
52
49
 
53
50
  console.log(`\n✓ Burn accepted and merged`);
54
- console.log(`Now on: ${originalBranch}\n`);
51
+ console.log(`Now on: ${originalBranch}`);
52
+ console.log(`Branch kept: ${burnBranch}\n`);
55
53
 
56
54
  } catch (error) {
57
55
  console.error('❌ Accept failed:', error.message);
package/src/bburn.js CHANGED
@@ -15,6 +15,36 @@ const CONFIG_FILE = 'config.json';
15
15
  // Template folder in the package (ships as payload-bonzai, copied as bonzai)
16
16
  const TEMPLATE_DIR = join(__dirname, '..', 'payload-bonzai');
17
17
 
18
+ // Parse --provider / -p argument, with config as fallback
19
+ function parseProvider(configDefault = 'claude') {
20
+ const args = process.argv.slice(2);
21
+ let provider = null;
22
+
23
+ for (let i = 0; i < args.length; i++) {
24
+ if (args[i] === '--provider' || args[i] === '-p') {
25
+ provider = args[i + 1];
26
+ break;
27
+ }
28
+ if (args[i].startsWith('--provider=')) {
29
+ provider = args[i].split('=')[1];
30
+ break;
31
+ }
32
+ }
33
+
34
+ // Use config default if no CLI arg provided
35
+ if (!provider) {
36
+ provider = configDefault;
37
+ }
38
+
39
+ const validProviders = ['claude', 'cursor'];
40
+ if (!validProviders.includes(provider)) {
41
+ console.error(`❌ Invalid provider: "${provider}". Must be one of: ${validProviders.join(', ')}`);
42
+ process.exit(1);
43
+ }
44
+
45
+ return provider;
46
+ }
47
+
18
48
  function initializeBonzai() {
19
49
  const bonzaiPath = join(process.cwd(), BONZAI_DIR);
20
50
  const specsPath = join(bonzaiPath, SPECS_FILE);
@@ -251,6 +281,11 @@ function getToolIcon(toolName) {
251
281
  return icons[toolName] || '🔹';
252
282
  }
253
283
 
284
+ function executeCursor(requirements, config) {
285
+ console.log('🔥 Burning through Cursor...');
286
+ return Promise.resolve();
287
+ }
288
+
254
289
  async function burn() {
255
290
  try {
256
291
  // Initialize bonzai folder and specs.md on first execution
@@ -261,8 +296,8 @@ async function burn() {
261
296
  const config = loadConfig(configPath);
262
297
  const specs = loadSpecs(specsPath, config);
263
298
 
264
- // Check if Claude CLI exists and execute
265
- console.log('🔍 Checking for Claude Code CLI...');
299
+ // Determine provider: CLI arg overrides config
300
+ const provider = parseProvider(config.provider || 'claude');
266
301
 
267
302
  // Check if in git repo
268
303
  try {
@@ -304,13 +339,20 @@ async function burn() {
304
339
  exec(`git config bonzai.madeWipCommit ${madeWipCommit}`);
305
340
 
306
341
  console.log(`📋 Specs loaded from: ${BONZAI_DIR}/${SPECS_FILE}`);
307
- console.log(`⚙️ Headless mode: ${config.headlessClaude !== false ? 'on' : 'off'}`);
342
+ console.log(`🤖 Provider: ${provider}`);
343
+ if (provider === 'claude') {
344
+ console.log(`⚙️ Headless mode: ${config.headlessClaude !== false ? 'on' : 'off'}`);
345
+ }
308
346
  console.log('🔥 Running Bonzai burn...\n');
309
347
 
310
348
  const startTime = Date.now();
311
349
 
312
- // Execute Claude with specs from bonzai/specs.md
313
- await executeClaude(specs, config);
350
+ // Execute with the selected provider
351
+ if (provider === 'cursor') {
352
+ await executeCursor(specs, config);
353
+ } else {
354
+ await executeClaude(specs, config);
355
+ }
314
356
 
315
357
  const duration = Math.round((Date.now() - startTime) / 1000);
316
358