Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnthropicTokenCheck ¶
type AnthropicTokenCheck struct{}
AnthropicTokenCheck checks if Anthropic API key is available
func (*AnthropicTokenCheck) Name ¶
func (c *AnthropicTokenCheck) Name() string
func (*AnthropicTokenCheck) Run ¶
func (c *AnthropicTokenCheck) Run(ctx context.Context) CheckResult
type Check ¶
type Check interface {
// Name returns the check name
Name() string
// Run executes the check and returns a CheckResult
Run(ctx context.Context) CheckResult
}
Check represents a single preflight check
type CheckLevel ¶
type CheckLevel int
CheckLevel represents the severity level of a preflight check
const ( // LevelError indicates a critical failure that prevents execution LevelError CheckLevel = iota // LevelWarn indicates a warning that should be addressed but doesn't block execution LevelWarn // LevelInfo indicates informational output LevelInfo )
type CheckResult ¶
type CheckResult struct {
Name string // Check name
Level CheckLevel // Severity level
Message string // Human-readable message
Error error // Underlying error (if any)
}
CheckResult represents the result of a single preflight check
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker runs a collection of preflight checks
func NewChecker ¶
NewChecker creates a new preflight checker with the given configuration
type Config ¶
type Config struct {
// Skip skips all preflight checks
Skip bool
// Quiet suppresses info-level messages
Quiet bool
// RequireDocker checks if docker is available (default: true)
RequireDocker bool
// RequireGit checks if git is available (default: true)
RequireGit bool
// RequireGitHubToken checks if GitHub token is available (default: false)
RequireGitHubToken bool
// RequireAnthropicToken checks if Anthropic token is available (default: false)
RequireAnthropicToken bool
// WorkspacePath is the workspace path for permission checks
WorkspacePath string
// OutputPath is the output path for permission checks
OutputPath string
}
Config configures the preflight checker
type DiskSpaceCheck ¶
type DiskSpaceCheck struct {
Path string
MinBytes int64 // Minimum required bytes (for future use; currently writes a 10MB test file)
}
DiskSpaceCheck checks if there's sufficient disk space Note: MinBytes is for future use; the check uses a fixed 10MB test file for practical verification
func (*DiskSpaceCheck) Name ¶
func (c *DiskSpaceCheck) Name() string
func (*DiskSpaceCheck) Run ¶
func (c *DiskSpaceCheck) Run(ctx context.Context) CheckResult
type DockerCheck ¶
type DockerCheck struct{}
DockerCheck checks if docker is installed and the daemon is reachable
func (*DockerCheck) Name ¶
func (c *DockerCheck) Name() string
func (*DockerCheck) Run ¶
func (c *DockerCheck) Run(ctx context.Context) CheckResult
type GitHubTokenCheck ¶
type GitHubTokenCheck struct{}
GitHubTokenCheck checks if GitHub token is available
func (*GitHubTokenCheck) Name ¶
func (c *GitHubTokenCheck) Name() string
func (*GitHubTokenCheck) Run ¶
func (c *GitHubTokenCheck) Run(ctx context.Context) CheckResult
type NetworkCheck ¶
type NetworkCheck struct {
URL string // URL to check (default: https://google.com)
}
NetworkCheck performs a basic network connectivity check This is best-effort and may not catch all network issues
func (*NetworkCheck) Name ¶
func (c *NetworkCheck) Name() string
func (*NetworkCheck) Run ¶
func (c *NetworkCheck) Run(ctx context.Context) CheckResult
type OutputCheck ¶
type OutputCheck struct {
Path string
}
OutputCheck checks if output path is writable
func (*OutputCheck) Name ¶
func (c *OutputCheck) Name() string
func (*OutputCheck) Run ¶
func (c *OutputCheck) Run(ctx context.Context) CheckResult
type WorkspaceCheck ¶
type WorkspaceCheck struct {
Path string
}
WorkspaceCheck checks if workspace path is accessible
func (*WorkspaceCheck) Name ¶
func (c *WorkspaceCheck) Name() string
func (*WorkspaceCheck) Run ¶
func (c *WorkspaceCheck) Run(ctx context.Context) CheckResult