feat(plugin): improve OpenCode plugin robustness with availability checks#58
Merged
hmans merged 2 commits intohmans:mainfrom Jan 16, 2026
Merged
feat(plugin): improve OpenCode plugin robustness with availability checks#58hmans merged 2 commits intohmans:mainfrom
hmans merged 2 commits intohmans:mainfrom
Conversation
…ecks - Check if beans CLI is installed before attempting to run commands - Verify project has beans configuration before loading prime - Handle errors gracefully when beans is unavailable - Use correct working directory for beans commands - Switch to single quotes for consistency This prevents the plugin from failing in projects without beans or when the beans CLI is not installed.
Owner
|
Hi, this is a useful change, thanks! |
hmans
added a commit
to divaltor/beans
that referenced
this pull request
Jan 17, 2026
* origin/main: feat(tui): Two-column layout with detail preview (hmans#42) feat: add ETag support for optimistic concurrency control (hmans#59) feat(plugin): improve OpenCode plugin robustness with availability checks (hmans#58) feat(cli): Add --prefix flag to create command (hmans#56) chore: clean up README.md docs: only push prime if it exists (hmans#52) fix: normalise short IDs when storing relationship links (hmans#50)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Improves the OpenCode Beans Prime plugin to gracefully handle cases where the beans CLI is not installed or the current project is not configured to use beans.
Changes
which beans) and that the project has beans configured (beans check) before attempting to load prime contentdirectoryparameter to run beans commands in the correct project contextWhy
Previously, the plugin would fail if:
This made the plugin unreliable for general use. With these changes, the plugin now works seamlessly across all projects, only injecting beans prime content when it's actually available and appropriate.
Testing
To test this PR: