Documentation
¶
Overview ¶
Package readiness answers "can this computer run agents yet, and if not, what is the next step?" — the setup checklist of Settings → Computers, Home, `caprock setup`, and the readiness a linked laptop reads through `/v1/m/{id}/v1/setup` (GET /v1/setup, ADR-099).
The owner's first two-computer test (a MacBook driving a Windows PC, 2026-11-20) found a PC without Git and Claude Code that nothing on either screen mentioned, and a laptop that showed the PC linked without saying whether it could do anything. Five items cover the path from a fresh install to "start agents from your laptop": Git, an agent, its sign-in, a project, the link. Each says in a sentence what to do, and the installs and sign-ins carry the command that does it — typed into a shell tab for the user to run, never run by Caprock (ADR-046).
Build is pure: the daemon gathers the facts (files, PATH, the pairing state) and Build words them, so every wording is tested on every OS.
Index ¶
Constants ¶
const ( // OK: done. OK = "ok" // Missing: not done; Detail says what to do, Command does it when there // is one command for it. Missing = "missing" // Unknown: Caprock cannot tell from what it may read (Codex keeping its // sign-in in the system keyring). Offered, never ticked. Unknown = "unknown" // NotNeeded: does not apply on this computer. A client treats it as done. NotNeeded = "not_needed" )
The states of an item.
const ( KeyGit = "git" KeyAgent = "agent" KeySignIn = "signin" KeyProject = "project" KeyLink = "link" )
The items, in the checklist's order.
Variables ¶
This section is empty.
Functions ¶
func GitInstall ¶
GitInstall is the command that installs Git, "" where there is no single one (Linux: the distribution's package manager).
- Windows: winget's Git for Windows package (Git.Git), the install Claude Code's setup page points at (code.claude.com/docs/en/setup, read 2026-11-20). It asks for an administrator once.
- macOS: the Command Line Tools, which carry Git; macOS opens its own installer window.
Types ¶
type Agent ¶
type Agent struct {
ID string // "claude", "codex"
Label string // "Claude Code", "Codex"
Installed bool
// Install is the catalog's install command (ADR-046).
Install string
// SignIn is OK, Missing or Unknown.
SignIn string
// SignInCommand is the agent's own sign-in.
SignInCommand string
}
Agent is one agent that can run here: Claude Code or Codex.
type Git ¶
type Git struct {
Found bool
// Fresh is false when the user's current PATH could not be read, so a Git
// installed after Caprock started may not be seen until it restarts.
Fresh bool
}
Git is what was found of Git.
type GitFinder ¶
type GitFinder struct {
GOOS string
// Dirs is the user's PATH as it is now (userenv.CurrentPath), split.
Dirs []string
// Env reads a variable (ProgramFiles, LOCALAPPDATA on Windows).
Env func(string) string
// IsFile reports whether a path is a regular file. Swapped by tests.
IsFile func(string) bool
}
GitFinder looks for Git without running it. Running `git --version` on a Mac without the Command Line Tools would open Apple's install dialog from a daemon on a timer, so the answer is read from the file system only.
type Item ¶
type Item struct {
Key string `json:"key"`
State string `json:"state"`
Label string `json:"label"`
Detail string `json:"detail"`
// Command fixes it in a terminal: typed into a shell tab, or printed by
// `caprock setup`, never run by Caprock. The link's is a caprock command
// for a computer reached over SSH; its screen has its own buttons.
Command string `json:"command,omitempty"`
}
Item is one line of the checklist.
type Link ¶
type Link struct {
// Supported is false in a build that cannot be reached through a relay.
Supported bool
// On: access from anywhere is on.
On bool
// Allowed are the computers allowed here, by name; Waiting those that
// redeemed a link and wait for Allow.
Allowed []string
Waiting []string
}
Link is how this computer stands with the computers that reach it.