genbox 1.0.144 → 1.0.146

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.
@@ -138,10 +138,21 @@ async function createClaudeSession(ipAddress, keyPath, sessionName) {
138
138
  try {
139
139
  console.log(chalk_1.default.dim(`Creating new Claude session: ${sessionName}...`));
140
140
  // Create tmux session and start Claude Code in it
141
- // Using -d to create detached, then we'll attach
142
- (0, child_process_1.execSync)(`ssh -i "${keyPath}" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dev@${ipAddress} "tmux new-session -d -s ${sessionName} -c /home/dev 'claude'" 2>/dev/null`, { encoding: 'utf-8', timeout: 30000 });
141
+ // Use bash -l (login shell) to ensure nvm and other tools are loaded
142
+ // The command sources nvm explicitly to ensure claude is available
143
+ // --dangerously-skip-permissions allows Claude to work autonomously without prompts
144
+ const startCmd = `source ~/.nvm/nvm.sh && cd /home/dev && claude --dangerously-skip-permissions`;
145
+ (0, child_process_1.execSync)(`ssh -i "${keyPath}" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dev@${ipAddress} "tmux new-session -d -s ${sessionName} 'bash -c \\"${startCmd}\\"'" 2>/dev/null`, { encoding: 'utf-8', timeout: 30000 });
143
146
  // Give Claude a moment to start
144
- await new Promise(resolve => setTimeout(resolve, 1000));
147
+ await new Promise(resolve => setTimeout(resolve, 1500));
148
+ // Verify session was created
149
+ try {
150
+ (0, child_process_1.execSync)(`ssh -i "${keyPath}" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dev@${ipAddress} "tmux has-session -t ${sessionName}" 2>/dev/null`, { encoding: 'utf-8', timeout: 10000 });
151
+ }
152
+ catch {
153
+ console.error(chalk_1.default.red(`Session failed to start. Claude may have exited.`));
154
+ return false;
155
+ }
145
156
  return true;
146
157
  }
147
158
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genbox",
3
- "version": "1.0.144",
3
+ "version": "1.0.146",
4
4
  "description": "Genbox CLI - AI-Powered Development Environments",
5
5
  "main": "dist/index.js",
6
6
  "bin": {