@brimveyn/aimux 1.18.2 → 1.18.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimveyn/aimux",
3
- "version": "1.18.2",
3
+ "version": "1.18.3",
4
4
  "description": "A terminal multiplexer for AI CLIs. Run Claude, Codex, OpenCode side-by-side with tabbed navigation, split panes, and persistent sessions.",
5
5
  "keywords": [
6
6
  "ai",
@@ -60,8 +60,15 @@ export async function assertSafeAimuxWorktreePath(path: string): Promise<void> {
60
60
  if (!isInsideAimuxWorktreeRoot(path)) {
61
61
  throw new Error(`refusing worktree path outside Aimux temp root: ${path}`)
62
62
  }
63
+ // Create the repo-scoped parent (<root>/r-<hash>) before resolving it: git
64
+ // worktree add does not create intermediate dirs, and realpath() would throw
65
+ // ENOENT on the first worktree for a repo. mkdir(recursive) leaves an
66
+ // existing symlink in place, so the realpath check below still catches an
67
+ // escape out of the temp root.
68
+ const parent = resolve(path, '..')
69
+ await mkdir(parent, { recursive: true })
63
70
  const realRoot = await realpath(root)
64
- const realParent = await realpath(resolve(path, '..'))
71
+ const realParent = await realpath(parent)
65
72
  if (`${realParent}/`.startsWith(`${realRoot}/`)) return
66
73
  throw new Error(`unsafe Aimux worktree parent: ${realParent}`)
67
74
  }