Commit Graph
6844 Commits
Author SHA1 Message Date
8604a4d570 fix(bitbucket): recognize ssh.bitbucket.org remotes (#31002)
* fix(bitbucket): recognize the SSH host alias

* fix(bitbucket): recognize the SSH host alias on current main

Apply Chen's original SSH alias fix to current main, preserving canonical
Bitbucket browser links and adding case/port and lookalike-host coverage.

Co-authored-by: Chen <zwq19980411@gmail.com>

---------

Co-authored-by: Neil <neil@stably.ai>
2026-10-23 20:43:39 -07:00
df97aa3a6f fix(gitlab): recognize SSH-over-443 remotes (#30998)
* fix(gitlab): recognize SSH-over-443 remotes

* fix(gitlab): canonicalize SSH-over-443 project and review URLs

Reuse the existing GitLab transport-host normalizer in project identity,
hosted links, and manual merge-request links. Cover alias variants,
lookalikes, nested groups, and canonical encoded links.

Fixes #30876

Co-authored-by: lorenzozanee <wyz0707@proton.me>

* test(gitlab): cover alias identity consumers

---------

Co-authored-by: Neil <neil@stably.ai>
Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
2026-10-23 20:30:43 -07:00
AnmolandNeil 9b15b2bbec fix(ai-vault): show Copilot sessions under their workspace with the original prompt as title (#31160)
* fix(ai-vault): show Copilot sessions under their workspace with the original prompt as title

Copilot sessions in Agent Session History showed "Unknown location" and
titles prefixed with an injected <current_datetime> tag.

The Copilot parser only learned a session's folder from the
"Folder X has been added to trusted folders" notice, which Copilot does
not write for every session. It now reads the launch directory, git
root and branch from session.start's context, and the trust notice only
fills a folder the start did not name, so resume runs in the start
directory as it does for other agents.

User messages now take the original `content` before
`transformedContent`, which carries context Copilot injects.
`current_datetime` joins the hidden blocks so a transformed-only
message still gets a clean title.

Bump the session parse cache schema so histories cached with the old
parser are re-read once instead of keeping the wrong folder and title.

Fixes #30985

* fix(ai-vault): refresh cached Copilot metadata and search text

---------

Co-authored-by: Neil <neil@stably.ai>
2026-10-23 20:30:39 -07:00
cedce2aa9f feat(cli): add orca ports to list a workspace's detected ports (#33016)
* feat(cli): add orca ports to list a workspace's detected ports

Scripts and agents had no way to read the ports Orca already detects for
a workspace, so finding a dev server on a random port meant redoing the
lsof scan by hand. `orca ports` reuses the host-scoped
workspacePorts.scanHost RPC, keeps the rows owned by the current (or
--worktree) workspace, and prints port, pid, process, connect host,
protocol, how the owner was matched, and the advertised URL. --all shows
every listener on that host. An older runtime without scanHost gets an
"update Orca" error instead of a raw method_not_found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): resolve folder workspaces in orca ports and match rows by path

Run inside a native folder, `orca ports` failed with selector_not_found
(or picked an enclosing git worktree) because it only searched the
worktree list. It now resolves the cwd like `agent launch`, native
folders first, and shows that host's listeners. Rows are matched on the
owner's path instead of its id, so every instance of a repo-backed
folder workspace keeps its ports even though attribution names only the
first instance as owner. `--all` adds the worktree id when two owners
share a display name, and the skill guide notes that only workspace
rows carry `owner` and `advertisedUrl`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): refuse orca ports for folder workspaces without --all; document the command

Co-authored-by: Manuel Meurer <manuel@meurer.io>

* fix(cli): recognise native folder path selectors in orca ports; note SSH scan limits

Co-authored-by: Manuel Meurer <manuel@meurer.io>

* fix(cli): refuse a folder path shared by several folder workspaces in orca ports

Co-authored-by: Manuel Meurer <manuel@meurer.io>

* fix(cli): refuse a path a worktree and a folder workspace share in orca ports

Co-authored-by: Manuel Meurer <manuel@meurer.io>

---------

Co-authored-by: Manuel Meurer <manuel@meurer.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 20:05:47 -07:00
Neil 82534d0183 refactor: colocate remote runtime passthrough socket (#33009) 2026-10-23 19:46:31 -07:00
Kelvin Amoaba 117e186147 fix(browser): remote tunnel matches Chromium for IPv6 bypass rules and <-loopback> (#32665) 2026-10-24 02:35:00 +00:00
Kelvin Amoaba 33bd67e057 fix(notifications): tapping a phone push opens the agent that sent it (#31773) 2026-10-24 02:34:14 +00:00
OrcaWinandOrcaWin 3b380ddfcf fix: reset Muse hook state and strengthen regression tests (#33008)
* fix: reset Muse hook state and strengthen boundary tests

* test: require live permission, replay, and recency controls

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 19:25:11 -07:00
Neil 4975e2451e fix(git): preserve binary output through termination barriers (#32633) 2026-10-23 19:21:53 -07:00
NeilandCubatica c1d980c111 fix(runtime): retire predecessor exit evidence on replacement (#32341)
* fix(runtime): retire predecessor exit evidence on incarnation change

When a PTY id is re-registered with a different, known incarnation, the handle was already invalidated but lastExitCode/lastExitCause (pty and leaves) still carried the predecessor exit, so a live replacement reported the old stop. Clear them at that same proven-replacement point. Same or unknown incarnation keeps the evidence (fail closed).

* fix(runtime): retire exit evidence for replacement incarnations

Clear predecessor exit evidence on the PTY and its indexed leaves when
registration or provider spawn proves a different known incarnation owns it.
Cover both paths so an earlier spawn cannot hide the transition from later
registration. Keep same and uncertain incarnation evidence conservative.

Adapted from Cubatica's original fix and regression cases in #24513; extend
the coverage to spawn-first replacement on the current runtime modules.

Co-authored-by: Cubatica <4414418+Cubatica@users.noreply.github.com>

---------

Co-authored-by: Cubatica <4414418+Cubatica@users.noreply.github.com>
2026-10-23 19:21:40 -07:00
fancivezandNeil 2fb3de3405 fix(git): close subprocess stdin for SSH-signed commits (#30961)
Co-authored-by: Neil <neil@stably.ai>
2026-10-23 19:20:58 -07:00
Kyle PandNeil 9ff0b53ec6 fix(markdown): keep readable documents after traversal errors (#27774)
* Keep readable Markdown documents after traversal errors

* Document partial Markdown listing behavior

---------

Co-authored-by: Neil <neil@stably.ai>
2026-10-23 19:20:42 -07:00
Suat KocarandNeil ad4c25cda2 fix(linear): list issue comments oldest first (#25622)
Linear returns an issue's comments newest first and getIssueComments
passed that order through, so the activity feed showed the newest comment
on top while comments posted from Orca were appended at the bottom and
jumped to the top on reload. Sort by createdAt, oldest first, like the
GitLab notes path does.

Fixes #25573

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-10-23 19:20:34 -07:00
e4f5e1ddf1 fix(gitea): treat HTTP 404 as no-PR in the hosted-review branch lookup (#10411)
* fix(gitea): treat HTTP 404 as no-PR in throwing hosted-review lookup

hostedReview:forBranch always uses the throwing Gitea lookup variant, and
requestJsonAtBase threw on any non-OK status. A 404 (PR deleted, repo absent
on the forge, or Gitea masking a private repo) rejected the IPC handler and
spammed the main-process log on every refresh for every unaffiliated branch.

404 means the resource is absent — an accepted "no PR", not a transport or
auth failure. Map it to null even with throwOnFailure; 401/403/5xx/network
errors still throw so creation eligibility keeps reporting 'unavailable'.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(gitea): scope the 404 no-PR exemption to the linked-PR fetch

A blanket status !== 404 exemption in the shared request helper also
covered the repo-level /pulls scan, where a 404 means a wrong API base
URL, a repo absent from the forge, or a token without scope. Collapsing
that to "no PR" would make a misconfigured Gitea host look permanently
PR-less instead of surfacing reviewLookupOutcome: 'unavailable'.

Gate the exemption on an explicit allowNotFound request option, set only
on the single-resource /pulls/{n} fetch.

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

* test(gitea): pin the 200-with-empty-list no-PR shape alongside the 404 case

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

* fix(gitea): preserve deleted linked pull request absence handling

Refresh the original Donach PR and its prior maintainer correction on current main, keeping the HTTP404 exemption limited to the linked pull resource.

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
Co-authored-by: Orca <help@stably.ai>
2026-10-23 19:20:13 -07:00
b0cb24d2d5 fix: address pr-bug-scan validated finding from #6484 (#6511)
findActivePathCommand now .catch(()=>null)s inspectSymlink so an execute-only foreign PATH `orca` is skipped instead of rethrowing EACCES; blocks the readFile EACCES at cli-installer.ts:551.

Co-authored-by: orca-bug-scan-bot <orca-bug-scan-bot@stably.ai>
Co-authored-by: Neil <neil@stably.ai>
2026-10-23 19:19:55 -07:00
Neil b46be798ed fix(orchestration): refuse sends to a Run whose home is another computer (#33005)
* fix(orchestration): refuse send to a Run whose home is another computer

A remote Dispatch's Run id also names a mirror row on the worker's host. Once the
worker lost its link to the home, send --to run:<id> wrote into that mirror and the
message reached no one. Now the host refuses with run_home_unreachable, and a linked
worker that names its own Run home is delivered there.

Reported by @cookapps-jhlee8 in #32292.

* fix(orchestration): refuse only mirror Runs, and answer coordinator mail at its Run home

A loopback runtime's attachment names a real local Run, so the refusal now keys on the
Run row's remote home, not on any attachment. A reply to coordinator mail imported under
a remote Run relays to the home through the replying pane's Dispatch link, and is refused
with run_home_unreachable when that link is gone.

* fix(orchestration): a remote reply answers only mail sent to the replier's own Dispatch
2026-10-23 19:09:54 -07:00
OrcaWinandOrcaWin 3286f3b259 [comment audit] Clean up IPC, host lifecycle and native-chat comments (#32966)
* [comment audit] Tighten watcher lifetime and file-write constraints [skip ci]

* [comment audit] Clarify IPC routing and notification comments [skip ci]

* [comment audit] Shorten watcher, preflight and PTY comments [skip ci]

* [comment audit] Clarify PTY delivery and restore ownership [skip ci]

* [comment audit] Tighten PTY environment and flow-control rationale [skip ci]

* [comment audit] Clarify IPC spawn and stable-pane guarantees [skip ci]

* [comment audit] Tighten PTY provider and filesystem ownership rationale [skip ci]

* [comment audit] Clarify clone ownership and remote runtime recovery [skip ci]

* [comment audit] Condense upload, settings and SSH lifecycle comments [skip ci]

* [comment audit] Shorten shutdown, preview and worktree watcher rationale [skip ci]

* [comment audit] Clarify worktree identity, remote ownership and copy limits [skip ci]

* [comment audit] Shorten worktree catalog, removal and WSL routing rationale [skip ci]

* [comment audit] Tighten Linear credential, pagination and export comments [skip ci]

* [comment audit] Condense managed-server activation, snapshot and launch rationale [skip ci]

* [comment audit] Trim runtime installation and managed-server lifecycle comments [skip ci]

* [comment audit] Simplify managed tunnel, memory and menu comments [skip ci]

* [comment audit] Condense integration, model catalog and attachment rationale [skip ci]

* [comment audit] Shorten journal persistence, replay and queue rationale [skip ci]

* [comment audit] Condense journal ordering and timeline lifecycle comments [skip ci]

* [comment audit] Trim timeline and subscriber delivery explanations [skip ci]

* [comment audit] Shorten Stop, child-exit and recovery contracts [skip ci]

* [comment audit] Simplify handover and host recovery comments [skip ci]

* [comment audit] Trim queue delivery and provider startup commentary [skip ci]

* [comment audit] Clarify restart and rewind safety comments [skip ci]

* [comment audit] Trim status, Stop and completion commentary [skip ci]

* [comment audit] Simplify transcript lookup and visual containment comments [skip ci]

* [comment audit] Trim transcript reader, watcher and WSL transport commentary [skip ci]

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 19:07:32 -07:00
OrcaWinandOrcaWin b4fa75e954 test: replace self-fulfilling checks with production boundary assertions (#33006)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 19:01:22 -07:00
OrcaWinandOrcaWin 5672185e59 test: tighten hook and relay coverage and consolidate launcher checks (#32998)
* test: replace process and subagent status waits with controlled clocks

* test: establish permission waits and deliverable stale results

* test: consolidate launcher checks and require retained relay state

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 18:39:50 -07:00
Neilandray3w 4095b64243 fix(terminal): restored SSH terminals recover after password sign-in (#32275)
* fix(terminal): recover restored SSH terminals after password sign-in

* fix(terminal): also recover after a cancelled SSH sign-in, and share the in-progress copy

A restored pane refused because the user cancelled the password prompt
stayed frozen after a later successful sign-in too. Treat that refusal like
the other pending sign-in states, and share the in-progress wording with
main so the renderer match cannot drift.

Co-authored-by: ray3w <61264633+ray3w@users.noreply.github.com>

---------

Co-authored-by: ray3w <61264633+ray3w@users.noreply.github.com>
2026-10-23 18:36:01 -07:00
Jinwoo Hong 15c3f0866d feat(connectors): cancel a conversation's queued work and stop its agent, behind experimentalConnectors (B4) (#32961)
* feat(connectors): cancel a conversation's queued work and stop its agent, behind experimentalConnectors (B4)

* test(connectors): drop a type assertion from the interrupt test

* fix(connectors): interrupt only a running main-agent turn, never background-only work

* chore(connectors): shorten the interrupt comment

* fix(connectors): fence cancel and prompt keys at transport handoff

* fix(connectors): clear the prompt Claude restores after our cancel, and end a turn our cancel rejected

* fix(connectors): require stronger evidence for cancel cleanup and settlement

* fix(connectors): cancel waits for a published agent's link, keeps cancel headroom in a full backlog, and pastes nothing after an unsettled clear

* fix(connectors): bound cancellation settlement and preserve unresolved lanes

* refactor(connectors): drop the leftover-prompt clear after cancel; keep the rejected-turn end
2026-10-23 21:34:48 -04:00
OrcaWinandOrcaWin 4ed7424c85 test: strengthen retirement controls and remove redundant waits (#32995)
* test: require live delivery controls in OMP retirement cases

* test: consolidate nonblocking status persistence coverage

* test: drive Codex transcript lifecycle with controlled clocks

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 18:18:54 -07:00
Neil 55a45491be refactor(shared): colocate remote runtime Tailscale guidance (#32992) 2026-10-23 18:18:19 -07:00
OrcaWinandOrcaWin 69db315f52 test: verify hook delivery and exit cleanup through observable state (#32994)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 18:04:50 -07:00
NeilandJesse Sanford 7cafdb072b feat(ssh): Recover server for a managed host refused on a stale lock, and surface that refusal in seconds (#32951)
* feat(orcad): run --reclaim-stale-lock on a managed host's active slot

The desktop can now dry-run and confirm the stale instance-lock recovery
on a Linux managed host, serialized with launches, then start the server
again and reconnect the way the restart action does.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* feat(settings): offer Recover server for a managed host refused on a stale lock

When a managed orcad start names --reclaim-stale-lock, the SSH host row
offers Recover server. The dialog dry-runs the check, shows the host's
evidence, and clears the lock only after the user confirms no other
machine sharing the home runs Orca.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* feat(mobile): point a host refused on a stale lock to the desktop's Recover server

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(settings): mount the Recover server dialog per opening

A fresh mount starts each opening from a new check instead of resetting
state in an effect.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(orcad): end the readiness wait once the host proves the launch exited

A managed orcad refused at start (such as on a possibly stale instance
lock) left the client waiting out the full readiness deadline. Each
host-side wait now also checks the launch's PID file with kill -0 and
ends early on a proven exit, so the caller reports the same pending
readiness, with the orcad.log tail, within a poll. No PID, a denied
probe or a reused PID keeps the old deadline.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(orcad): refuse a managed slot without --reclaim-stale-lock before running it

An older orcad ignores the flag and starts serving in the foreground. The
same remote exec now checks that the slot's server bundle names the flag
and answers unsupported otherwise, without invoking orcad.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(settings): show the manual stale-lock command as literal mono text

The rendered dialog ran the command into the sentence, so it was hard to
read or copy. It now sits in its own mono block, like Details.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(settings): offer only a manual delete when the host can't reclaim, and format the lock's age

An unsupported host was told to run the very command it lacks. Main now
names the lock path for that case, and the dialog shows only a copyable
rm of it with the shared-home caution. The lock's age uses the UI's
relative-time formatter instead of a hand-rolled minutes count.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(orcad): pin a confirmed stale-lock reclaim to the record the user approved

--yes reclaimed whatever record held the lock at that moment, so a lock a
same-named machine wrote while the dialog sat open could be cleared.
orcad now takes --expect-nonce and refuses unless the lock still holds
it; the dry run reports the nonce, the desktop sends it back on confirm,
and the managed slot gate requires a build that knows the pin. A
reclaimed result carries the evidence it acted on.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(settings): keep the Recover server dialog open through its own reclaim

The dialog's mount was gated on the status that offered it, and the
reclaim clears that note before its answer arrives, so the result was
never shown and the card kept the dialog marked open. Only the triggers
are gated now; an open dialog keeps the server it opened for until the
user closes it.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(settings): put the Recover server confirmation on the security surface

It asks permission to run a remote command that clears an ownership lock
and starts server code, which STYLEGUIDE puts on that surface.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(orcad): trust a gone launch PID only on the machine that launched it

The PID file sits in a home other login nodes may share, so a wait exec
that lands on another node read a starting server as exited. Both launch
paths now record the launching machine's boot id and node name beside
the PID, and the readiness wait ends early only when its own exec reads
the same record. No record, a host without a boot id, or another machine
keeps the deadline. The PID path is named once in the launch command so
it stays within its sent-byte ceiling.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(orcad): keep a slot's unreadable stale-lock answer from offering a manual delete

A slot that passed the gate but gave no JSON, or a status this client
does not know, read as unsupported and offered rm of the lock. It now
reads as no-answer, which points to the slot's own reclaim command, and
unsupported is left to a slot without the command, a non-Linux host or
no active version.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* style(settings): use the text-2xs step for the stale-lock command block

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(mobile): offer the desktop-recovery hint on the same refusal the desktop does

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* test(orcad): name the extra fields a fake stale-lock answer carries

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(settings): end the Recover server flow once the lock is cleared, and keep an unpinned reclaim manual

After a reclaim whose restart failed, the dialog kept the old evidence,
the enabled confirmation and manual recovery for a lock that was gone.
It now shows only that the lock was cleared and why the server did not
start, with Close. A slot that has the reclaim but not the nonce pin is
now told apart from one without the reclaim, and is pointed to its own
reclaim command rather than rm.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(orcad): keep a stale-lock reclaim's result when the restart after it throws

A wake or tunnel rebuild that threw after the lock was cleared discarded
the reclaimed result, so the caller skipped its reconnect and note
clearing and the dialog kept a confirmation for a lock that was gone.
The restart's failure now becomes the result's notRestarted reason.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(orcad): report a reclaimed server as started when only its forward failed to follow

A tunnel rebuild that failed after the wake started the server was
reported as the server not starting. The rebuild now goes through
followLaunchedServerPort, as other relaunches do, which warns and leaves
the forward to the next connect. Also drops a caller test that only
covered behaviour the fix did not change.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* test(mobile): re-record the execution-target goldens for the recovery hint field

The SSH gate's projected state gained `needsDesktopServerRecovery`, which
is false for every recorded reply (no recorded host sends a managed
server refusal). Re-recorded with `pnpm --dir mobile rpc:record` for the
two pilot recordings and the four execution-target reply partitions; the
only change is that field, plus the value pool reordering around it.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

---------

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>
2026-10-23 17:57:22 -07:00
861299e6cc refactor(ipc): remove unreachable runtime-environment provisioning and control-retry IPC (#32960)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 17:54:11 -07:00
f5f7f172a8 chore(ipc): remove unreachable hooks:createIssueCommandRunner IPC (#32953)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 17:50:37 -07:00
OrcaWinandOrcaWin 019dc054b7 test: replace hook shape checks with execution and delivery assertions (#32991)
* test: exercise hook cleanup and interpreter environment boundaries

* test: verify installed hook delivery and actual curl budgets

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 17:47:35 -07:00
Neil d31deaa39f fix(terminal): verify an exact stop through an overlapping liveness inventory (#32948)
* fix(terminal): verify an exact stop through an overlapping liveness inventory

terminal.stopExact re-read the PTY inventory once after the stop. When a newer
inventory started meanwhile (the exit's own session republish triggers one),
the older read was voided as stale and the confirmed stop came back as
terminal_liveness_unavailable, so hibernating a remote pane on a busy host
rolled back. Retry the post-stop read within one list budget.

* test(terminal): keep the post-stop liveness failure fixture unavailable across retries
2026-10-23 17:42:59 -07:00
OrcaWinandOrcaWin 02d7214c1a refactor: remove four unreachable preload IPC bridges (#32950)
* refactor(repos): remove unreachable repos:getGitUsername IPC

* refactor(mobile): remove unreachable mobile:isWebSocketReady IPC

* refactor(skills): remove unreachable skills:deletePackageVersion IPC

* refactor(space): remove unreachable workspaceSpace:closeWindow IPC

* chore: prune repo-host-read baseline for removed git username handler

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 17:39:44 -07:00
OrcaWinandOrcaWin cdba9a7703 refactor(dashboard): remove unreachable popout spawn/sleep IPC (#32954)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 17:33:42 -07:00
OrcaWinandOrcaWin da620ad632 refactor(rate-limits): remove unreachable setPollingInterval and refreshMiniMax IPC (#32945)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 17:32:57 -07:00
OrcaWinandOrcaWin 2c46becd29 perf(emulator): accumulate MJPEG chunks instead of re-joining partial frames (#32967)
* perf(emulator): accumulate MJPEG chunks instead of re-joining partial frames

A simulator frame spans many socket chunks, and extractJpegFrames re-concatenated
the growing partial frame on every chunk, which is quadratic in chunks per frame on
the Electron main thread. Hold chunks until one could complete the frame, then join
once. Held chunks are copied, so no caller chunk memory is retained.

* perf(emulator): ignore empty MJPEG chunks in the accumulator

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 17:31:03 -07:00
OrcaWinandOrcaWin d1aef1eee9 refactor(worktrees): remove unreachable legacy worktree list IPC (#32942)
* refactor(worktrees): remove unreachable legacy worktree list IPC

The desktop and web preloads both always provide `worktrees.listDetected`,
so the renderer's fallback to `worktrees.list` never ran, and nothing calls
`worktrees.listAll`. Remove both IPC handlers, their preload/web wrappers,
the renderer fallback, and helpers only they used. Tests that observed
behaviour through the removed handlers now go through `worktrees:listDetected`.

* test(worktrees): drop removed list channels from SSH listing matrix

Address review: the canonical SSH listing test built channel names dynamically
and still invoked worktrees:list/listAll. Also fold the detected-result reader
into the shared worktree test fixtures, refresh stale comments, and assert the
backfill no-op test listed authoritatively.

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 17:30:59 -07:00
96ac40e244 fix(speech): avoid full-recording copies when encoding dictation (#32432)
* fix(speech): avoid full-recording copies when encoding dictation

* test(speech): drop the dictation heap probe

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 17:27:13 -07:00
Neil cd59239927 fix(workspaces): add main-owned project move pause barrier (#32940)
* fix(workspaces): add main-owned project move pause barrier

* test(workspaces): type project move pause reply fixtures
2026-10-23 17:25:22 -07:00
Neil 1cc2a2afd8 refactor(shared): group remote runtime shared-control lifecycle (#32977) 2026-10-23 17:04:58 -07:00
OrcaWinandOrcaWin 01652255f0 test: strengthen hook, build, and mobile lifecycle coverage (#32968)
* test: strengthen hook, build, and mobile lifecycle coverage

* fix: use relocated Jira types in issue user field

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 16:38:53 -07:00
OrcaWinandOrcaWin 4687e90a16 [comment audit] Continue main-process comment cleanup (#32946)
* [comment audit] Shorten daemon, hook, and emulator comments [skip ci]

* [comment audit] Shorten VM, conversation, SQLite, and theme-import comments [skip ci]

* [comment audit] Tighten Git execution and source-control comment contracts [skip ci]

* [comment audit] Clarify repository probes and maintenance comments [skip ci]

* [comment audit] Shorten status, diff-cache, and checkout comments [skip ci]

* [comment audit] Clarify worktree lifecycle and WSL routing comments [skip ci]

* [comment audit] Shorten forge identity and review-refresh comments [skip ci]

* [comment audit] Tighten hosted-review client comment contracts [skip ci]

* [comment audit] Clarify GitLab compatibility and review comments [skip ci]

* [comment audit] Tighten hook ownership and watchdog rationale [skip ci]

* [comment audit] Condense host and integration compatibility comments [skip ci]

* [comment audit] Clarify IPC authority and remote-routing rationale [skip ci]

* [comment audit] Finalize file-import and containment comment cleanup

* [comment audit] Fix stale Jira type imports blocking full CI

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 16:27:37 -07:00
Brennan Benson fb1f4b3e6f Agents: store each agent's permission itself; terminals and new chats read it (#31315)
* feat(agents): store each agent's permission itself instead of typing flags into Arguments

Terminals and new chats read one stored choice per agent (Use the agent's own
settings, Ask for approval, Accept edits, Approve for me, Full access). Orca adds
the flag at launch; Arguments hold only the user's own text. A one-time move
lifts Orca's flags out of saved Arguments. Older clients still see and write
the flag as part of Arguments; the host translates.

* fix(agents): say the all-agents switch resets agents set separately; keep primitives unstyled

* test(agents): the one-time move returns every launch-profile field

* Fix permission carrier ownership and surface-specific defaults

* Preserve uncertain permission operands and name the option inventory

* Check env entries without indexing typed agent maps

* Combine Chat permission capability imports

* Use folder execution-host platform for permission environment

* Preserve launch map replacement and acknowledge permission saves

* Keep permission feedback fallbacks statically discoverable

* Provide preload platform to Agents settings render tests

* Preserve Gemini approval arguments under Full access

* fix(settings): retain complete environment edits through save outcomes

* fix(settings): narrow local failure scope and preserve host messages

* fix(settings): retire argument drafts after acknowledged saves

* fix(settings): keep Goose environment editable after reset

* fix(settings): show resolved arguments for legacy hosts

* Preserve pending environment resets and bound launch settings work

* Keep optional settings fallback in repository metadata reads

* Read repository visibility defaults through the raw settings fixtures

* Prepare whole Environment edits and retire unchanged drafts

* Keep Environment settings transitions in an acyclic module

* Update raw settings reader test fixtures

* Place test fixture safety notes on assertion starts

* test: pin permission settings work and recovery contracts

* test: type permission settings work fixtures

* test: cover migrated permission inputs and captured CLI grammar

* test: preserve typed permissions in WSL Claude restarts
2026-10-23 16:20:55 -07:00
Brennan Benson 87eccfe9f4 Pick Jira users for required Reporter and custom user fields (#31972)
* fix(jira): pick real users for required create fields

* test(jira): keep user picker coverage within renderer boundary

* fix(jira): preserve known user identities and metadata choices

* test(jira): preserve full dialog fixture model type

* test(jira): target metadata Select trigger

* fix(jira): show matching people before known ID action
2026-10-23 15:58:12 -07:00
Neil 9a5da64fdd refactor: group remote runtime requests and subscriptions (#32952) 2026-10-23 15:52:57 -07:00
Jinwoo Hong 8586fc761d fix(linux): stop marking the terminal host scope ManagedOOMPreference=avoid (#32935)
uresourced before 0.5.5 answers every attribute write on the scope's cgroup by
re-setting its CPU and IO weights, which makes systemd rewrite the oomd xattr
again. The loop pins systemd --user and eventually stops it starting new
terminals. Per-terminal scopes already keep oomd from taking every terminal.
2026-10-23 18:38:16 -04:00
Jinwoo Hong 2c53a550ff feat(connectors): pending prompts, answers and turn events behind experimentalConnectors (B3) (#32160) 2026-10-23 15:31:49 -07:00
NeilandJesse Sanford 0008e0cdf5 fix(orcad): add --reclaim-stale-lock for a lock no start can judge after a reboot on a shared home (#32915)
* fix(orcad): add --reclaim-stale-lock for a lock no start may judge

On a Linux host with no machine id whose ~/.orca is on a network or FUSE
home, a lock left by the host's own previous boot names a PID that is
evidence only on the machine that issued it, so every start after a
reboot refused it, and the only way out was deleting orcad.lock by hand.

Starts still refuse it: losing contact is not proof of exit, and a home
other machines may share must never be taken over automatically. Now:

- `orca serve --reclaim-stale-lock` (and `orcad --reclaim-stale-lock`)
  checks that the lock was written on this host, in an earlier boot, at
  least 2 minutes ago, and that nothing answers at its holder's
  endpoints. It prints the pid, host, boot and age and warns about other
  machines sharing the home, and clears the lock only with --yes,
  through the normal race-safe reclaim of that exact record.
- Lock records now name their host, as evidence for that command.
- The refusal has its own code, orcad_instance_lock_holder_unverifiable,
  names the command, and exits 3, so `orca serve --supervise` waits on it
  instead of giving up, and the desktop refuses on it like a held lock.
- orcad advertises orcad.stale-lock-reclaim.v1 so a client can offer
  the command on hosts that have it.

Fixes #32177

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(orcad): let --reclaim-stale-lock clear a reclaimer cut short by the reboot, and probe IPv6

A reclaimer from the same earlier boot on this host that the reboot cut
short left a recovery owner the command could never judge, so --yes
always failed. The confirmation now covers such an owner too, and only
one from this host's earlier boot. An IPv6 WebSocket endpoint is probed
by its bare address.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(cli): ship the stale-lock reclaim module with packaged builds, and refuse an unreachable lock

The CLI loads main modules from out/main after the main build replaces
it, so the reclaim module becomes a stable plain-Node entry and is
unpacked from the asar. A lock that cannot be stat'ed for any reason other
than absence (a permission error, say) is now a refusal, not "nothing to
reclaim".

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(orcad): make --reclaim-stale-lock name the real data root and report a status

- The refusal prints a runnable command for the data root it refused:
  an orcad names its own runtime and entry plus `--data-root <dir>`,
  since managed hosts have neither `orca` nor `orcad` on PATH and their
  data root is not the default. The hint is Linux-only.
- Both entry points take `--data-root` and `--json` and report one of
  none, eligible, refused or reclaimed, each with its own exit code
  (4, 2, 1, 0), so a missing lock never reads as a recovery.
- The evidence says nothing answers on this machine, and that the host
  name and boot checks cannot rule out another machine with the same
  name; --yes stays the gate.
- wss endpoints default to port 443, a same-boot branch that could never
  run is gone, and the supervisor's standby line points at the command.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(orcad): point the eligible message at the same command plus --yes

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* fix(orcad): refuse an empty --data-root, and name the right program in reclaim hints

- `--data-root` with no usable value (a trailing flag, an empty or blank
  string) prints usage and exits 1 on both entry points, never falling
  back to the default profile.
- A refusal raised while the reclaim command itself runs names
  `orca serve --reclaim-stale-lock`, not the binary the CLI runs under;
  an orcad still names its own runtime and entry.
- The supervisor's standby hint includes this profile's --data-root.
- The unreadable-lock test is skipped when running as root.

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

* test(cli): reuse the existing client stub for the --data-root refusal test

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>

---------

Co-authored-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>
2026-10-23 15:26:03 -07:00
Brennan BensonandGabriel Petrovic 18adb179b7 Keep Claude weekly usage from jumping back to an idle session’s old value (#32249)
* fix(usage): ignore an idle Claude session's older usage for the same window

Claude Code re-sends each session's last-seen rate limits to the statusline,
dropping only windows whose reset has passed. An idle session days old keeps
posting the current weekly window at the value it saw back then, so the
weekly figure flipped between that stale value and the current one while the
5-hour figure held. Usage inside one window only grows, so a lower value for
the same reset (or an earlier reset) is dropped, and a post with nothing newer
leaves the snapshot and the OAuth poll timing untouched.

Fixes STA-10493 (#28418). Ports the rule from #23421.

Co-authored-by: Gabriel Petrovic <243207667+gabba6@users.noreply.github.com>

* fix(usage): separate Claude display receipts from corrective checks

* fix(usage): honor Claude retry eligibility when selecting refreshes

* test: verify fresh usage checks after service recreation

---------

Co-authored-by: Gabriel Petrovic <243207667+gabba6@users.noreply.github.com>
2026-10-23 15:14:17 -07:00
OrcaWinandOrcaWin 3a3e9c4038 test: reuse maintenance worker setup for compatibility cases (#29761)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 15:12:12 -07:00
OrcaWinandOrcaWin bd0261d147 test: verify terminal chunk yields without waiting for Enter delay (#29752)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 15:03:46 -07:00
OrcaWinandOrcaWin 0797def856 test: isolate shutdown suites from unused application startup (#29703)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 15:03:43 -07:00
OrcaWinandOrcaWin ef91e89faf test: reduce mobile relay integration startup imports (#29624)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-23 14:56:32 -07:00