Commit Graph
34 Commits
Author SHA1 Message Date
f90cd6ebc9 fix(cli): preserve WSL cwd through the Windows bridge (#6965) (#7640)
* fix(cli): preserve WSL cwd through the Windows bridge (#6965)

# Conflicts:
#	src/cli/index.test.ts
#	src/cli/index.ts

* fix(cli): preserve bridge exit codes (#6965)

* fix(cli): harden WSL cwd bridge compatibility

* chore(cli): align cwd tests with main

* fix(cli): repair deleted WSL cwd before path conversion

* chore: preserve main formatting after merge

---------

Co-authored-by: Brennan Benson <brennanbenson@Brennans-MacBook-Pro.local>
Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
2026-07-13 15:44:32 -07:00
Jinjing 34a9df7795 Fix wsl cli rc4 migration (#8471)
* fix(cli): migrate managed WSL launchers to native exe

* refactor(cli): reconcile managed WSL registrations

* fix(cli): harden WSL registration reconciliation

* fix(cli): serialize and harden WSL CLI registration lifecycle

- Cap per-distro concurrent repairs and add a filesystem lock so two
  Orca installs can't race the same distro's launcher/bridge files
- Skip re-adopting a legacy managed launcher when its bridge is user-
  owned, avoiding a doomed install retried on every startup
- Track per-distro reconciliation against launcher target + app
  version so unchanged registrations aren't re-probed each boot
- Replace command install with a single atomic rename instead of a
  move-based backup, closing a window where no orca-ide exists
- Remove the registry invalidate-on-persist-failure path now that
  writes are atomic and repair is disk-authoritative
- Add brief negative caching to WSL distro discovery to bound
  wsl.exe respawns on persistently broken hosts
- Extract keyed-promise-queue as a shared serialization primitive
2026-07-12 23:19:15 -07:00
Neil ee82d66a35 fix(cli): preserve multiline arguments on Windows (#8374)
* fix(cli): preserve multiline Windows arguments

* test(cli): run Windows launcher regression in CI

* fix(cli): support Windows Framework C# compiler
2026-07-12 02:13:41 -07:00
NeilandOrca 42cf64cdc9 fix(linux): stop Orca terminals from launching the GNOME Orca screen reader via bare orca (#8347)
On Linux the CLI installs as orca-ide so it never shadows /usr/bin/orca
(GNOME's screen reader), but agent-facing surfaces (orca-cli skill,
dispatch preambles, CLI hints) all invoke bare `orca` — so on stock
Ubuntu an agent inside an Orca terminal launched the screen reader,
which started speaking (#7904).

Fix: prepend a userData-scoped shim dir (bare `orca` -> bundled
orca-ide launcher, or the stable AppImage) to the PATH of every
packaged-Linux managed PTY, mirroring the existing dev-mode cli/bin
prepend. The user's own shells — and their real screen reader command —
stay untouched. Also flip the orca-cli skill probe to prefer orca-ide
so agents outside Orca terminals never execute the screen reader.

Fixes #7904

Co-authored-by: Orca <help@stably.ai>
2026-07-12 00:38:35 -07:00
NeilandOrca 11e537616c Surface a friendly error when Windows blocks the user PATH write (#6412) (#6588)
* Surface a friendly error when Windows blocks the user PATH write

When HKCU\Environment is locked (Group Policy / restricted ACL / EDR-managed
environment), the PowerShell SetEnvironmentVariable write rejects with a raw
'Command failed: powershell ...' error (often mojibake-localized) that the CLI
Settings toast displayed verbatim. Detect the permission failure via the Latin
PowerShell error-envelope tokens and rethrow an actionable message naming the
exact folder to add to PATH manually, chaining the original error on cause.

Fixes #6412

Co-authored-by: Orca <help@stably.ai>

* Tighten Windows PATH permission detection

---------

Co-authored-by: Orca <help@stably.ai>
2026-07-11 13:43:31 -07:00
NeilandOrca e33b2006f4 Remove stale max-lines lint disables from files under the limit (#7548)
110 files carried an eslint/oxlint-disable max-lines directive but are
already under the default max-lines budget (300 .ts / 400 .tsx / 600 .mjs
/ 800 test), so the suppression is dead. Removing it restores real
max-lines coverage on these files with zero behavior change.

Each removed directive had max-lines as its only rule; verified via a
full oxlint run (0 max-lines violations, 0 new errors). Diff is pure
deletions (200 lines, 0 additions) — no code touched.

Co-authored-by: Orca <help@stably.ai>
2026-07-06 02:12:32 -07:00
5124b0d0ad fix(serve): install orca CLI in headless serve so orca claude-teams resolves (takeover of #5766) (#7267)
* fix(serve): install the orca CLI in headless serve mode

In headless serve mode the orca CLI command (~/.local/bin/orca on Linux,
/usr/local/bin/orca on macOS) is never created, so the in-app Claude Team
launcher (orca claude-teams) opened by 'Start new agent' fails with
command-not-found. CliInstaller.install() is only invoked from renderer/desktop
flows (onboarding, Settings 'Install CLI', feature tips) via the cli:install IPC;
headless serve has no renderer. Run the existing idempotent installer on the
serve startup path, best-effort so a failure never blocks serve startup.

Fixes #5763.

* fix(serve): install a bare `orca` dispatcher on Linux for Claude Team

On Linux CliInstaller installs the CLI as `orca-ide` (to avoid shadowing GNOME
Orca's /usr/bin/orca), not bare `orca`. But the Claude Team launcher (`orca
claude-teams`), composed client-side by both the desktop renderer and the
mobile app and written verbatim to the host PTY, invokes bare `orca` — which
is unresolved in the initial managed terminal (no agent-teams shim on PATH
yet). The serve-mode CLI install therefore fixed macOS but not Linux.

Add a bare-`orca` dispatcher in the serve branch (host-side, Linux only) that
execs the bundled CLI wrapper. ~/.local/bin is hardcoded ahead of /usr/bin on
the managed-terminal PATH, so it resolves. Plain file (not a managed symlink)
so CliInstaller.removeLegacyLinuxCommandIfManaged leaves it untouched.

* Restore ai-vault files to origin/main (drop stale pre-0.52 oxfmt merge artifact)

Co-authored-by: Orca <help@stably.ai>

* Harden serve CLI install: AppImage-safe dispatcher, no-prompt macOS, skip Windows, conflict guard

- Gate CliInstaller.install() to macOS+Linux; Windows would only mutate the
  persistent user-registry PATH without helping the current serve's terminals.
- Inject a non-prompting privilegedRunner so headless macOS never pops an
  osascript admin dialog when /usr/local/bin isn't writable (skips instead).
- Linux dispatcher: exec the stable $APPIMAGE via buildAppImageCliWrapper when
  running from an AppImage (resourcesPath is an ephemeral FUSE mount); skip when
  the bundled orca-ide launcher is absent; never clobber a user-owned ~/.local/bin/orca.
- Single-quote the exec target; add coverage for all new branches.

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Daniel Rudaev <daniel@d1dx.com>
Co-authored-by: Orca <help@stably.ai>
2026-07-03 14:12:33 -07:00
NeilandOrca 46646d7ff1 chore(lint): upgrade oxlint to 1.71 + enable 7 new rules (autofixed backlog) (#6841)
* chore(lint): upgrade oxlint to 1.71 and enable 7 new rules

Upgrade oxlint 1.67.0 -> 1.71.0 (1.72 was blocked by the repo's 3-day
minimum-release-age supply-chain guard; nothing here needs it). The
bump is a no-op on the existing config.

Enable 3 error rules (backlog autofixed to zero in this commit) and
4 warn rules (surface signal without gating CI):

error (autofixed, behavior-preserving):
- unicorn/prefer-node-protocol        (~1531 sites: bare builtin -> node:)
- typescript/no-import-type-side-effects (~36: all-inline-type -> import type)
- unicorn/no-array-reverse            (19: copy-then-reverse -> toReversed)

warn (real signal, current fires are test-only/correct):
- unicorn/no-array-fill-with-reference-type  (aliasing footgun guard)
- typescript/no-unsafe-function-type         (bans bare Function type)
- unicorn/prefer-array-flat-map              (map().flat() -> flatMap())
- unicorn/prefer-regexp-test                 (.match() in bool ctx -> .test())

mobile/.oxlintrc.json extends root, so it inherits all 7; the autofix
ran from root and covered mobile/ too.

Verification (all green): oxlint 0 errors (root+mobile+aux configs),
oxfmt clean, typecheck (node+cli+web), vitest 22795 passed / 0 failed,
builds (electron-vite + web + cli) succeed. node: rewrites confirmed to
skip embedded SSH/CLI string payloads (AST-only); all toReversed sites
verified to operate on fresh copies or write-once locals.

* chore(lint): bump mobile oxlint to 1.71 so inherited rules parse

mobile/ is a standalone pnpm project pinning its own oxlint@1.67, which
lacks unicorn/no-array-fill-with-reference-type (needs >=1.70). Since
mobile/.oxlintrc.json extends the root config, mobile CI's 'cd mobile &&
oxlint' failed to parse the new rule. Bump mobile to match root (1.71).

Verified in mobile/: oxlint 0 errors, oxfmt --check clean, tsc --noEmit
pass, vitest 978 passed / 0 failed.

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
2026-06-29 22:38:29 -07:00
Jinjing 6729f683f6 Fix Orca CLI path resolution and improve registration UI (#6484)
* fix Orca CLI path resolution and improve registration UI

- Hydrate the shell PATH before running installer actions on macOS to
  match the user's terminal instead of launchd.
- Resolve the active macOS command path dynamically against shell PATH
  candidates, ignoring broken symlinks and non-executable files.
- Detect and report conflicts with unmanaged executables shadowing the
  configured command path.
- Add "Preparing..." and "Registering..." loading states to the settings
  and setup panels during preflight checks.

* Fix Orca CLI detection and installation path conflict checks

- Allow detecting a managed Orca command located later in PATH when the
  default path entry is missing or non-executable.
- Avoid raising installation conflicts for unmanaged commands located
  after the default install path, as they will be safely shadowed.
- Translate terminal setup and Orca CLI registration strings for
  Spanish, Japanese, Korean, and Chinese locales.

* Only open terminal when pre-install checks succeed

Prevent the terminal from opening and setting the terminal command if
onBeforeOpenTerminal or refreshPreInstallNotice throws an error.
2026-06-27 02:05:23 -07:00
08ba730d8e feat(devin): managed hooks, sleeping resume, AI Vault (#5380)
* Revert "fix(terminal): add proportional scroll fallback for sidebar resize" (#937)

* fix(sidebar): smoothly animate off-screen worktree reveal on click (#1302)

Clicking a worktree card whose row lies outside the sidebar viewport
caused an instant jump when scrolling it into view. Switching
`scrollToIndex` to `behavior: 'smooth'` turns that minimum-distance
scroll into an animated slide while keeping `align: 'auto'` so visible
cards still no-op (no re-centering).

Co-authored-by: Orca <help@stably.ai>

* Avoid local scrollback serialization on shutdown (#1821)

* Fix PR refresh coordinator test arguments (#2545)

* release: v1.4.31

* release: v1.4.31

* release: v1.4.31

* release: v1.4.31

* release: v1.4.31

* release: v1.4.31

* release: v1.4.31

* release: v1.4.36-rc.6

* release: v1.4.36-rc.6

* release: v1.4.36-rc.6

* ci: gate release-cut to the canonical repo so it skips forks (#4815)

The cut job checks out main, bumps package.json's version, and
fast-forwards main. On a fork with Actions enabled, the scheduled RC
cut runs against the fork's main and diverges it on the version line
every slot, so that contributor's PRs back to upstream conflict on
package.json even when their change never touches it.

Gate the job to github.repository == 'stablyai/orca' so it (and the
jobs that depend on it) no-op on forks. Canonical scheduled and manual
cuts are unaffected.

* feat(hooks): install Devin managed status hooks

* feat(devin): address hook review, resume, and UI polish

- Parse Devin config.json as JSONC; warn on read_config_from overlap
- Windows hook command uses forward slashes; APPDATA fallback
- Add devin to sleeping-agent resume and UI registries (plan 003/004)
- Add hook-service and hook-config-json tests

Closes follow-up for plans 002–004 on feat/add-devin-agent.

* feat(devin): scan ATIF transcripts for AI Vault

Register devin in AI_VAULT_AGENTS, discover ~/.local/share/devin/cli/transcripts
(or DEVIN_HOME), parse ATIF JSON sessions, and build devin --resume commands.

* docs(devin): clarify stdin-after-start vs bracketed paste

* fix(devin): use JSONC for remote install, add partial+APPDATA tests

- installRemote: replace readHooksJsonRemote (JSON.parse) with
  readTextFileRemote + parseJsonc for JSONC compatibility on SSH
- Add partial status test (some hooks missing → state:'partial')
- Add Windows APPDATA config path test with fallback

* fix(devin): address CodeRabbit review — sessionId fallback, parseJsonc errors, comment, i18n

* Fix Devin integration edge cases

Co-authored-by: Orca <help@stably.ai>

* Package Devin JSONC parser dependency

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Trevin Chow <trevin@trevinchow.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
2026-06-17 20:49:29 -07:00
0ec3882cb8 Add project Windows runtime selection (#5519)
* Add project Windows runtime selection

* Fix project Windows runtime selection

Co-authored-by: Orca <help@stably.ai>

* fix: preserve WSL shell variables

---------

Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Neil <neil@stably.ai>
2026-06-17 16:08:14 -07:00
Jinwoo HongandOrca 7ea359bd60 Add Claude Agent Teams native pane launcher (#4892)
* Add Claude Agent Teams native pane launcher

Co-authored-by: Orca <help@stably.ai>

* Fix Agent Teams CI coverage checks

Co-authored-by: Orca <help@stably.ai>

* Fix Claude Agent Teams split direction mapping

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
2026-06-08 16:11:32 -04:00
Jinwoo Hong 3017efe00b Fix WSL account and skill setup issues (#4412) 2026-06-01 20:01:03 -04:00
Neil df9a254393 Heal stale generated Orca CLI launchers
Detect generated Orca Unix launcher files as stale CLI registrations and replace them during install, while keeping arbitrary regular files protected as conflicts. This removes the stale /usr/local/bin/orca blocker found during memory profiling.
2026-06-01 14:56:27 -07:00
Jinwoo Hong 4cc0147005 Fix orchestration mail from WSL and SSH terminals (#3918) 2026-05-31 15:13:15 -04:00
Neil 5577fb0541 fix: preserve packaged windows cli launcher (#4180) 2026-05-31 07:11:33 -07:00
Eren ÇakarandNeil fc35a0607a fix: use resources/bin/orca.cmd for packaged Windows CLI path (#4165)
* feat(ui): add instruction hints to command and prompt dialogs

Add helper text below prompt/description textareas in the quick command
dialog, automation editor dialog, and create PR dialog to inform users
about supported features like skills, file paths, and built-in commands.

Closes #3998

* fix: use resources/bin/orca.cmd for packaged Windows CLI path

resolveCommandPath() returned %LOCALAPPDATA%\\Programs\\Orca\\bin\\orca.cmd
but the actual CLI after updates lives at resources\\bin\\orca.cmd.
The bin\\orca.cmd shim is wiped on every update, breaking CLI access.

* chore: keep windows cli path PR focused

---------

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-05-31 06:56:11 -07:00
Neil 38feb52864 Fix AppImage CLI launcher path 2026-05-31 03:57:17 -07:00
Jinjing 73083ca2d8 fix: address review findings (#4015) 2026-05-31 01:26:34 -07:00
Emad Fussi 3647b53e00 fix(linux): support AppImage CLI registration
Support packaged Linux AppImage CLI registration with a stable wrapper that invokes the outer AppImage and resolves the CLI entry from APPDIR at runtime.

The takeover drops the already-landed Linux command rename plus unrelated perf/GPU sandbox changes from the original branch, and adds regression coverage for wrapper install, stale wrapper replacement, legacy symlink cleanup, argument forwarding, and env preservation.

Co-authored-by: Emad Fussi <43019044+omd0@users.noreply.github.com>
2026-05-31 01:06:58 -07:00
Lesley MurfinandNeil a6c658c325 fix(cli): fall back to ~/.local/bin on macOS arm64 when /usr/local/bin is absent (#3959)
* fix(cli): fall back to ~/.local/bin on macOS arm64 when /usr/local/bin is absent

/usr/local/bin does not exist by default on Apple Silicon Macs — Homebrew
moved to /opt/homebrew after the arm64 transition. The previous code called
mkdir(/usr/local/bin) inside install(), which threw EACCES (root-owned parent
directory) before installSymlink() was reached, so the existing osascript
privileged-runner fallback was never invoked. Settings permanently showed
"not installed" with no error surfaced anywhere, silently blocking all four
agent skill install flows (Orchestration, Browser Use, Computer Use, CLI).

Changes:
- resolveCommandPath() darwin branch now returns this.macCommandPath, a field
  resolved once at construction time via existsSync(dirname(candidatePath)).
  When /usr/local/bin is absent the constructor falls back to ~/.local/bin/orca
  (user-writable, no sudo, XDG standard, already on PATH via shell init on arm64).
  existsSync is not called on every getStatus() invocation.
- mkdir is moved from install() into installSymlink()'s try/catch block so any
  EACCES failure reaches the osascript privileged runner instead of propagating
  as an unhandled rejection. mkdir is kept in install() for the Windows wrapper
  path where the target directory is always user-writable.
- defaultMacCommandPath option added as a test seam so tests can simulate an
  absent /usr/local/bin without touching the real filesystem.

Fixes stablyai/orca#3557

* review: tighten macOS CLI installer coverage

- cover the macOS path-selection seam without bypassing it

- make the privileged-runner test invoke install and assert the fallback

- prove macCommandPath stays fixed after construction

---------

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-05-31 00:21:37 -07:00
Neil 1007686342 fix: package runtime node modules
Fix packaged runtime dependency resolution so installed apps ship the node_modules needed by main, CLI, SSH, hooks, and speech runtime paths.
2026-05-30 20:18:49 -07:00
Jinjing b8ad7e6bf7 fix: harden packaging installers (#3878) 2026-05-30 16:33:09 -07:00
Neil 0fc0c7faf0 fix: time out windows cli path commands (#3825) 2026-05-30 11:35:52 -07:00
Neil d2619c4f55 fix: time out wsl cli commands (#3823) 2026-05-30 11:31:01 -07:00
Emad Fussi 7337cab2d8 feat(linux): add RPM package target and rename CLI to orca-ide
Adds an RPM Linux package target and renames the Linux CLI command to orca-ide to avoid shadowing GNOME Orca, while preserving macOS and Windows CLI command behavior.\n\nFollow-up hardening keeps the Linux launcher executable, removes only old Orca-managed Linux/WSL orca launchers during migration, preserves AppImage/deb artifact names, and updates package/release tests for the RPM asset.
2026-05-29 16:57:56 -07:00
Jinwoo HongandOrca f3551142a3 Unpack yaml for packaged Orca CLI (#2790)
Co-authored-by: Orca <help@stably.ai>
2026-05-25 12:31:56 -07:00
Maciej Kobuszewski 4c9a2ed28d fix(linux): resolve symlink and probe orca-ide in CLI wrapper
Fixes #2539
2026-05-22 00:04:22 -07:00
Jinwoo Hong da93f0d852 Fix WSL Codex terminal environment (#2558) 2026-05-21 17:29:46 -04:00
Jinwoo Hong 6abf031d66 Fix WSL terminal settings parity (#2446) 2026-05-20 17:33:07 -04:00
Jinwoo HongandOrca a22717bb35 Refactor runtime app architecture (#1878)
Co-authored-by: Orca <help@stably.ai>
2026-05-14 23:13:37 -07:00
Jinwoo HongandClaude Opus 4.6 f6ec69c969 feat: add WSL support for repos on WSL filesystems (#375)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 21:02:36 -04:00
Jinwoo Hong 46070d8f27 Fix Windows packaged Orca CLI launcher path resolution (#282) 2026-04-03 22:20:09 -07:00
Jinwoo Hong 182ba156dd Add Orca runtime CLI and bundled install support (#273) 2026-04-03 16:50:28 -07:00