fix(opencode): restore external plugin loading in Plugin.init() (#408)#409
Merged
fix(opencode): restore external plugin loading in Plugin.init() (#408)#409
Conversation
- Replace stub Plugin.init() with real implementation that loads internal and external plugins - Create SDK client with Server.App().fetch adapter for in-process routing - Respect OPENCODE_DISABLE_DEFAULT_PLUGINS flag for internal plugins - Load external plugins via PluginLoader.loadExternal() with error reporting - Reset hooks on re-init to prevent accumulation - Fix pre-existing as any casts: use PluginModule type and keyof Hooks - Remove unused imports (Session, NamedError, errorMessage) - Add plugin-loading feature entry to fork-features manifest - Add plugin-loading tests with mockConfig helper
- Replace Promise.resolve() with async/await on fetch adapter for proper error propagation - Remove explicit Config.PluginOrigin[] type annotation, use TypeScript inference
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.
What happened
Plugin.init() was a stub that only logged 'plugin system stub - init called'. External plugins from ~/.config/opencode/plugins/ were never loaded.
What changed
Quality Gates
Fixes #408