Documentation
¶
Overview ¶
Package opencode reads the project-scoped OpenCode V2 model catalog.
Index ¶
Constants ¶
const ( Executable = "opencode2" RuntimeVersionPrefix = Executable + " v0.0.0-beta-" MinimumBetaBuild = 18314 MinimumVersion = RuntimeVersionPrefix + "18314" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct {
Models []Model
}
Catalog is the currently enabled, agent-capable model catalog for one repository.
type LoadedSkill ¶ added in v0.10.0
LoadedSkill is the safe subset of one live OpenCode skill. Its source location is deliberately not retained: compatibility depends on content, not where OpenCode loaded it from.
type Model ¶
Model is the safe subset of an available OpenCode model. Provider settings, headers, credentials, account identifiers, and request bodies are never retained.
type SelectionCheck ¶
SelectionCheck reports whether one configured OpenCode role is present in the project-scoped live catalog.
func CheckSelections ¶
func CheckSelections(roles config.Roles, catalog Catalog) []SelectionCheck
CheckSelections checks all six configured roles in configuration order. It never includes other catalog entries in diagnostics.
type SkillCatalog ¶ added in v0.10.0
type SkillCatalog struct {
Skills []LoadedSkill
}
SkillCatalog is OpenCode's winning live skill set for one repository.
func ReadSkillCatalog ¶ added in v0.10.0
func ReadSkillCatalog(ctx context.Context, runner execx.Runner, directory string) (SkillCatalog, error)
ReadSkillCatalog returns the repository-scoped live OpenCode skill catalog. It verifies that OpenCode answered for directory and never includes command output or loaded skill content in an error.