Documentation
¶
Overview ¶
Package setup checks, installs and removes what the loop needs in the configuration homes of the coding agents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallCommand ¶
InstallCommand is the command that installs the loop into one home.
func SessionValue ¶
SessionValue is the value, in the loop's MCP registration, that the agent expands to the handle its manager gave the session: the first of vars that is set, as ${A:-${B}}.
func TrustCommand ¶
TrustCommand is the command that trusts the repository of folder in home.
Types ¶
type AgentHome ¶
type AgentHome interface {
Check(ctx context.Context, home string) ([]Finding, error)
Install(ctx context.Context, home string, dryRun bool) ([]string, error)
Remove(ctx context.Context, home string, dryRun bool) ([]string, error)
}
AgentHome is one agent's configuration home. Install and Remove return a line per entry they add, change, back up or remove.
type Finding ¶
type Finding struct {
// Problem is "" when the entry is present and right.
Home, Entry, Problem, Fix string
}
Finding is one entry the loop needs in an agent home.
type HomeKind ¶
type HomeKind interface {
New(s HomeSpec) AgentHome
// Find lists the homes of this kind on this machine.
Find(s HomeSpec) []string
// Default is the home the agent reads with no override.
Default(userHome string) string
// SkillsRoot is the directory whose skills/<name>/SKILL.md the agent reads in home, "" for none.
SkillsRoot(home string) string
}
HomeKind is one agent's configuration homes.
type HomeSpec ¶
type HomeSpec struct {
Command, MCPURL, UserHome string
// MCPKey is the secret the MCP endpoint requires, "" before install writes one.
MCPKey string
// CallerHome is the home of the session running the loop, "" when unset.
CallerHome string
// SessionVars are the variables the enabled workspace managers set, in a
// session's agent process, to the handle of its process; one manager's
// sessions leave every other's unset.
SessionVars []string
// ManagerHomes are the homes of this kind the workspace manager keeps.
ManagerHomes []string
Now func() time.Time
}
HomeSpec is what an agent's home installer needs from this process.