commands

package
v0.0.0-...-45c8ac1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 77 Imported by: 0

Documentation

Overview

Package commands provides the command-line interface for the azd-app CLI.

Package commands provides the command-line interface for the azd-app CLI.

Package commands provides the command-line interface for the azd-app CLI.

Package commands provides the command-line interface for the azd-app CLI.

Package commands provides the command-line interface for the azd-app CLI.

Package commands provides the command-line interface for the azd-app CLI.

getAppInfoForMCP / processEnvMap back the `services`, `project info`, and `environment variables` MCP tools. They replace the Stage 2 implementation that shelled out to `azd app info --output json`; the subprocess path cost ~200ms per call and produced nothing the in-process path can't reproduce. See docs/adr/0001-connect-go-transport.md Stage 3 for the rationale.

Package commands - MCP output sanitization to prevent ANSI/control-character prompt injection (CWE-150, CWE-117).

Threat: a malicious service can write ANSI escape sequences to stderr that erase the user-visible transcript in some terminals while injecting hidden instructions into the LLM context window via MCP tool results.

Defense: strip all ANSI/VT escape sequences and dangerous C0/C1 control characters from every string that exits via an MCP channel, both on the success path (marshalToolResult) and the error path (mcpErrorResult).

Index

Constants

View Source
const LogLevelAll service.LogLevel = -1

LogLevelAll is a sentinel value indicating no level filtering should be applied.

Variables

View Source
var BuildTime = "unknown"

BuildTime is set at build time via -ldflags.

View Source
var Commit = "unknown"

Commit is set at build time via -ldflags.

View Source
var VersionInfo = coreversion.New("jongio.azd.app", "azd app")

VersionInfo provides the shared version information for this extension.

Functions

func IsDetachedChild

func IsDetachedChild() bool

IsDetachedChild reports whether this process is the background run spawned by `azd app run --detach` rather than the foreground invocation that spawned it.

The marker is read once and then removed from this process's environment. Spawned services and lifecycle hooks build their environment from os.Environ(), so leaving it set would mark them, and any nested `azd app run` they invoke, as detached children. Such a nested invocation would skip LoadAzdEnvironment and silently run against the default azd environment instead of the one it was given with -e. The result is cached because callers run both before and after the unset.

func NewAddCommand

func NewAddCommand() *cobra.Command

NewAddCommand creates the add command.

func NewCertCommand

func NewCertCommand() *cobra.Command

NewCertCommand creates the cert command.

func NewCleanCommand

func NewCleanCommand() *cobra.Command

NewCleanCommand creates the clean command.

func NewConfigCommand

func NewConfigCommand() *cobra.Command

NewConfigCommand creates the config command.

func NewDepsCommand

func NewDepsCommand() *cobra.Command

NewDepsCommand creates the deps command.

func NewDoctorCommand

func NewDoctorCommand() *cobra.Command

NewDoctorCommand creates the doctor command.

func NewEnvCommand

func NewEnvCommand() *cobra.Command

NewEnvCommand creates the env command.

func NewGraphCommand

func NewGraphCommand() *cobra.Command

NewGraphCommand creates the graph command.

func NewHealthCommand

func NewHealthCommand() *cobra.Command

NewHealthCommand creates the health command.

func NewHooksCommand

func NewHooksCommand() *cobra.Command

NewHooksCommand creates the hooks command.

func NewInfoCommand

func NewInfoCommand() *cobra.Command

NewInfoCommand creates the info command.

func NewInitCommand

func NewInitCommand() *cobra.Command

NewInitCommand creates the init command for setting up azd app in a project.

func NewListenCommand

func NewListenCommand() *cobra.Command

NewListenCommand creates the listen command using the azdext SDK helper. It registers a local service target provider and post-provision event handler.

func NewLogsCommand

func NewLogsCommand() *cobra.Command

NewLogsCommand creates the logs command.

func NewMCPCommand

func NewMCPCommand() *cobra.Command

NewMCPCommand creates the mcp command with subcommands.

func NewMetadataCommand

func NewMetadataCommand(rootCmdProvider func() *cobra.Command) *cobra.Command

NewMetadataCommand creates the metadata command using the azdext SDK helper. rootCmdProvider returns the root command for introspection.

func NewNotificationsCommand

func NewNotificationsCommand() *cobra.Command

NewNotificationsCommand creates the notifications command.

func NewOpenCommand

func NewOpenCommand() *cobra.Command

NewOpenCommand creates the open command.

func NewOutdatedCommand

func NewOutdatedCommand() *cobra.Command

NewOutdatedCommand creates the outdated command.

func NewPortsCommand

func NewPortsCommand() *cobra.Command

NewPortsCommand creates the ports command.

func NewProxyCommand

func NewProxyCommand() *cobra.Command

NewProxyCommand creates the proxy command.

func NewRemoveCommand

func NewRemoveCommand() *cobra.Command

NewRemoveCommand creates the remove command.

func NewReqsCommand

func NewReqsCommand() *cobra.Command

NewReqsCommand creates the reqs command.

func NewRestartCommand

func NewRestartCommand() *cobra.Command

NewRestartCommand creates the restart command.

func NewRunCommand

func NewRunCommand() *cobra.Command

NewRunCommand creates the run command.

func NewStartCommand

func NewStartCommand() *cobra.Command

NewStartCommand creates the start command.

func NewStatusCommand

func NewStatusCommand() *cobra.Command

NewStatusCommand creates the status command.

func NewStopCommand

func NewStopCommand() *cobra.Command

NewStopCommand creates the stop command.

func NewSupportBundleCommand

func NewSupportBundleCommand() *cobra.Command

NewSupportBundleCommand creates the support-bundle command.

func NewTestCommand

func NewTestCommand() *cobra.Command

NewTestCommand creates the test command.

func NewValidateCommand

func NewValidateCommand() *cobra.Command

NewValidateCommand creates the validate command.

func NewVersionCommand

func NewVersionCommand(outputFormat *string) *cobra.Command

NewVersionCommand creates the version command.

func ResetDepsOptions

func ResetDepsOptions()

ResetDepsOptions resets the global options to defaults. This is primarily used for testing to ensure clean state.

func SetCacheEnabled

func SetCacheEnabled(enabled bool)

SetCacheEnabled configures whether caching should be enabled.

func SetReqsOnlyMissing

func SetReqsOnlyMissing(enabled bool)

SetReqsOnlyMissing configures whether reqs output should include only failures.

Types

type AddResult

type AddResult struct {
	Service           string            `json:"service"`
	Added             bool              `json:"added"`
	Message           string            `json:"message,omitempty"`
	Preview           string            `json:"preview,omitempty"`
	ConnectionStrings map[string]string `json:"connectionStrings,omitempty"`
}

AddResult represents the result of adding a service.

type AzureYaml

type AzureYaml struct {
	Reqs     []Prerequisite         `yaml:"reqs"`
	Services map[string]ReqsService `yaml:"services,omitempty"`
}

AzureYaml represents the structure of azure.yaml.

type BulkServiceControlResult

type BulkServiceControlResult struct {
	Success      bool                   `json:"success"`
	Message      string                 `json:"message"`
	Results      []ServiceControlResult `json:"results"`
	SuccessCount int                    `json:"successCount"`
	FailureCount int                    `json:"failureCount"`
	TotalTime    string                 `json:"totalDuration"` // Human-readable duration string
}

BulkServiceControlResult contains results for bulk service operations.

type CleanDependenciesError

type CleanDependenciesError struct {
	Count   int
	Details []string
}

CleanDependenciesError represents an error during dependency cleaning with details.

func (*CleanDependenciesError) Error

func (e *CleanDependenciesError) Error() string

Error implements the error interface.

type CollectedLogs

type CollectedLogs struct {
	// Entries holds log entries when no context extraction is needed.
	// Initialized to empty slice (not nil) so JSON marshaling produces [] not null.
	Entries []service.LogEntry

	// EntriesWithContext holds log entries with surrounding context lines.
	// Populated when contextLines > 0 and a level filter is active.
	// Initialized to empty slice (not nil) so JSON marshaling produces [] not null.
	EntriesWithContext []LogEntryWithContext

	// HasContext indicates whether EntriesWithContext is populated (true)
	// or Entries is populated (false).
	HasContext bool

	// DashboardAvailable indicates whether the dashboard was reachable.
	DashboardAvailable bool

	// ServiceCount is the number of services discovered via dashboard.
	ServiceCount int

	// Source is the log source that was used ("local", "azure", "all").
	Source string

	// Warnings holds non-fatal warning messages (e.g., "Azure logs unavailable").
	// CLI displays these via cliout.Warning; MCP can include them in responses.
	Warnings []string
}

CollectedLogs holds the result of log collection, including metadata for callers to make display/error decisions. collect() returns this; execute() and MCP handlers consume it.

type DashboardClient

type DashboardClient interface {
	Ping(ctx context.Context) error
	GetServices(ctx context.Context) ([]*serviceinfo.ServiceInfo, error)
	StreamLogs(ctx context.Context, serviceName string, logs chan<- service.LogEntry) error
	GetAzureLogs(ctx context.Context, services []string, tail int, since time.Time) ([]service.LogEntry, error)
	GetAzureStatus(ctx context.Context) (*service.AzureStatus, error) //nolint:staticcheck // backward-compatible API
	StreamAzureLogs(ctx context.Context, logs chan<- service.LogEntry) error
}

DashboardClient defines the interface for dashboard operations needed by logs. This interface enables testing by allowing mock implementations.

type DependencyInstaller

type DependencyInstaller struct {
	// contains filtered or unexported fields
}

DependencyInstaller handles installation of project dependencies.

func NewDependencyInstaller

func NewDependencyInstaller(searchRoot string) *DependencyInstaller

NewDependencyInstaller creates a new dependency installer.

func (*DependencyInstaller) InstallAll

func (di *DependencyInstaller) InstallAll() ([]InstallResult, error)

InstallAll installs dependencies for all detected project types. Returns results for all attempted installations and any detection errors.

func (*DependencyInstaller) InstallAllFiltered

func (di *DependencyInstaller) InstallAllFiltered() ([]InstallResult, error)

InstallAllFiltered installs dependencies for pre-filtered projects. Use this when projects have already been detected and filtered (e.g., by service name).

type DepsOptions

type DepsOptions struct {
	Verbose  bool
	Clean    bool
	NoCache  bool
	Force    bool
	DryRun   bool     // Show what would be installed without installing
	Check    bool     // Verify dependencies are installed without installing (non-zero exit if missing)
	Services []string // Filter to specific services by name
}

DepsOptions holds the options for the deps command. Using a struct instead of global variables for better testability and concurrency safety.

func GetDepsOptions deprecated

func GetDepsOptions() *DepsOptions

GetDepsOptions is a legacy getter function for backward compatibility.

Deprecated: Use executor pattern instead.

type DepsResult

type DepsResult struct {
	Success  bool            `json:"success"`
	Projects []InstallResult `json:"projects"`
	Message  string          `json:"message,omitempty"`
	Error    string          `json:"error,omitempty"`
}

DepsResult represents the JSON output structure for deps command.

type DetectedProjects

type DetectedProjects struct {
	Node   []types.NodeProject
	Python []types.PythonProject
	Dotnet []types.DotnetProject
	// ServicesByDir maps a project directory to the names of the azure.yaml
	// services that share it. Used to label a single (deduped) install with the
	// services it covers when several services point at one directory. Nil/empty
	// entries fall back to the directory name.
	ServicesByDir map[string][]string
}

DetectedProjects groups detected project types that are typically processed together.

func (DetectedProjects) Total

func (p DetectedProjects) Total() int

Total returns the total number of detected projects.

type DetectedRequirement

type DetectedRequirement struct {
	Name             string // Tool identifier (e.g., "node", "docker")
	InstalledVersion string // Currently installed version (e.g., "22.3.0")
	MinVersion       string // Normalized minimum version (e.g., "22.0.0")
	CheckRunning     bool   // Whether tool must be running
	Source           string // What triggered detection (e.g., "package.json", "AppHost.cs")
}

DetectedRequirement represents a requirement found during project scanning.

type DetectedService

type DetectedService struct {
	Name           string            `json:"name"`
	Language       string            `json:"language"`
	Framework      string            `json:"framework,omitempty"`
	Project        string            `json:"project"`
	Ports          []string          `json:"ports,omitempty"`
	Command        string            `json:"command,omitempty"`
	PackageManager string            `json:"packageManager,omitempty"`
	Environment    map[string]string `json:"environment,omitempty"`
	Type           string            `json:"type,omitempty"`
	Mode           string            `json:"mode,omitempty"`
	Uses           []string          `json:"uses,omitempty"`
	IsWorkspace    bool              `json:"isWorkspace,omitempty"`
}

DetectedService represents a service discovered during project scanning.

type ExecutionContext

type ExecutionContext struct {
	CacheEnabled    bool
	ReqsOnlyMissing bool
}

ExecutionContext holds runtime configuration for command execution.

type FixResult

type FixResult struct {
	Name      string `json:"name"`
	Fixed     bool   `json:"fixed"`
	Found     bool   `json:"found"`
	Path      string `json:"path,omitempty"`
	Message   string `json:"message"`
	Satisfied bool   `json:"satisfied"`
}

FixResult represents the result of attempting to fix a requirement.

type GenerateConfig

type GenerateConfig struct {
	DryRun     bool   // Don't write files, just show what would happen
	WorkingDir string // Directory to start search from
}

GenerateConfig holds configuration for requirement generation.

type GenerateResult

type GenerateResult struct {
	Reqs          []DetectedRequirement
	AzureYamlPath string
	Created       bool // True if azure.yaml was created vs updated
	Added         int  // Number of reqs added
	Skipped       int  // Number of existing reqs preserved
}

GenerateResult contains the outcome of reqs generation.

type InitResult

type InitResult struct {
	Services      []DetectedService `json:"services"`
	AzureYamlPath string            `json:"azureYamlPath"`
	Created       bool              `json:"created"`
	Enriched      bool              `json:"enriched"`
}

InitResult contains the outcome of the init command.

type InstallResult

type InstallResult struct {
	Type    string `json:"type"`
	Dir     string `json:"dir,omitempty"`
	Path    string `json:"path,omitempty"`
	Manager string `json:"manager,omitempty"`
	Success bool   `json:"success"`
	Error   string `json:"error,omitempty"`
}

InstallResult represents the result of installing dependencies for a project.

type LogContext

type LogContext struct {
	Before []string `json:"before,omitempty"`
	After  []string `json:"after,omitempty"`
}

LogContext contains log lines before and after a matching entry.

type LogEntryWithContext

type LogEntryWithContext struct {
	Service   string      `json:"service"`
	Message   string      `json:"message"`
	Level     string      `json:"level"`
	Timestamp time.Time   `json:"timestamp"`
	IsStderr  bool        `json:"isStderr,omitempty"`
	Context   *LogContext `json:"context,omitempty"`
}

LogEntryWithContext represents a log entry with surrounding context lines. Used when --context flag is specified to include lines before/after matches.

type LogManagerInterface

type LogManagerInterface interface {
	GetBuffer(serviceName string) (*service.LogBuffer, bool)
	GetAllBuffers() map[string]*service.LogBuffer
}

LogManagerInterface defines the interface for log manager operations. This interface enables testing by allowing mock implementations.

type LogServiceSummary

type LogServiceSummary struct {
	Service string `json:"service"`
	Info    int    `json:"info"`
	Warn    int    `json:"warn"`
	Error   int    `json:"error"`
	Debug   int    `json:"debug"`
	Unknown int    `json:"unknown,omitempty"`
	Total   int    `json:"total"`
}

LogServiceSummary contains counts for one service.

type LogSource

type LogSource string

LogSource represents where logs are collected from.

const (
	// LogSourceLocal indicates logs from locally running services.
	LogSourceLocal LogSource = "local"
	// LogSourceAzure indicates logs from Azure-deployed services.
	LogSourceAzure LogSource = "azure"
	// LogSourceAll indicates logs from both local and Azure sources.
	LogSourceAll LogSource = "all"
)

type LogSummaryResult

type LogSummaryResult struct {
	Total     int                 `json:"total"`
	StartTime *time.Time          `json:"startTime,omitempty"`
	EndTime   *time.Time          `json:"endTime,omitempty"`
	Services  []LogServiceSummary `json:"services"`
}

LogSummaryResult is the machine-readable shape for "logs --summary".

type Prerequisite

type Prerequisite struct {
	Name       string `yaml:"name"`
	MinVersion string `yaml:"minVersion"`
	// Custom tool configuration (optional)
	Command       string   `yaml:"command,omitempty"`       // Override command to execute
	Args          []string `yaml:"args,omitempty"`          // Override arguments
	VersionPrefix string   `yaml:"versionPrefix,omitempty"` // Override version prefix to strip
	VersionField  int      `yaml:"versionField,omitempty"`  // Override which field contains version
	// Runtime check configuration (optional)
	CheckRunning         bool     `yaml:"checkRunning,omitempty"`         // Whether to check if the tool is running
	RunningCheckCommand  string   `yaml:"runningCheckCommand,omitempty"`  // Command to check if tool is running
	RunningCheckArgs     []string `yaml:"runningCheckArgs,omitempty"`     // Arguments for running check command
	RunningCheckExpected string   `yaml:"runningCheckExpected,omitempty"` // Expected substring in output (optional)
	RunningCheckExitCode *int     `yaml:"runningCheckExitCode,omitempty"` // Expected exit code (default: 0)
	// Install URL configuration (optional)
	InstallURL string `yaml:"installUrl,omitempty"` // URL to installation page (overrides built-in)
}

Prerequisite represents a prerequisite from azure.yaml.

type PrerequisiteChecker

type PrerequisiteChecker struct {
	// contains filtered or unexported fields
}

PrerequisiteChecker handles checking of prerequisites.

func NewPrerequisiteChecker

func NewPrerequisiteChecker() *PrerequisiteChecker

NewPrerequisiteChecker creates a new prerequisite checker.

func (*PrerequisiteChecker) Check

func (pc *PrerequisiteChecker) Check(prereq Prerequisite) ReqResult

Check checks a prerequisite and returns structured result.

type ProjectInfo

type ProjectInfo struct {
	Project  map[string]any          `json:"project" jsonschema:"description=Project metadata"`
	Services []ProjectServiceSummary `json:"services" jsonschema:"description=Summary of services defined in the project"`
}

ProjectInfo represents the output schema for get_project_info tool

type ProjectServiceSummary

type ProjectServiceSummary struct {
	Name      string `json:"name" jsonschema:"description=Service name"`
	Language  string `json:"language" jsonschema:"description=Programming language"`
	Framework string `json:"framework" jsonschema:"description=Framework used"`
	Project   string `json:"project" jsonschema:"description=Project directory path"`
}

ProjectServiceSummary represents a simplified service summary

type RemoveResult

type RemoveResult struct {
	Service string `json:"service"`
	Removed bool   `json:"removed"`
	Message string `json:"message,omitempty"`
}

RemoveResult represents the result of removing a service, mirroring AddResult.

type ReqResult

type ReqResult struct {
	Name       string `json:"name"`
	Installed  bool   `json:"installed"`
	Version    string `json:"version,omitempty"`
	Required   string `json:"required"`
	Satisfied  bool   `json:"satisfied"`
	Running    bool   `json:"running,omitempty"`
	CheckedRun bool   `json:"checkedRunning,omitempty"`
	Message    string `json:"message,omitempty"`
	IsPodman   bool   `json:"isPodman,omitempty"`   // True when Podman is aliased to Docker
	InstallURL string `json:"installUrl,omitempty"` // URL to installation page
}

ReqResult represents the result of checking a requirement.

type ReqsDockerConfig

type ReqsDockerConfig struct {
	Image string `yaml:"image,omitempty"`
}

ReqsDockerConfig represents minimal Docker configuration for reqs parsing.

type ReqsResult

type ReqsResult struct {
	Satisfied bool        `json:"satisfied"`
	Reqs      []ReqResult `json:"reqs"`
}

ReqsResult represents the JSON output structure for reqs command.

type ReqsService

type ReqsService struct {
	Image  string            `yaml:"image,omitempty"`
	Docker *ReqsDockerConfig `yaml:"docker,omitempty"`
}

ReqsService represents a minimal service definition for reqs parsing. Only includes fields needed to detect container services.

type RequirementStatus

type RequirementStatus struct {
	Name           string `json:"name" jsonschema:"description=Requirement name (e.g. node, python, docker)"`
	Required       string `json:"required" jsonschema:"description=Required version"`
	Installed      string `json:"installed,omitempty" jsonschema:"description=Installed version if found"`
	Met            bool   `json:"met" jsonschema:"description=Whether requirement is satisfied"`
	InstallCommand string `json:"installCommand,omitempty" jsonschema:"description=Command to install if missing"`
}

RequirementStatus represents individual requirement check result

type RequirementsResult

type RequirementsResult struct {
	Requirements []RequirementStatus `json:"requirements" jsonschema:"description=List of requirements and their status"`
	AllMet       bool                `json:"allMet" jsonschema:"description=Whether all requirements are satisfied"`
}

RequirementsResult represents the output schema for check_requirements tool

type ResultFormatter

type ResultFormatter struct{}

ResultFormatter handles formatting of requirement check results.

func NewResultFormatter

func NewResultFormatter() *ResultFormatter

NewResultFormatter creates a new result formatter.

func (*ResultFormatter) Print

func (rf *ResultFormatter) Print(result ReqResult)

Print formats and prints a single requirement result.

func (*ResultFormatter) PrintAll

func (rf *ResultFormatter) PrintAll(results []ReqResult)

PrintAll formats and prints all requirement results.

type ServiceControlResult

type ServiceControlResult struct {
	ServiceName string `json:"serviceName"`
	Success     bool   `json:"success"`
	Message     string `json:"message"`
	Status      string `json:"status,omitempty"`
	Error       string `json:"error,omitempty"`
	Duration    string `json:"duration,omitempty"` // Human-readable duration string
}

ServiceControlResult contains the result of a service control operation.

type ServiceController

type ServiceController struct {
	// contains filtered or unexported fields
}

ServiceController provides shared logic for service lifecycle CLI commands.

func NewServiceController

func NewServiceController(projectDir string) (*ServiceController, error)

NewServiceController creates a new service controller for the given project directory.

func (*ServiceController) BulkRestart

func (c *ServiceController) BulkRestart(ctx context.Context, serviceNames []string) *BulkServiceControlResult

BulkRestart restarts multiple services.

func (*ServiceController) BulkStart

func (c *ServiceController) BulkStart(ctx context.Context, serviceNames []string) *BulkServiceControlResult

BulkStart starts multiple services.

func (*ServiceController) BulkStop

func (c *ServiceController) BulkStop(ctx context.Context, serviceNames []string) *BulkServiceControlResult

BulkStop stops multiple services.

func (*ServiceController) GetAllServices

func (c *ServiceController) GetAllServices() []string

GetAllServices returns a list of all registered service names.

func (*ServiceController) GetRunningServices

func (c *ServiceController) GetRunningServices() []string

GetRunningServices returns a list of running service names.

func (*ServiceController) GetStoppedServices

func (c *ServiceController) GetStoppedServices() []string

GetStoppedServices returns a list of stopped service names.

func (*ServiceController) RestartService

func (c *ServiceController) RestartService(ctx context.Context, serviceName string) *ServiceControlResult

RestartService restarts a single service.

func (*ServiceController) StartService

func (c *ServiceController) StartService(ctx context.Context, serviceName string) *ServiceControlResult

StartService starts a single service.

func (*ServiceController) StopService

func (c *ServiceController) StopService(ctx context.Context, serviceName string) *ServiceControlResult

StopService stops a single service.

type ServiceDetails

type ServiceDetails struct {
	Name      string            `json:"name" jsonschema:"description=Service name"`
	Language  string            `json:"language" jsonschema:"description=Programming language (e.g. python, javascript, dotnet)"`
	Framework string            `json:"framework" jsonschema:"description=Framework used (e.g. flask, express, aspnet)"`
	Project   string            `json:"project" jsonschema:"description=Path to the project directory"`
	Status    string            `json:"status,omitempty" jsonschema:"description=Current running status"`
	Health    string            `json:"health,omitempty" jsonschema:"description=Health check status"`
	URL       string            `json:"url,omitempty" jsonschema:"description=Local URL where service is running"`
	Port      int               `json:"port,omitempty" jsonschema:"description=Port number the service is listening on"`
	PID       int               `json:"pid,omitempty" jsonschema:"description=Process ID of the running service"`
	Env       map[string]string `json:"env,omitempty" jsonschema:"description=Environment variables configured for the service"`
}

ServiceDetails represents individual service information

type ServicesResult

type ServicesResult struct {
	Project  map[string]any   `json:"project" jsonschema:"description=Project metadata including name and directory"`
	Services []ServiceDetails `json:"services" jsonschema:"description=List of services with their status and configuration"`
}

ServiceInfo represents the output schema for get_services tool

type TestOptions

type TestOptions struct {
	Type            string
	Coverage        bool
	ServiceFilter   string
	Watch           bool
	UpdateSnapshots bool
	FailFast        bool
	Parallel        bool
	Threshold       int
	Verbose         bool
	DryRun          bool
	OutputFormat    string
	OutputDir       string
	Stream          bool
	NoStream        bool
	Timeout         time.Duration
	Save            bool
	NoSave          bool
	Environment     string
	Changed         bool
	ChangedBase     string
}

TestOptions holds the options for the test command. Using a struct instead of global variables for better testability and concurrency safety.

type ToolConfig

type ToolConfig struct {
	Command       string   // The command to execute
	Args          []string // Arguments to get version
	VersionPrefix string   // Prefix to strip from version output (e.g., "v" for node)
	VersionField  int      // Which field contains version (0 = whole output, 1 = second field, etc.)
}

ToolConfig defines how to check a specific tool.

Jump to

Keyboard shortcuts

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