indieclaw-agent 1.1.2 → 1.1.3

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/index.js +7 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -543,11 +543,15 @@ function handleTerminalStart(ws, { id }) {
543
543
  }
544
544
  }
545
545
 
546
- // Fallback: child_process.spawn
546
+ // Fallback: use script(1) to allocate a real PTY
547
547
  const { spawn } = require('child_process');
548
- const proc = spawn(shell, ['-i'], {
548
+ const scriptArgs = os.platform() === 'darwin'
549
+ ? ['-q', '/dev/null', shell]
550
+ : ['-q', '-c', shell, '/dev/null'];
551
+
552
+ const proc = spawn('script', scriptArgs, {
549
553
  cwd: os.homedir(),
550
- env: { ...process.env, TERM: 'dumb' },
554
+ env: { ...process.env, TERM: 'xterm-256color' },
551
555
  stdio: ['pipe', 'pipe', 'pipe'],
552
556
  });
553
557
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "indieclaw-agent",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Manage your server from your phone. Agent for the IndieClaw mobile app.",
5
5
  "main": "index.js",
6
6
  "bin": {