Skip to content

feat(agents): add Reasonix (DeepSeek-native) to the agent picker - #23217

Open
makiisthenes wants to merge 2 commits into
stablyai:mainfrom
makiisthenes:feat/deepseek-agent
Open

makiisthenes wants to merge 2 commits into
stablyai:mainfrom
makiisthenes:feat/deepseek-agent

Conversation

@makiisthenes

Copy link
Copy Markdown

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 reasonix as a launchable TUI agent across the same surface every shallow-launch agent uses:

  • src/shared/tui-agent.ts — add 'reasonix' to the TuiAgent union
  • src/shared/tui-agent-config.ts — detectCmd: 'reasonix', promptInjectionMode: 'stdin-after-start' (bare reasonix launches its interactive code TUI; -p/run are headless one-shots)
  • agent-kind.ts + telemetry-property-schemas.ts — telemetry kind reasonix
  • tui-agent-display-names.ts, agent-type-label.ts, agent-status.ts — label/icon plumbing
  • tui-agent-selection.ts + agent-catalog.tsx — picker entry (kept order in sync with TUI_AGENT_AUTO_PICK_ORDER)
  • skills-cli-agent-keys.ts — maps to the skills CLI's reasonix key
  • agent-favicon-assets.ts, mobile-agent-icon-assets.ts, mobile-tui-agents.ts — bundled icon + favicon domain
  • six i18n/locales/*.json — reasonix_label
  • src/shared/agent-icons/reasonix.png — 64×64 diamond mark (Reasonix brand mark)
  • docs/site/content/docs/agents/supported.mdx — docs row
  • tests: tui-agent-startup.test.ts, agent-process-recognition.test.ts

Before: the picker has no DeepSeek-native entry; a DeepSeek user must configure a custom agent manually.
After: Reasonix appears in the picker, launches reasonix in 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_modules and the repo pins Node 24 (host has Node 22), so pnpm typecheck / pnpm test / pnpm lint could not be executed here — relying on CI.

  • Manually verified every exhaustive Record<TuiAgent, …> surface is covered and the catalog order stays in sync with TUI_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

  • Not applicable — this change adds a first-party-authored agent entry and copies no upstream skill-installer source, tests, fixtures, registry entries, or documentation.

Notes

  • Cross-platform: launch is a plain reasonix command; no git/workspace assumption. Reasonix itself requires Node ≥ 22.
  • Remote/SSH: detection is data-driven per host; Reasonix reports no live status (no hooks), so the live/unverifiable/exited vocabulary does not apply.
  • Reasonix has no wired permission-bypass flag here, so the Yolo/Manual toggle does not affect it (its default is to ask); noted in the docs.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

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.

@pullfrog pullfrog Bot left a comment

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.

ℹ️ No critical issues — minor suggestions inline.

Reviewed changes

  • New TuiAgent member — 'reasonix' added to src/shared/tui-agent.ts, every exhaustive Record<TuiAgent, …> map (agent-kind.ts, agent-status.ts, tui-agent-display-names.ts, tui-agent-config.ts, skills-cli-agent-keys.ts), and telemetry AGENT_KIND_VALUES.
  • Shallow launch config — detectCmd: 'reasonix', launchCmd/expectedProcess default to reasonix, promptInjectionMode: 'stdin-after-start'; no hooks, native chat, resume, or permission-bypass arg.
  • Picker, icons, i18n, docs — catalog entry and TUI_AGENT_AUTO_PICK_ORDER both insert reasonix between zcode and pi; bundled reasonix.png wired into desktop + mobile; reasonix_label in all six locales; supported.mdx row.
  • 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?

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread src/shared/tui-agent-config.ts Resolved
@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

📝 Walkthrough

Walkthrough

Reasonix 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 e8016

A Reasonix session started in a directory named run may not be recognized as a live agent. The issue is narrow and has a straightforward fix.

Security Architecture Review

Security architecture risk: 🔵 Low · up to e8016

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
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — Selecting the new tool can execute a third-party coding process in the chosen workspace. Its effective file, credential, network, and remote-environment access was not established by the supplied evidence.

Security Findings and Attack Paths

  • inferred — No introduced authorization bypass is established. The run-token matcher could suppress recognition of an interactive command containing that token, but whether such a command is valid is unverified; Reasonix commands were not recognized before this PR.

Trust Boundaries and Controls

  • observed — The credential guard opts into recognizing headless agents, and daemon attach-only handling does not derive its state from the new matcher. These counterexamples limit the evidenced effect of one-shot filtering.

Resilience and Maintainability Implications

  • observed — The shared launch path avoids writing a prompt before terminal readiness and does not retry a create operation whose outcome is unknown, limiting misdelivery and duplicate-session risk for the new entry.

Hardening Proposals

  • proposed — Confirm the third-party CLI’s argument grammar, particularly whether run can occur as an interactive argument after an option terminator, before relying on this classification for launch controls.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the primary change: adding Reasonix to the agent picker.
Description check ✅ Passed The description includes all required sections and explains the user impact, implementation, rationale, linked issue, testing limits, AI disclosure, cross-platform considerations, and checklist status…
Linked Issues check ✅ Passed Issue #23216 requires a launchable Reasonix picker entry with detectCmd: reasonix and stdin-after-start delivery. src/shared/tui-agent-config.ts adds that configuration, and `src/shared/tui-agen…
Out of Scope Changes check ✅ Passed The changed files support Reasonix registration, launch behavior, process recognition, picker presentation, telemetry, skills integration, localization, icons, mobile presentation, documentation, or a…
Full details: Docstring Coverage

Explanation

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.)

  • Fix all pre-merge checks with AI

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 23e7b359-645e-4212-b0be-72c913c9d54c

📥 Commits

Reviewing files that changed from the base of the PR and between da6d483 and 8d17491.

⛔ Files ignored due to path filters (1)
  • src/shared/agent-icons/reasonix.png is excluded by !**/*.png
📒 Files selected for processing (22)
  • docs/site/content/docs/agents/supported.mdx
  • mobile/src/components/mobile-agent-icon-assets.ts
  • mobile/src/tasks/mobile-tui-agents.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/agent-catalog.tsx
  • src/renderer/src/lib/agent-favicon-assets.ts
  • src/renderer/src/lib/agent-status.ts
  • src/shared/agent-kind.ts
  • src/shared/agent-process-recognition.test.ts
  • src/shared/agent-type-label.ts
  • src/shared/skills-cli-agent-keys.ts
  • src/shared/telemetry-property-schemas.ts
  • src/shared/tui-agent-config.ts
  • src/shared/tui-agent-display-names.ts
  • src/shared/tui-agent-selection.ts
  • src/shared/tui-agent-startup.test.ts
  • src/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).

@pullfrog pullfrog Bot left a comment

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.

✅ No new issues found.

Reviewed changes

  • Added isReasonixHeadlessOneShotCommand (src/shared/reasonix-headless-command.ts) and wired reasonix into HEADLESS_ONE_SHOT_MATCHERS, so reasonix -p … / reasonix run … are no longer classified as the interactive agent — this addresses the prior matcher thread.
  • Added process-recognition cases asserting the -p/--print and run forms resolve to null while bare reasonix and reasonix --continue still resolve to the interactive agent.
  • Corrected the supported.mdx Reasonix row from Node 22+ to Node 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.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: a084b56c-666e-4419-b83c-14a64120c635

📥 Commits

Reviewing files that changed from the base of the PR and between 8d17491 and e8016d7.

📒 Files selected for processing (4)
  • docs/site/content/docs/agents/supported.mdx
  • src/shared/agent-headless-command.ts
  • src/shared/agent-process-recognition.test.ts
  • src/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')) {

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
+    }
   }

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Reasonix (DeepSeek-native) as a launchable agent

1 participant