claude-code-remote-pilot 0.2.11 → 0.2.12

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 (2) hide show
  1. package/bin/claude-pilot.js +13 -10
  2. package/package.json +1 -1
@@ -32,11 +32,14 @@ function tmuxInstallCmd() {
32
32
  return 'sudo apt-get install -y tmux';
33
33
  }
34
34
 
35
+ function isYes(answer) { return answer === '' || answer === 'y' || answer === 'yes'; }
36
+ function isNo(answer) { return answer === '' || answer === 'n' || answer === 'no'; }
37
+
35
38
  async function ensureDep(rl, cmd, label, installCmd) {
36
39
  if (has(cmd)) return;
37
40
  console.log(`\n${label} is not installed.`);
38
- const answer = await question(rl, 'Install it now? (y/n) ');
39
- if (answer !== 'y' && answer !== 'yes') {
41
+ const answer = await question(rl, 'Install it now? (Y/n) ');
42
+ if (!isYes(answer)) {
40
43
  console.log(`Run manually: ${installCmd}`);
41
44
  process.exit(1);
42
45
  }
@@ -67,8 +70,8 @@ async function setupTelegram(rl) {
67
70
  return saved;
68
71
  }
69
72
  console.log('\nTelegram notifications (optional).');
70
- const answer = await question(rl, 'Set up Telegram now? (y/n) ');
71
- if (answer !== 'y' && answer !== 'yes') { console.log('Skipping.\n'); return {}; }
73
+ const answer = await question(rl, 'Set up Telegram now? (y/N) ');
74
+ if (answer === '' || !isYes(answer)) { console.log('Skipping.\n'); return {}; }
72
75
  const token = await questionRaw(rl, 'Bot token: ');
73
76
  const chatId = await questionRaw(rl, 'Chat ID: ');
74
77
  config.saveTelegram(token, chatId);
@@ -180,8 +183,8 @@ async function handleExit(manager, rl) {
180
183
  console.log('');
181
184
  process.exit(0);
182
185
  }
183
- const answer = await questionRaw(rl, `\n Kill all ${sessions.length} session(s) before exiting? (y/n) `);
184
- if (answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes') {
186
+ const answer = await question(rl, `\n Kill all ${sessions.length} session(s) before exiting? (y/N) `);
187
+ if (isYes(answer) && answer !== '') {
185
188
  manager.killAll();
186
189
  config.clearSessions();
187
190
  console.log(' All sessions killed.\n');
@@ -329,8 +332,8 @@ ${HELP}`);
329
332
  if (savedSessions.length) {
330
333
  console.log(`\n Found ${savedSessions.length} session(s) still running from last time:`);
331
334
  savedSessions.forEach(s => console.log(` ${s.name.padEnd(22)} ${s.path}`));
332
- const recover = await question(setupRl, ' Re-adopt and watch them? (y/n) ');
333
- if (recover === 'y' || recover === 'yes') {
335
+ const recover = await question(setupRl, ' Re-adopt and watch them? (Y/n) ');
336
+ if (isYes(recover)) {
334
337
  savedSessions.forEach(s => {
335
338
  try { manager.adopt(s.name, s.path); console.log(` ✓ Re-adopted "${s.name}"`); }
336
339
  catch (e) { console.log(` ✗ Could not adopt "${s.name}": ${e.message}`); }
@@ -341,9 +344,9 @@ ${HELP}`);
341
344
 
342
345
  const cwd = process.cwd();
343
346
  const defaultName = path.basename(cwd);
344
- const mount = await question(setupRl, `Mount current directory as a session? (${defaultName}) [y/n] `);
347
+ const mount = await question(setupRl, `Mount current directory as a session? (${defaultName}) [Y/n] `);
345
348
 
346
- if (mount === 'y' || mount === 'yes') {
349
+ if (isYes(mount)) {
347
350
  const rawName = await questionRaw(setupRl, `Session name [${defaultName}]: `);
348
351
  const session = manager.spawn(cwd, rawName || defaultName);
349
352
  console.log(` ✓ "${session.name}" started at ${session.path}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-remote-pilot",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "description": "Interactive Claude Code supervisor — spawn and monitor multiple Claude sessions from a single terminal.",
5
5
  "type": "commonjs",
6
6
  "bin": {