Skip to content

Fork Orca into packages/ide as first-party code, and rename its config and CLI identifiers to CoDev - #11

Merged
yousef20920 merged 5 commits into
mainfrom
worktree-orca-first-party-fork
Aug 31, 2026
Merged

Fork Orca into packages/ide as first-party code, and rename its config and CLI identifiers to CoDev#11
yousef20920 merged 5 commits into
mainfrom
worktree-orca-first-party-fork

Conversation

@yousef20920

@yousef20920 yousef20920 commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Makes the IDE first-party code in this monorepo, then renames the identifiers a
person actually types or sees on disk.

The diff is enormous (~11.3k files) but almost all of it is one mechanical move:
the IDE source landing in packages/ide. Review the last three commits; skim
the first.

Why

The IDE was vendored. Every build cloned stablyai/orca at a pinned tag and
re-applied a 13k-line codev-web.patch over it. That made CoDev's own IDE work
invisible in the tree, unreviewable in diffs, and reconcilable only as patch
hunks — and it left "Orca" as the name on config files, the CLI, and the pairing
scheme.

The commits

f16a5720 Fork Orca into packages/ide as first-party code
ca5de8d8 Rename the config directory and project config
3296835b Rename the plugin manifest, pairing scheme, and CLI
43837979 Record what was renamed and what deliberately was not

1. The fork

Mechanical and byte-exact: the patched upstream tree at the pinned commit
02cea8a became packages/ide verbatim, so no CoDev edit was rewritten or
redone
. Rebuilding the web client from the new location reproduces the
committed bundle with identical content hashes and zero diff under
apps/web/public/orca — proof this changed no behavior.

Both artifacts now build from that one directory, which keeps them on the same
version by construction: pnpm orca:web (browser client) and
build-orca-serve.sh (the backend — the Containerfile now COPYs the source as
build context instead of cloning it).

packages/ide stays a self-contained project rather than joining the workspace:
it declares its own pnpm-workspace.yaml (packages: []), lockfile,
patchedDependencies, and an Electron native-rebuild postinstall — exactly the
carve-out upstream already made for itself. The root workspace excludes it and
.prettierignore skips it, so the recursive build/lint/typecheck/test
scripts and Prettier don't sweep ~11k IDE sources into every CI run; it formats
with its own oxfmt and lints with its own oxlint.

Trimmed at fork time, since no build consumes them and electron-builder already
excluded three of them from the packaged app: mobile/ (a separate workspace),
docs/, examples/, Casks/, .github/.

Accepted trade-off: upstream Orca fixes are no longer a version bump. Taking
one now means reading their diff and porting it by hand into a diverged tree.

2–3. The rename

Was Now Old name still works?
~/.orca ~/.codev an existing ~/.orca keeps being used
<repo>/.orca/ <repo>/.codev/ read, and cleared on delete
orca.yaml codev.yaml read
orca-plugin.json codev-plugin.json read
orca://pair codev://pair parsed — IDE, renderer, and apps/web
orca / orca-ide codev kept as bin aliases; still probed and detected

Every reader accepts both names, so nothing has to migrate and no deploy has
to be coordinated
. Only what is written and displayed uses the CoDev name.
src/shared/codev-identifiers.ts holds both sets.

Neither name was centralized before — 15 call sites each hand-built
join(home, '.orca', …) or join(repoPath, 'orca.yaml'), and ten remote hook
installers each had their own copy of the path — so this also collapses them
onto shared helpers.

~/.orca is not moved when it already exists: agent hooks record absolute
script paths in Claude/Codex config, so relocating the directory would break
hooks installed before this change. Fresh installs get ~/.codev.

What reviewers should look at

Three things are deliberately not renamed, each with a test pinning it:

  1. source: 'orca.yaml' in orca-runtime.ts is a host→client wire
    discriminant. Per AGENTS.md remote-wire-compatibility, mixed client/host
    versions are the normal state and an older paired client would not understand
    a new token. Invisible to users; the filename displayed beside it is renamed.
  2. Remote launches keep the pre-rename shim name. The relay deploys the CLI
    as plain orca, so getTuiAgentLaunchCommand now routes remote launches
    through a separate remoteLaunchCmdByPlatform. Local launches use codev on
    all three platforms.
  3. Package and app identityproductName, the Electron name, the
    com.stablyai.orca bundle id, and the deb/rpm package and artifact names.
    These are tied to code signing, TCC grants, update channels, and the userData
    directory, so renaming them would orphan user data rather than rename a
    command. Linux executableName is the command a person types, so that one
    did change — orca-ide existed only to dodge Ubuntu's GNOME Orca package, a
    conflict codev doesn't have.

detectCmdAliases gained the new names rather than swapping them, so a session
started by an older build is still detected.

Verification

  • IDE suite at exact parity with the pre-fork baseline: 24 failing files / 65
    failing tests before and after, identical failure set
    , 47,213 passing. Those
    24 are pre-existing — they need a built Electron runtime.
  • typecheck (node + cli + web), repo format:check, lint, and pnpm install --frozen-lockfile (lockfile unchanged) all pass.
  • Web client rebuilds from packages/ide to a byte-identical bundle.
  • The infra suite gained a test asserting neither build script nor the
    Containerfile can reintroduce an upstream clone.

One unrelated fix rode along. apps/web/components/sign-in-layout.test.ts
was already failing on main: it still expected initialMode={mode === "sign-up" inline, but the waitlist-invite work (e8c993dc) moved that behind
startInSignUp, which is true for ?mode=sign-up or a valid invite grant.
The page has been correct the whole time; only the test was stale. This PR
didn't cause it and doesn't depend on it, but verify can't go green without
it, so the assertion now checks both the derivation and the prop. The full
recursive suite passes: apps/web 458, packages/contracts 31,
apps/hocuspocus-server 8.

Not verified here: Linux deb/rpm packaging output, which needs an
electron-builder run this environment cannot do. The packaging config's own
contract test passes.

Still to do

Display copy, not identifiers. infra/aws/orca-build/brand-web.mjs still
rewrites OrcaCoDev in the built bundle after the fact, and the
non-English locale bundles (es/ja/ko/zh, ~600 occurrences each) are
untouched. Folding that into the source is now ordinary editing.

🤖 Generated with Claude Code

yousef20920 and others added 4 commits August 30, 2026 15:18
The IDE was vendored: every build cloned stablyai/orca at a pinned tag and
re-applied a 13k-line codev-web.patch over it. That made CoDev's own IDE work
invisible in the tree, unreviewable in diffs, and reconcilable only as patch
hunks. It is now ordinary source in this monorepo.

The move is mechanical and byte-exact. The patched upstream tree at the pinned
commit 02cea8a became packages/ide verbatim, so no CoDev edit was rewritten or
redone. Rebuilding the web client from the new location reproduces the
committed bundle with identical content hashes and zero diff under
apps/web/public/orca -- proof this changes no behavior.

Both artifacts now build from that one directory, which keeps them on the same
version by construction:

  - pnpm orca:web             -> browser client
  - build-orca-serve.sh       -> orca serve (Containerfile COPYs it as context)

packages/ide stays a self-contained project rather than joining the workspace:
it declares its own pnpm-workspace.yaml (packages: []), lockfile,
patchedDependencies, and an Electron native-rebuild postinstall, exactly the
carve-out upstream already made for itself. The root workspace excludes it and
.prettierignore skips it, so the recursive build/lint/typecheck/test scripts
and Prettier do not sweep ~11k IDE sources into every CI run -- it formats with
its own oxfmt and lints with its own oxlint.

Trimmed at fork time, since no build consumes them and electron-builder already
excluded three of them from the packaged app: mobile/ (a separate workspace),
docs/, examples/, Casks/, .github/.

Upstream identifiers are deliberately untouched, so this commit is a pure
relocation: the package is still named orca, and the orca CLI binary,
orca.yaml, ~/.orca, orca:// and orca-plugin.json are unchanged. Renaming them,
and folding the post-build brand-web.mjs rewrite into the source, is follow-up
work planned in packages/ide/CODEV-INTEGRATION.md.

The MIT LICENSE moves with the code. third_party/orca/UPSTREAM.md is replaced
by packages/ide/README.md (origin, licence, how to work in here) and
packages/ide/CODEV-INTEGRATION.md (every CoDev-specific behavior: the embedding
contract, parent bridge, folded sidebar, default chat tab, per-member agent
subscriptions, settings surface, theme and branding layers).

Accepted trade-off: upstream Orca fixes are no longer a version bump. Taking
one now means reading their diff and porting it by hand into a diverged tree.

Verified: pnpm install --frozen-lockfile (lockfile unchanged), format:check,
lint, typecheck, cargo fmt --check, and the infra suite all pass, and the web
client builds from packages/ide to a byte-identical bundle. The one failing
test (apps/web sign-in-layout) is pre-existing on main from in-flight
credentials sign-in work; this branch does not touch its subject files.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
First half of the identifier rename now that the IDE is first-party: the two
identifiers users actually touch on disk.

  ~/.orca          -> ~/.codev        (per-user config directory)
  <repo>/.orca/    -> <repo>/.codev/  (issue-command, drops, templates)
  orca.yaml        -> codev.yaml      (tracked project config)

Reads accept both names, so nothing has to migrate and no deploy has to be
coordinated. src/shared/codev-identifiers.ts holds the canonical and legacy
names; codevHomeConfigDir() keeps using an existing ~/.orca rather than moving
it, because agent hooks record absolute script paths in Claude/Codex config and
relocating the directory would break hooks installed before this change. Fresh
installs get ~/.codev. Writes and everything displayed use the CoDev name.

Neither name was centralized before -- 15 call sites each built
`join(home, '.orca', ...)` or `join(repoPath, 'orca.yaml')` by hand -- so this
also collapses them onto shared helpers: codevHomeConfigDir(),
getProjectConfigPath(), getRemoteManagedScriptPath() for the ten remote agent
hook installers, and readFirstProjectConfig()/readRemoteProjectConfig() for the
remote provider paths that cannot stat locally and instead try each candidate.

Deliberately NOT renamed, and each for a reason:

  - `source: 'orca.yaml'` in orca-runtime.ts is a host->client wire
    discriminant. Per AGENTS.md remote-wire-compatibility, mixed client/host
    versions are the normal state and an older paired client would not
    understand a new token. It is invisible to users; the displayed filename
    beside it is renamed.
  - `com.stablyai.orca` is the macOS bundle identifier -- app identity, tied to
    code signing, TCC grants, and update channels.
  - `.orca-remote` (SSH relay install root), `.orca-upload-` (temp suffix),
    `orca-skills` (plugin key), and the `.orca-diff-comment-add-btn` CSS class
    are unrelated to config and stay.

Remote and WSL hook installers always write the CoDev name: a remote home
cannot be stat'd from here, and createManagedCommandMatcher already sweeps a
stale entry by script name regardless of its parent directory.

Still to do in this series: orca-plugin.json, the orca:// pairing scheme, and
the orca CLI binary name.

Verified: typecheck:node, typecheck:cli, typecheck:web, and repo format:check
all pass. The IDE suite is at parity with the pre-change baseline -- 4412
passed, and the one file failing that did not fail before
(remote-runtime-shared-control-connection) is untouched by this commit, passed
in two earlier full runs, and passes 27/27 in isolation, i.e. flaky.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… CoDev

Second half of the identifier rename.

  orca-plugin.json -> codev-plugin.json   (plugin manifest)
  orca://pair      -> codev://pair        (pairing deep link)
  orca / orca-ide  -> codev               (CLI command)

Every parser accepts both names, so a plugin authored before the rename still
loads and a pairing link minted by an older desktop build still pairs. Only what
is minted and displayed uses the CoDev name. apps/web's extractPairingCode
accepts both schemes too, since the IDE now mints codev://.

The CLI rename is the substantive one. Linux used `orca-ide` specifically to
avoid colliding with Ubuntu's GNOME Orca package and /usr/bin/orca; `codev` has
no such conflict, so every platform now shares one command name. package.json
keeps `orca`/`orca-dev` as aliases beside `codev`/`codev-dev`, the bundled
launcher moved to resources/linux/bin/codev, the deb/rpm hooks symlink
/usr/bin/codev, and both the launcher's executable search and the deb/rpm
uninstall hook still recognise pre-rename install layouts.

Two compatibility rules are preserved deliberately, and each has a test:

  - Remote launches keep the pre-rename shim name. The relay deploys the CLI as
    plain `orca`, so getTuiAgentLaunchCommand now routes remote launches through
    a separate remoteLaunchCmdByPlatform rather than the local name. Local
    launches use `codev` on all three platforms.
  - detectCmdAliases gained the new names instead of swapping them, so a session
    started by an older build is still detected.

Not renamed, same reasoning as the previous commit: the deb/rpm packageName and
artifactName, the AppImage/mac/windows artifact names, `productName`, and the
`com.stablyai.orca` bundle id are package and app identity -- tied to code
signing, TCC grants, update channels, and the userData directory -- so renaming
them would orphan user data rather than rename a command. Linux `executableName`
is the command a person types, so that one did change.

Verified: typecheck (node + cli + web), repo format:check, and the web suite all
pass, and the IDE suite is at exact parity with the pre-rename baseline -- 24
failing files / 65 failing tests before and after, with an identical failure
set, all pre-existing (they need a built Electron runtime). The one web failure
(sign-in-layout) is the same pre-existing one from in-flight credentials work.

Not verified here: Linux deb/rpm packaging output, which needs an electron-builder
run this environment cannot do. The packaging config's own contract test passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The rename tables now show which name each reader writes and which legacy name
it still accepts, plus the two compatibility rules that constrain further work
(the remote shim keeps the pre-rename name; `source: 'orca.yaml'` is a wire
discriminant). Also states why package and app identity — productName, the
Electron name, the bundle id, deb/rpm package and artifact names — is staying
Orca: it is tied to code signing, TCC grants, update channels, and the userData
directory, so renaming it orphans user data rather than renaming a command.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 30, 2026 20:53
@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codev Ready Ready Preview Aug 30, 2026 9:02pm

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…rivation

The assertion still expected `initialMode={mode === "sign-up"` inline, but the
waitlist-invite work moved that behind `startInSignUp`, which is true for
`?mode=sign-up` *or* a valid invite grant. The page has been correct since
e8c993d; only the test was stale, so `verify` was already red on main and this
PR merely surfaced it.

Assert both halves — the derivation and the prop — so the original intent (the
mode query param selects sign-up) stays guarded without re-coupling the test to
an inline expression.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@yousef20920
yousef20920 merged commit 8a08f93 into main Aug 31, 2026
3 checks passed
@yousef20920
yousef20920 deleted the worktree-orca-first-party-fork branch August 31, 2026 03:36
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.

2 participants