Inside OpenCode V1/V2 Plugin Loading: One Package for Two Versions and Local Debugging
OpenCode V1 and V2 use fundamentally different plugin mechanisms, and their plugin definitions are not interchangeable. However, the official migration guide provides a dual-version plugin pattern: by exposing separate V1 and V2 entry points, one npm package can support both versions. This article explains the differences between local directories, npm packages, and server entry points through concrete examples, then presents a packaging strategy for dual-version plugins.
Read article