@brimveyn/aimux 1.19.6 → 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.
- package/README.md +6 -0
- package/package.json +3 -2
- package/skills/aimux-orchestrator/SKILL.md +93 -0
- package/skills/aimux-orchestrator/assets/ledger.template.md +18 -0
- package/skills/aimux-orchestrator/references/prompts.md +57 -0
- package/skills/aimux-orchestrator/references/review.md +18 -0
- package/src/app-runtime/backend-runtime-events.ts +16 -0
- package/src/app-runtime/side-effects.ts +15 -2
- package/src/auto-rename/coordinator.ts +97 -0
- package/src/auto-rename/prompt-capture.ts +211 -0
- package/src/auto-rename/title-runner.ts +96 -0
- package/src/cli/client/daemon-client.ts +16 -0
- package/src/cli/commands/tab/create.ts +236 -124
- package/src/cli/commands/tab/prompt-io.ts +2 -1
- package/src/cli/commands/worker/await.ts +33 -0
- package/src/cli/commands/worker/doctor.ts +129 -0
- package/src/cli/commands/worker/list.ts +25 -0
- package/src/cli/commands/worker/prompt.ts +49 -0
- package/src/cli/commands/worker/run.ts +97 -0
- package/src/cli/commands/worker/shared.ts +255 -0
- package/src/cli/commands/worker/stop.ts +84 -0
- package/src/cli/commands/worktree/remove.ts +29 -9
- package/src/cli/index.ts +21 -9
- package/src/cli/registry.ts +12 -0
- package/src/daemon/daemon.ts +173 -12
- package/src/daemon/session-manager.ts +8 -0
- package/src/daemon/session-registry.ts +22 -1
- package/src/git/worktree.ts +8 -0
- package/src/index.tsx +21 -82
- package/src/input/modes/types.ts +1 -0
- package/src/ipc/manager-protocol.ts +52 -2
- package/src/ipc/protocol.ts +74 -3
- package/src/session-backend/bootstrap.ts +3 -1
- package/src/session-backend/local-session-backend.ts +63 -2
- package/src/session-backend/remote-session-backend.ts +17 -0
- package/src/session-backend/types.ts +7 -0
- package/src/state/reducers/tab-state.ts +14 -1
- package/src/state/session-persistence.ts +4 -0
- package/src/state/types.ts +18 -1
- package/src/state/validation.ts +5 -1
- package/src/terminal-manager/manager-client.ts +33 -1
- package/src/terminal-manager/terminal-manager.ts +9 -0
|
@@ -49,6 +49,7 @@ export function serializeWorkspace(state: AppState): WorkspaceSnapshotV1 {
|
|
|
49
49
|
tabGroupMap: Object.keys(state.tabGroupMap).length > 0 ? state.tabGroupMap : undefined,
|
|
50
50
|
tabs: state.tabs.map((tab) => ({
|
|
51
51
|
assistant: tab.assistant,
|
|
52
|
+
autoRenameStatus: tab.autoRenameStatus,
|
|
52
53
|
buffer: tab.buffer,
|
|
53
54
|
command: tab.command,
|
|
54
55
|
errorMessage: tab.errorMessage,
|
|
@@ -58,6 +59,7 @@ export function serializeWorkspace(state: AppState): WorkspaceSnapshotV1 {
|
|
|
58
59
|
terminalModes: tab.terminalModes,
|
|
59
60
|
title: tab.title,
|
|
60
61
|
viewport: tab.viewport,
|
|
62
|
+
workerName: tab.workerName,
|
|
61
63
|
worktreeId: tab.worktreeId,
|
|
62
64
|
})),
|
|
63
65
|
version: 1,
|
|
@@ -113,6 +115,7 @@ export function restoreTabsFromWorkspace(
|
|
|
113
115
|
.map((tab) => ({
|
|
114
116
|
activity: 'idle',
|
|
115
117
|
assistant: tab.assistant,
|
|
118
|
+
autoRenameStatus: tab.autoRenameStatus,
|
|
116
119
|
buffer: tab.buffer,
|
|
117
120
|
command: tab.command,
|
|
118
121
|
errorMessage: tab.errorMessage,
|
|
@@ -122,6 +125,7 @@ export function restoreTabsFromWorkspace(
|
|
|
122
125
|
terminalModes: tab.terminalModes,
|
|
123
126
|
title: tab.title,
|
|
124
127
|
viewport: tab.viewport,
|
|
128
|
+
workerName: tab.workerName,
|
|
125
129
|
worktreeId: tab.worktreeId,
|
|
126
130
|
}))
|
|
127
131
|
return pruneOrphanedTabs(restored, options.validWorktreeIds)
|
package/src/state/types.ts
CHANGED
|
@@ -133,6 +133,9 @@ 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
|
|
138
|
+
autoRenameStatus?: 'eligible' | 'attempted'
|
|
136
139
|
}
|
|
137
140
|
|
|
138
141
|
export interface WorkspaceSnapshotV1 {
|
|
@@ -203,6 +206,9 @@ export interface TabSession {
|
|
|
203
206
|
errorMessage?: string
|
|
204
207
|
exitCode?: number
|
|
205
208
|
worktreeId?: string
|
|
209
|
+
/** Stable workspace-scoped name assigned by the headless worker facade. */
|
|
210
|
+
workerName?: string
|
|
211
|
+
autoRenameStatus?: 'eligible' | 'attempted'
|
|
206
212
|
}
|
|
207
213
|
|
|
208
214
|
export interface SidebarState {
|
|
@@ -747,7 +753,18 @@ export type TabAction =
|
|
|
747
753
|
| { type: 'reorder-active-tab'; delta: number }
|
|
748
754
|
| { type: 'reorder-tabs'; orderedTabIds: string[] }
|
|
749
755
|
| { type: 'reset-tab-session'; tabId: string }
|
|
750
|
-
| {
|
|
756
|
+
| {
|
|
757
|
+
type: 'rename-tab'
|
|
758
|
+
tabId: string
|
|
759
|
+
title: string
|
|
760
|
+
autoRenameStatus?: 'eligible' | 'attempted'
|
|
761
|
+
}
|
|
762
|
+
| {
|
|
763
|
+
type: 'update-tab-metadata'
|
|
764
|
+
tabId: string
|
|
765
|
+
title?: string
|
|
766
|
+
autoRenameStatus?: 'eligible' | 'attempted'
|
|
767
|
+
}
|
|
751
768
|
| { type: 'append-tab-buffer'; tabId: string; chunk: string }
|
|
752
769
|
| {
|
|
753
770
|
type: 'replace-tab-viewport'
|
package/src/state/validation.ts
CHANGED
|
@@ -152,7 +152,11 @@ export function isWorkspaceSnapshotV1(value: unknown): value is WorkspaceSnapsho
|
|
|
152
152
|
(tab.viewport === undefined || isTerminalSnapshot(tab.viewport)) &&
|
|
153
153
|
(tab.errorMessage === undefined || isString(tab.errorMessage)) &&
|
|
154
154
|
(tab.exitCode === undefined || isFiniteNumber(tab.exitCode)) &&
|
|
155
|
-
(tab.worktreeId === undefined || isString(tab.worktreeId))
|
|
155
|
+
(tab.worktreeId === undefined || isString(tab.worktreeId)) &&
|
|
156
|
+
(tab.workerName === undefined || isString(tab.workerName)) &&
|
|
157
|
+
(tab.autoRenameStatus === undefined ||
|
|
158
|
+
tab.autoRenameStatus === 'eligible' ||
|
|
159
|
+
tab.autoRenameStatus === 'attempted')
|
|
156
160
|
) &&
|
|
157
161
|
(value.layoutTree === undefined || isLayoutNode(value.layoutTree)) &&
|
|
158
162
|
(value.layoutTrees === undefined || isLayoutTreesMap(value.layoutTrees)) &&
|
|
@@ -8,6 +8,8 @@ import { logDebug } from '../debug/input-log'
|
|
|
8
8
|
import {
|
|
9
9
|
encodeManagerMessage,
|
|
10
10
|
MANAGER_CAPABILITY_SET_BROADCAST_ENABLED,
|
|
11
|
+
MANAGER_CAPABILITY_TAB_METADATA,
|
|
12
|
+
MANAGER_CAPABILITY_WORKER_METADATA,
|
|
11
13
|
MANAGER_PROTOCOL_BROADCAST_GATE_VERSION,
|
|
12
14
|
MANAGER_PROTOCOL_MIN_VERSION,
|
|
13
15
|
MANAGER_PROTOCOL_VERSION,
|
|
@@ -295,7 +297,16 @@ export class TerminalManagerClient extends EventEmitter<ManagerClientEvents> {
|
|
|
295
297
|
tabId: options.tabId,
|
|
296
298
|
title: options.title,
|
|
297
299
|
})
|
|
298
|
-
|
|
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
|
+
}
|
|
309
|
+
return this.sendExpectOk({ id: crypto.randomUUID(), payload, type: 'createTab' })
|
|
299
310
|
}
|
|
300
311
|
|
|
301
312
|
async write(sessionId: string, tabId: string, data: string): Promise<void> {
|
|
@@ -306,6 +317,19 @@ export class TerminalManagerClient extends EventEmitter<ManagerClientEvents> {
|
|
|
306
317
|
})
|
|
307
318
|
}
|
|
308
319
|
|
|
320
|
+
async updateTabMetadata(
|
|
321
|
+
sessionId: string,
|
|
322
|
+
tabId: string,
|
|
323
|
+
patch: { title?: string; autoRenameStatus?: 'eligible' | 'attempted' }
|
|
324
|
+
): Promise<void> {
|
|
325
|
+
if (!this.serverCapabilities.has(MANAGER_CAPABILITY_TAB_METADATA)) return
|
|
326
|
+
return this.sendExpectOk({
|
|
327
|
+
id: crypto.randomUUID(),
|
|
328
|
+
payload: { ...patch, sessionId, tabId },
|
|
329
|
+
type: 'updateTabMetadata',
|
|
330
|
+
})
|
|
331
|
+
}
|
|
332
|
+
|
|
309
333
|
async resize(sessionId: string, cols: number, rows: number): Promise<void> {
|
|
310
334
|
return this.sendExpectOk({
|
|
311
335
|
id: crypto.randomUUID(),
|
|
@@ -398,6 +422,14 @@ export class TerminalManagerClient extends EventEmitter<ManagerClientEvents> {
|
|
|
398
422
|
return this.selectedProtocolVersion
|
|
399
423
|
}
|
|
400
424
|
|
|
425
|
+
getCapabilities(): readonly string[] {
|
|
426
|
+
return [...this.serverCapabilities]
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
hasCapability(name: string): boolean {
|
|
430
|
+
return this.serverCapabilities.has(name)
|
|
431
|
+
}
|
|
432
|
+
|
|
401
433
|
destroy(): void {
|
|
402
434
|
this.resetConnection('Terminal manager client destroyed')
|
|
403
435
|
}
|
|
@@ -209,6 +209,15 @@ export async function runTerminalManager(): Promise<void> {
|
|
|
209
209
|
)
|
|
210
210
|
sendOk(socket, message.id)
|
|
211
211
|
break
|
|
212
|
+
case 'updateTabMetadata':
|
|
213
|
+
requireNegotiatedVersion(socket, negotiatedVersions)
|
|
214
|
+
sessionManager.updateTabMetadata(
|
|
215
|
+
message.payload.sessionId,
|
|
216
|
+
message.payload.tabId,
|
|
217
|
+
message.payload
|
|
218
|
+
)
|
|
219
|
+
sendOk(socket, message.id)
|
|
220
|
+
break
|
|
212
221
|
case 'resizeClient': {
|
|
213
222
|
requireNegotiatedVersion(socket, negotiatedVersions)
|
|
214
223
|
sessionManager.resize(
|