OpenCode DevContainer Feature: Add Gemini Authentication Plugin#2
Merged
OpenCode DevContainer Feature: Add Gemini Authentication Plugin#2
Conversation
e6b80cd to
959e3a0
Compare
Add opencode configuration and npm dependency so the gemini auth plugin is installed with the feature by default. Require the node feature and run the on-create hook to guarantee npm is present and emit setup status as the container initializes. Signed-off-by: Svetlin Ralchev <iamralch@users.noreply.github.com>
959e3a0 to
80dd1f7
Compare
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.
1. High-Level Summary
What changed:
This PR enhances the OpenCode devcontainer feature by integrating the
opencode-gemini-authplugin. It adds a configuration file, an onCreatelifecycle hook, updates feature dependencies, and installs the authentication
plugin globally via npm.
Why it changed:
To enable Gemini authentication support out-of-the-box when using the OpenCode
devcontainer feature, providing a smoother developer experience for users who
need Gemini API integration.
2. Detailed Technical Breakdown
2.1 Behavior & Execution Flow
After this change, the OpenCode devcontainer feature:
common-utilsandnodefeatures (ensuring npm isavailable)
opencode-gemini-authglobally via npmhooks/on-create.shwhen the devcontainer is createdopencode-gemini-authplugin via the newopencode.jsonconfiguration file2.2 Key Modifications
config/opencode.jsondevcontainer-feature.jsonhooks/on-create.shinstall.shopencode-gemini-auth2.3 Design Considerations
feature to ensure npm is available before attempting plugin installation
system-wide within the container
onCreateCommandallows for future extensibilityof container initialization logic
opencode.jsonfile follows OpenCode'splugin system, keeping configuration declarative
2.4 Assumptions & Edge Cases
install, the npm command will fail
container build
install.shindentation was changed from spacesto tabs, which is a style inconsistency to note
on-create.shscript currently only echoes amessage and may need actual implementation
3. Impact Assessment
installations within devcontainers
time
opencode-gemini-auth)which could fail if the package is unavailable or npm registry is unreachable
users should verify the plugin's security practices
automatically
future initialization logic