You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(plugins): workers can list and open workspaces, create and read terminals, launch agents - #37312
Full-access mods could react to Orca, but could not do much in it: they could not list workspaces, open a terminal or start an agent. Now a mod's worker can list and open workspaces, create and read terminals, and launch agents, through the same paths the orca CLI uses.
What Changed
New worker-only host methods (host API minor 3):
Method
Capability
Returns
workspace.list
workspace:read
host-qualified id, worktree/folder (project-group folders included), name, path, branch or null, hostId or null (at most 500, reports truncation)
{ terminalId } at once; the prompt is delivered in the background
Each call rechecks the plugin is still enabled right before Orca acts, and a worker's cancel or exit aborts the call. terminal.create runs in the background without taking focus, and a cut-off terminal.read says so.
The new capabilities follow the existing pattern: declared in the manifest, shown at install, worker-only. Engine floor 1.4.248.
No reimplementation:
These call the same runtime methods as orca worktree list, terminal create/read and agent launch, through the in-process dispatcher the browser automation path already uses.
So the host that owns the workspace (local, WSL or SSH) does the work, and folder workspaces are included.
Headless serve gets them too.
Generated typings, host-API and manifest docs, schemas and skill references, plus a recipe ("Driving workspaces, terminals and agents from a worker").
Why
Full modability needs mods to act on Orca, not only observe it: for example, a mod that opens a terminal per issue, or launches a reviewer agent when a workspace is created. Routing through the existing runtime methods keeps one implementation for the CLI and mods, including SSH.
Not here: editor.open and commands.run need the renderer to act and have no runtime method yet. They come in a follow-up.
Linked Issue
N/A (maintainer).
Visual Proof
N/A: worker API only; covered by tests.
Testing
One test per method: projection and params, including SSH hostId and the folder kind, the line cap, agent validation and background launch. Also capability, worker-only and no-runtime refusals, and a guard test that fails if a dispatched runtime method stops existing.
219 test files pass. pnpm tc, anti-slop, ast-grep, localization and freshness checks pass.
Risk
Level: Low. Additive and capability-gated; nothing changes for plugins that don't ask. Plain revert.
We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
Walkthrough
The Host API advances to version 1.3 and adds five worker-only methods for workspace, terminal, and agent actions. The change adds runtime RPC wiring and host bindings for these methods, including request and response validation and access checks. It also adds the workspace:write, agent:launch, and terminal:read capabilities, updates capability schemas and version metadata, and revises reference documentation, typings, bundled guides, and consent labels.
Merge Risk: Low · previous review c2d46
The new worker actions are mergeable with awareness that their runtime RPC contracts are not exercised end to end by the supplied tests.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: worker methods for listing and opening workspaces, creating and reading terminals, and launching agents.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description covers the core content well. The ELI5, What Changed (with a method/capability/returns table), Why, Testing, Risk (Low, plain revert), and Checklist are all filled in. The Linked Issue…
Full details: Description check
Explanation
The description covers the core content well. The ELI5, What Changed (with a method/capability/returns table), Why, Testing, Risk (Low, plain revert), and Checklist are all filled in. The Linked Issue section is marked N/A (maintainer), which is acceptable here because the template says maintainers should only attach pre-existing issues. Visual Proof is marked N/A with a reason (worker API only). The Review and AI Disclosure sections are not addressed. The Notes section asks to confirm no issues in security, cross-platform, SSH, mobile, backwards compatibility, and performance; the description touches SSH and backwards compatibility (additive, capability-gated) but does not explicitly cover security, cross-platform (Windows/Linux/macOS), mobile, or performance. The Testing section does not state which platforms were manually tested, and the manual-test box is unchecked. The Checklist omits the cross-platform/SSH and pnpm lint/typecheck/test/build items, though the author lists tests and checks run.
Full details: Docstring Coverage
Explanation
Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 7 functions across 18 files. (9 skipped: 9 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
This guard checks method names only, not the parameter or answer shapes.
The test confirms that each dispatched method name exists in ALL_RPC_METHODS. It does not check that the bindings send parameters the runtime accepts. It also does not check that the bindings parse the runtime answers. plugin-host-workspace-methods.test.ts mocks PluginRuntimeRpc, so no test sends the real parameters through RpcDispatcher. A schema mismatch fails only at run time. See the verification script on plugin-host-workspace-method-bindings.ts.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: b2ee63af-5bae-4132-8574-448956e6f9d6
Commits
Reviewing files that changed from the base of the PR and between 54b496c and c2d46d6.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
…nd agents
Host API minor 3 adds worker-only rows: workspace.list (workspace:read),
workspace.open (workspace:write), terminal.create (terminal:send),
terminal.read (terminal:read, at most 2,000 lines) and agent.launch
(agent:launch). Each dispatches the runtime RPC method the orca CLI calls,
in process with the CLI's identity, so it runs on the host that owns the
workspace (local, WSL or SSH) and covers folder workspaces. The new
capabilities arrive in 1.4.248; typings, docs and skill references are
generated from the table.
…target
- Each runtime effect re-checks the plugin's approval right before the
runtime acts (a dispatcher beforeInvoke hook, after its own waits), and a
worker's cancel or exit now aborts the call's signal through to the runtime.
- agent.launch starts the agent's CLI in a background terminal and returns
its handle at once; a prompt is delivered afterwards through the runtime's
own reuse-terminal path, so the host call never waits for the composer.
- workspace.list adds project-group folder workspaces and returns ids that
name their host (identity: keys), so twins on two hosts are never ambiguous.
- terminal.create passes presentation background; terminal.read counts a
runtime-limited read as truncated. workspace.open refuses folders as
unavailable until a window-side open lands.
…ne limits after rebasing on the hooks
Worker-only status bar and workspace methods spread into PLUGIN_HOST_API through
one module, the in-flight host call map moves into PluginWorkerHostCalls, and
bindPluginRuntime builds the runtime RPC so main-process-plugins.ts keeps its
size; regenerated docs and typings.
Co-Authored-By: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Full-access mods could react to Orca, but could not do much in it: they could not list workspaces, open a terminal or start an agent. Now a mod's worker can list and open workspaces, create and read terminals, and launch agents, through the same paths the
orcaCLI uses.What Changed
New worker-only host methods (host API minor 3):
workspace.listworkspace:readworktree/folder(project-group folders included), name, path, branch or null, hostId or null (at most 500, reports truncation)workspace.open({ workspaceId })workspace:write(new)terminal.create({ workspaceId, title?, command? })terminal:send{ terminalId }terminal.read({ terminalId, maxLines? })terminal:read(new)agent.launch({ workspaceId, agent, prompt? })agent:launch(new){ terminalId }at once; the prompt is delivered in the backgroundterminal.createruns in the background without taking focus, and a cut-offterminal.readsays so.orca worktree list,terminal create/readand agent launch, through the in-process dispatcher the browser automation path already uses.Why
Full modability needs mods to act on Orca, not only observe it: for example, a mod that opens a terminal per issue, or launches a reviewer agent when a workspace is created. Routing through the existing runtime methods keeps one implementation for the CLI and mods, including SSH.
Not here:
editor.openandcommands.runneed the renderer to act and have no runtime method yet. They come in a follow-up.Linked Issue
N/A (maintainer).
Visual Proof
N/A: worker API only; covered by tests.
Testing
pnpm tc, anti-slop, ast-grep, localization and freshness checks pass.Risk
Level: Low. Additive and capability-gated; nothing changes for plugins that don't ask. Plain revert.
Agent skill upstream boundary
Checklist
N/Afor visuals with reason