Documentation
¶
Overview ¶
Package install puts Claude Code or Codex on the machine as a job of five steps the hub's UI shows live: the system is checked, the provider's servers are reached, the CLI is downloaded, installed, and started once to see it runs. Claude Code comes from Anthropic's native installer into ~/.local/bin; Codex from npm into ~/.local.
Index ¶
Constants ¶
const ( StepSystem = "system" StepProvider = "provider" StepDownload = "download" StepInstall = "install" StepVerify = "verify" )
Step ids, in order (docs/hub/api.md).
Variables ¶
var ErrBusy = errors.New("an install of this agent is already running")
ErrBusy: an install of that provider is already running.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
// Shell runs scripts in the login shell, EnvDir is where the env files are (a proxy among them).
Shell agents.LoginRunner
EnvDir string
// Home is the account's home folder; JobsDir holds each job's scratch folder.
Home string
JobsDir string
// Preflight is a fresh report of the system; Check the provider check through the proxy the agent has.
Preflight func(ctx context.Context) hubproto.PreflightReport
Check func(ctx context.Context, provider string) hubproto.ProviderCheck
// Emit gets a copy of the job after every change; Done is told when a job ended, for the agent to refresh statuses.
Emit func(hubproto.Job)
Done func(provider string, ok bool)
}
Deps are what an install needs of the rest of the agent.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager runs install jobs, one per provider at a time.
func NewManager ¶
NewManager is a manager whose jobs stop when ctx ends.