Help us shape the future of Go! Take the 2026 Go Developer Survey

opencodeplugin

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Definition

type Definition struct {
	ID          model.OpenCodeCommunityPluginID
	Name        string
	PackageName string
	RepoURL     string
	Owner       string
	Repo        string
	Description string
}

type Result

type Result struct {
	Changed bool
	Files   []string
}

func Install

func Install(homeDir string, id model.OpenCodeCommunityPluginID) (Result, error)

type UninstallResult

type UninstallResult struct {
	PluginID           model.OpenCodeCommunityPluginID
	ChangedTUI         bool
	ChangedPackageJSON bool
	ChangedNodeModules bool
	CacheEntryRemoved  string   // absolute path of removed cache entry, or "" if none
	NodeModulesPath    string   // absolute path of node_modules/<pkg> removed, or ""
	TSXPath            string   // absolute path of .tsx file removed (GentleLogo only), or ""
	CleanupPending     []string // staged paths left after a post-commit cleanup failure
	JournalManifest    []mutationjournal.OwnedFile
}

UninstallResult summarizes what the 4-layer engine touched.

func Uninstall

Uninstall removes a community plugin across up to 4 layers: tui.json, package.json, node_modules/<pkg>, and the matching cache entry under ~/.cache/opencode/packages/<pkg>@latest. Built-in GentleLogo swaps the NPM layers for a single .tsx removal. Files use compare-and-swap journal writes; directories are renamed to reversible staging paths until the operation commits. A post-commit staging cleanup failure is reported in CleanupPending.

type UnsupportedLogoError

type UnsupportedLogoError struct{}

UnsupportedLogoError reports the accepted V2 omission without installing or relocating branding. Pipeline callers classify this as skipped, not success.

func (UnsupportedLogoError) Error

func (UnsupportedLogoError) Error() string

func (UnsupportedLogoError) SkipReason

func (e UnsupportedLogoError) SkipReason() string

Jump to

Keyboard shortcuts

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