diff options
| author | GoldJohnKing <GoldJohnKing@live.cn> | 2026-08-07 20:16:01 +0800 |
|---|---|---|
| committer | GoldJohnKing <GoldJohnKing@live.cn> | 2026-08-07 20:18:03 +0800 |
| commit | 2ee628174705a5db2dcd1bf2eeafe295a8fb48b7 (patch) | |
| tree | 593a5c9d38ed331aeb724f6eb84784f1a40e5047 /.codex-plugin | |
| parent | c367f804bbf136a8a2814252c94dd286ed1c9a67 (diff) | |
feat(opencode): add V2 (opencode2) plugin compatibility
Add dual V1/V2 support to the OpenCode plugin. The same source file now
works on both OpenCode V1 (opencode) and V2 (opencode2) without version
detection at runtime.
V2 changes:
- Add default export { id, server, setup } for V2 PluginSupervisor
- setup() registers skills via ctx.skill.transform() (V2 native API)
- setup() injects bootstrap via ctx.session.hook('context') (V2 equivalent
of V1's experimental.chat.messages.transform)
- config hook guards against V2 array-format skills to avoid conflicts
Both APIs confirmed active at runtime via diagnostics in the V2 beta.
No external dependencies added — pure JavaScript throughout.
Docs updated with V2 install instructions, OPENCODE_CONFIG_DIR side-by-side
setup, and accurate How It Works section for both versions.
Diffstat (limited to '.codex-plugin')
0 files changed, 0 insertions, 0 deletions
