Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentNameForIDE ¶ added in v0.1.5
AgentNameForIDE maps a compozy runtime IDE name to the setup agent name.
Types ¶
type Agent ¶
type Agent struct {
Name string
DisplayName string
ProjectRootDir string
GlobalRootDir string
Universal bool
Detected bool
}
Agent describes one supported agent/editor destination.
func DetectInstalledAgents ¶
func DetectInstalledAgents(options ResolverOptions) ([]Agent, error)
func SupportedAgents ¶
func SupportedAgents(options ResolverOptions) ([]Agent, error)
type FailureItem ¶
type FailureItem struct {
Skill Skill
Agent Agent
Path string
Mode InstallMode
Error string
}
FailureItem captures one failed installation mapping.
type InstallConfig ¶
type InstallConfig struct {
Bundle fs.FS
ResolverOptions
SkillNames []string
AgentNames []string
Global bool
Mode InstallMode
}
InstallConfig describes one bundled-skill installation run.
type InstallMode ¶
type InstallMode string
InstallMode determines how bundled skills are materialized for agents.
const ( // InstallModeSymlink installs a canonical copy and symlinks agent paths to it. InstallModeSymlink InstallMode = "symlink" // InstallModeCopy copies the bundled skill into each target agent path. InstallModeCopy InstallMode = "copy" )
type InstallScope ¶ added in v0.1.5
type InstallScope string
InstallScope identifies whether a skill installation is project-local or global.
const ( // InstallScopeUnknown indicates that no existing installation scope could be resolved. InstallScopeUnknown InstallScope = "unknown" // InstallScopeProject identifies a project-local installation. InstallScopeProject InstallScope = "project" // InstallScopeGlobal identifies a global installation. InstallScopeGlobal InstallScope = "global" )
type PreviewItem ¶
type PreviewItem struct {
Skill Skill
Agent Agent
CanonicalPath string
TargetPath string
WillOverwrite bool
}
PreviewItem describes the on-disk plan for one skill/agent install pair.
func Preview ¶
func Preview(cfg InstallConfig) ([]PreviewItem, error)
Preview resolves selected bundled skills and agents to on-disk install targets.
func PreviewBundledSkillInstall ¶
func PreviewBundledSkillInstall(cfg InstallConfig) ([]PreviewItem, error)
PreviewBundledSkillInstall resolves the on-disk install plan for bundled skills.
type ResolverOptions ¶
type ResolverOptions struct {
CWD string
HomeDir string
XDGConfigHome string
CodeXHome string
ClaudeConfigDir string
}
ResolverOptions configures environment-sensitive path resolution.
type Result ¶
type Result struct {
Global bool
Mode InstallMode
Successful []SuccessItem
Failed []FailureItem
}
Result summarizes one bundled-skill installation run.
func Install ¶
func Install(cfg InstallConfig) (*Result, error)
Install materializes bundled skills for the selected agents.
func InstallBundledSkills ¶
func InstallBundledSkills(cfg InstallConfig) (*Result, error)
InstallBundledSkills materializes bundled public skills for the selected agents.
type Skill ¶
Skill describes one bundled skill available for installation.
func ListBundledSkills ¶
ListBundledSkills returns the public skills bundled into the compozy binary.
func ListSkills ¶
ListSkills enumerates bundled public skills from the provided bundle.
type SkillDrift ¶ added in v0.1.5
type SkillDrift struct {
MissingFiles []string
ExtraFiles []string
ChangedFiles []string
Reason string
}
SkillDrift describes how an installed skill differs from the bundled version.
type SuccessItem ¶
type SuccessItem struct {
Skill Skill
Agent Agent
Path string
CanonicalPath string
Mode InstallMode
SymlinkFailed bool
}
SuccessItem captures one successful installation mapping.
type VerifiedSkill ¶ added in v0.1.5
type VerifiedSkill struct {
Skill Skill
CanonicalPath string
TargetPath string
ResolvedPath string
State VerifyState
Drift SkillDrift
}
VerifiedSkill captures the verification result for one skill.
type VerifyConfig ¶ added in v0.1.5
type VerifyConfig struct {
Bundle fs.FS
ResolverOptions
AgentName string
SkillNames []string
}
VerifyConfig describes one bundled-skill verification run.
type VerifyResult ¶ added in v0.1.5
type VerifyResult struct {
Agent Agent
Scope InstallScope
Mode InstallMode
Skills []VerifiedSkill
}
VerifyResult summarizes one bundled-skill verification run.
func Verify ¶ added in v0.1.5
func Verify(cfg VerifyConfig) (VerifyResult, error)
Verify checks whether the selected bundled skills are installed and current for one agent.
func VerifyBundledSkills ¶ added in v0.1.5
func VerifyBundledSkills(cfg VerifyConfig) (VerifyResult, error)
VerifyBundledSkills checks whether bundled public skills are installed and current.
func (VerifyResult) DriftedSkillNames ¶ added in v0.1.5
func (r VerifyResult) DriftedSkillNames() []string
DriftedSkillNames returns every drifted skill name in sorted order.
func (VerifyResult) HasDrift ¶ added in v0.1.5
func (r VerifyResult) HasDrift() bool
HasDrift reports whether any installed skill differs from the bundled version.
func (VerifyResult) HasMissing ¶ added in v0.1.5
func (r VerifyResult) HasMissing() bool
HasMissing reports whether any skill is missing.
func (VerifyResult) MissingSkillNames ¶ added in v0.1.5
func (r VerifyResult) MissingSkillNames() []string
MissingSkillNames returns every missing skill name in sorted order.
type VerifyState ¶ added in v0.1.5
type VerifyState string
VerifyState describes the verification status for one installed skill.
const ( // VerifyStateCurrent indicates the installed skill matches the bundled version. VerifyStateCurrent VerifyState = "current" // VerifyStateMissing indicates the installed skill is missing from the selected scope. VerifyStateMissing VerifyState = "missing" // VerifyStateDrifted indicates the installed skill differs from the bundled version. VerifyStateDrifted VerifyState = "drifted" )