minivibe 0.1.3 → 0.1.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 (3) hide show
  1. package/README.md +0 -9
  2. package/package.json +1 -1
  3. package/vibe.js +4 -143
package/README.md CHANGED
@@ -145,15 +145,6 @@ vibe "Explain this code" # With prompt
145
145
  | `--port <port>` | Local WebSocket port (default: 9999) |
146
146
  | `--help, -h` | Show help message |
147
147
 
148
- ## In-Session Commands
149
-
150
- | Command | Description |
151
- |---------|-------------|
152
- | `/name <name>` | Rename the current session |
153
- | `/path` + Enter | If not a vibe command, forwards to Claude |
154
- | `Escape` | Cancel command mode, forward to Claude |
155
- | `Ctrl+C` | Cancel command mode, forward to Claude |
156
-
157
148
  ## Skip Permissions Mode
158
149
 
159
150
  For automated/headless environments where you trust the execution context:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minivibe",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "CLI wrapper for Claude Code with mobile remote control",
5
5
  "author": "neng.ai",
6
6
  "homepage": "https://github.com/python3isfun/neng",
package/vibe.js CHANGED
@@ -411,10 +411,6 @@ Options:
411
411
  --dangerously-skip-permissions Run Claude without permission prompts (use with caution!)
412
412
  --help, -h Show this help message
413
413
 
414
- In-Session Commands:
415
- /name <name> Rename the current session
416
- /anything + Enter If not a vibe command, forwards to Claude
417
-
418
414
  Authentication:
419
415
  Use --login to sign in via browser, or get token from MiniVibe iOS app.
420
416
  Use --login --headless on servers without a browser (EC2, etc.)
@@ -1487,151 +1483,16 @@ function startClaude() {
1487
1483
  // Terminal Input
1488
1484
  // ====================
1489
1485
 
1490
- let commandBuffer = '';
1491
- let inCommandMode = false;
1492
-
1493
- function handleVibeCommand(command) {
1494
- const trimmed = command.trim();
1495
-
1496
- if (trimmed.startsWith('/name ')) {
1497
- const newName = trimmed.slice(6).trim();
1498
- if (!newName) {
1499
- log('Usage: /name <session name>', colors.yellow);
1500
- return true;
1501
- }
1502
-
1503
- // Update local session name
1504
- sessionName = newName;
1505
-
1506
- // Send rename request to bridge
1507
- if (bridgeSocket && bridgeSocket.readyState === WebSocket.OPEN && isAuthenticated) {
1508
- bridgeSocket.send(JSON.stringify({
1509
- type: 'rename_session',
1510
- sessionId: sessionId,
1511
- name: newName
1512
- }));
1513
- log(`📝 Session renamed to: ${newName}`, colors.green);
1514
- } else {
1515
- log(`📝 Session name set to: ${newName} (not connected to bridge)`, colors.yellow);
1516
- }
1517
- return true;
1518
- }
1519
-
1520
- if (trimmed === '/name') {
1521
- // Show current session name
1522
- const currentName = sessionName || path.basename(process.cwd());
1523
- log(`📝 Current session name: ${currentName}`, colors.cyan);
1524
- log(' To rename: /name <new name>', colors.dim);
1525
- return true;
1526
- }
1527
-
1528
- // Not a recognized vibe command - forward to Claude
1529
- // This allows users to type paths like /usr/bin/bash
1530
- return false;
1531
- }
1532
-
1533
1486
  function setupTerminalInput() {
1534
1487
  if (process.stdin.isTTY) {
1535
1488
  process.stdin.setRawMode(true);
1536
1489
  }
1537
1490
  process.stdin.resume();
1538
1491
  process.stdin.on('data', (data) => {
1539
- const str = data.toString();
1540
-
1541
- // Check for command mode
1542
- for (const char of str) {
1543
- const code = char.charCodeAt(0);
1544
-
1545
- // Enter key (CR or LF)
1546
- if (code === 0x0d || code === 0x0a) {
1547
- if (inCommandMode) {
1548
- // Try to handle as vibe command
1549
- if (handleVibeCommand(commandBuffer)) {
1550
- // Command was handled, reset and don't forward
1551
- commandBuffer = '';
1552
- inCommandMode = false;
1553
- // Echo a newline to terminal
1554
- process.stdout.write('\n');
1555
- continue;
1556
- }
1557
- // Not a valid command, forward the buffered content + Enter
1558
- if (claudeProcess && isRunning && claudeProcess.stdin && claudeProcess.stdin.writable) {
1559
- claudeProcess.stdin.write(commandBuffer + '\r');
1560
- }
1561
- commandBuffer = '';
1562
- inCommandMode = false;
1563
- continue;
1564
- }
1565
- }
1566
-
1567
- // Ctrl+C - always forward to Claude (cancel any prompt)
1568
- if (code === 0x03) {
1569
- if (inCommandMode) {
1570
- // Clear the echoed command text
1571
- for (let i = 0; i < commandBuffer.length; i++) {
1572
- process.stdout.write('\b \b');
1573
- }
1574
- commandBuffer = '';
1575
- inCommandMode = false;
1576
- }
1577
- // Always forward Ctrl+C to Claude
1578
- if (claudeProcess && isRunning && claudeProcess.stdin && claudeProcess.stdin.writable) {
1579
- claudeProcess.stdin.write('\x03');
1580
- }
1581
- continue;
1582
- }
1583
-
1584
- // Escape - exit command mode and forward to Claude
1585
- if (code === 0x1b) {
1586
- if (inCommandMode) {
1587
- // Clear the echoed command text
1588
- for (let i = 0; i < commandBuffer.length; i++) {
1589
- process.stdout.write('\b \b');
1590
- }
1591
- commandBuffer = '';
1592
- inCommandMode = false;
1593
- }
1594
- // Always forward Escape to Claude (for canceling prompts)
1595
- if (claudeProcess && isRunning && claudeProcess.stdin && claudeProcess.stdin.writable) {
1596
- claudeProcess.stdin.write('\x1b');
1597
- }
1598
- continue;
1599
- }
1600
-
1601
- // Backspace handling in command mode
1602
- if ((code === 0x7f || code === 0x08) && inCommandMode) {
1603
- if (commandBuffer.length > 0) {
1604
- commandBuffer = commandBuffer.slice(0, -1);
1605
- // Echo backspace to terminal
1606
- process.stdout.write('\b \b');
1607
- }
1608
- if (commandBuffer.length === 0) {
1609
- inCommandMode = false;
1610
- }
1611
- continue;
1612
- }
1613
-
1614
- // Start of line and '/' character - enter command mode
1615
- if (char === '/' && commandBuffer.length === 0 && !inCommandMode) {
1616
- inCommandMode = true;
1617
- commandBuffer = '/';
1618
- // Echo to terminal
1619
- process.stdout.write('/');
1620
- continue;
1621
- }
1622
-
1623
- // In command mode - buffer the character
1624
- if (inCommandMode) {
1625
- commandBuffer += char;
1626
- // Echo to terminal
1627
- process.stdout.write(char);
1628
- continue;
1629
- }
1630
-
1631
- // Normal mode - forward to Claude
1632
- if (claudeProcess && isRunning && claudeProcess.stdin && claudeProcess.stdin.writable) {
1633
- claudeProcess.stdin.write(char);
1634
- }
1492
+ // Pass all input directly to Claude - no command interception
1493
+ // Session naming: use --name flag or rename via iOS app
1494
+ if (claudeProcess && isRunning && claudeProcess.stdin && claudeProcess.stdin.writable) {
1495
+ claudeProcess.stdin.write(data);
1635
1496
  }
1636
1497
  });
1637
1498
  }