@brimveyn/aimux 1.19.7 → 1.20.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.
@@ -133,6 +133,8 @@ export interface PersistedTabSnapshot {
133
133
  errorMessage?: string
134
134
  exitCode?: number
135
135
  worktreeId?: string
136
+ /** Stable workspace-scoped name assigned by the headless worker facade. */
137
+ workerName?: string
136
138
  autoRenameStatus?: 'eligible' | 'attempted'
137
139
  }
138
140
 
@@ -204,6 +206,8 @@ export interface TabSession {
204
206
  errorMessage?: string
205
207
  exitCode?: number
206
208
  worktreeId?: string
209
+ /** Stable workspace-scoped name assigned by the headless worker facade. */
210
+ workerName?: string
207
211
  autoRenameStatus?: 'eligible' | 'attempted'
208
212
  }
209
213
 
@@ -153,6 +153,7 @@ export function isWorkspaceSnapshotV1(value: unknown): value is WorkspaceSnapsho
153
153
  (tab.errorMessage === undefined || isString(tab.errorMessage)) &&
154
154
  (tab.exitCode === undefined || isFiniteNumber(tab.exitCode)) &&
155
155
  (tab.worktreeId === undefined || isString(tab.worktreeId)) &&
156
+ (tab.workerName === undefined || isString(tab.workerName)) &&
156
157
  (tab.autoRenameStatus === undefined ||
157
158
  tab.autoRenameStatus === 'eligible' ||
158
159
  tab.autoRenameStatus === 'attempted')
@@ -9,6 +9,7 @@ import {
9
9
  encodeManagerMessage,
10
10
  MANAGER_CAPABILITY_SET_BROADCAST_ENABLED,
11
11
  MANAGER_CAPABILITY_TAB_METADATA,
12
+ MANAGER_CAPABILITY_WORKER_METADATA,
12
13
  MANAGER_PROTOCOL_BROADCAST_GATE_VERSION,
13
14
  MANAGER_PROTOCOL_MIN_VERSION,
14
15
  MANAGER_PROTOCOL_VERSION,
@@ -296,9 +297,15 @@ export class TerminalManagerClient extends EventEmitter<ManagerClientEvents> {
296
297
  tabId: options.tabId,
297
298
  title: options.title,
298
299
  })
299
- const payload = this.serverCapabilities.has(MANAGER_CAPABILITY_TAB_METADATA)
300
- ? options
301
- : (({ autoRenameStatus: _autoRenameStatus, ...legacy }) => legacy)(options)
300
+ let payload = options
301
+ if (!this.serverCapabilities.has(MANAGER_CAPABILITY_TAB_METADATA)) {
302
+ const { autoRenameStatus: _autoRenameStatus, ...legacy } = payload
303
+ payload = legacy
304
+ }
305
+ if (!this.serverCapabilities.has(MANAGER_CAPABILITY_WORKER_METADATA)) {
306
+ const { workerName: _workerName, ...legacy } = payload
307
+ payload = legacy
308
+ }
302
309
  return this.sendExpectOk({ id: crypto.randomUUID(), payload, type: 'createTab' })
303
310
  }
304
311
 
@@ -415,6 +422,14 @@ export class TerminalManagerClient extends EventEmitter<ManagerClientEvents> {
415
422
  return this.selectedProtocolVersion
416
423
  }
417
424
 
425
+ getCapabilities(): readonly string[] {
426
+ return [...this.serverCapabilities]
427
+ }
428
+
429
+ hasCapability(name: string): boolean {
430
+ return this.serverCapabilities.has(name)
431
+ }
432
+
418
433
  destroy(): void {
419
434
  this.resetConnection('Terminal manager client destroyed')
420
435
  }