refactor(plugin):Merge OpenCode plugins#1859
refactor(plugin):Merge OpenCode plugins#1859tanyouqing wants to merge 4 commits intovolcengine:mainfrom
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
|
整体方向 +1,分层清晰,工具语义也设计得到位。merge 前几个 must-fix,后面是建议。 🔴 必修
🟡 强烈建议
💡 架构层面(不阻塞合并,可开 follow-up)读侧工具( |
Rename wrapper to .mjs, clean install docs, align README/INSTALL wording with the current directory layout, remove invalid README_ZH.md from package files, and pin @opencode-ai/plugin version.
79a6170 to
33f4ee7
Compare
ZaynJarvis
left a comment
There was a problem hiding this comment.
Nice work merging the split plugins into one unified package. Two suggestions:
-
Remove
autoStartServer— the plugin should only take an endpoint URL + API key. Decoupling from server lifecycle is cleaner and avoids the detached-process management problem (no PID tracking / no shutdown). -
Wrapper path assumption —
wrappers/openviking.mjsexports from"./openviking/index.mjs", which assumes the source-install directory layout. This will break when installed as an npm package. Consider adjusting or documenting the constraint.
Otherwise the architecture is solid — native OpenCode plugin API (event/tool/system.transform/messages.transform) is the right call over the shell-hook approach.
|
One more — the 10-minute auto-commit interval may not be the best trigger. Memories are already in the session context while the conversation is alive. Committing on a timer wastes cycles when context is intact. Consider committing only at context-loss boundaries (session end, compaction, context window pressure) instead of on a fixed interval. |
…to-start logic from the plugin runtime - Replace fixed-interval auto commits with lifecycle-boundary commits - Commit sessions on compaction, deletion, error, and plugin shutdown - Exclude source-install wrapper files from the npm package - Update docs to clarify wrapper usage and remove deprecated config fields
Description
Adds a unified OpenCode plugin package for OpenViking. The plugin merges repository retrieval and long-term memory capabilities into a package-style OpenCode plugin that can be enabled through OpenCode's plugin configuration.
Related Issue
N/A
Type of Change
Changes Made
examples/opencode-pluginas a unified OpenCode plugin package."plugin": ["openviking-opencode-plugin"].Testing
Checklist