Documentation
¶
Index ¶
- Variables
- func ComputeBundleContentHash(bundle SkillBundle) (string, error)
- func InstallFlagError(errs []map[string]any) error
- func InstallWorkflowError(report InstallWorkflowReport) error
- type AgentSelector
- type BaseOptions
- type GitHubBundleOptions
- type Host
- type InstallFlagValues
- type InstallOptions
- type InstallReport
- type InstallSelection
- type InstallSelectionOptions
- type InstallUXText
- type InstallWorkflowExit
- type InstallWorkflowOptions
- type InstallWorkflowReport
- type ParsedInstallFlags
- type ReportError
- type Scope
- type SkillBundle
- type SkillFile
- type SkillInfo
- type TargetGroup
- type TargetResult
- type TargetStatus
- type UninstallOptions
- type UninstallReport
Constants ¶
This section is empty.
Variables ¶
View Source
var InstallUX = InstallUXText{
SkillUse: "skill",
SkillShort: "Manage bundled Agent Skill",
InstallUse: "install",
InstallShort: "Install bundled Agent Skill",
ScopeFlag: "Install scope: user or project",
AgentFlag: "Target agent id. Repeat for multiple agents. Use '*' for all.",
DryRunFlag: "Show install plan without writing",
YesFlag: "Skip prompts and accept policy-selected targets",
ForceFlag: "Overwrite unsafe target conflicts",
SelectScope: "Select install scope:",
ScopePrompt: "Scope (user/project)",
InvalidScopeSelection: "Invalid scope selection.",
SelectAgents: "Select agents:",
AgentsPrompt: "Agents (numbers, ids, comma-separated, empty cancels)",
InvalidAgentSelection: "Invalid agent selection.",
Proceed: "Proceed? [y/N] ",
InstallSummary: "Install summary:",
ErrorPrefix: "kitup:",
Canceled: "Installation canceled.",
SelectionError: "Agent selection failed.",
Conflict: "Installation has conflicts.",
Failed: "Installation failed.",
InvalidFlags: "Invalid install flags.",
}
Functions ¶
func ComputeBundleContentHash ¶
func ComputeBundleContentHash(bundle SkillBundle) (string, error)
func InstallFlagError ¶
func InstallWorkflowError ¶
func InstallWorkflowError(report InstallWorkflowReport) error
Types ¶
type AgentSelector ¶
func AgentSelectorFromFlags ¶
func AgentSelectorFromFlags(values []string) (AgentSelector, []map[string]any)
func AllAgents ¶
func AllAgents() AgentSelector
func AutoAgents ¶
func AutoAgents() AgentSelector
func ExplicitAgents ¶
func ExplicitAgents(ids ...string) AgentSelector
type BaseOptions ¶
type GitHubBundleOptions ¶
type Host ¶
type Host struct {
ID string `json:"id"`
DisplayName string `json:"displayName"`
Aliases []string `json:"aliases,omitempty"`
ProjectSkillsDir []string `json:"projectSkillsDirs"`
UserSkillsDir []string `json:"userSkillsDirs"`
Detect []string `json:"detect"`
Status string `json:"status"`
Notes []string `json:"notes,omitempty"`
}
func DetectHosts ¶
func DetectHosts(opts BaseOptions, scope Scope) ([]Host, error)
func LoadHostSpec ¶
func ResolveHosts ¶
func ResolveHosts(agents AgentSelector, hosts []Host) ([]Host, []map[string]any)
type InstallFlagValues ¶
type InstallOptions ¶
type InstallOptions struct {
BaseOptions
AppID string
SkillBundle SkillBundle
Scope Scope
Agents AgentSelector
Force bool
}
type InstallReport ¶
type InstallReport struct {
Installed []TargetResult `json:"installed"`
Updated []TargetResult `json:"updated"`
Skipped []TargetStatus `json:"skipped"`
Conflicts []TargetStatus `json:"conflicts"`
Errors []ReportError `json:"errors"`
}
func InstallBundledSkill ¶
func InstallBundledSkill(opts InstallOptions) (InstallReport, error)
func PlanBundledSkill ¶
func PlanBundledSkill(opts InstallOptions) (InstallReport, error)
func UpdateBundledSkill ¶
func UpdateBundledSkill(opts InstallOptions) (InstallReport, error)
type InstallSelection ¶
type InstallSelection struct {
Action string `json:"action"`
SelectedHostIDs []string `json:"selectedHostIds"`
CandidateHostIDs []string `json:"candidateHostIds"`
DetectedHostIDs []string `json:"detectedHostIds"`
NeedsConfirmation bool `json:"needsConfirmation"`
Errors []map[string]any `json:"errors"`
}
func ResolveInstallSelection ¶
func ResolveInstallSelection(opts InstallSelectionOptions) (InstallSelection, error)
type InstallSelectionOptions ¶
type InstallSelectionOptions struct {
BaseOptions
Scope Scope
Agents AgentSelector
Yes bool
StdinTTY bool
CurrentAgent string
}
type InstallUXText ¶
type InstallUXText struct {
SkillUse string
SkillShort string
InstallUse string
InstallShort string
ScopeFlag string
AgentFlag string
DryRunFlag string
YesFlag string
ForceFlag string
SelectScope string
ScopePrompt string
InvalidScopeSelection string
SelectAgents string
AgentsPrompt string
InvalidAgentSelection string
Proceed string
InstallSummary string
ErrorPrefix string
Canceled string
SelectionError string
Conflict string
Failed string
InvalidFlags string
}
type InstallWorkflowExit ¶
type InstallWorkflowExit struct {
OK bool `json:"ok"`
Code string `json:"code"`
Message string `json:"message"`
}
func ClassifyInstallWorkflowExit ¶
func ClassifyInstallWorkflowExit(report InstallWorkflowReport) InstallWorkflowExit
type InstallWorkflowOptions ¶
type InstallWorkflowReport ¶
type InstallWorkflowReport struct {
Selection InstallSelection `json:"selection"`
Scope Scope `json:"scope"`
Plan InstallReport `json:"plan"`
Report InstallReport `json:"report"`
Canceled bool `json:"canceled"`
DryRun bool `json:"dryRun"`
}
func RunBundledSkillInstall ¶
func RunBundledSkillInstall(opts InstallWorkflowOptions) (InstallWorkflowReport, error)
type ParsedInstallFlags ¶
type ParsedInstallFlags struct {
Scope Scope
ScopeSet bool
Agents AgentSelector
Yes bool
DryRun bool
Force bool
Errors []map[string]any
}
func ParseInstallFlags ¶
func ParseInstallFlags(flags InstallFlagValues) ParsedInstallFlags
type ReportError ¶
type SkillBundle ¶
type SkillBundle struct {
// contains filtered or unexported fields
}
func DirectoryBundle ¶
func DirectoryBundle(dir string) SkillBundle
func FilesBundle ¶
func FilesBundle(files []SkillFile) SkillBundle
func GitHubBundle ¶
func GitHubBundle(opts GitHubBundleOptions) SkillBundle
type SkillInfo ¶
type SkillInfo struct {
Valid bool `json:"valid"`
SkillName string `json:"skillName,omitempty"`
Description string `json:"description,omitempty"`
ErrorCode string `json:"errorCode,omitempty"`
}
func ValidateSkillBundle ¶
func ValidateSkillBundle(bundle SkillBundle) SkillInfo
type TargetGroup ¶
func ResolveInstallTargets ¶
func ResolveInstallTargets(opts BaseOptions, agents AgentSelector, scope Scope, skillName string) ([]TargetGroup, []map[string]any, []string, error)
type TargetResult ¶
type TargetStatus ¶
type TargetStatus struct {
TargetResult
Reason string `json:"reason"`
}
type UninstallOptions ¶
type UninstallOptions struct {
BaseOptions
AppID string
SkillName string
Scope Scope
Agents AgentSelector
}
type UninstallReport ¶
type UninstallReport struct {
Removed []TargetResult `json:"removed"`
Skipped []TargetStatus `json:"skipped"`
Conflicts []TargetStatus `json:"conflicts"`
Errors []ReportError `json:"errors"`
}
func UninstallBundledSkill ¶
func UninstallBundledSkill(opts UninstallOptions) (UninstallReport, error)
Click to show internal directories.
Click to hide internal directories.