ADE for working with a fleet of parallel agents
Go to file
Neil fef3f7d2f8
refactor(cli): split runtime-client.ts and add envelope schema validation (#1090)
* refactor(cli): split runtime-client.ts into runtime/ subsystem

Break the 413-line src/cli/runtime-client.ts into focused modules under
src/cli/runtime/:

- types.ts       — RuntimeRpcSuccess/Failure, RuntimeClientError,
                   RuntimeRpcFailureError
- metadata.ts    — readMetadata / tryReadMetadata /
                   getDefaultUserDataPath
- transport.ts   — sendRequest: Unix-socket newline-framed JSON with
                   id and runtimeId verification and timeout handling
- status.ts      — getCliStatus + buildCliStatusResponse +
                   isProcessRunning
- launch.ts      — launchOrcaApp + macOS .app-bundle resolution +
                   ELECTRON_RUN_AS_NODE env handling
- client.ts      — RuntimeClient class, now a thin composer
- index.ts       — subsystem barrel

runtime-client.ts becomes a backward-compat re-export barrel so
src/cli/index.ts and the existing tests import the same symbols from
the same path. No behavior changes.

Motivation: the file had an eslint-disable max-lines override and
mixed five concerns (envelope types, wire transport, metadata I/O,
status aggregation, cross-platform app launch). Splitting them makes
each concern independently testable and unblocks adding schema
validation at the RPC boundary.

* feat(cli): validate runtime RPC envelope with Zod at decode boundary

Add RuntimeRpcEnvelopeSchema and apply it inside sendRequest so every
response frame is validated against the id/ok/result/error/_meta shape
before the CLI hands it to the caller. The payload (`result`) is left
as unknown — the TResult generic remains the caller's responsibility —
so only the envelope itself is the contract this schema enforces.

Motivation: the CLI and the Orca main runtime are separate processes
and can drift in version (older CLI vs newer app, or vice versa during
dev HMR). A malformed or partial frame used to risk mis-typed field
access downstream; it now surfaces as a single structured
`invalid_runtime_response` error.

Behavior:
- Well-formed success and failure frames continue to decode unchanged.
- Failure frames without `_meta` are accepted (the runtime may fail
  before resolving its own runtimeId).
- Valid JSON that does not match the envelope shape now rejects with
  `invalid_runtime_response`, matching the existing error code for
  non-JSON frames.

Tests: adds a pure schema test file
(src/cli/runtime/envelope-schema.test.ts) covering accept/reject cases.
The existing integration tests in runtime-client.test.ts continue to
pass unchanged.
2026-04-25 13:51:50 -07:00
.agents/skills docs(electron-skill): harden playwright-cli usage against alias and port collisions (#996) 2026-04-23 10:14:42 -07:00
.claude/skills feat(editor): preserve Cmd+B for bold in markdown editor (#802) 2026-04-18 10:08:25 -07:00
.github Add community PRs directly to project (#1052) 2026-04-24 13:50:10 -07:00
.husky
config fix terminal resize flicker during pane drag (#962) 2026-04-22 17:50:14 -07:00
docs docs(readme): add Annotate AI Diff feature, SSH support, and Spanish translation (#1080) 2026-04-25 00:01:53 -07:00
patches fix: resolve posix_spawnp failure in daemon's node-pty spawn (#762) 2026-04-17 10:37:56 -07:00
resources Revert "fix(terminal): terminal mic access" (#1057) 2026-04-24 14:44:21 -07:00
scripts feat: Add SSH remote support (beta) (#590) 2026-04-13 19:23:09 -07:00
skills/orca-cli feat(cli): add terminal create, split, rename, focus, close, tui-idle wait (#734) 2026-04-22 17:51:32 -07:00
src refactor(cli): split runtime-client.ts and add envelope schema validation (#1090) 2026-04-25 13:51:50 -07:00
tests feat(terminals): per-tab activity indicators (#944) 2026-04-24 14:05:09 -07:00
.editorconfig
.env.e2e feat: add idempotent E2E test suite with headless Electron support (#671) 2026-04-19 12:09:32 -07:00
.gitignore diff-comments: copy-only flow in Source Control (#884) 2026-04-20 21:50:31 -07:00
.npmrc min release age = 1 day 2026-04-06 23:32:45 -07:00
.oxfmtrc.json
.oxlintrc.json Lint long files (and add TS skills) (#23) 2026-03-22 12:12:54 -07:00
AGENTS.md docs(agents): tighten code-comment rule to short, why-only (#883) 2026-04-20 19:39:25 -07:00
CLAUDE.md feat: show merge conflicts in source control sidebar (#204) 2026-03-29 15:40:23 -07:00
CONTRIBUTING.md chore(release): expose patch/minor/major as Cut Release kinds (#999) 2026-04-23 11:11:46 -07:00
LICENSE Add MIT license 2026-03-28 10:19:14 -07:00
README.md docs(readme): add Annotate AI Diff feature, SSH support, and Spanish translation (#1080) 2026-04-25 00:01:53 -07:00
components.json Shadcn 2026-03-16 22:27:51 -07:00
dev-app-update.yml code release stuff 2026-03-19 00:36:36 -07:00
electron.vite.config.ts fix: bundle xterm deps into daemon-entry to fix packaged build crash (#759) 2026-04-17 09:29:29 -07:00
orca.yaml Add orca.yaml with setup script (#685) 2026-04-15 19:01:08 -07:00
package.json release: 1.3.19-rc.2 [rc-slot:2026-04-25-03] 2026-04-25 10:12:43 +00:00
pnpm-lock.yaml feat: add Linear integration (#1007) 2026-04-23 14:54:32 -07:00
skills-lock.json Lint long files (and add TS skills) (#23) 2026-03-22 12:12:54 -07:00
tsconfig.json feat: Add SSH remote support (beta) (#590) 2026-04-13 19:23:09 -07:00
vitest.config.ts fix: harden terminal pane lifecycle for split groups (#641) 2026-04-14 16:23:01 -07:00

README.md

Orca

Orca

Supported Platforms Discord Follow on X

English · 中文 · 日本語 · Español

The AI Orchestrator for 100x builders.
Run Claude Code, Codex, or OpenCode side-by-side across repos — each in its own worktree, tracked in one place.
Available for macOS, Windows, and Linux.

Download at onOrca.dev

Orca Screenshot

Supported Agents

Orca supports any CLI agent (not just this list).

Claude Code   Codex   Gemini   Pi   Hermes Agent   OpenCode   Goose   Amp   Auggie   Charm   Cline   Codebuff   Continue   Cursor   Droid   GitHub Copilot   Kilocode   Kimi   Kiro   Mistral Vibe   Qwen Code   Rovo Dev


Features

  • No login required — Bring your own Claude Code or Codex subscription.
  • Worktree-native — Every feature gets its own worktree. No stashing, no branch juggling. Spin up and switch instantly.
  • Multi-agent terminals — Run multiple AI agents side-by-side in tabs and panes. See which ones are active at a glance.
  • Built-in source control — Review AI-generated diffs, make quick edits, and commit without leaving Orca.
  • GitHub integration — PRs, issues, and Actions checks linked to each worktree automatically.
  • SSH support — Connect to remote machines and run agents on them directly from Orca.
  • Notifications — Know when an agent finishes or needs attention. Mark threads unread to come back later.

Install


[New] Annotate AI Diff

Comment directly on AI-generated diffs.

Annotate any line in an AI-generated diff with your feedback, then send it back to the agent to revise. Keep the review loop tight — no copying line numbers, no context switching.

Orca Annotate AI Diff — comment on AI-generated diffs and send feedback to the agent


[New] Hot Swap Codex Accounts

Multiple Codex accounts? Switch in one click.

If you run multiple Codex accounts to get the best token deal, Orca lets you hot-swap between them instantly — no re-login, no config files. Just pick an account and keep building.

Orca Codex Account Switcher — hot swap between multiple Codex accounts


[New] Per Worktree Browser & Design Mode

See your app. Click any element. Drop it into the chat.

Orca ships with a built-in browser right inside your worktree. Preview your app as you build, then switch to Design Mode — click any UI element and it lands directly in your AI chat as context. No screenshots, no copy-pasting selectors. Just point at what you want to change and tell the agent what to do.

Orca Design Mode — click any UI element and drop it into the chat


[New] Introducing the Orca CLI

Agent orchestration from your terminal.

Let your AI agent control your IDE. Use AI to add projects to your IDE, spin up worktrees, and update the current worktree's comment with meaningful progress checkpoints directly from the terminal. Ships with the Orca IDE (install under Settings).

npx skills add https://github.com/stablyai/orca --skill orca-cli

Community & Support

  • Discord: Join the community on Discord.
  • Twitter / X: Follow @orca_build for updates and announcements.
  • Feedback & Ideas: We ship fast. Missing something? Request a new feature.
  • Show Support: Star this repo to follow along with our daily ships.

Developing

Want to contribute or run locally? See our CONTRIBUTING.md guide.