agentsetup

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package agentsetup is the optional setup for coding agents: the MCP server registered with Claude Code and Codex, and the agent skill in their skill directories. It checks each item and applies the missing ones, for `setup`, `doctor` and the menu bar app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Applicable

func Applicable(items []Item) bool

Applicable reports whether any agent is installed.

func Failed

func Failed(results []Result) bool

Failed reports whether any result failed.

func MCPConfig

func MCPConfig() any

MCPConfig is the MCP server entry for clients configured by hand, in the common mcpServers shape, with the path agents should start it with.

func Prompt added in v0.2.0

func Prompt() string

Prompt is the request a user pastes into a coding agent so it sets up the agents, adds the user's projects and checks they start.

func SharePrompt added in v0.2.0

func SharePrompt() string

SharePrompt is the request a user pastes into a coding agent so it sets up two computers for each other: Tailscale on both, sharing on the one that runs the projects, and pairing.

Types

type Item

type Item struct {
	ID         string `json:"id"`
	Label      string `json:"label"`
	State      State  `json:"state"`
	Applicable bool   `json:"applicable"`
	Command    string `json:"command"`
	// Detail explains a state that needs the user, such as a foreign file.
	Detail string `json:"detail,omitempty"`
	// contains filtered or unexported fields
}

Item is one setup step. Applicable is false when its agent is not installed for this account. Command is what applying it runs, or what to run by hand when it cannot be applied.

func Check

func Check(port int, cfgPath string) []Item

Check returns every item, applicable or not, for a daemon on port with its config at cfgPath (the skill names both).

func Select

func Select(items []Item, ids []string) ([]Item, error)

Select returns the items with the given IDs, in that order.

func (Item) Fixable

func (it Item) Fixable() bool

Fixable reports whether applying the item can make it ok without replacing anything the user wrote.

type Result

type Result struct {
	ID      string `json:"id"`
	Label   string `json:"label"`
	OK      bool   `json:"ok"`
	Changed bool   `json:"changed"`
	State   State  `json:"state"`
	Error   string `json:"error,omitempty"`
	// Command is the manual command after a failure.
	Command string `json:"command,omitempty"`
}

Result is the outcome of applying one item.

func Apply

func Apply(ctx context.Context, items []Item) []Result

Apply applies items and reports each. An item that is already ok succeeds unchanged; one that needs the user fails with its manual command.

type State

type State string

State of an item.

const (
	OK       State = "ok"
	Missing  State = "missing"
	Outdated State = "outdated"
	// Foreign is a skill file with the product's name that it did not write.
	Foreign State = "foreign"
	// Unavailable is a missing MCP server whose agent CLI was not found, so
	// only the manual command can add it.
	Unavailable State = "unavailable"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL