opencode

package
v0.50.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package opencode implements the OpenCode platform adapter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter is the OpenCode platform adapter.

func New

func New() *Adapter

New creates an adapter rooted at the current directory.

func NewWithRoot

func NewWithRoot(root string) *Adapter

NewWithRoot creates an adapter rooted at the specified path.

func (*Adapter) CLIBinary

func (a *Adapter) CLIBinary() string

func (*Adapter) Clean

func (a *Adapter) Clean(_ context.Context) error

Clean removes files created by this adapter.

func (*Adapter) Detect

func (a *Adapter) Detect(_ context.Context) (bool, error)

Detect checks whether the opencode binary is installed in PATH.

func (*Adapter) Generate

Generate creates OpenCode platform files based on the harness config.

func (*Adapter) InjectOrchestraPlugin

func (a *Adapter) InjectOrchestraPlugin(scriptPath string) error

InjectOrchestraPlugin preserves legacy external callers by appending a plugin path.

func (*Adapter) InstallHooks

func (a *Adapter) InstallHooks(_ context.Context, hooks []adapter.HookConfig, _ *adapter.PermissionSet) error

InstallHooks updates OpenCode plugin wiring for the provided hooks.

func (*Adapter) Name

func (a *Adapter) Name() string

func (*Adapter) SupportsHooks

func (a *Adapter) SupportsHooks() bool

func (*Adapter) Update

Update updates OpenCode files based on the manifest diff.

func (*Adapter) Validate

func (a *Adapter) Validate(_ context.Context) ([]adapter.ValidationError, error)

Validate checks the validity of installed OpenCode files.

func (*Adapter) Version

func (a *Adapter) Version() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL