Add Ante as a supported CLI agent (#5193)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: brennanb2025 <brennankbenson@gmail.com>
This commit is contained in:
leofoo
2026-06-17 11:12:45 -07:00
committed by GitHub
co-authored by Claude Fable 5 Orca brennanb2025
parent 5429e659d4
commit 99b5de6e3d
22 changed files with 163 additions and 22 deletions
+4
View File
@@ -11,6 +11,7 @@ export const MOBILE_TUI_AGENT_AUTO_PICK_ORDER = [
'grok',
'copilot',
'opencode',
'ante',
'pi',
'omp',
'gemini',
@@ -46,6 +47,7 @@ export const MOBILE_TUI_AGENT_LABELS: Record<TuiAgent, string> = {
grok: 'Grok',
copilot: 'GitHub Copilot',
opencode: 'OpenCode',
ante: 'Ante',
pi: 'Pi',
omp: 'OMP',
gemini: 'Gemini',
@@ -78,6 +80,7 @@ export const MOBILE_TUI_AGENT_FAVICON_DOMAINS: Partial<Record<TuiAgent, string>>
grok: 'x.ai',
copilot: 'github.com',
opencode: 'opencode.ai',
ante: 'antigma.ai',
omp: 'omp.sh',
gemini: 'gemini.google.com',
antigravity: 'antigravity.google',
@@ -111,6 +114,7 @@ export const MOBILE_TUI_AGENT_LAUNCH_COMMANDS: Record<TuiAgent, string> = {
grok: 'grok',
copilot: 'copilot',
opencode: 'opencode',
ante: 'ante',
pi: 'pi',
omp: 'omp',
gemini: 'gemini',
+2 -1
View File
@@ -276,7 +276,8 @@
"a5fc0cb622": "OpenClaude",
"bf53f09bf8": "Claude Agent Teams",
"0708ed89f1": "Claude",
"fc80296033": "Devin"
"fc80296033": "Devin",
"da41abbdd4": "Ante"
},
"skill": {
"cli": {
+2 -1
View File
@@ -276,7 +276,8 @@
"a5fc0cb622": "OpenClaude",
"bf53f09bf8": "Claude Agent Teams",
"0708ed89f1": "Claude",
"fc80296033": "Devin"
"fc80296033": "Devin",
"da41abbdd4": "Ante"
},
"skill": {
"cli": {
+2 -1
View File
@@ -276,7 +276,8 @@
"a5fc0cb622": "OpenClaude",
"bf53f09bf8": "Claude Agent Teams",
"0708ed89f1": "Claude",
"fc80296033": "Devin"
"fc80296033": "Devin",
"da41abbdd4": "Ante"
},
"skill": {
"cli": {
+2 -1
View File
@@ -276,7 +276,8 @@
"a5fc0cb622": "OpenClaude",
"bf53f09bf8": "Claude Agent Teams",
"0708ed89f1": "Claude",
"fc80296033": "Devin"
"fc80296033": "Devin",
"da41abbdd4": "Ante"
},
"skill": {
"cli": {
+2 -1
View File
@@ -276,7 +276,8 @@
"a5fc0cb622": "OpenClaude",
"bf53f09bf8": "Claude Agent Teams",
"0708ed89f1": "Claude",
"fc80296033": "Devin"
"fc80296033": "Devin",
"da41abbdd4": "Ante"
},
"skill": {
"cli": {
+7
View File
@@ -74,6 +74,13 @@ export const getAgentCatalog = createLocalizedCatalog((): AgentCatalogEntry[] =>
faviconDomain: 'opencode.ai',
homepageUrl: 'https://opencode.ai/docs/cli/'
},
{
id: 'ante',
label: translate('auto.lib.agent.catalog.da41abbdd4', 'Ante'),
cmd: 'ante',
faviconDomain: 'antigma.ai',
homepageUrl: 'https://github.com/AntigmaLabs/ante-preview'
},
{
id: 'pi',
label: translate('auto.lib.agent.catalog.302934c5d9', 'Pi'),
@@ -812,6 +812,10 @@ describe('formatAgentTypeLabel', () => {
expect(formatAgentTypeLabel('command-code')).toBe('Command Code')
})
it("maps 'ante' to 'Ante'", () => {
expect(formatAgentTypeLabel('ante')).toBe('Ante')
})
it('passes through arbitrary custom agent names as-is', () => {
expect(formatAgentTypeLabel('weirdo')).toBe('weirdo')
})
@@ -835,6 +839,7 @@ describe('agentTypeToIconAgent', () => {
expect(agentTypeToIconAgent('openclaude')).toBe('openclaude')
expect(agentTypeToIconAgent('antigravity')).toBe('antigravity')
expect(agentTypeToIconAgent('command-code')).toBe('command-code')
expect(agentTypeToIconAgent('ante')).toBe('ante')
})
it('returns null for arbitrary non-iconable strings', () => {
+4 -2
View File
@@ -127,7 +127,8 @@ const WELL_KNOWN_LABELS: Record<string, string> = {
'command-code': 'Command Code',
grok: 'Grok',
hermes: 'Hermes',
devin: 'Devin'
devin: 'Devin',
ante: 'Ante'
}
export function formatAgentTypeLabel(agentType: AgentType | null | undefined): string {
@@ -183,7 +184,8 @@ const ICONABLE_AGENT_TYPES: Record<TuiAgent, true> = {
openclaw: true,
copilot: true,
grok: true,
devin: true
devin: true,
ante: true
}
export function agentTypeToIconAgent(agentType: AgentType | null | undefined): TuiAgent | null {
@@ -87,6 +87,22 @@ describe('buildAgentStartupPlan', () => {
})
})
it('launches Ante first and injects the draft prompt after startup', () => {
expect(
buildAgentStartupPlan({
agent: 'ante',
prompt: 'Summarize the failing tests',
cmdOverrides: {},
platform: 'linux'
})
).toEqual({
agent: 'ante',
launchCommand: 'ante',
expectedProcess: 'ante',
followupPrompt: 'Summarize the failing tests'
})
})
it('uses cursor-agent as the actual launch binary', () => {
expect(
buildAgentStartupPlan({
+22
View File
@@ -0,0 +1,22 @@
import { isAnteHeadlessOneShotCommand } from './ante-headless-command'
import { isClaudeHeadlessOneShotCommand } from './claude-headless-command'
import type { TuiAgent } from './types'
export function isHeadlessOneShotAgentCommand(agent: TuiAgent, tokens: readonly string[]): boolean {
if (agent === 'claude') {
return isClaudeHeadlessOneShotCommand(tokens)
}
return agent === 'ante' && isAnteHeadlessOneShotCommand(tokens)
}
type AgentCommandRecognition = { agent: TuiAgent } | null
export function filterHeadlessOneShotAgentCommand<T extends AgentCommandRecognition>(
recognition: T,
tokens: readonly string[]
): T | null {
if (recognition && isHeadlessOneShotAgentCommand(recognition.agent, tokens)) {
return null
}
return recognition
}
+2 -1
View File
@@ -45,7 +45,8 @@ const TUI_AGENT_KIND_BY_AGENT = {
openclaw: 'openclaw',
copilot: 'copilot',
grok: 'grok',
devin: 'devin'
devin: 'devin',
ante: 'ante'
} satisfies Record<TuiAgent, ConcreteAgentKind>
// Why: `satisfies Record<TuiAgent, …>` makes the lookup exhaustive at compile
@@ -75,6 +75,54 @@ describe('agent process recognition', () => {
expect(recognizeAgentProcess('cmd.exe')).toBeNull()
})
it('recognizes Ante without classifying ante-prefixed path fragments as the agent', () => {
expect(recognizeAgentProcess('ante')).toEqual({
agent: 'ante',
processName: 'ante'
})
expect(recognizeAgentProcess('/Users/dev/.ante/bin/ante')).toEqual({
agent: 'ante',
processName: 'ante'
})
expect(isExpectedAgentProcess('/Users/dev/.ante/bin/ante', 'ante')).toBe(true)
expect(isRecognizedAgentType('ante')).toBe(true)
// Why: 'ante' is a common token in directory and binary names; only the
// exact normalized basename may classify as the agent.
expect(recognizeAgentProcess('ante-obsidian')).toBeNull()
expect(recognizeAgentProcess('antechamber')).toBeNull()
expect(isExpectedAgentProcess('ante-obsidian', 'ante')).toBe(false)
})
it('does not recognize Ante headless one-shot commands as interactive agents', () => {
expect(recognizeAgentProcessFromCommandLine('ante -p "summarize this diff"')).toBeNull()
expect(recognizeAgentProcessFromCommandLine('ante -psummarize')).toBeNull()
expect(
recognizeAgentProcessFromCommandLine('ante --prompt "review this for security issues"')
).toBeNull()
expect(
recognizeAgentProcessFromCommandLine('ante --prompt=review --output-format minimal')
).toBeNull()
expect(recognizeAgentProcessFromCommandLine('ante --resume ses_123')).toEqual({
agent: 'ante',
processName: 'ante'
})
})
it('does not recognize wrapped Ante headless one-shot commands as interactive agents', () => {
expect(
recognizeAgentProcessFromCommandLine('node /Users/dev/.ante/bin/ante --prompt "review"')
).toBeNull()
expect(
recognizeAgentProcessFromCommandLine(
String.raw`node C:\Users\dev\.ante\bin\ante.cmd -p review`
)
).toBeNull()
expect(recognizeAgentProcessFromCommandLine('node /Users/dev/.ante/bin/ante')).toEqual({
agent: 'ante',
processName: 'ante'
})
})
it('recognizes Mistral Vibe by its installed executable and legacy alias', () => {
expect(recognizeAgentProcess('/home/dev/.local/bin/vibe')).toEqual({
agent: 'mistral-vibe',
+9 -13
View File
@@ -1,7 +1,7 @@
import { getTuiAgentDetectCommands, TUI_AGENT_CONFIG } from './tui-agent-config'
import type { AgentType } from './agent-status-types'
import type { TuiAgent } from './types'
import { isClaudeHeadlessOneShotCommand } from './claude-headless-command'
import { filterHeadlessOneShotAgentCommand } from './agent-headless-command'
export type RecognizedAgentProcess = { agent: TuiAgent; processName: string }
@@ -288,7 +288,6 @@ export function recognizeAgentProcess(
}
return { agent, processName: normalized }
}
export function recognizeAgentProcessFromCommandLine(
commandLine: string | null | undefined
): RecognizedAgentProcess | null {
@@ -297,12 +296,10 @@ export function recognizeAgentProcessFromCommandLine(
}
const tokens = tokenizeCommandLine(commandLine)
const firstNormalized = normalizeProcessName(tokens[0])
const directRecognition = recognizeAgentProcess(tokens[0])
// Why: Claude Code plugin hooks spawn `claude --print`/JSON one-shots for
// internal analysis; those should not surface as long-running agent sessions.
if (directRecognition?.agent === 'claude' && isClaudeHeadlessOneShotCommand(tokens)) {
return null
}
const directRecognition = filterHeadlessOneShotAgentCommand(
recognizeAgentProcess(tokens[0]),
tokens
)
if (directRecognition) {
return directRecognition
}
@@ -310,12 +307,11 @@ export function recognizeAgentProcessFromCommandLine(
if (!entrypoint) {
return null
}
if (isPythonProcessName(firstNormalized)) {
return recognizePythonEntrypoint(tokens, entrypoint)
}
return recognizeAgentProcess(entrypoint) ?? recognizeNodeScriptEntrypoint(entrypoint)
const entrypointRecognition = isPythonProcessName(firstNormalized)
? recognizePythonEntrypoint(tokens, entrypoint)
: (recognizeAgentProcess(entrypoint) ?? recognizeNodeScriptEntrypoint(entrypoint))
return filterHeadlessOneShotAgentCommand(entrypointRecognition, tokens)
}
export function isAgentForegroundWrapperProcess(processName: string | null | undefined): boolean {
const normalized = normalizeProcessName(processName)
return (
+1
View File
@@ -31,6 +31,7 @@ export type WellKnownAgentType =
| 'grok'
| 'hermes'
| 'devin'
| 'ante'
| 'unknown'
export type AgentType = WellKnownAgentType | (string & {})
+20
View File
@@ -0,0 +1,20 @@
const ANTE_HEADLESS_PROMPT_FLAGS = new Set(['--prompt', '-p'])
function optionName(token: string): string {
const eq = token.indexOf('=')
return eq === -1 ? token : token.slice(0, eq)
}
function isAnteHeadlessPromptFlag(token: string): boolean {
const name = optionName(token)
return ANTE_HEADLESS_PROMPT_FLAGS.has(name) || /^-p[^-]/.test(name)
}
export function isAnteHeadlessOneShotCommand(tokens: readonly string[]): boolean {
for (let index = 1; index < tokens.length; index += 1) {
if (isAnteHeadlessPromptFlag(tokens[index])) {
return true
}
}
return false
}
+1
View File
@@ -101,6 +101,7 @@ export const AGENT_KIND_VALUES = [
'copilot',
'grok',
'devin',
'ante',
'other'
] as const
export const agentKindSchema = z.enum(AGENT_KIND_VALUES)
+9
View File
@@ -94,6 +94,15 @@ export const TUI_AGENT_CONFIG: Record<TuiAgent, TuiAgentConfig> = {
expectedProcess: 'autohand',
promptInjectionMode: 'stdin-after-start'
},
ante: {
detectCmd: 'ante',
launchCmd: 'ante',
expectedProcess: 'ante',
// Why: `ante --prompt` is Ante's documented headless mode (runs the task
// once and exits), so Orca launches the bare interactive TUI and injects
// the composed prompt after startup to keep the hosted session alive.
promptInjectionMode: 'stdin-after-start'
},
opencode: {
detectCmd: 'opencode',
launchCmd: 'opencode',
+1
View File
@@ -11,6 +11,7 @@ export const TUI_AGENT_DISPLAY_NAMES: Record<TuiAgent, string> = {
openclaude: 'OpenClaude',
codex: 'Codex',
devin: 'Devin',
ante: 'Ante',
autohand: 'Autohand Code',
opencode: 'OpenCode',
pi: 'Pi',
+2 -1
View File
@@ -26,7 +26,8 @@ export const YOLO_TUI_AGENT_ARGS: Partial<Record<TuiAgent, string>> = {
hermes: '--yolo',
copilot: '--yolo',
grok: '--permission-mode bypassPermissions',
devin: '--permission-mode bypass'
devin: '--permission-mode bypass',
ante: '--yolo'
}
export const YOLO_TUI_AGENT_ENV: Partial<Record<TuiAgent, Record<string, string>>> = {
+1
View File
@@ -11,6 +11,7 @@ export const TUI_AGENT_AUTO_PICK_ORDER = [
'grok',
'copilot',
'opencode',
'ante',
'pi',
'omp',
'gemini',
+1
View File
@@ -2194,6 +2194,7 @@ export type TuiAgent =
| 'copilot' // GitHub Copilot CLI
| 'grok' // xAI Grok CLI
| 'devin' // Devin CLI
| 'ante' // Ante (Antigma Labs)
export type TaskViewPresetId = 'all' | 'issues' | 'review' | 'my-issues' | 'my-prs' | 'prs'