Skip to content

fix(desktop): support Bun plugin runtime APIs#30324

Open
askforoneZY wants to merge 1 commit into
anomalyco:devfrom
askforoneZY:fix/desktop-bun-plugin-runtime
Open

fix(desktop): support Bun plugin runtime APIs#30324
askforoneZY wants to merge 1 commit into
anomalyco:devfrom
askforoneZY:fix/desktop-bun-plugin-runtime

Conversation

@askforoneZY
Copy link
Copy Markdown

@askforoneZY askforoneZY commented Jun 2, 2026

Issue for this PR

Closes #25880

Related: #25824, #28287, code-yeongyu/oh-my-openagent#4662

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Desktop runs server plugins inside Electron's Node sidecar, so Bun-targeted plugins can fail before their config hooks register agents or commands. This PR adds a small compatibility layer for the Bun runtime APIs hit by current desktop plugin failures (Bun.serve and Bun.which).

It also initializes plugin config hooks before the agent and command catalogs are built. That lets plugin-provided agents and slash commands appear in Desktop after the plugin loads.

How did you verify your code works?

  • Reproduced the Desktop sidecar showing only built-in agents/commands while the plugin was configured.
  • Reproduced the plugin load failure from oh-my-openagent@4.6.0 requiring Bun.serve under Electron/Node.
  • Rebuilt the opencode Node sidecar bundle and verified the Electron-run sidecar listed OMO agents and commands, including /start-work.
  • Ran bun.cmd typecheck from packages/opencode in the original package workspace after the same source changes.
  • Ran git diff --check on this clean PR branch.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Jun 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@askforoneZY askforoneZY changed the title fix(opencode): support Bun plugin runtime APIs in desktop fix(desktop): support Bun plugin runtime APIs Jun 2, 2026
@github-actions github-actions Bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Jun 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

Desktop v1.14.39: Bun-target plugins fail to load (Node.js sidecar lacks Bun APIs)

1 participant