Files
orca/src/shared/tui-agent-config.test.ts
T
Jinwoo Hong 70c6876635 fix(rovo): detect and launch Rovo Dev through acli (#25981)
* fix(rovo): detect and launch Rovo Dev through acli

Rovo Dev ships as the `acli rovodev` subcommand, with no `rovo` binary on
PATH, so Orca never listed it as installed. Detect `acli`, launch
`acli rovodev run` (prompt still typed after start, since a positional
instruction is one-shot), and build resume as the launch command plus
`--restore <id>` so a full-command settings override composes too.

Fixes STA-9645

* test(skills): detect Rovo Dev through acli in the skills CLI fixture
2026-10-06 22:49:18 -04:00

35 lines
1.4 KiB
TypeScript

import { describe, expect, it } from 'vitest'
import { TUI_AGENT_CONFIG } from './tui-agent-config'
import type { TuiAgent } from './tui-agent'
describe('TUI_AGENT_CONFIG', () => {
it('resolves launchCmd and expectedProcess for every agent', () => {
for (const [agent, config] of Object.entries(TUI_AGENT_CONFIG)) {
expect(config.launchCmd, agent).toBeTruthy()
expect(config.expectedProcess, agent).toBeTruthy()
}
})
it('defaults launchCmd and expectedProcess to detectCmd', () => {
expect(TUI_AGENT_CONFIG.codex).toMatchObject({
detectCmd: 'codex',
launchCmd: 'codex',
expectedProcess: 'codex'
})
})
it('keeps explicit overrides where the launch line or process differs from the binary', () => {
const overrides: Partial<Record<TuiAgent, Partial<(typeof TUI_AGENT_CONFIG)[TuiAgent]>>> = {
'claude-agent-teams': { launchCmd: 'orca claude-teams', expectedProcess: 'claude' },
kiro: { launchCmd: 'kiro-cli chat --tui', expectedProcess: 'kiro-cli' },
'command-code': { launchCmd: 'command-code --trust' },
hermes: { launchCmd: 'hermes --tui' },
rovo: { detectCmd: 'acli', launchCmd: 'acli rovodev run', expectedProcess: 'acli' },
muse: { launchCmd: 'muse --trust-workspace' }
}
for (const [agent, expected] of Object.entries(overrides)) {
expect(TUI_AGENT_CONFIG[agent as TuiAgent]).toMatchObject(expected)
}
})
})