localagents

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClaudeCodeAgentID = "claude-code"
)
View Source
const (
	SharedAgentsID = "agents"
)

Variables

This section is empty.

Functions

func InstallSkillToRoot

func InstallSkillToRoot(ctx context.Context, skillsRoot string, skill SkillArchive) (string, []string, error)

Types

type Agent

type Agent interface {
	ID() string
	DisplayName() string
	Detect(ctx context.Context) DetectionResult
}

func DetectedAgents

func DetectedAgents() []Agent

type ClaudeCode

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

func NewClaudeCode

func NewClaudeCode() ClaudeCode

func (ClaudeCode) Detect

func (c ClaudeCode) Detect(ctx context.Context) DetectionResult

func (ClaudeCode) DisplayName

func (c ClaudeCode) DisplayName() string

func (ClaudeCode) ID

func (c ClaudeCode) ID() string

func (ClaudeCode) InstallBootstrap

func (c ClaudeCode) InstallBootstrap(ctx context.Context, home string) (InstallResult, error)

func (ClaudeCode) InstallSkill

func (c ClaudeCode) InstallSkill(ctx context.Context, home string, skill SkillArchive) (InstallResult, error)

type DetectionResult

type DetectionResult struct {
	AgentID     string
	DisplayName string
	State       DetectionState
	Reason      string
}

type DetectionState

type DetectionState string
const (
	DetectionMissing DetectionState = "missing"
	DetectionPresent DetectionState = "present"
)

type DirectInstaller

type DirectInstaller interface {
	Agent
	InstallBootstrap(ctx context.Context, home string) (InstallResult, error)
	InstallSkill(ctx context.Context, home string, skill SkillArchive) (InstallResult, error)
}

func DirectInstallers

func DirectInstallers() []DirectInstaller

type InstallResult

type InstallResult struct {
	AgentID     string
	DisplayName string
	Installed   []string
	Message     string
}

type SetupTarget

type SetupTarget interface {
	ID() string
	DisplayName() string
	InstallBootstrap(ctx context.Context, home string) (InstallResult, error)
}

func SetupTargets

func SetupTargets() []SetupTarget

type SharedAgents

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

func NewSharedAgents

func NewSharedAgents() SharedAgents

func (SharedAgents) DisplayName

func (a SharedAgents) DisplayName() string

func (SharedAgents) ID

func (a SharedAgents) ID() string

func (SharedAgents) InstallBootstrap

func (a SharedAgents) InstallBootstrap(ctx context.Context, home string) (InstallResult, error)

func (SharedAgents) InstallSkill

func (a SharedAgents) InstallSkill(ctx context.Context, home string, skill SkillArchive) (InstallResult, error)

type SkillArchive

type SkillArchive struct {
	Name  string
	Files []SkillArchiveFile
}

SkillArchive is a validated skill payload ready for agent-specific installation. ZIP parsing and download-specific checks live outside DirectInstaller implementations.

func ParseSkillArchive

func ParseSkillArchive(data []byte, fallbackName string) (SkillArchive, error)

ParseSkillArchive validates downloaded skill ZIP bytes and returns a normalized archive rooted at the skill directory.

func (SkillArchive) ExtractTo

func (s SkillArchive) ExtractTo(target string) error

type SkillArchiveFile

type SkillArchiveFile struct {
	RelPath string
	Content []byte
	Mode    fs.FileMode
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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