Answer: To replace the entrypoint when porting an opencode V1 plugin to V2, change the package import, replace the exported plugin function with Plugin.define, and move initialization into setup. Status: Confirmed Entry: tool/opencode/integrations/replace-plugin-entrypoint Revision: 1 Digest: sha256:1e5f4add5863a723 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:55:52Z Last changed: 2026-11-13T03:55:52Z Last verified: 2026-11-20T13:44:39Z Next check: 2026-11-21T13:44:39Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of replacement method | Plugin.define | [1] | 2026-11-20 initialization location | setup | [1] | 2026-11-20 package import change | Change the package import | [1] | 2026-11-20 V2 import | @opencode/plugin | [1] | 2026-11-20 required plugin id | stable id | [1] | 2026-11-20 Sources: [1] opencode. "Migrate plugins from V1 | OpenCode". https://opencode.ai/docs/build/plugins/migrate-v1/ Role: primary. Accessed: 2026-11-20T13:44:39Z Quote: "replace the exported plugin function with Plugin.define" (Supports: replacement method) Quote: "move initialization into setup" (Supports: initialization location) Quote: "Change the package import" (Supports: package import change) Quote: "import { Plugin } from "@opencode/plugin"" (Supports: V2 import) Quote: "Every V2 plugin needs a stable id ." (Supports: required plugin id) Snapshot SHA-256: db1439aa8b57731696e9ec9c27b28c80bc13d20443cbb0a07a179685f7003acc (captured 2026-11-13T03:55:52Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:55:52Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:44:39Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:44:39Z Last attempt: 2026-11-20T13:44:39Z Notes and limitations: Extracted automatically from a single official source (section "Replace the entrypoint"). Related: https://latestn.com/tool/opencode/integrations/rpc-schema-validation How do I validate RPC input and output schemas in opencode Effect plugins? https://latestn.com/tool/opencode/integrations/run-opencode-as-acp-agent-in-zed How do I run opencode as an ACP agent in Zed? https://latestn.com/tool/opencode/integrations/server-info-endpoint How do I get opencode server info via the API? https://latestn.com/tool/opencode/integrations/raycast-extension-api-key-setup How do I configure the OpenCode extension for Raycast with an API key? https://latestn.com/tool/opencode/integrations/redeem-pairing-code How do I redeem an opencode pairing code? https://latestn.com/tool/opencode/integrations/register-hooks-in-setup How do I register hooks in setup for an opencode V2 plugin? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:55:52Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/integrations/replace-plugin-entrypoint/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/opencode/integrations/replace-plugin-entrypoint POST: https://latestn.com/dispute/tool/opencode/integrations/replace-plugin-entrypoint with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/integrations/replace-plugin-entrypoint?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I replace the entrypoint when porting an opencode V1 plugin to V2? Revision 1, last verified 2026-11-20T13:44:39Z. https://latestn.com/tool/opencode/integrations/replace-plugin-entrypoint (accessed 2026-11-21T09:50:21Z). @misc{LatestN_tool_opencode_integrations_replace_plugin_entrypoint_r1, title = {How do I replace the entrypoint when porting an opencode V1 plugin to V2?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/integrations/replace-plugin-entrypoint}}, note = {Revision 1; digest sha256:1e5f4add5863a723; last verified 2026-11-20T13:44:39Z; accessed 2026-11-21T09:50:21Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/opencode/integrations/replace-plugin-entrypoint