Documentation
¶
Index ¶
- Variables
- type AgentLauncher
- func (l *AgentLauncher) BuildEnv() []string
- func (l *AgentLauncher) InstallInstructions() string
- func (l *AgentLauncher) IsAvailable() bool
- func (l *AgentLauncher) Launch() error
- func (l *AgentLauncher) LaunchWithPrompt(prompt string) error
- func (l *AgentLauncher) LaunchWithPromptAndOptions(prompt string, opts LaunchOptions) error
- func (l *AgentLauncher) SetEnv(envVars map[string]string)
- type AgentOption
- type LaunchOptions
Constants ¶
This section is empty.
Variables ¶
var DefaultAgents = []AgentOption{
{
Name: "Claude Code",
Command: "claude",
Description: "AI coding assistant with deep SpecLedger integration",
},
{
Name: "None",
Command: "",
Description: "Skip agent launch; use SpecLedger manually",
},
}
DefaultAgents is the list of agent options presented during onboarding.
Functions ¶
This section is empty.
Types ¶
type AgentLauncher ¶
type AgentLauncher struct {
Name string // Agent display name
Command string // CLI command to execute
Dir string // Working directory for the agent process
// contains filtered or unexported fields
}
AgentLauncher checks availability and launches an AI coding agent as an interactive subprocess.
func NewAgentLauncher ¶
func NewAgentLauncher(agent AgentOption, dir string) *AgentLauncher
NewAgentLauncher creates a launcher for the given agent in the given directory.
func (*AgentLauncher) BuildEnv ¶ added in v1.0.34
func (l *AgentLauncher) BuildEnv() []string
func (*AgentLauncher) InstallInstructions ¶
func (l *AgentLauncher) InstallInstructions() string
InstallInstructions returns help text for installing the agent.
func (*AgentLauncher) IsAvailable ¶
func (l *AgentLauncher) IsAvailable() bool
IsAvailable checks if the agent command exists in PATH.
func (*AgentLauncher) Launch ¶
func (l *AgentLauncher) Launch() error
Launch starts the agent as an interactive subprocess with stdio passthrough. This blocks until the agent process exits.
func (*AgentLauncher) LaunchWithPrompt ¶ added in v1.0.24
func (l *AgentLauncher) LaunchWithPrompt(prompt string) error
LaunchWithPrompt starts the agent as an interactive subprocess and passes prompt as a positional argument. Using a positional arg (not stdin) preserves TTY interactivity. This blocks until the agent process exits.
func (*AgentLauncher) LaunchWithPromptAndOptions ¶ added in v1.0.37
func (l *AgentLauncher) LaunchWithPromptAndOptions(prompt string, opts LaunchOptions) error
LaunchWithPromptAndOptions starts the agent with custom options.
func (*AgentLauncher) SetEnv ¶ added in v1.0.34
func (l *AgentLauncher) SetEnv(envVars map[string]string)
type AgentOption ¶
type AgentOption struct {
Name string // Display name (e.g., "Claude Code")
Command string // CLI command (e.g., "claude")
Description string // Short description for TUI
}
AgentOption represents an available AI coding agent choice.
type LaunchOptions ¶ added in v1.0.37
type LaunchOptions struct {
SkipPermissions bool // Add --dangerously-skip-permissions flag
Model string // Set ANTHROPIC_MODEL env var (empty = use default)
MaxOutputTokens int // Set CLAUDE_CODE_MAX_OUTPUT_TOKENS env var (0 = use default)
}
LaunchOptions configures agent launch behavior.