@brimveyn/aimux 1.7.0 → 1.7.1

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.7.0",
3
+ "version": "1.7.1",
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",
@@ -61,7 +61,7 @@
61
61
  "generate-themes": "bun run scripts/generate-themes.ts"
62
62
  },
63
63
  "dependencies": {
64
- "@brimveyn/aimux-config": "0.4.3",
64
+ "@brimveyn/aimux-config": "0.4.4",
65
65
  "@opentui/core": "^0.1.90",
66
66
  "@opentui/react": "^0.1.90",
67
67
  "@xterm/headless": "^6.0.0",
@@ -14,8 +14,8 @@ import {
14
14
  negotiateProtocolVersion,
15
15
  } from './protocol'
16
16
 
17
- export const MANAGER_PROTOCOL_MIN_VERSION = 1
18
- export const MANAGER_PROTOCOL_VERSION = 1
17
+ export const MANAGER_PROTOCOL_MIN_VERSION = 2
18
+ export const MANAGER_PROTOCOL_VERSION = 2
19
19
 
20
20
  export interface ManagerHelloRequest {
21
21
  minVersion: number
@@ -16,8 +16,8 @@ import { isWorkspaceSnapshotV1 } from '../state/validation'
16
16
  // the client applies them atomically with tab creation — previously they
17
17
  // arrived as separate events and could lose to the unknown-tab no-op in
18
18
  // the reducer.
19
- export const IPC_PROTOCOL_MIN_VERSION = 5
20
- export const IPC_PROTOCOL_VERSION = 5
19
+ export const IPC_PROTOCOL_MIN_VERSION = 6
20
+ export const IPC_PROTOCOL_VERSION = 6
21
21
 
22
22
  export interface ProtocolHelloRequest {
23
23
  minVersion: number
@@ -6,6 +6,7 @@ import {
6
6
  getIpcDaemonSocketPath,
7
7
  getSocketSecurityIssue,
8
8
  removeDaemonSocketIfExists,
9
+ removeTerminalManagerSocketIfExists,
9
10
  } from '../daemon/runtime-paths'
10
11
  import { logDebug } from '../debug/input-log'
11
12
  import {
@@ -15,7 +16,12 @@ import {
15
16
  MessageDecoder,
16
17
  parseServerMessage,
17
18
  } from '../ipc/protocol'
18
- import { findIpcDaemonPid, killProcess, spawnDetachedIpcDaemon } from '../platform/daemon-control'
19
+ import {
20
+ findIpcDaemonPid,
21
+ findTerminalManagerPid,
22
+ killProcess,
23
+ spawnDetachedIpcDaemon,
24
+ } from '../platform/daemon-control'
19
25
  import { LocalSessionBackend } from './local-session-backend'
20
26
  import { RemoteSessionBackend } from './remote-session-backend'
21
27
 
@@ -204,6 +210,19 @@ async function restartDaemon(socketPath: string): Promise<void> {
204
210
  await spawnDaemon()
205
211
  }
206
212
 
213
+ // Kill the terminal-manager and clear its socket so the restarted daemon
214
+ // spawns a fresh one via ensureTerminalManagerReady. Without this, the new
215
+ // daemon reconnects to the still-running old terminal-manager and the
216
+ // breaking protocol mismatch persists.
217
+ async function stopTerminalManager(): Promise<void> {
218
+ const pid = await findTerminalManagerPid()
219
+ if (pid !== null) {
220
+ logDebug('backend.stopTerminalManager.killing', { pid })
221
+ await killProcess(pid)
222
+ }
223
+ removeTerminalManagerSocketIfExists()
224
+ }
225
+
207
226
  export async function createSessionBackend(opts?: {
208
227
  onBreakingUpdateRequired?: () => Promise<void>
209
228
  }): Promise<SessionBackend> {
@@ -240,6 +259,7 @@ export async function createSessionBackend(opts?: {
240
259
  socketPath,
241
260
  })
242
261
  await opts?.onBreakingUpdateRequired?.()
262
+ await stopTerminalManager()
243
263
  await restartDaemon(socketPath)
244
264
  const retriedHandshake = await probeDaemonProtocolCompatibility(socketPath)
245
265
  logDebug('backend.create.handshakeAfterRestart', {