Documentation
¶
Overview ¶
Package setup owns local coding-client detection and MCP registration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AllClients = []Client{Codex, Claude}
AllClients lists supported adapters in deterministic application order.
Functions ¶
func CheckRegistration ¶
CheckRegistration reports whether the selected client has a GitContribute MCP entry without changing its configuration.
func IsNpxEnvironment ¶
IsNpxEnvironment reports whether npm is providing an ephemeral execution context rather than a persistent package installation. A non-nil env map is authoritative, including when a key is deliberately absent.
func ResolveNPMVersion ¶
ResolveNPMVersion returns a registry-safe package version for setup launchers and persistent installation commands. It removes one release-tag "v" prefix and maps empty or development versions to the explicit "latest" tag.
Types ¶
type Launcher ¶
Launcher is the exact process command stored in a coding client's MCP configuration.
func ResolveLauncher ¶
ResolveLauncher returns a durable MCP command for the current installation context. Ephemeral npm execution uses a registry-safe, versioned npx command; persistent/source execution uses an absolute executable path. It never saves os.Executable when that path points into npx's disposable cache.
type Operation ¶
type Operation string
Operation identifies whether client-owned MCP entries are configured or removed.
type Options ¶
type Options struct {
Operation Operation
Clients []Client
All bool
DryRun bool
Home string
Version string
Env map[string]string
Executable string
}
Options controls coding-client MCP registration. Env is authoritative when non-nil, allowing callers to distinguish ephemeral npx execution from a persistent executable without retaining a cache path.
type Report ¶
type Report struct {
Operation Operation `json:"operation"`
DryRun bool `json:"dry_run"`
Launcher Launcher `json:"launcher"`
Results []Result `json:"results"`
}
Report contains the resolved launcher and ordered per-client effects.