blun-king-cli 9.1.4 → 9.1.5

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.
@@ -81,13 +81,21 @@ function readPackageVersion() {
81
81
  return version;
82
82
  }
83
83
 
84
+ function shouldDetachProtectedCore(options = {}) {
85
+ const platform = options.platform || process.platform;
86
+ const stdinIsTTY = Object.hasOwn(options, 'stdinIsTTY')
87
+ ? options.stdinIsTTY
88
+ : process.stdin.isTTY;
89
+ return platform !== 'win32' || stdinIsTTY !== true;
90
+ }
91
+
84
92
  function spawnProtectedCore(args, env, cwd) {
85
93
  const child = spawn(
86
94
  process.execPath,
87
95
  [path.join(PKG, 'bin', 'core-bootstrap.js'), ...args],
88
96
  {
89
97
  cwd,
90
- detached: true,
98
+ detached: shouldDetachProtectedCore(),
91
99
  env,
92
100
  stdio: ['inherit', 'inherit', 'inherit', 'ipc'],
93
101
  windowsHide: true,
@@ -290,4 +298,4 @@ async function runLauncher(options = {}) {
290
298
  }
291
299
  }
292
300
 
293
- module.exports = { resolveLauncherPrivatePaths, runLauncher };
301
+ module.exports = { resolveLauncherPrivatePaths, runLauncher, shouldDetachProtectedCore };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "9.1.4",
3
+ "version": "9.1.5",
4
4
  "description": "BLUN CLI - your own AI agent with a Telegram channel. Get it done. With BLUN.",
5
5
  "license": "MIT",
6
6
  "bin": {