Skip to content

feat(opencode): add hook-only installation mode - #3734

Open
zrh805 wants to merge 2 commits into
volcengine:mainfrom
zrh805:codex/opencode-hook-only-mode
Open

feat(opencode): add hook-only installation mode#3734
zrh805 wants to merge 2 commits into
volcengine:mainfrom
zrh805:codex/opencode-hook-only-mode

Conversation

@zrh805

@zrh805 zrh805 commented Aug 4, 2026

Copy link
Copy Markdown

Description

Adds an opt-in hook-only mode for the OpenCode plugin. The default remains unchanged: the plugin registers its bundled stdio MCP proxy.

Set mcp.enabled to false in openviking-config.json to retain repository context, automatic recall, message capture, and lifecycle commits without adding or overwriting OpenCode's mcp.openviking entry.

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

Fixes #3690

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Add mcp.enabled, defaulting to true, to the OpenCode plugin configuration.
  • Skip bundled MCP registration without mutating existing OpenCode MCP configuration when hook-only mode is enabled.
  • Document the option in English and Chinese installation guides, with configuration, injection, and plugin-entrypoint regression tests.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes

Validated with npm test (23 passing tests) and npm run check in examples/opencode-plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

[Feature]: Support optional hook-only installation for the OpenCode plugin

1 participant