@brimveyn/aimux 1.19.5 → 1.19.6

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 CHANGED
@@ -13,7 +13,7 @@ snippets, themes, and fully configurable keymaps.
13
13
  ## Features
14
14
 
15
15
  - multi-workspace workflow with a dedicated workspace picker
16
- - tabs for `claude`, `codex`, `opencode`, `grok`, and `terminal`
16
+ - tabs for `claude`, `codex`, `opencode`, `grok`, `kimi`, and `terminal`
17
17
  - split panes with pane focus and resize shortcuts
18
18
  - persistent workspaces with saved layout and tab state
19
19
  - profile-isolated config, catalogs, daemon sockets, and runtime state
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@brimveyn/aimux",
3
- "version": "1.19.5",
4
- "description": "A terminal multiplexer for AI CLIs. Run Claude, Codex, OpenCode side-by-side with tabbed navigation, split panes, and persistent sessions.",
3
+ "version": "1.19.6",
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",
7
7
  "aimux",
@@ -9,6 +9,7 @@
9
9
  "claude",
10
10
  "cli",
11
11
  "codex",
12
+ "kimi",
12
13
  "multiplexer",
13
14
  "opencode",
14
15
  "pty",
@@ -3,13 +3,14 @@ export interface HeadlessInvocation {
3
3
  args: string[]
4
4
  }
5
5
 
6
- export type SupportedProvider = 'claude' | 'codex' | 'opencode' | 'grok'
6
+ export type SupportedProvider = 'claude' | 'codex' | 'opencode' | 'grok' | 'kimi'
7
7
 
8
8
  const SUPPORTED: ReadonlySet<string> = new Set<SupportedProvider>([
9
9
  'claude',
10
10
  'codex',
11
11
  'opencode',
12
12
  'grok',
13
+ 'kimi',
13
14
  ])
14
15
 
15
16
  export function isSupportedProvider(id: string): id is SupportedProvider {
@@ -44,6 +45,13 @@ export function buildHeadlessInvocation(
44
45
  if (model != null && model !== '') args.push('-m', model)
45
46
  return { args, executable: 'grok' }
46
47
  }
48
+ case 'kimi': {
49
+ // Headless: kimi -p "<prompt>" [--model <model>]. Non-interactive mode uses
50
+ // auto permission by default; --output-format text is the default.
51
+ const args: string[] = ['-p', prompt]
52
+ if (model != null && model !== '') args.push('--model', model)
53
+ return { args, executable: 'kimi' }
54
+ }
47
55
  default:
48
56
  return null
49
57
  }
@@ -55,7 +55,7 @@ export const tabCreate: CliCommand = {
55
55
  flags: [
56
56
  ...SHARED_FLAGS,
57
57
  {
58
- description: 'assistant id (claude, codex, opencode, grok, terminal, ...)',
58
+ description: 'assistant id (claude, codex, opencode, grok, kimi, terminal, ...)',
59
59
  kind: 'string',
60
60
  name: 'assistant',
61
61
  },
package/src/index.tsx CHANGED
@@ -83,7 +83,7 @@ if (command === '--help' || command === '-h' || command === 'help') {
83
83
  '',
84
84
  'Common CLI verbs at a glance',
85
85
  ' aimux tab list Enumerate tabs (+ activeTabId)',
86
- ' aimux tab create --assistant <id> [--title …] Spawn claude / codex / opencode / grok / terminal / …',
86
+ ' aimux tab create --assistant <id> [--title …] Spawn claude / codex / opencode / grok / kimi / terminal / …',
87
87
  ' aimux tab send <tabId> [text] [--enter|--keys|--stdin] Type, chord, or paste into a tab',
88
88
  ' aimux tab focus <tabId> Bring a tab to the foreground',
89
89
  ' aimux tab close <tabId> Terminate a tab',
@@ -44,6 +44,13 @@ const PERMISSION_SIGNALS: readonly string[] = [
44
44
  'pprove', // Grok stylized plan approval "[ a ] pprove ..."
45
45
  'grant',
46
46
  'press enter to confirm',
47
+ // Kimi Code CLI approval panel titles
48
+ 'run this command?',
49
+ 'write this file?',
50
+ 'apply these edits?',
51
+ 'ready to build with this plan?',
52
+ 'approve for session',
53
+ 'stop this task?',
47
54
  ]
48
55
 
49
56
  /**
@@ -6,10 +6,10 @@
6
6
  * `src/detect.rs` in that repo.
7
7
  *
8
8
  * The detector classifies a terminal session as `working`, `waiting-input`,
9
- * or `idle`. Built-in CLIs (claude, codex, opencode, grok) have dedicated classify* functions.
10
- * tables. Custom CLIs fall back to a generic heuristic that (a) recognises
11
- * common shells as always-idle and (b) uses pane-tail change velocity plus
12
- * generic y/n / confirm prompt patterns.
9
+ * or `idle`. Built-in CLIs (claude, codex, opencode, grok, kimi) have dedicated
10
+ * classify* functions. Custom CLIs fall back to a generic heuristic that
11
+ * (a) recognises common shells as always-idle and (b) uses pane-tail change
12
+ * velocity plus generic y/n / confirm prompt patterns.
13
13
  */
14
14
  import type { AssistantId, TabActivity, TerminalSnapshot } from '../state/types'
15
15
 
@@ -140,6 +140,8 @@ function classifyBuiltin(
140
140
  return classifyOpencode(haystack)
141
141
  case 'grok':
142
142
  return classifyGrok(haystack, rawTail)
143
+ case 'kimi':
144
+ return classifyKimi(haystack, rawTail)
143
145
  default:
144
146
  return null
145
147
  }
@@ -255,6 +257,68 @@ function classifyGrok(haystack: string, _rawTail: string): TabActivity {
255
257
  return 'idle'
256
258
  }
257
259
 
260
+ /** Braille spinner frames used by Kimi Code CLI (`BRAILLE_SPINNER_FRAMES`). */
261
+ const KIMI_BRAILLE_SPINNER = '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏'
262
+ /** Moon-phase spinner frames used by Kimi Code CLI (`MOON_SPINNER_FRAMES`). */
263
+ const KIMI_MOON_SPINNER = '🌑🌒🌓🌔🌕🌖🌗🌘'
264
+
265
+ /**
266
+ * Kimi Code CLI status heuristics from the official TUI:
267
+ * - Approval panel titles/footers → waiting-input
268
+ * - Braille/moon spinners, `working...`, rotating tips → working
269
+ */
270
+ function classifyKimi(haystack: string, rawTail: string): TabActivity {
271
+ // Tool / plan approval panel (apps/kimi-code approval-panel.ts headers + footer).
272
+ if (
273
+ haystack.includes('run this command?') ||
274
+ haystack.includes('write this file?') ||
275
+ haystack.includes('apply these edits?') ||
276
+ haystack.includes('stop this task?') ||
277
+ haystack.includes('ready to build with this plan?') ||
278
+ haystack.includes('approve for session') ||
279
+ haystack.includes('approve for this session') ||
280
+ haystack.includes('type feedback') ||
281
+ haystack.includes('waiting for authorization') ||
282
+ haystack.includes('sign in to kimi') ||
283
+ haystack.includes('do you want') ||
284
+ haystack.includes('would you like') ||
285
+ haystack.includes('permission required') ||
286
+ haystack.includes('permission to') ||
287
+ haystack.includes('approve?') ||
288
+ haystack.includes('allow?') ||
289
+ // Generic "Approve <Tool>?" header, e.g. "▶ Approve Bash?"
290
+ (haystack.includes('approve ') && haystack.includes('?')) ||
291
+ // Distinctive panel chrome: "↑/↓ select · 1/2 choose · ↵ confirm"
292
+ haystack.includes('↑/↓ select') ||
293
+ haystack.includes('↵ confirm')
294
+ ) {
295
+ return 'waiting-input'
296
+ }
297
+
298
+ // Agent actively streaming / calling tools.
299
+ // Anchor thinking on ellipsis so the footer model suffix "thinking" alone
300
+ // (e.g. "kimi-k2 thinking") does not mark an idle session as working.
301
+ if (
302
+ haystack.includes('working...') ||
303
+ haystack.includes('working…') ||
304
+ haystack.includes(' · tip:') ||
305
+ haystack.includes('thinking…') ||
306
+ haystack.includes('thinking...') ||
307
+ hasKimiSpinner(rawTail)
308
+ ) {
309
+ return 'working'
310
+ }
311
+
312
+ return 'idle'
313
+ }
314
+
315
+ function hasKimiSpinner(rawTail: string): boolean {
316
+ for (const ch of rawTail) {
317
+ if (KIMI_BRAILLE_SPINNER.includes(ch) || KIMI_MOON_SPINNER.includes(ch)) return true
318
+ }
319
+ return false
320
+ }
321
+
258
322
  const GENERIC_WAITING_PATTERNS: string[] = [
259
323
  '[y/n]',
260
324
  '(y/n)',
@@ -70,6 +70,16 @@ export const ASSISTANT_OPTIONS: AssistantOption[] = [
70
70
  buildModelArgs: (model) => ['-m', model],
71
71
  },
72
72
  },
73
+ {
74
+ command: 'kimi',
75
+ description: 'Moonshot Kimi Code CLI',
76
+ id: 'kimi',
77
+ label: 'Kimi',
78
+ // Kimi supports --model / -m; no reasoning-effort flag.
79
+ model: {
80
+ buildModelArgs: (model) => ['--model', model],
81
+ },
82
+ },
73
83
  {
74
84
  command: 'agy',
75
85
  description: 'Antigravity CLI',
@@ -9,6 +9,7 @@ export type BuiltinAssistantId =
9
9
  | 'codex'
10
10
  | 'opencode'
11
11
  | 'grok'
12
+ | 'kimi'
12
13
  | 'terminal'
13
14
  | 'antigravity'
14
15