jettypod 4.4.61 → 4.4.63

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.
@@ -1171,19 +1171,12 @@ async function mergeWork(options = {}) {
1171
1171
  }
1172
1172
  }
1173
1173
 
1174
- // CRITICAL: Refuse to run from inside a worktree
1175
- // Running merge from inside the worktree that will be deleted poisons the shell session
1174
+ // Auto-chdir to main repo if running from inside a worktree
1176
1175
  const cwd = process.cwd();
1177
1176
  if (cwd.includes('.jettypod-work')) {
1178
1177
  const mainRepo = getGitRoot();
1179
- console.error(' Cannot merge from inside a worktree.');
1180
- console.error('');
1181
- console.error(' The merge will delete this worktree, breaking your shell session.');
1182
- console.error('');
1183
- console.error(' Run from the main repository instead:');
1184
- console.error(` cd ${mainRepo}`);
1185
- console.error(' jettypod work merge');
1186
- return Promise.reject(new Error('Cannot merge from inside a worktree'));
1178
+ console.log('📂 Changing to main repository for merge...');
1179
+ process.chdir(mainRepo);
1187
1180
  }
1188
1181
 
1189
1182
  // Get current work - either from explicit ID or branch detection
@@ -1360,11 +1353,13 @@ async function mergeWork(options = {}) {
1360
1353
  console.log(`Branch: ${currentBranch}`);
1361
1354
 
1362
1355
  // Step 1: Push feature branch to remote
1356
+ // NOTE: Use ['pipe', 'inherit', 'inherit'] instead of 'inherit' to avoid stealing stdin
1357
+ // from Claude Code's shell. Using 'inherit' for stdin breaks the shell when run interactively.
1363
1358
  try {
1364
1359
  console.log('Pushing feature branch to remote...');
1365
1360
  execSync(`git push -u origin ${currentBranch}`, {
1366
1361
  cwd: gitRoot,
1367
- stdio: 'inherit'
1362
+ stdio: ['pipe', 'inherit', 'inherit']
1368
1363
  });
1369
1364
  } catch (err) {
1370
1365
  const errorMsg = err.message.toLowerCase();
@@ -1416,7 +1411,7 @@ async function mergeWork(options = {}) {
1416
1411
  console.log(`Checking out ${defaultBranch}...`);
1417
1412
  execSync(`git checkout ${defaultBranch}`, {
1418
1413
  cwd: gitRoot,
1419
- stdio: 'inherit'
1414
+ stdio: ['pipe', 'inherit', 'inherit']
1420
1415
  });
1421
1416
  } catch (err) {
1422
1417
  return Promise.reject(new Error(`Failed to checkout ${defaultBranch}: ${err.message}`));
@@ -1455,7 +1450,7 @@ async function mergeWork(options = {}) {
1455
1450
  console.log(`Updating ${defaultBranch} from remote...`);
1456
1451
  execSync(`git pull origin ${defaultBranch}`, {
1457
1452
  cwd: gitRoot,
1458
- stdio: 'inherit'
1453
+ stdio: ['pipe', 'inherit', 'inherit']
1459
1454
  });
1460
1455
  } catch (err) {
1461
1456
  const errorMsg = err.message.toLowerCase();
@@ -1492,12 +1487,12 @@ async function mergeWork(options = {}) {
1492
1487
  return Promise.reject(new Error(`Failed to pull ${defaultBranch}: ${err.message}`));
1493
1488
  }
1494
1489
 
1495
- // Step 4: Merge feature branch into default branch
1490
+ // Step 5: Merge feature branch into default branch
1496
1491
  try {
1497
1492
  console.log(`Merging ${currentBranch} into ${defaultBranch}...`);
1498
1493
  execSync(`git merge --no-ff ${currentBranch} -m "Merge work item #${currentWork.id}"`, {
1499
1494
  cwd: gitRoot,
1500
- stdio: 'inherit'
1495
+ stdio: ['pipe', 'inherit', 'inherit']
1501
1496
  });
1502
1497
  } catch (err) {
1503
1498
  // Check if merge failed due to conflicts
@@ -1538,12 +1533,12 @@ async function mergeWork(options = {}) {
1538
1533
  return Promise.reject(new Error(`Failed to merge ${currentBranch}: ${err.message}`));
1539
1534
  }
1540
1535
 
1541
- // Step 5: Push default branch to remote
1536
+ // Step 6: Push default branch to remote
1542
1537
  try {
1543
1538
  console.log(`Pushing ${defaultBranch} to remote...`);
1544
1539
  execSync(`git push origin ${defaultBranch}`, {
1545
1540
  cwd: gitRoot,
1546
- stdio: 'inherit'
1541
+ stdio: ['pipe', 'inherit', 'inherit']
1547
1542
  });
1548
1543
  } catch (err) {
1549
1544
  const errorMsg = err.message.toLowerCase();
@@ -1735,18 +1730,12 @@ async function testsMerge(featureId) {
1735
1730
  return Promise.reject(new Error('Invalid feature ID'));
1736
1731
  }
1737
1732
 
1738
- // CRITICAL: Refuse to run from inside a worktree
1733
+ // Auto-chdir to main repo if running from inside a worktree
1739
1734
  const cwd = process.cwd();
1740
1735
  if (cwd.includes('.jettypod-work')) {
1741
1736
  const mainRepo = getGitRoot();
1742
- console.error(' Cannot merge from inside a worktree.');
1743
- console.error('');
1744
- console.error(' The merge will delete this worktree, breaking your shell session.');
1745
- console.error('');
1746
- console.error(' Run from the main repository instead:');
1747
- console.error(` cd ${mainRepo}`);
1748
- console.error(` jettypod work tests merge ${featureId}`);
1749
- return Promise.reject(new Error('Cannot merge from inside a worktree'));
1737
+ console.log('📂 Changing to main repository for merge...');
1738
+ process.chdir(mainRepo);
1750
1739
  }
1751
1740
 
1752
1741
  const db = getDb();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jettypod",
3
- "version": "4.4.61",
3
+ "version": "4.4.63",
4
4
  "description": "AI-powered development workflow manager with TDD, BDD, and automatic test generation",
5
5
  "main": "jettypod.js",
6
6
  "bin": {