@brimveyn/aimux 1.22.0 → 1.22.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimveyn/aimux",
3
- "version": "1.22.0",
3
+ "version": "1.22.2",
4
4
  "description": "A terminal multiplexer for AI CLIs. Run Claude, Codex, OpenCode, Kimi side-by-side with tabbed navigation, split panes, and persistent sessions.",
5
5
  "keywords": [
6
6
  "ai",
@@ -13,12 +13,25 @@ export async function runCli(
13
13
  timeoutMs: number = DEFAULT_TIMEOUT_MS,
14
14
  cwd?: string
15
15
  ): Promise<CliResult> {
16
- const proc = Bun.spawn([command, ...args], {
17
- cwd,
18
- stderr: 'pipe',
19
- stdin: 'ignore',
20
- stdout: 'pipe',
21
- })
16
+ let proc: Bun.Subprocess<'ignore', 'pipe', 'pipe'>
17
+ try {
18
+ proc = Bun.spawn([command, ...args], {
19
+ cwd,
20
+ stderr: 'pipe',
21
+ stdin: 'ignore',
22
+ stdout: 'pipe',
23
+ })
24
+ } catch (error) {
25
+ // posix_spawn throws — synchronously — for a missing binary AND for a cwd
26
+ // that no longer exists (a deleted project dir or a pruned worktree), and
27
+ // it names the binary in both. Uncaught, that took the whole app down.
28
+ return {
29
+ error: `${command}: ${String(error)}`.slice(0, 200),
30
+ ok: false,
31
+ stderr: '',
32
+ stdout: '',
33
+ }
34
+ }
22
35
 
23
36
  const timeout = setTimeout(() => {
24
37
  try {