Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/site/content/docs/agents/supported.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ To restore prompts for one agent only, edit that agent's default arguments or en
| Command Code | Auto-setup, status | [Command Code](https://commandcode.ai/docs/quickstart) |
| Muse | macOS/Linux; trusts the workspace at launch | [Meta](https://dev.meta.ai/docs/muse-code) |
| ZCode | Deep integration; needs a `zcode` CLI that ships the TUI (see note below) | [Z.ai](https://zcode.z.ai/en/docs) |
| Reasonix | Auto-setup via the installed `reasonix` executable (npm `reasonix`, Node 18+ for the npm path); DeepSeek-native agent | [Reasonix](https://github.com/esengine/DeepSeek-Reasonix) |
| Continue | Auto-setup | [Continue](https://docs.continue.dev/guides/cli) |
| Cursor CLI | Deep integration | [Cursor](https://cursor.com/cli) |
| Devin | Auto-setup | [Devin](https://devin.ai/cli) |
Expand Down
1 change: 1 addition & 0 deletions mobile/src/components/mobile-agent-icon-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ export const MOBILE_AGENT_ICON_ASSETS: Partial<Record<TuiAgent, ImageSourcePropT
devin: require('../../../src/shared/agent-icons/devin.png'),
muse: require('../../../src/shared/agent-icons/muse.png'),
zcode: require('../../../src/shared/agent-icons/zcode.png'),
reasonix: require('../../../src/shared/agent-icons/reasonix.png'),
openclaw: require('../../../src/shared/agent-icons/openclaw.png')
}
1 change: 1 addition & 0 deletions mobile/src/tasks/mobile-tui-agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const MOBILE_TUI_AGENT_FAVICON_DOMAINS: Partial<Record<TuiAgent, string>>
trae: 'www.trae.cn',
muse: 'dev.meta.ai',
zcode: 'zcode.z.ai',
reasonix: 'esengine.github.io',
omp: 'omp.sh',
'prime-agent': 'primeintellect.ai',
gemini: 'gemini.google.com',
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@
"060d152fb5": "Trae",
"muse_label": "Muse",
"zcode_label": "ZCode",
"reasonix_label": "Reasonix",
"d443a47995": "Prime Agent",
"mimo_code_label": "MiMo Code",
"opencode2_label": "OpenCode 2"
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@
"d443a47995": "Prime Agent",
"mimo_code_label": "MiMo Code",
"muse_label": "Muse",
"zcode_label": "ZCode"
"zcode_label": "ZCode",
"reasonix_label": "Reasonix"
},
"skill": {
"cli": {
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,8 @@
"mimo_code_label": "MiMo Code",
"muse_label": "Muse",
"opencode2_label": "OpenCode 2",
"zcode_label": "ZCode"
"zcode_label": "ZCode",
"reasonix_label": "Reasonix"
},
"skill": {
"cli": {
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,8 @@
"mimo_code_label": "MiMo Code",
"muse_label": "Muse",
"opencode2_label": "OpenCode 2",
"zcode_label": "ZCode"
"zcode_label": "ZCode",
"reasonix_label": "Reasonix"
},
"skill": {
"cli": {
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/src/i18n/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,8 @@
"mimo_code_label": "MiMo Code",
"muse_label": "Muse",
"opencode2_label": "OpenCode 2",
"zcode_label": "ZCode"
"zcode_label": "ZCode",
"reasonix_label": "Reasonix"
},
"skill": {
"cli": {
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/src/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,8 @@
"mimo_code_label": "MiMo Code",
"muse_label": "Muse",
"opencode2_label": "OpenCode 2",
"zcode_label": "ZCode"
"zcode_label": "ZCode",
"reasonix_label": "Reasonix"
},
"skill": {
"cli": {
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/src/lib/agent-catalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ export const getAgentCatalog = createLocalizedCatalog((): AgentCatalogEntry[] =>
faviconDomain: 'zcode.z.ai',
homepageUrl: 'https://zcode.z.ai/en/docs'
},
{
id: 'reasonix',
label: translate('auto.lib.agent.catalog.reasonix_label', 'Reasonix'),
cmd: 'reasonix',
searchAliases: ['deepseek'],
faviconDomain: 'esengine.github.io',
homepageUrl: 'https://github.com/esengine/DeepSeek-Reasonix'
},
{
id: 'pi',
label: translate('auto.lib.agent.catalog.302934c5d9', 'Pi'),
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/src/lib/agent-favicon-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import hermesUrl from '../../../shared/agent-icons/hermes.png?url'
import devinUrl from '../../../shared/agent-icons/devin.png?url'
import museUrl from '../../../shared/agent-icons/muse.png?url'
import zcodeUrl from '../../../shared/agent-icons/zcode.png?url'
import reasonixUrl from '../../../shared/agent-icons/reasonix.png?url'
import openclawUrl from '../../../shared/agent-icons/openclaw.png?url'

// Why: these agents have no hand-authored SVG glyph, so previously their icons
Expand Down Expand Up @@ -61,5 +62,6 @@ export const AGENT_FAVICON_ASSETS: Partial<Record<TuiAgent, string>> = {
devin: devinUrl,
muse: museUrl,
zcode: zcodeUrl,
reasonix: reasonixUrl,
openclaw: openclawUrl
}
3 changes: 2 additions & 1 deletion src/renderer/src/lib/agent-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ const ICONABLE_AGENT_TYPES: Record<TuiAgent, true> = {
ante: true,
trae: true,
muse: true,
zcode: true
zcode: true,
reasonix: true
}

// Why: return null (not a 'claude' fallback) for unknown so Codex panes don't flash the Claude icon before the hook fires.
Expand Down
8 changes: 5 additions & 3 deletions src/shared/agent-headless-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import { isAnteHeadlessOneShotCommand } from './ante-headless-command'
import { isMuseHeadlessOneShotCommand } from './muse-headless-command'
import { isZCodeHeadlessOneShotCommand } from './zcode-headless-command'
import { isPrimeAgentHeadlessOneShotCommand } from './prime-agent-headless-command'
import { isReasonixHeadlessOneShotCommand } from './reasonix-headless-command'
import { isPrintModeHeadlessOneShotCommand } from './print-mode-headless-command'
import type { TuiAgent } from './tui-agent'

// Why: a table (not an if-chain) so adding an agent is one entry; Claude and Trae share
// the same `--print` one-shot contract, Ante's `--prompt` form, Prime Agent's
// `--mode` forms, Muse's `exec` subcommand, and ZCode's `--prompt`/`--target` forms need
// their own matchers.
// `--mode` forms, Muse's `exec` subcommand, ZCode's `--prompt`/`--target` forms, and
// Reasonix's `run`/`-p` forms need their own matchers.
const HEADLESS_ONE_SHOT_MATCHERS: Partial<
Record<TuiAgent, (tokens: readonly string[]) => boolean>
> = {
Expand All @@ -17,7 +18,8 @@ const HEADLESS_ONE_SHOT_MATCHERS: Partial<
'prime-agent': isPrimeAgentHeadlessOneShotCommand,
ante: isAnteHeadlessOneShotCommand,
muse: isMuseHeadlessOneShotCommand,
zcode: isZCodeHeadlessOneShotCommand
zcode: isZCodeHeadlessOneShotCommand,
reasonix: isReasonixHeadlessOneShotCommand
}

export function isHeadlessOneShotAgentCommand(agent: TuiAgent, tokens: readonly string[]): boolean {
Expand Down
Binary file added src/shared/agent-icons/reasonix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/shared/agent-kind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ const TUI_AGENT_KIND_BY_AGENT = {
ante: 'ante',
trae: 'trae',
muse: 'muse',
zcode: 'zcode'
zcode: 'zcode',
reasonix: 'reasonix'
} satisfies Record<TuiAgent, ConcreteAgentKind>

// Why: `satisfies Record<TuiAgent, …>` makes the lookup exhaustive at compile
Expand Down
35 changes: 35 additions & 0 deletions src/shared/agent-process-recognition.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,41 @@ describe('agent process recognition', () => {
expect(isRecognizedAgentType('qwen')).toBe(true)
})

it('recognizes Reasonix by its installed reasonix executable', () => {
expect(recognizeAgentProcess('/home/dev/.local/bin/reasonix')).toEqual({
agent: 'reasonix',
processName: 'reasonix'
})
expect(recognizeAgentProcess('C:/Users/dev/AppData/Roaming/npm/reasonix.cmd')).toEqual({
agent: 'reasonix',
processName: 'reasonix'
})
expect(isExpectedAgentProcess('/usr/local/bin/reasonix', 'reasonix')).toBe(true)
expect(isRecognizedAgentType('reasonix')).toBe(true)
})

it('does not recognize Reasonix headless one-shot commands as interactive agents', () => {
expect(recognizeAgentProcessFromCommandLine('reasonix -p "summarize this diff"')).toBeNull()
expect(
recognizeAgentProcessFromCommandLine(
'reasonix --print "summarize this diff" --output-format json'
)
).toBeNull()
expect(recognizeAgentProcessFromCommandLine('reasonix run "implement the TODOs"')).toBeNull()
expect(
recognizeAgentProcessFromCommandLine('reasonix run --model mimo-pro "add unit tests"')
).toBeNull()
// Why: bare `reasonix` and its resume forms reopen the interactive TUI, so they still host a live session.
expect(recognizeAgentProcessFromCommandLine('reasonix')).toEqual({
agent: 'reasonix',
processName: 'reasonix'
})
expect(recognizeAgentProcessFromCommandLine('reasonix --continue')).toEqual({
agent: 'reasonix',
processName: 'reasonix'
})
})

it('recognizes agent CLIs launched through interpreter wrappers', () => {
expect(
recognizeAgentProcessFromCommandLine('node /Users/dev/.nvm/versions/node/bin/codex')
Expand Down
3 changes: 2 additions & 1 deletion src/shared/agent-type-label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const WELL_KNOWN_LABELS: Record<string, string> = {
trae: 'Trae',
kimi: 'Kimi',
muse: 'Muse',
zcode: 'ZCode'
zcode: 'ZCode',
reasonix: 'Reasonix'
}

export function formatAgentTypeLabel(agentType: AgentType | null | undefined): string {
Expand Down
13 changes: 13 additions & 0 deletions src/shared/reasonix-headless-command.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { isPrintModeHeadlessOneShotCommand } from './print-mode-headless-command'

// Why: Reasonix runs headless in two ways — `-p`/`--print` prints one response and
// exits, and the `run` subcommand streams a single task to stdout and exits. Neither
// hosts the interactive `code` TUI, so a pane must not be tagged as a live session.
// `run` matches past any position (a quoted TUI prompt never splits into a bare `run`
// token on its own), mirroring muse's `exec` subcommand dispatch.
export function isReasonixHeadlessOneShotCommand(tokens: readonly string[]): boolean {
if (tokens.slice(1).some((token) => token === 'run')) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '1,100p' src/shared/reasonix-headless-command.ts
sed -n '175,225p' src/shared/agent-process-recognition.ts
sed -n '310,350p' src/shared/agent-process-recognition.test.ts
rg -n 'reasonix|--dir' docs/site/content/docs/agents/supported.mdx src/shared/reasonix-headless-command.ts src/shared/agent-process-recognition.test.ts

Repository: stablyai/orca

Length of output: 7269


🌐 Web query:

Reasonix CLI documentation --dir PATH run interactive session option

💡 Result:

To start an **interactive session** in a specific directory, use:

```bash
cd /path/to/project && reasonix
```

The documented `--dir PATH` option applies to `reasonix run` (a task-oriented, non-interactive run), not the regular interactive-session command. For example:

```bash
reasonix run --dir /path/to/project "Explain this project"
```

For an interactive session, launch `reasonix` from the target directory. ([reasonix.io](https://reasonix.io/docs/))

Citations:

- 1: https://reasonix.io/docs/

🏁 Script executed:

printf '%s\n' '--- changed file and related helpers ---'
cat -n src/shared/reasonix-headless-command.ts
rg -n -C 8 'filterHeadlessOneShotAgentCommand|isReasonixHeadlessOneShotCommand|tokenizeCommandLine|reasonix --dir|reasonix run|--dir' src/shared
printf '%s\n' '--- relevant diff ---'
git diff --stat da6d483ab9aae8aa81eaf773bcf0fda9fc4e3495 e8016d72cf0df67834d89ab07ceeea09dd6cf240 -- src/shared/reasonix-headless-command.ts src/shared/agent-process-recognition.ts src/shared/agent-process-recognition.test.ts
git diff da6d483ab9aae8aa81eaf773bcf0fda9fc4e3495 e8016d72cf0df67834d89ab07ceeea09dd6cf240 -- src/shared/reasonix-headless-command.ts src/shared/agent-process-recognition.ts src/shared/agent-process-recognition.test.ts

Repository: stablyai/orca

Length of output: 23815


🏁 Script executed:

cat -n src/shared/agent-command-line-entrypoint.ts | sed -n '34,100p'
printf '%s\n' '--- repository CLI references ---'
rg -n -i -C 3 'Reasonix|reasonix|--dir|run' README.md docs package.json src --glob '!**/*.test.*' --glob '!**/node_modules/**' | head -n 240

Repository: stablyai/orca

Length of output: 31331


🌐 Web query:

official Reasonix CLI documentation source --dir run interactive command

💡 Result:

Official Reasonix CLI reference: [CLI.md](https://github.com/loserbcc/reasonix/blob/main-v2/docs/CLI.md).

- Start an **interactive session** in a directory: `reasonix --dir /path/to/project`
- Run a **one-shot command** in a directory: `reasonix run --dir /path/to/project "your task"`

The docs say running `reasonix` without a subcommand starts the interactive terminal UI; `run` is for one-shot tasks. ([github.com](https://github.com/loserbcc/reasonix/blob/main-v2/docs/CLI.md))

Citations:

- 1: https://github.com/loserbcc/reasonix/blob/main-v2/docs/CLI.md

Parse --dir values before matching run.

The Reasonix CLI supports reasonix --dir PATH for interactive sessions. With reasonix --dir run, the tokenizer produces run as the --dir value. The any-position match then classifies the live session as headless, so recognizeAgentProcessFromCommandLine returns null. Skip option values such as --dir before matching the run subcommand, and add this command to the recognition tests.

Suggested fix
-  if (tokens.slice(1).some((token) => token === 'run')) {
-    return true
+  for (let index = 1; index < tokens.length; index += 1) {
+    const token = tokens[index]
+    if (token === '--dir') {
+      index += 1
+      continue
+    }
+    if (token === 'run') {
+      return true
+    }
   }

return true
}
return isPrintModeHeadlessOneShotCommand(tokens)
}
3 changes: 2 additions & 1 deletion src/shared/skills-cli-agent-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export const SKILLS_CLI_AGENT_KEY_BY_TUI_AGENT = {
// Why: Orca detects trae by `traecli`, an alias only TRAE CN ships.
trae: 'trae-cn',
muse: null,
zcode: 'zcode'
zcode: 'zcode',
reasonix: 'reasonix'
} satisfies Record<TuiAgent, string | null>

/**
Expand Down
1 change: 1 addition & 0 deletions src/shared/telemetry-property-schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const AGENT_KIND_VALUES = [
'trae',
'muse',
'zcode',
'reasonix',
'other'
] as const
export const agentKindSchema = z.enum(AGENT_KIND_VALUES)
Expand Down
6 changes: 6 additions & 0 deletions src/shared/tui-agent-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ const TUI_AGENT_CONFIG_SOURCE: Record<TuiAgent, TuiAgentConfigSource> = {
// window never settles; its composer box corner is the real "input is live" signal.
draftPasteReadySignal: 'zcode-composer-prompt'
},
reasonix: {
// Why: DeepSeek-native agent; bare `reasonix` launches its interactive `code`
// TUI and `-p`/`run` are headless one-shots, so the prompt must ride the live PTY.
detectCmd: 'reasonix',
promptInjectionMode: 'stdin-after-start'
Comment thread
pullfrog[bot] marked this conversation as resolved.
Resolved
},
devin: {
detectCmd: 'devin',
// Why: `devin -- <prompt>` auto-submits immediately (docs.devin.ai/cli), so start the REPL with no argv prompt.
Expand Down
1 change: 1 addition & 0 deletions src/shared/tui-agent-display-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const TUI_AGENT_DISPLAY_NAMES: Record<TuiAgent, string> = {
trae: 'Trae',
muse: 'Muse',
zcode: 'ZCode',
reasonix: 'Reasonix',
autohand: 'Autohand Code',
opencode: 'OpenCode',
opencode2: 'OpenCode 2',
Expand Down
1 change: 1 addition & 0 deletions src/shared/tui-agent-selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const TUI_AGENT_AUTO_PICK_ORDER = [
'trae',
'muse',
'zcode',
'reasonix',
'pi',
'omp',
'prime-agent',
Expand Down
17 changes: 17 additions & 0 deletions src/shared/tui-agent-startup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,23 @@ describe('tui agent startup plans', () => {
})
})

it('launches Reasonix through the installed reasonix executable', () => {
const plan = buildAgentStartupPlan({
agent: 'reasonix',
prompt: 'fix it',
cmdOverrides: {},
platform: 'linux'
})

expect(plan).toEqual({
agent: 'reasonix',
launchCommand: 'reasonix',
expectedProcess: 'reasonix',
followupPrompt: 'fix it',
launchConfig: { agentCommand: 'reasonix', agentArgs: '', agentEnv: {} }
})
})

it.each([
['yolo', 'linux', 'posix', undefined, "muse --trust-workspace '--yolo'"],
['manual', 'linux', 'posix', { muse: '' }, 'muse --trust-workspace'],
Expand Down
1 change: 1 addition & 0 deletions src/shared/tui-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ export type TuiAgent =
| 'trae' // Trae CLI
| 'muse' // Muse (Meta `muse` CLI)
| 'zcode' // ZCode (Z.ai `zcode` CLI)
| 'reasonix' // Reasonix (DeepSeek-native, `reasonix` CLI)
| 'prime-agent' // Prime Agent (Prime Intellect)