Skip to content

Install and update Orca's skills on paired servers and SSH hosts - #31867

Merged
Jinwoo-H merged 66 commits into
mainfrom
jinwoo/bundled-skill-install-remote
Oct 23, 2026
Merged

Jinwoo-H merged 66 commits into
mainfrom
jinwoo/bundled-skill-install-remote

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​713 $\color{#cf222e}{\Huge{\mathbf{−}}}$​62 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​651
Prod 34 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​580 $\color{#cf222e}{\Huge{\mathbf{−}}}$​188 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​392

Stacked on #31688 (local switch), which is stacked on #31662 (the installer). Review those first; this PR's diff is against #31688's branch.

ELI5

Orca now updates its own skills (orca-cli, orchestration, ...) itself instead of running npx skills add. Until this PR that only worked for skills on this computer. Many people run their agents somewhere else: a paired Orca server or an SSH host. This PR lets the same Update skills flow plan and update the skills where the agents actually run.

What Changed

Before: with a paired server or SSH host focused, Orca showed no skill update badge, nudge or status for that machine. Updating meant opening a terminal there and running npx.

After:

  • Paired servers and SSH hosts (every SSH host runs Orca's own server, orcad, reached as a paired runtime): the nudge, the Update skills dialog, Replace and the result line work as on this computer, but against the server's disk. The server plans its own home with its own files. This computer's skill folders are never read or written for it.
  • An older server (one that does not know this feature): the skill status shows Update Orca on the server, and Update is not offered. A server that cannot be reached is shown as an error, not as an older server.
  • WSL projects: unchanged from main: no update badge, nudge or Update dialog. WSL is moving to run Orca's own server inside the distro (the WSL-host work behind ORCA_INTERNAL_WSL_HOSTS). Once that ships, WSL projects use this same server path, with no WSL-specific installer code.
  • Direct SSH workspaces without a paired server, WSL projects, and workspaces whose owner hasn't loaded yet show no plan at all. Orca never falls back to planning this computer for them.
  • Results are kept per machine: a run on one host never shows as another's, and Replace choices are cleared when the host changes.

Mechanism:

  • New capability skills.bundled-orca.v1 and two RPC methods: skills.planBundledOrca({ force?, names? }) returns the host's plan (without names it updates what is installed; with names it installs those bundled skills for the host's agents, like orca skills install <names>, and the host rejects a name it does not ship), and skills.executeBundledOrca({ planDigest, request }) re-plans under the host's locks and runs only if the digest still matches (same contract as the local IPC). Neither accepts a WSL target or operations, so a client cannot point a server at anything but its own home.
  • The renderer resolves one target per window (lib/bundled-skill-target.ts): the active workspace's host if it is paired, else the focused paired runtime, else this computer. A WSL project, or an active workspace whose owner hasn't loaded yet, gets no target. Every surface (nudge, dialog, pill, run store, re-plan on Replace) uses that target. runtime-bundled-skills-client.ts routes it: this computer over IPC, paired hosts over RPC after a capability check.

Wire compatibility:

  • New client, old server: the client reads the server's capability list first. If the server lacks skills.bundled-orca.v1, the client shows Update Orca on the server and never calls the new methods. If the status probe fails, the client shows an error instead.
  • Old client, new server: old clients never call the new methods. skills.discover and the existing skills.* methods are unchanged, and an old client's terminal npx install still lands on the server's disk.
  • The request is { force?, names? }, strict and frozen with v1, so a later field needs a new capability. Execute carries the same request, so a plan previewed with different names is refused as changed. Op and reason values are frozen too; a client shows a value it does not know as Needs attention (already in Add Orca's own bundled-skill planner and installer (not wired in yet) #31662's summary).

Why

The plan has to be made on the machine whose disk it describes. Shipping a remote filesystem API would have meant symlink, readlink and rename over a wire, and SSH no longer has a relay filesystem at all. Since every SSH host and paired server already runs Orca, it can run the same planner on its own disk and send back the same plan and digest. An earlier revision also reached WSL distros directly through wsl.exe; it was removed because WSL is becoming an Orca server host, which this path already covers.

Deviations from the design doc (design-rev4):

  • The setup-surface status pills now show for paired hosts too, because that is where Update Orca on the server appears. They stay off for WSL projects.
  • A paired Windows server whose own agents run in WSL plans its Windows home. The RPC has no WSL target, by design.

Linked Issue

Refs #28914. Part of the bundled-skill installer stack (#31662, #31688).

Visual Proof

Real dev builds with hidden windows (Playwright, CDP screenshots), an isolated headless Orca server, and an isolated server home holding a real npx [email protected] install of an older Orca release (Claude-only, with computer-use edited by hand). Before this PR, none of this UI appeared for a paired server.

Paired server, nudge: (screenshot removed: contained real product data)
Paired server, before Update: (screenshot removed: contained real product data)
Paired server, after Update: (screenshot removed: contained real product data)
Older server (built from #31688, no capability): (screenshot removed: contained real product data)

After Update, the server's orca-cli and orchestration held this build's bytes, computer-use was left alone, and the client's own home had no skill folders.

Testing

  • Automated:

    • RPC contract tests: permissions; no WSL field and no ops accepted; plan, then execute that digest over a JSON round trip; a disk change after preview returns changed and writes nothing.
    • Client tests: an old server is unsupported; a failed probe is an error; a paired host is never planned locally.
    • Target resolution: paired host, active SSH-runtime workspace, direct SSH, WSL project (no target), restored SSH/paired/folder workspaces whose owner hasn't loaded (no target, never this computer).
    • Target switching in useSkillFreshness.
  • Real runs:

  • Ran: pnpm tc, the touched test suites, check:code-quality:changed, oxlint, oxfmt --check, RPC catalog, localization, reliability gates, ratchets, the other check-*.mjs scripts and anti-slop.

  • Not run: orcad itself as the server on this Mac. Its own build smoke fails here on a file-watcher readiness timeout, unrelated to this change. The method is in the orcad bundle, and Update Orca's skills with Orca's own installer instead of npx skills #31688's node-server test covers the planner in orcad.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

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)

One planner decides what installing Orca's bundled skills does to each
target folder; execute re-plans under per-path locks and runs only a plan
whose digest still matches; a shared summary derives badge, wording and
exit code. A copy counts as Orca's untouched one only when its SKILL.md
bytes match a version some build shipped (resources/skills/released-digests.json,
generated from git history and checked add-only).

Nothing calls this yet; the npx path is unchanged.
A leave is no longer a failure: the outcome line says what happened plus
"N left alone: <reason>", and the exit code is 1 only for a failed or
changed op. Backups for every scope go to <home>/.agents/.orca-skill-backups
on the executing host, so a project Replace never writes into the repo;
moving there falls back to copy, verify, then remove across filesystems.
The app's Update skills dialog, badge, nudge and status pills now read the
bundled-skill plan and summary, and Update executes the reviewed plan's
digest. `orca skills install|update` runs the same planner in-process with
--dry-run, --force, --json and per-summary exit codes. Removes both npx
spawn sites, the freshness inventory modules and the npx round-trip CI.
…p and CLI

installedOnly now drops every location that holds nothing (keeping the shared slot
only when an existing agent link points at it), so Update never adds a skill for
another agent. The app and CLI resolve the Claude skills folder through the same
rule in localBundledSkillInput; a test asserts both plan identically.
…gent

summarizeBundledSkillPlan now returns each skill's locations, labelled by
agent (or "Shared folder") with a ~-collapsed path; the dialog shows one row
per skill that needs something, collapses up-to-date skills into one line, and
lists every location behind "Show all locations". The result reads "Updated N
skills · M left alone". Under installedOnly a Replace with no shared copy
replaces in place instead of adding one.
…nder

Split the update dialog's rows, headline and footer into components, move the Update label
next to the other plan copy, and use z.strictObject for the request schemas.
The orcad bundle rejects a literal non-ASCII character in a regex.
Drop the deleted roundtrip workflow's group from the closed-PR cancellation fixture.
…nd runs apart, never boot WSL for a background check
…tch' into jinwoo/bundled-skill-install-remote
…s on Windows

Directory links in fixtures are junctions on Windows, which need no
Developer Mode; the one file-link fixture is skipped there.
…d-skill-install-remote

# Conflicts:
#	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/pt.json
#	src/renderer/src/i18n/locales/zh.json
…skill-install-switch

# Conflicts:
#	src/main/skills/bundled-skill-install/plan.ts
…d-skill-install-remote

# Conflicts:
#	src/renderer/src/components/skills/SkillFreshnessUpdateDialog.tsx
#	src/renderer/src/components/skills/skill-update-run-store.ts
#	src/renderer/src/components/status-bar/SkillUpdateStatusSegment.tsx
…install-switch

# Conflicts:
#	src/main/skills/bundled-skill-install/layouts.test.ts
#	src/main/skills/bundled-skill-install/plan.ts
#	src/main/skills/bundled-skill-install/service.ts
#	src/main/skills/bundled-skill-install/skill-home.test-support.ts
#	src/shared/bundled-skill-plan.ts
#	src/shared/bundled-skill-summary.test.ts
#	src/shared/bundled-skill-summary.ts
@Jinwoo-H
Jinwoo-H changed the base branch from jinwoo/bundled-skill-install-switch to main October 23, 2026 02:35
…tch' into jinwoo/bundled-skill-install-remote
…install-remote

# Conflicts:
#	src/main/ipc/skills.test.ts
#	src/main/ipc/skills.ts
#	src/main/runtime/runtime-bundled-skill-install.ts
#	src/preload/api/agent-skill-api.ts
#	src/renderer/src/components/floating-terminal/FloatingTerminalOrchestrationDialog.freshness.test.tsx
#	src/renderer/src/components/settings/use-settings-store-model.ts
#	src/renderer/src/components/skills/SkillFreshnessNudge.test.tsx
#	src/renderer/src/components/skills/SkillFreshnessNudge.tsx
#	src/renderer/src/components/skills/SkillFreshnessStatusPill.tsx
#	src/renderer/src/components/skills/SkillFreshnessUpdateDialog.test.tsx
#	src/renderer/src/components/skills/SkillFreshnessUpdateDialog.tsx
#	src/renderer/src/components/skills/skill-update-run-store.ts
#	src/renderer/src/components/skills/use-reviewed-skill-plan.ts
#	src/renderer/src/components/status-bar/SkillUpdateStatusSegment.test.tsx
#	src/renderer/src/components/status-bar/SkillUpdateStatusSegment.tsx
#	src/renderer/src/hooks/useSkillFreshness.test.tsx
#	src/renderer/src/hooks/useSkillFreshness.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/pt.json
#	src/renderer/src/i18n/locales/zh.json
#	src/shared/bundled-skill-plan.ts
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@Jinwoo-H
Jinwoo-H merged commit fa71556 into main Oct 23, 2026
41 checks passed
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.

1 participant