Documentation
¶
Overview ¶
Package opencode is the first-party SkillOps hook installer for OpenCode. Unlike the JSON-hooks agents, OpenCode loads JS plugins, so installation drops an embedded quiver.js into ~/.config/opencode/plugins/ that shells out to `qvr _hook opencode <type>`.
Index ¶
- Constants
- type Adapter
- func (a *Adapter) Detect() (ops.DetectionResult, error)
- func (a *Adapter) DisplayName() string
- func (a *Adapter) Install(opts ops.InstallOptions) (ops.InstallResult, error)
- func (a *Adapter) Name() string
- func (a *Adapter) Status() (ops.HookStatus, error)
- func (a *Adapter) Uninstall(opts ops.UninstallOptions) (ops.UninstallResult, error)
Constants ¶
const AgentName = "opencode"
AgentName is the dispatch key: `qvr _hook opencode <type>`.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct{}
Adapter implements ops.HookInstaller.
func (*Adapter) Detect ¶
func (a *Adapter) Detect() (ops.DetectionResult, error)
Detect reports whether OpenCode's config dir exists.
func (*Adapter) DisplayName ¶
func (*Adapter) Install ¶
func (a *Adapter) Install(opts ops.InstallOptions) (ops.InstallResult, error)
Install writes the embedded plugin to ~/.config/opencode/plugins/quiver.js.
func (*Adapter) Status ¶
func (a *Adapter) Status() (ops.HookStatus, error)
Status reports whether the plugin is present and references qvr.
func (*Adapter) Uninstall ¶
func (a *Adapter) Uninstall(opts ops.UninstallOptions) (ops.UninstallResult, error)
Uninstall removes the plugin file, restoring a pre-install backup when one exists (so a user's own quiver.js, if any, is preserved).