Documentation
¶
Index ¶
- Constants
- Variables
- func AddMCPTool(workflowFile string, mcpServerID string, registryURL string, ...) error
- func AddMultipleWorkflowsWithRepo(workflows []string, number int, verbose bool, engineOverride string, ...) error
- func AddMultipleWorkflowsWithRepoAndPR(workflows []string, number int, verbose bool, engineOverride string, ...) error
- func AddWorkflowWithRepo(workflow string, number int, verbose bool, engineOverride string, ...) error
- func AddWorkflowWithRepoAndPR(workflow string, number int, verbose bool, engineOverride string, ...) error
- func AddWorkflowWithTracking(workflow string, number int, verbose bool, engineOverride string, name string, ...) error
- func AddWorkflows(workflows []string, number int, verbose bool, engineOverride string, ...) error
- func CompileWorkflowWithValidation(compiler *workflow.Compiler, filePath string, verbose bool) error
- func CompileWorkflows(markdownFiles []string, verbose bool, engineOverride string, validate bool, ...) error
- func CreateWorkflowInteractively(workflowName string, verbose bool, force bool) error
- func DisableWorkflows(pattern string) error
- func DownloadWorkflowLogs(workflowName string, count int, ...) error
- func EnableWorkflows(pattern string) error
- func ExtractLogMetricsFromRun(processedRun ProcessedRun) workflow.LogMetrics
- func GetVersion() string
- func InspectWorkflowMCP(workflowFile string, serverFilter string, toolFilter string, verbose bool) error
- func InstallPackage(repoSpec string, local bool, verbose bool) error
- func IsRunnable(markdownPath string) (bool, error)
- func IsRunningInCI() bool
- func ListPackages(local bool, verbose bool) error
- func ListWorkflowMCP(workflowFile string, verbose bool) error
- func ListWorkflows(verbose bool) error
- func NewAddCommand(verbose bool, validateEngine func(string) error) *cobra.Command
- func NewLogsCommand() *cobra.Command
- func NewMCPAddSubcommand() *cobra.Command
- func NewMCPCommand() *cobra.Command
- func NewMCPInspectCommand() *cobra.Command
- func NewMCPInspectSubcommand() *cobra.Command
- func NewMCPListSubcommand() *cobra.Command
- func NewMCPServerSubcommand() *cobra.Command
- func NewWorkflow(workflowName string, verbose bool, force bool) error
- func NormalizeWorkflowFile(workflowFile string) string
- func RemoveWorkflows(pattern string, keepOrphans bool) error
- func ResolveWorkflowPath(workflowFile string) (string, error)
- func RunWorkflowOnGitHub(workflowIdOrName string, enable bool, verbose bool) error
- func RunWorkflowsOnGitHub(workflowNames []string, repeatSeconds int, enable bool, verbose bool) error
- func SetVersionInfo(v string)
- func StatusWorkflows(pattern string, verbose bool) error
- func UninstallPackage(repoSpec string, local bool, verbose bool) error
- type AccessLogEntry
- type Argument
- type AwInfo
- type DomainAnalysis
- type DownloadResult
- type EnvironmentVariable
- type FileTracker
- func (ft *FileTracker) GetAllFiles() []string
- func (ft *FileTracker) RollbackAllFiles(verbose bool) error
- func (ft *FileTracker) RollbackCreatedFiles(verbose bool) error
- func (ft *FileTracker) RollbackModifiedFiles(verbose bool) error
- func (ft *FileTracker) StageAllFiles(verbose bool) error
- func (ft *FileTracker) TrackCreated(filePath string)
- func (ft *FileTracker) TrackModified(filePath string)
- type GitHubWorkflow
- type Header
- type IncludeDependency
- type InteractiveWorkflowBuilder
- type LogMetrics
- type MCPFailureReport
- type MCPFailureSummary
- type MCPPackage
- type MCPRegistryClient
- type MCPRegistryServerForProcessing
- type MissingToolReport
- type MissingToolSummary
- type Package
- type ProcessedRun
- type Remote
- type Repository
- type Server
- type ServerListResponse
- type ToolGraph
- type ToolTransition
- type Transport
- type WorkflowMatch
- type WorkflowRun
- type WorkflowSourceInfo
Constants ¶
const ( // MaxIterations limits how many batches we fetch to prevent infinite loops MaxIterations = 20 // BatchSize is the number of runs to fetch in each iteration BatchSize = 100 // BatchSizeForAllWorkflows is the larger batch size when searching for agentic workflows // There can be a really large number of workflow runs in a repository, so // we are generous in the batch size when used without qualification. BatchSizeForAllWorkflows = 250 // MaxConcurrentDownloads limits the number of parallel artifact downloads MaxConcurrentDownloads = 10 )
Constants for the iterative algorithm
const ( StatusActive = "active" StatusInactive = "inactive" )
Status constants for server status
const (
ArgumentTypePositional = "positional"
)
Argument type constants
Variables ¶
var ErrNoArtifacts = errors.New("no artifacts found for this run")
ErrNoArtifacts indicates that a workflow run has no artifacts
Functions ¶
func AddMCPTool ¶ added in v0.8.3
func AddMCPTool(workflowFile string, mcpServerID string, registryURL string, transportType string, customToolID string, verbose bool) error
AddMCPTool adds an MCP tool to an agentic workflow
func AddMultipleWorkflowsWithRepo ¶ added in v0.2.7
func AddMultipleWorkflowsWithRepo(workflows []string, number int, verbose bool, engineOverride string, repoSpec string, name string, force bool) error
AddMultipleWorkflowsWithRepo adds multiple workflows from components to .github/workflows with optional repository installation Deprecated: Use AddWorkflows instead
func AddMultipleWorkflowsWithRepoAndPR ¶ added in v0.2.7
func AddMultipleWorkflowsWithRepoAndPR(workflows []string, number int, verbose bool, engineOverride string, repoSpec string, name string, force bool) error
AddMultipleWorkflowsWithRepoAndPR adds multiple workflows from components to .github/workflows with optional repository installation and creates a PR Deprecated: Use AddWorkflows instead
func AddWorkflowWithRepo ¶
func AddWorkflowWithRepo(workflow string, number int, verbose bool, engineOverride string, repoSpec string, name string, force bool) error
AddWorkflowWithRepo adds a workflow from components to .github/workflows with optional repository installation Deprecated: Use AddWorkflows instead
func AddWorkflowWithRepoAndPR ¶
func AddWorkflowWithRepoAndPR(workflow string, number int, verbose bool, engineOverride string, repoSpec string, name string, force bool) error
AddWorkflowWithRepoAndPR adds a workflow from components to .github/workflows with optional repository installation and creates a PR Deprecated: Use AddWorkflows instead
func AddWorkflowWithTracking ¶ added in v0.0.22
func AddWorkflowWithTracking(workflow string, number int, verbose bool, engineOverride string, name string, force bool, tracker *FileTracker) error
AddWorkflowWithTracking adds a workflow from components to .github/workflows with file tracking
func AddWorkflows ¶ added in v0.2.7
func AddWorkflows(workflows []string, number int, verbose bool, engineOverride string, repoSpec string, name string, force bool, createPR bool) error
AddWorkflows adds one or more workflows from components to .github/workflows with optional repository installation and PR creation
func CompileWorkflowWithValidation ¶ added in v0.5.1
func CompileWorkflowWithValidation(compiler *workflow.Compiler, filePath string, verbose bool) error
CompileWorkflowWithValidation compiles a workflow with always-on YAML validation for CLI usage
func CompileWorkflows ¶
func CreateWorkflowInteractively ¶ added in v0.8.3
CreateWorkflowInteractively prompts the user to build a workflow interactively
func DisableWorkflows ¶
DisableWorkflows disables workflows matching a pattern
func DownloadWorkflowLogs ¶
func DownloadWorkflowLogs(workflowName string, count int, startDate, endDate, outputDir, engine, branch string, beforeRunID, afterRunID int64, verbose bool, toolGraph bool, noStaged bool) error
DownloadWorkflowLogs downloads and analyzes workflow logs with metrics
func EnableWorkflows ¶
EnableWorkflows enables workflows matching a pattern
func ExtractLogMetricsFromRun ¶ added in v0.6.0
func ExtractLogMetricsFromRun(processedRun ProcessedRun) workflow.LogMetrics
ExtractLogMetricsFromRun extracts log metrics from a processed run's log directory
func InspectWorkflowMCP ¶
func InspectWorkflowMCP(workflowFile string, serverFilter string, toolFilter string, verbose bool) error
InspectWorkflowMCP inspects MCP servers used by a workflow and lists available tools, resources, and roots
func InstallPackage ¶
InstallPackage installs agentic workflows from a GitHub repository
func IsRunnable ¶
IsRunnable checks if a workflow can be run (has schedule or workflow_dispatch trigger)
func IsRunningInCI ¶ added in v0.8.3
func IsRunningInCI() bool
IsRunningInCI checks if we're running in a CI environment
func ListPackages ¶
ListPackages lists all installed packages
func ListWorkflowMCP ¶ added in v0.7.1
ListWorkflowMCP lists MCP servers defined in a workflow
func ListWorkflows ¶
ListWorkflows lists available workflow components
func NewAddCommand ¶ added in v0.8.3
NewAddCommand creates the add command
func NewMCPAddSubcommand ¶ added in v0.8.3
NewMCPAddSubcommand creates the mcp add subcommand
func NewMCPCommand ¶ added in v0.6.3
NewMCPCommand creates the main mcp command with subcommands
func NewMCPInspectCommand ¶ added in v0.2.0
NewMCPInspectCommand creates the mcp inspect command
func NewMCPInspectSubcommand ¶ added in v0.6.3
NewMCPInspectSubcommand creates the mcp inspect subcommand This is the former mcp inspect command now nested under mcp
func NewMCPListSubcommand ¶ added in v0.7.1
NewMCPListSubcommand creates the mcp list subcommand
func NewMCPServerSubcommand ¶ added in v0.8.5
NewMCPServerSubcommand creates the mcp server subcommand
func NewWorkflow ¶
NewWorkflow creates a new workflow markdown file with template content
func NormalizeWorkflowFile ¶ added in v0.8.3
NormalizeWorkflowFile normalizes a workflow file name by adding .md extension if missing
func RemoveWorkflows ¶
RemoveWorkflows removes workflows matching a pattern
func ResolveWorkflowPath ¶ added in v0.8.3
ResolveWorkflowPath resolves a workflow file path from various formats: - Absolute path to .md file - Relative path to .md file - Workflow name (adds .md extension and looks in .github/workflows) - Workflow name with .md extension
func RunWorkflowOnGitHub ¶
RunWorkflowOnGitHub runs an agentic workflow on GitHub Actions
func RunWorkflowsOnGitHub ¶ added in v0.2.4
func RunWorkflowsOnGitHub(workflowNames []string, repeatSeconds int, enable bool, verbose bool) error
RunWorkflowsOnGitHub runs multiple agentic workflows on GitHub Actions, optionally repeating at intervals
func SetVersionInfo ¶
func SetVersionInfo(v string)
SetVersionInfo sets the version information for the CLI
func StatusWorkflows ¶
Types ¶
type AccessLogEntry ¶ added in v0.3.4
type AccessLogEntry struct {
Timestamp string
Duration string
ClientIP string
Status string
Size string
Method string
URL string
User string
Hierarchy string
Type string
}
AccessLogEntry represents a parsed squid access log entry
type AwInfo ¶ added in v0.6.1
type AwInfo struct {
EngineID string `json:"engine_id"`
EngineName string `json:"engine_name"`
Model string `json:"model"`
Version string `json:"version"`
WorkflowName string `json:"workflow_name"`
Staged bool `json:"staged"`
CreatedAt string `json:"created_at"`
// Additional fields that might be present
RunID any `json:"run_id,omitempty"`
RunNumber any `json:"run_number,omitempty"`
Repository string `json:"repository,omitempty"`
}
AwInfo represents the structure of aw_info.json files
type DomainAnalysis ¶ added in v0.3.4
type DomainAnalysis struct {
AllowedDomains []string
DeniedDomains []string
TotalRequests int
AllowedCount int
DeniedCount int
}
DomainAnalysis represents analysis of domains from access logs
type DownloadResult ¶ added in v0.0.25
type DownloadResult struct {
Run WorkflowRun
Metrics LogMetrics
AccessAnalysis *DomainAnalysis
MissingTools []MissingToolReport
MCPFailures []MCPFailureReport
Error error
Skipped bool
LogsPath string
}
DownloadResult represents the result of downloading artifacts for a single run
type EnvironmentVariable ¶ added in v0.8.3
type EnvironmentVariable struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
IsRequired bool `json:"is_required,omitempty"`
IsSecret bool `json:"is_secret,omitempty"`
Default string `json:"default,omitempty"`
}
EnvironmentVariable represents an environment variable configuration
type FileTracker ¶ added in v0.0.22
type FileTracker struct {
CreatedFiles []string
ModifiedFiles []string
OriginalContent map[string][]byte // Store original content for rollback
// contains filtered or unexported fields
}
FileTracker keeps track of files created or modified during workflow operations to enable proper staging and rollback functionality
func NewFileTracker ¶ added in v0.0.22
func NewFileTracker() (*FileTracker, error)
NewFileTracker creates a new file tracker
func (*FileTracker) GetAllFiles ¶ added in v0.0.22
func (ft *FileTracker) GetAllFiles() []string
GetAllFiles returns all tracked files (created and modified)
func (*FileTracker) RollbackAllFiles ¶ added in v0.0.22
func (ft *FileTracker) RollbackAllFiles(verbose bool) error
RollbackAllFiles rolls back both created and modified files
func (*FileTracker) RollbackCreatedFiles ¶ added in v0.0.22
func (ft *FileTracker) RollbackCreatedFiles(verbose bool) error
RollbackCreatedFiles deletes all files that were created during the operation
func (*FileTracker) RollbackModifiedFiles ¶ added in v0.0.22
func (ft *FileTracker) RollbackModifiedFiles(verbose bool) error
RollbackModifiedFiles restores all modified files to their original state
func (*FileTracker) StageAllFiles ¶ added in v0.0.22
func (ft *FileTracker) StageAllFiles(verbose bool) error
StageAllFiles stages all tracked files using git add
func (*FileTracker) TrackCreated ¶ added in v0.0.22
func (ft *FileTracker) TrackCreated(filePath string)
TrackCreated adds a file to the created files list
func (*FileTracker) TrackModified ¶ added in v0.0.22
func (ft *FileTracker) TrackModified(filePath string)
TrackModified adds a file to the modified files list and stores its original content
type GitHubWorkflow ¶
type GitHubWorkflow struct {
ID int64 `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
State string `json:"state"`
}
GitHubWorkflow represents a workflow from GitHub API
type Header ¶ added in v0.8.3
type Header struct {
Name string `json:"name"`
IsSecret bool `json:"is_secret,omitempty"`
Default string `json:"default,omitempty"`
}
Header represents an HTTP header for remote servers
type IncludeDependency ¶
type IncludeDependency struct {
SourcePath string // Path in the source (local)
TargetPath string // Relative path where it should be copied in .github/workflows
IsOptional bool // Whether this is an optional include (@include?)
}
IncludeDependency represents a file dependency from @include directives
type InteractiveWorkflowBuilder ¶ added in v0.8.3
type InteractiveWorkflowBuilder struct {
WorkflowName string
Trigger string
Engine string
Tools []string
SafeOutputs []string
Intent string
NetworkAccess string
CustomDomains []string
}
InteractiveWorkflowBuilder collects user input to build an agentic workflow
type LogMetrics ¶
type LogMetrics = workflow.LogMetrics
LogMetrics represents extracted metrics from log files This is now an alias to the shared type in workflow package
type MCPFailureReport ¶ added in v0.6.2
type MCPFailureReport struct {
ServerName string `json:"server_name"`
Status string `json:"status"`
Timestamp string `json:"timestamp,omitempty"`
WorkflowName string `json:"workflow_name,omitempty"`
RunID int64 `json:"run_id,omitempty"`
}
MCPFailureReport represents an MCP server failure detected in a workflow run
type MCPFailureSummary ¶ added in v0.6.2
type MCPFailureSummary struct {
ServerName string
Count int
Workflows []string // List of workflow names that had this server fail
RunIDs []int64 // List of run IDs where this server failed
}
MCPFailureSummary aggregates MCP server failures across runs
type MCPPackage ¶ added in v0.8.3
type MCPPackage struct {
RegistryType string `json:"registry_type,omitempty"`
Identifier string `json:"identifier,omitempty"`
Version string `json:"version,omitempty"`
RuntimeHint string `json:"runtime_hint,omitempty"`
Transport Transport `json:"transport,omitempty"`
RuntimeArguments []Argument `json:"runtime_arguments,omitempty"`
PackageArguments []Argument `json:"package_arguments,omitempty"`
EnvironmentVariables []EnvironmentVariable `json:"environment_variables,omitempty"`
}
MCPPackage represents a package configuration for an MCP server
type MCPRegistryClient ¶ added in v0.8.3
type MCPRegistryClient struct {
// contains filtered or unexported fields
}
MCPRegistryClient handles communication with MCP registries
func NewMCPRegistryClient ¶ added in v0.8.3
func NewMCPRegistryClient(registryURL string) *MCPRegistryClient
NewMCPRegistryClient creates a new MCP registry client
func (*MCPRegistryClient) GetServer ¶ added in v0.8.3
func (c *MCPRegistryClient) GetServer(serverName string) (*MCPRegistryServerForProcessing, error)
GetServer gets a specific server by name from the registry
func (*MCPRegistryClient) SearchServers ¶ added in v0.8.3
func (c *MCPRegistryClient) SearchServers(query string) ([]MCPRegistryServerForProcessing, error)
SearchServers searches for MCP servers in the registry by fetching all servers and filtering locally
type MCPRegistryServerForProcessing ¶ added in v0.8.3
type MCPRegistryServerForProcessing struct {
Name string `json:"name"`
Description string `json:"description"`
Repository string `json:"repository"`
Command string `json:"command"`
Args []string `json:"args"`
RuntimeHint string `json:"runtime_hint"`
RuntimeArguments []string `json:"runtime_arguments"`
Transport string `json:"transport"`
Config map[string]interface{} `json:"config"`
EnvironmentVariables []EnvironmentVariable `json:"environment_variables"`
}
MCPRegistryServerForProcessing represents a flattened server for internal use
type MissingToolReport ¶ added in v0.5.0
type MissingToolReport struct {
Tool string `json:"tool"`
Reason string `json:"reason"`
Alternatives string `json:"alternatives,omitempty"`
Timestamp string `json:"timestamp"`
WorkflowName string `json:"workflow_name,omitempty"` // Added for tracking which workflow reported this
RunID int64 `json:"run_id,omitempty"` // Added for tracking which run reported this
}
MissingToolReport represents a missing tool reported by an agentic workflow
type MissingToolSummary ¶ added in v0.5.0
type MissingToolSummary struct {
Tool string
Count int
Workflows []string // List of workflow names that reported this tool
FirstReason string // Reason from the first occurrence
RunIDs []int64 // List of run IDs where this tool was reported
}
MissingToolSummary aggregates missing tool reports across runs
type ProcessedRun ¶ added in v0.3.4
type ProcessedRun struct {
Run WorkflowRun
AccessAnalysis *DomainAnalysis
MissingTools []MissingToolReport
MCPFailures []MCPFailureReport
}
ProcessedRun represents a workflow run with its associated analysis
type Remote ¶ added in v0.8.3
type Remote struct {
Type string `json:"type"`
URL string `json:"url"`
Headers []Header `json:"headers,omitempty"`
}
Remote represents a remote server configuration
type Repository ¶ added in v0.8.3
Repository represents the source repository information
type Server ¶ added in v0.8.3
type Server struct {
Name string `json:"name"`
Description string `json:"description"`
Status string `json:"status"`
Version string `json:"version,omitempty"`
Repository Repository `json:"repository,omitempty"`
Packages []MCPPackage `json:"packages,omitempty"`
Remotes []Remote `json:"remotes,omitempty"`
}
Server represents an MCP server in the registry
type ServerListResponse ¶ added in v0.8.3
type ServerListResponse struct {
Servers []Server `json:"servers"`
}
ServerListResponse represents the response from the /servers endpoint
type ToolGraph ¶ added in v0.6.0
type ToolGraph struct {
Tools map[string]bool // Set of all tools
Transitions map[string]int // Key: "from->to", Value: count
// contains filtered or unexported fields
}
ToolGraph represents a directed graph of tool call sequences
func NewToolGraph ¶ added in v0.6.0
func NewToolGraph() *ToolGraph
NewToolGraph creates a new empty tool graph
func (*ToolGraph) AddSequence ¶ added in v0.6.0
AddSequence adds a tool call sequence to the graph
func (*ToolGraph) GenerateMermaidGraph ¶ added in v0.6.0
GenerateMermaidGraph generates a Mermaid state diagram from the tool graph
func (*ToolGraph) GetSummary ¶ added in v0.6.0
GetSummary returns a summary of the tool graph
type ToolTransition ¶ added in v0.6.0
type ToolTransition struct {
From string // Source tool name
To string // Target tool name
Count int // Number of times this transition occurred
}
ToolTransition represents an edge in the tool graph
type Transport ¶ added in v0.8.3
type Transport struct {
Type string `json:"type"`
}
Transport represents the transport configuration
type WorkflowMatch ¶
WorkflowMatch represents a workflow match in package search
type WorkflowRun ¶
type WorkflowRun struct {
DatabaseID int64 `json:"databaseId"`
Number int `json:"number"`
URL string `json:"url"`
Status string `json:"status"`
Conclusion string `json:"conclusion"`
WorkflowName string `json:"workflowName"`
CreatedAt time.Time `json:"createdAt"`
StartedAt time.Time `json:"startedAt"`
UpdatedAt time.Time `json:"updatedAt"`
Event string `json:"event"`
HeadBranch string `json:"headBranch"`
HeadSha string `json:"headSha"`
DisplayTitle string `json:"displayTitle"`
Duration time.Duration
TokenUsage int
EstimatedCost float64
Turns int
LogsPath string
}
WorkflowRun represents a GitHub Actions workflow run with metrics
Source Files
¶
- access_log.go
- actions.go
- add_command.go
- ci.go
- commands.go
- enable.go
- file_tracker.go
- git.go
- interactive.go
- logs.go
- mcp.go
- mcp_add.go
- mcp_inspect.go
- mcp_inspect_mcp.go
- mcp_list.go
- mcp_registry.go
- mcp_registry_list.go
- mcp_registry_types.go
- mcp_secrets.go
- mcp_server.go
- packages.go
- resolver.go
- run.go
- secrets.go
- tool_graph.go
- workflows.go