Personal blog / Field notes

JavaYu.

Notes on technology, ideas, and continuous learning.

Recent writing

14
  1. OpenCode / Open Source / Software Architecture / Plugins / TypeScript

    Announcing opencode-models-discovery v2.0.0

    opencode-models-discovery v2.0.0 is officially released! This article serves as both a major release announcement and complete migration guide from V1 to V2, as well as the concluding overview for the 'OpenCode Plugins V1 to V2 Architecture Evolution' series. Explore native V2 support, credential management via Integration API, persistent state via Host Storage, Server/TUI RPC decoupling, and zero-restart console controls.

    Read article
  2. OpenCode / Software Architecture / RPC / TUI / Plugins / TypeScript

    How to Build Modern OpenCode Plugin UIs: Decoupling Server and TUI via the V2 RPC Architecture

    The third critical boundary shift from OpenCode plugins V1 to V2: how should responsibilities be divided between the user interface and backend business logic? Why should a simple model refresh never pollute the Agent conversation session? This article explores the architectural evolution from config-injected commands and synthetic messages to native TUI keymaps, strongly typed RPC contracts, and the zero-restart Discovery Console.

    Read article
  3. OpenCode / Software Architecture / Storage Design / Plugins / TypeScript

    Where Should Plugin State Live in OpenCode? From XDG File Caching to Host Storage

    The second critical boundary shift from OpenCode plugins V1 to V2: where should persistent plugin state actually live? This article explores how plugins moved from managing XDG directories, JSON serialization, and atomic renames in V1 to leveraging host-managed Storage abstractions, business-defined caching policies, and dual-lifecycle isolation in V2.

    Read article
  4. OpenCode / Security Architecture / Credential Management / Plugins / TypeScript

    Who Owns Plugin Credentials in OpenCode? From Auth-File Sniffing to the Integration API

    The first critical boundary shift from OpenCode plugins V1 to V2: who owns the credentials? This article dives into the transition from sniffing XDG auth.json credential files and environment variables in V1 to leveraging the declarative Integration Connection API, isolated secret lifecycles, and strict override guards in V2.

    Read article
  5. OpenCode / Architecture / Plugins / TypeScript / Open Source

    From Config Hooks to Server/TUI: The Architecture Evolution of OpenCode Plugins from V1 to V2

    Moving from OpenCode V1 to V2 is far more than swapping API names—it is a fundamental redistribution of responsibilities between host and plugin. Drawing from real-world model discovery plugin experience, this article breaks down the shift from config hooks, filesystem auth, and XDG caching to Provider Transforms, Host Storage, the Integration API, and Server/TUI RPC.

    Read article
View all writing