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 ¶
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 (c Controller) Contract() activation.ActivationContract
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