Files
opencode-toolkit/REQUIREMENTS.md
T

1.1 KiB

Requirements

Plugin loading and tools

  • OpenCode V2 must load the plugin from the consuming project's installed local package directory without trying to download the provisional package name from npm.
  • The package root must expose an OpenCode-loadable JavaScript entrypoint.
  • Register toolkit_project_status in the toolkit Code Mode namespace. The tool must report the current project and VCS status through OpenCode's V2 API without mutating project state.

Installation safety

  • Register the plugin with a config-relative path that works with either opencode.json or .opencode/opencode.json.
  • Migrate an installer-owned legacy npm-name entry on update, and remove only the installer-owned local path on uninstall.
  • Preserve JSONC comments and unrelated plugin entries; do not overwrite unmanaged project files.

Verification

  • Keep unit and installer tests deterministic and independent of external model providers.
  • Verify plugin activation and tool execution on OpenCode 2.0.24 using a local mock OpenAI-compatible endpoint; do not make a paid or remote provider call as part of deterministic validation.