Repository navigation
feat(agents): add Reasonix (DeepSeek-native) to the agent picker - #23217
makiisthenes wants to merge 2 commits into
Conversation
Adds Reasonix (esengine/DeepSeek-Reasonix) as a launchable TUI agent: detectCmd 'reasonix', stdin-after-start prompt delivery, bundled diamond mark icon, telemetry kind, skills-CLI key, i18n labels, and docs row.
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes
- New
TuiAgentmember —'reasonix'added tosrc/shared/tui-agent.ts, every exhaustiveRecord<TuiAgent, …>map (agent-kind.ts,agent-status.ts,tui-agent-display-names.ts,tui-agent-config.ts,skills-cli-agent-keys.ts), and telemetryAGENT_KIND_VALUES. - Shallow launch config —
detectCmd: 'reasonix',launchCmd/expectedProcessdefault toreasonix,promptInjectionMode: 'stdin-after-start'; no hooks, native chat, resume, or permission-bypass arg. - Picker, icons, i18n, docs — catalog entry and
TUI_AGENT_AUTO_PICK_ORDERboth insert reasonix betweenzcodeandpi; bundledreasonix.pngwired into desktop + mobile;reasonix_labelin all six locales;supported.mdxrow. - Tests — startup-plan and process-recognition cases mirroring the Qwen Code entries.
I confirmed the upstream is real (esengine/DeepSeek-Reasonix, ~35.7k stars, MIT, npm reasonix) and that SKILLS_CLI_VALID_AGENT_KEYS (captured from skills CLI v1.5.20, untouched by this PR) already lists reasonix, so the reasonix → reasonix skills-key mapping is valid.
ℹ️ Live-TUI readiness was not validated against a real Reasonix screen
The stdin-after-start path waits only for the foreground process to become reasonix (waitForWorktreeStartupFollowup), then writes the raw prompt + Enter; draft launches fall back to the generic render-quiet-after-bracketed-paste window. None of that was checked against a running Reasonix TUI, and the author notes the app could not be launched here. Reasonix paints an animated logo at startup — the exact condition that forced zcode onto a dedicated zcode-composer-prompt signal — so the generic window is worth eyeballing before merge. This is not blocking on its own (many stdin-after-start agents ship the same way), but a manual launch is the missing evidence.
Technical details
# Reasonix readiness/transport is unverified
## Affected sites
- `src/shared/tui-agent-config.ts:338` — no `draftPasteReadySignal`; falls back to `render-quiet-after-bracketed-paste`.
- `src/main/runtime/runtime-worktree-startup-readiness.ts:59` — `waitForWorktreeStartupFollowup` gates on `isExpectedAgentProcess(foregroundProcess, 'reasonix')`, not on the composer being live.
## Required outcome
- Confirm, against a real Reasonix launch, that the initial task prompt is submitted after the composer is ready and not dropped mid-startup; if the animated startup stream keeps the quiet window from settling, add a `draftPasteReadySignal` (and ideally a committed capture/trace-replay test, per the readiness-evidence convention).
## Open questions for the human
- Is a `stdin-after-start` prompt written immediately after process detection reliably consumed by Reasonix's `code` TUI, or does it need a composer-ready gate?DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthroughReasonix is added as a launchable TUI agent. Its executable, startup prompt delivery, process recognition, agent type, and automatic selection order are configured. The renderer and mobile app receive catalog, label, and icon mappings. Telemetry and skills-CLI mappings are added, and the supported-agent documentation lists Reasonix. Priority: ⬇️ Low Severity of issue fixed: Low Merge Risk: 🔵 Low · up to A Reasonix session started in a directory named Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to A newly selectable coding tool will run in the workspace. The existing launch safeguards appear to apply, and no new security failure was verified, but the tool’s command behavior and the full reach of its launch path remain uncertain. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 17 files. (1 skipped: 1 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 23e7b359-645e-4212-b0be-72c913c9d54c
⛔ Files ignored due to path filters (1)
src/shared/agent-icons/reasonix.pngis excluded by!**/*.png
📒 Files selected for processing (22)
docs/site/content/docs/agents/supported.mdxmobile/src/components/mobile-agent-icon-assets.tsmobile/src/tasks/mobile-tui-agents.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/agent-catalog.tsxsrc/renderer/src/lib/agent-favicon-assets.tssrc/renderer/src/lib/agent-status.tssrc/shared/agent-kind.tssrc/shared/agent-process-recognition.test.tssrc/shared/agent-type-label.tssrc/shared/skills-cli-agent-keys.tssrc/shared/telemetry-property-schemas.tssrc/shared/tui-agent-config.tssrc/shared/tui-agent-display-names.tssrc/shared/tui-agent-selection.tssrc/shared/tui-agent-startup.test.tssrc/shared/tui-agent.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
- Register reasonix in HEADLESS_ONE_SHOT_MATCHERS so 'reasonix -p' and 'reasonix run' are not tagged as live interactive sessions. - Correct docs: Reasonix needs Node 18+ for the npm install path (the CLI itself is a prebuilt Go binary, no Node at runtime).
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Added
isReasonixHeadlessOneShotCommand(src/shared/reasonix-headless-command.ts) and wiredreasonixintoHEADLESS_ONE_SHOT_MATCHERS, soreasonix -p …/reasonix run …are no longer classified as the interactive agent — this addresses the prior matcher thread. - Added process-recognition cases asserting the
-p/--printandrunforms resolve tonullwhile barereasonixandreasonix --continuestill resolve to the interactive agent. - Corrected the
supported.mdxReasonix row fromNode 22+toNode 18+ for the npm path.
I verified the matcher against upstream esengine/DeepSeek-Reasonix docs/CLI.md (bare reasonix / reasonix tui interactive; -p/--print and reasonix run one-shot; --continue/--resume interactive), and confirmed npm reasonix@1.39.0 declares engines.node >= 18, so the corrected docs line is right.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: a084b56c-666e-4419-b83c-14a64120c635
📒 Files selected for processing (4)
docs/site/content/docs/agents/supported.mdxsrc/shared/agent-headless-command.tssrc/shared/agent-process-recognition.test.tssrc/shared/reasonix-headless-command.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/site/content/docs/agents/supported.mdx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
| // `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')) { |
There was a problem hiding this comment.
🎯 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.tsRepository: 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.tsRepository: 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 240Repository: 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
+ }
}
ELI5
Orca's agent picker can now launch Reasonix, the most popular DeepSeek-native coding agent, so DeepSeek users can pick it from the list instead of hand-wiring a generic command.
What Changed
Adds
reasonixas a launchable TUI agent across the same surface every shallow-launch agent uses:src/shared/tui-agent.ts— add'reasonix'to theTuiAgentunionsrc/shared/tui-agent-config.ts—detectCmd: 'reasonix',promptInjectionMode: 'stdin-after-start'(barereasonixlaunches its interactivecodeTUI;-p/runare headless one-shots)agent-kind.ts+telemetry-property-schemas.ts— telemetry kindreasonixtui-agent-display-names.ts,agent-type-label.ts,agent-status.ts— label/icon plumbingtui-agent-selection.ts+agent-catalog.tsx— picker entry (kept order in sync withTUI_AGENT_AUTO_PICK_ORDER)skills-cli-agent-keys.ts— maps to the skills CLI'sreasonixkeyagent-favicon-assets.ts,mobile-agent-icon-assets.ts,mobile-tui-agents.ts— bundled icon + favicon domaini18n/locales/*.json—reasonix_labelsrc/shared/agent-icons/reasonix.png— 64×64 diamond mark (Reasonix brand mark)docs/site/content/docs/agents/supported.mdx— docs rowtui-agent-startup.test.ts,agent-process-recognition.test.tsBefore: the picker has no DeepSeek-native entry; a DeepSeek user must configure a custom agent manually.
After: Reasonix appears in the picker, launches
reasonixin the worktree, and receives the task via the live PTY.Why
DeepSeek is a popular model provider but ships no first-party CLI agent. Reasonix is the canonical DeepSeek-native terminal agent (listed in DeepSeek's own
awesome-deepseek-agent, ~36k stars, actively maintained). Adding it as a shallow-launch agent — the same tier as Kimi / Qwen Code / ZCode — gives DeepSeek users a one-click launch with no deep-integration hooks.I considered Deep Code (
deepcode) too — also DeepSeek-native and in the same list — but it is ~16× smaller and its npm namespace collides with an unrelated package; Reasonix has a cleaner CLI contract and much wider adoption.Linked Issue
Fixes #23216
Visual Proof
Adds one row to the agent picker and one bundled icon asset. I could not run the Electron renderer locally to capture before/after screenshots (see Testing). The bundled 64×64 icon is
src/shared/agent-icons/reasonix.png.Testing
Added unit tests: startup plan (
tui-agent-startup.test.ts) and process recognition (agent-process-recognition.test.ts), mirroring the existing Qwen Code cases.Not run locally: this checkout has no
node_modulesand the repo pins Node 24 (host has Node 22), sopnpm typecheck/pnpm test/pnpm lintcould not be executed here — relying on CI.Manually verified every exhaustive
Record<TuiAgent, …>surface is covered and the catalog order stays in sync withTUI_AGENT_AUTO_PICK_ORDER.I manually tested these changes locally — partial (could not run the Electron app or test suite without Node 24 + a full install)
Automated tests added/updated
AI Disclosure
AI-assisted (Hermes Agent + Claude Code). All changes were reviewed by the human operator.
Review
Agent skill upstream boundary
Notes
reasonixcommand; no git/workspace assumption. Reasonix itself requires Node ≥ 22.live/unverifiable/exitedvocabulary does not apply.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)