noninteractive 0.3.17 → 0.3.18

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.
@@ -297,7 +297,7 @@ function runDaemon(sessionName, executable, args) {
297
297
  socket.end(JSON.stringify({ ok: false, error: "process exited" }));
298
298
  break;
299
299
  }
300
- stdin?.write(`${msg.data}\r`);
300
+ stdin?.write(msg.data);
301
301
  socket.end(JSON.stringify({ ok: true }));
302
302
  break;
303
303
  case "sendread": {
@@ -307,7 +307,7 @@ function runDaemon(sessionName, executable, args) {
307
307
  }
308
308
  const beforeLength = outputBuffer.length;
309
309
  const timeout = msg.timeout ?? 30000;
310
- stdin?.write(`${msg.data}\r`);
310
+ stdin?.write(msg.data);
311
311
  waitForNewOutput(socket, beforeLength, timeout);
312
312
  break;
313
313
  }
@@ -347,7 +347,7 @@ var init_daemon = __esm(() => {
347
347
  var require_package = __commonJS((exports, module) => {
348
348
  module.exports = {
349
349
  name: "noninteractive",
350
- version: "0.3.17",
350
+ version: "0.3.18",
351
351
  type: "module",
352
352
  bin: {
353
353
  noninteractive: "./bin/noninteractive.js"
@@ -443,7 +443,7 @@ usage: npx noninteractive <tool> [args...]
443
443
 
444
444
  commands:
445
445
  <tool> [args...] start a session (runs npx <tool> in a PTY)
446
- send <session> <text> [--wait] send keystrokes (--wait waits for new output)
446
+ send <session> <text> [--wait] send raw keystrokes (--wait waits for new output)
447
447
  read <session> [--wait] [--timeout N] read terminal output (--wait blocks until new output)
448
448
  stop <session> stop a session
449
449
  list show active sessions
@@ -456,12 +456,15 @@ flags:
456
456
 
457
457
  the session name is auto-derived from the tool (e.g. "workos" \u2192 session "workos").
458
458
 
459
- example workflow (recommended \u2014 uses --wait to minimize round-trips):
460
- npx noninteractive workos # starts "npx workos", session = "workos"
461
- npx noninteractive send workos "" --wait # press Enter, wait for response
462
- npx noninteractive send workos "y" --wait # type "y", wait for response
463
- npx noninteractive read workos --wait # wait for new output (e.g. OAuth callback)
464
- npx noninteractive stop workos # done, stop the session
459
+ text is sent exactly as-is \u2014 no auto-appended enter. use $'\\r' for Enter, $'\\x1b[B' for arrow keys.
460
+
461
+ example workflow:
462
+ npx noninteractive workos # starts "npx workos", session = "workos"
463
+ npx noninteractive send workos $'\\r' --wait # press Enter, wait for response
464
+ npx noninteractive send workos $'y\\r' --wait # type "y" + Enter, wait for response
465
+ npx noninteractive send workos $'\\x1b[B\\r' --wait # arrow down + Enter
466
+ npx noninteractive read workos --wait # wait for new output (e.g. OAuth callback)
467
+ npx noninteractive stop workos # done, stop the session
465
468
 
466
469
  more examples:
467
470
  npx noninteractive vercel # session "vercel"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noninteractive",
3
- "version": "0.3.17",
3
+ "version": "0.3.18",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "noninteractive": "./bin/noninteractive.js"