Skip to content

feat(plugin): add session webview bridge and file write actions - #15749

Closed
alotth wants to merge 3 commits into
anomalyco:devfrom
alotth:feat/plugin-bridge
Closed

alotth wants to merge 3 commits into
anomalyco:devfrom
alotth:feat/plugin-bridge

Conversation

@alotth

@alotth alotth commented Mar 2, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #15747

Type of change

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

What does this PR do?

This PR introduces a plugin session webview bridge and related plumbing so plugins can expose session UI and communicate with the host in a request/response flow.

Main changes:

  • Adds plugin session UI contributions via ui.session.tabs and ui.session.buttons
  • Adds bridge protocol events (opencode.bridge.host, opencode.bridge.request, opencode.bridge.response)
  • Adds base bridge file operations, including file.write with optimistic concurrency (expectedHash)
  • Serves plugin webview assets through global plugin routes
  • Allows CORS preflight for global plugin paths
  • Updates docs for plugin bridge usage and desktop troubleshooting

Context:

How did you verify your code works?

  • Ran repository pre-push checks locally (including bun turbo typecheck)
  • Pre-push hook completed successfully before pushing branch updates

Screenshots / recordings

Session side-panel / webview integration updates are included in this PR.

If maintainers want, I can attach a short recording in a follow-up comment.

Checklist

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

@alotth
alotth requested a review from adamdotdevin as a code owner March 2, 2026 18:42
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 2, 2026
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Mar 2, 2026
@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

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

@alotth

alotth commented Mar 5, 2026 •

Copy link
Copy Markdown
Author

Im motivate to do this, because I'm working now in orchestration of the agents by visualizing the kanban tasks and roadmaps, integrating on opencode by this plugin https://github.com/alotth/mapctx/tree/main/packages/opencode-plugin with the patterns that this PR adds.

image

@alotth
alotth force-pushed the feat/plugin-bridge branch from 09399d9 to 3b3c033 Compare March 9, 2026 19:42
@alotth
alotth force-pushed the feat/plugin-bridge branch from 3b3c033 to e057a8a Compare March 30, 2026 22:31
@rekram1-node

Copy link
Copy Markdown
Collaborator

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

@jensenojs

Copy link
Copy Markdown
Contributor

I'm a little disappointed to find out that this PR has been closed.

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.

[FEATURE]: Add plugin session webview bridge with safe file write and global asset routing

3 participants