opencode

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package opencode binds the generated OpenCode target to its documented global direct-discovery layout. It does not invoke OpenCode's native plugin writer or edit any OpenCode configuration file.

Index

Constants

View Source
const (
	SkillsDirectory = "skills"
	AgentsDirectory = "agent"
	HooksDirectory  = "plugins"
	HookFile        = "pasture-hooks.ts"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigFile

type ConfigFile string

ConfigFile is an OpenCode global configuration filename. These facts are informational for callers and tests; this controller never mutates them.

const (
	LegacyConfigJSON ConfigFile = "config.json"
	OpenCodeJSON     ConfigFile = "opencode.json"
	OpenCodeJSONC    ConfigFile = "opencode.jsonc"
)

type Controller

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

Controller is an immutable OpenCode global activation binding.

func New

func New(configRoot string) (Controller, error)

New validates an absolute global config root and binds all three generated cells to independent direct-file destinations below it.

func (Controller) ConfigRoot

func (c Controller) ConfigRoot() string

func (Controller) Contract

func (Controller) Descriptor

func (c Controller) Descriptor() target.TargetDescriptor

func (Controller) Destination

func (c Controller) Destination(extension artifact.Extension) (string, error)

Destination returns the exact global discovery root for one extension.

type DiscoveryFacts

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

DiscoveryFacts freezes the direct-discovery and native-writer facts for the pinned OpenCode host without granting a configuration mutation API.

func DirectDiscoveryFacts

func DirectDiscoveryFacts() DiscoveryFacts

func (DiscoveryFacts) NativeWriterOrder

func (f DiscoveryFacts) NativeWriterOrder() []ConfigFile

func (DiscoveryFacts) ReadOrder

func (f DiscoveryFacts) ReadOrder() []ConfigFile

Jump to

Keyboard shortcuts

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