Documentation
¶
Overview ¶
Package cli contains MCP (Model Context Protocol) validation functions. This file consolidates validation logic for MCP server configurations.
Index ¶
- Constants
- Variables
- func AddMCPTool(workflowFile string, mcpServerID string, registryURL string, ...) error
- func AddWorkflows(workflows []string, number int, verbose bool, engineOverride string, ...) error
- func ApplyJqFilter(jsonInput string, jqFilter string) (string, error)
- func AuditWorkflowRun(runInfo RunURLInfo, outputDir string, verbose bool, parse bool, ...) error
- func AutoMergePullRequestsCreatedAfter(repoSlug string, createdAfter time.Time, verbose bool) error
- func AutoMergePullRequestsLegacy(repoSlug string, verbose bool) error
- func ClearCurrentRepoSlugCache()
- func CompileWorkflowDataWithValidation(compiler *workflow.Compiler, workflowData *workflow.WorkflowData, ...) error
- func CompileWorkflowWithValidation(compiler *workflow.Compiler, filePath string, verbose bool, ...) error
- func CompileWorkflows(config CompileConfig) ([]*workflow.WorkflowData, error)
- func CreateWorkflowInteractively(workflowName string, verbose bool, force bool) error
- func DisableWorkflows(pattern string) errordeprecated
- func DisableWorkflowsByNames(workflowNames []string) error
- func DownloadWorkflowLogs(workflowName string, count int, ...) error
- func EnableWorkflows(pattern string) errordeprecated
- func EnableWorkflowsByNames(workflowNames []string) error
- func ExecuteWithRepeat(options RepeatOptions) error
- func ExtractLogMetricsFromRun(processedRun ProcessedRun) workflow.LogMetrics
- func GenerateOutputSchema[T any]() (*jsonschema.Schema, error)
- func GetCurrentRepoSlug() (string, error)
- func GetVersion() string
- func InitRepository(verbose bool, mcp bool) error
- func InspectWorkflowMCP(workflowFile string, serverFilter string, toolFilter string, verbose bool, ...) error
- func InstallPackage(repoSpec string, verbose bool) error
- func IsRunnable(markdownPath string) (bool, error)
- func IsRunningInCI() bool
- func ListToolsForMCP(workflowFile string, mcpServerName string, verbose bool) error
- func ListWorkflowMCP(workflowFile string, verbose bool) error
- func MergeWorkflowContent(base, current, new, oldSourceSpec, newRef string, verbose bool) (string, bool, error)
- func NewAddCommand(validateEngine func(string) error) *cobra.Command
- func NewAuditCommand() *cobra.Command
- func NewInitCommand() *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 NewMCPListToolsSubcommand() *cobra.Command
- func NewMCPServerCommand() *cobra.Command
- func NewPRCommand() *cobra.Command
- func NewPRTransferSubcommand() *cobra.Command
- func NewStatusCommand() *cobra.Command
- func NewTrialCommand(validateEngine func(string) error) *cobra.Command
- func NewUpdateCommand(validateEngine func(string) error) *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, engineOverride string, ...) error
- func RunWorkflowTrials(workflowSpecs []string, logicalRepoSpec string, cloneRepoSpec string, ...) error
- func RunWorkflowsOnGitHub(workflowNames []string, repeatCount int, enable bool, engineOverride string, ...) error
- func SetVersionInfo(v string)
- func StatusWorkflows(pattern string, verbose bool, jsonOutput bool) error
- func UpdateFieldInFrontmatter(content, fieldName, fieldValue string) (string, error)
- func UpdateWorkflows(workflowNames []string, allowMajor, force, verbose bool, engineOverride string) error
- func UpdateWorkflowsWithExtensionCheck(workflowNames []string, allowMajor, force, verbose bool, engineOverride string, ...) error
- func WaitForWorkflowCompletion(repoSlug, runID string, timeoutMinutes int, verbose bool) error
- type AccessLogEntry
- type AccessLogSummary
- type Argument
- type AuditData
- type AwInfo
- type AwInfoSteps
- type CombinedTrialResult
- type CompilationStats
- type CompileConfig
- type ContinuationData
- type DomainAnalysis
- type DomainRequestStats
- type DownloadResult
- type EnvironmentVariable
- type ErrorInfo
- type ErrorSummary
- type FileInfo
- 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 FirewallAnalysis
- type FirewallLogEntry
- type FirewallLogSummary
- type GitHubWorkflow
- type Header
- type IncludeDependency
- type InteractiveWorkflowBuilder
- type JobData
- type JobInfo
- type JobInfoWithDuration
- type LogMetrics
- type LogsData
- type LogsDataSchema
- type LogsSummary
- type MCPConfig
- type MCPFailureReport
- type MCPFailureSummary
- type MCPLogsGuardrailResponse
- type MCPPackage
- type MCPRegistryClient
- type MCPRegistryServerForProcessing
- type MCPServerConfig
- type MetricsData
- type MissingToolReport
- type MissingToolSummary
- type OverviewData
- type OverviewDisplay
- type PRInfo
- type Package
- type ProcessedRun
- type PullRequest
- type Remote
- type RepeatOptions
- type RepoSpec
- type Repository
- type RunData
- type RunSummary
- type RunURLInfo
- type SchemaField
- type SecretInfo
- type Server
- type ServerListResponse
- type SourceSpec
- type SuggestedJqQuery
- type ToolGraph
- type ToolTransition
- type ToolUsageInfo
- type ToolUsageSummary
- type Transport
- type TrialArtifacts
- type TrialSecretTracker
- type Workflow
- type WorkflowInfo
- type WorkflowJob
- type WorkflowMCPMetadata
- type WorkflowRun
- type WorkflowRunInfo
- type WorkflowSourceInfo
- type WorkflowSpec
- type WorkflowStatus
- type WorkflowStep
- type WorkflowTrialResult
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 ( // DefaultMaxMCPLogsOutputTokens is the default maximum number of tokens for MCP logs output // before triggering the guardrail (12000 tokens) DefaultMaxMCPLogsOutputTokens = 12000 // CharsPerToken is the approximate number of characters per token // Using OpenAI's rule of thumb: ~4 characters per token CharsPerToken = 4 )
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 AddWorkflows ¶ added in v0.2.7
func AddWorkflows(workflows []string, number int, verbose bool, engineOverride string, name string, force bool, appendText string, createPR bool, noGitattributes bool) error
AddWorkflows adds one or more workflows from components to .github/workflows with optional repository installation and PR creation
func ApplyJqFilter ¶ added in v0.20.0
ApplyJqFilter applies a jq filter to JSON input
func AuditWorkflowRun ¶ added in v0.12.1
func AuditWorkflowRun(runInfo RunURLInfo, outputDir string, verbose bool, parse bool, jsonOutput bool) error
AuditWorkflowRun audits a single workflow run and generates a report
func AutoMergePullRequestsCreatedAfter ¶ added in v0.22.1
AutoMergePullRequestsCreatedAfter checks for open PRs in the repository created after a specific time and auto-merges them This function filters PRs to only those created after the specified time to avoid merging unrelated PRs
func AutoMergePullRequestsLegacy ¶ added in v0.22.1
AutoMergePullRequestsLegacy is the legacy function that auto-merges all open PRs (used by trial command for backward compatibility)
func ClearCurrentRepoSlugCache ¶ added in v0.26.0
func ClearCurrentRepoSlugCache()
ClearCurrentRepoSlugCache clears the current repository slug cache This is useful for testing or when repository context might have changed
func CompileWorkflowDataWithValidation ¶ added in v0.25.0
func CompileWorkflowDataWithValidation(compiler *workflow.Compiler, workflowData *workflow.WorkflowData, filePath string, verbose bool, runZizmorPerFile bool, runPoutinePerFile bool, runActionlintPerFile bool, strict bool) error
CompileWorkflowDataWithValidation compiles from already-parsed WorkflowData with validation This avoids re-parsing when the workflow data has already been parsed
func CompileWorkflowWithValidation ¶ added in v0.5.1
func CompileWorkflowWithValidation(compiler *workflow.Compiler, filePath string, verbose bool, runZizmorPerFile bool, runPoutinePerFile bool, runActionlintPerFile bool, strict bool) error
CompileWorkflowWithValidation compiles a workflow with always-on YAML validation for CLI usage
func CompileWorkflows ¶
func CompileWorkflows(config CompileConfig) ([]*workflow.WorkflowData, error)
func CreateWorkflowInteractively ¶ added in v0.8.3
CreateWorkflowInteractively prompts the user to build a workflow interactively
func DisableWorkflows
deprecated
func DisableWorkflowsByNames ¶ added in v0.19.0
DisableWorkflowsByNames disables workflows by specific names, or all if no names provided
func DownloadWorkflowLogs ¶
func DownloadWorkflowLogs(workflowName string, count int, startDate, endDate, outputDir, engine, branch string, beforeRunID, afterRunID int64, verbose bool, toolGraph bool, noStaged bool, firewallOnly bool, noFirewall bool, parse bool, jsonOutput bool, timeout int) error
DownloadWorkflowLogs downloads and analyzes workflow logs with metrics
func EnableWorkflows
deprecated
func EnableWorkflowsByNames ¶ added in v0.19.0
EnableWorkflowsByNames enables workflows by specific names, or all if no names provided
func ExecuteWithRepeat ¶ added in v0.22.0
func ExecuteWithRepeat(options RepeatOptions) error
ExecuteWithRepeat runs a function once, and optionally repeats it the specified number of times with graceful signal handling for shutdown.
func ExtractLogMetricsFromRun ¶ added in v0.6.0
func ExtractLogMetricsFromRun(processedRun ProcessedRun) workflow.LogMetrics
displayToolCallReport displays a table of tool usage statistics across all runs ExtractLogMetricsFromRun extracts log metrics from a processed run's log directory
func GenerateOutputSchema ¶ added in v0.21.0
func GenerateOutputSchema[T any]() (*jsonschema.Schema, error)
GenerateOutputSchema generates a JSON schema from a Go struct type for MCP tool outputs. This helper uses the github.com/google/jsonschema-go package to automatically generate schemas from Go types, leveraging struct tags for descriptions and constraints.
The schema is generated with default options which respect: - json tags for field names - jsonschema tags for descriptions and constraints - omitempty to mark optional fields
Example usage:
type MyOutput struct {
Name string `json:"name" jsonschema:"description=Name of the item"`
Count int `json:"count,omitempty" jsonschema:"description=Number of items"`
}
schema, err := GenerateOutputSchema[MyOutput]()
tool := &mcp.Tool{
Name: "my-tool",
Description: "My tool description",
OutputSchema: schema,
}
func GetCurrentRepoSlug ¶ added in v0.22.1
GetCurrentRepoSlug gets the current repository slug with caching using sync.Once This is the recommended function to use for repository access across the codebase
func InitRepository ¶ added in v0.11.0
InitRepository initializes the repository for agentic workflows
func InspectWorkflowMCP ¶
func InspectWorkflowMCP(workflowFile string, serverFilter string, toolFilter string, verbose bool, useActionsSecrets 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 ListToolsForMCP ¶ added in v0.10.0
ListToolsForMCP lists available tools for a specific MCP server
func ListWorkflowMCP ¶ added in v0.7.1
ListWorkflowMCP lists MCP servers defined in a workflow
func MergeWorkflowContent ¶ added in v0.21.0
func MergeWorkflowContent(base, current, new, oldSourceSpec, newRef string, verbose bool) (string, bool, error)
MergeWorkflowContent performs a 3-way merge of workflow content using git merge-file It returns the merged content, whether conflicts exist, and any error
func NewAddCommand ¶ added in v0.8.3
NewAddCommand creates the add command
func NewAuditCommand ¶ added in v0.12.1
NewAuditCommand creates the audit command
func NewInitCommand ¶ added in v0.18.2
NewInitCommand creates the init 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 NewMCPListToolsSubcommand ¶ added in v0.10.0
NewMCPListToolsSubcommand creates the mcp list-tools subcommand
func NewMCPServerCommand ¶ added in v0.16.0
NewMCPServerCommand creates the mcp-server command
func NewPRCommand ¶ added in v0.22.2
NewPRCommand creates the main pr command with subcommands
func NewPRTransferSubcommand ¶ added in v0.22.2
NewPRTransferSubcommand creates the pr transfer subcommand
func NewStatusCommand ¶ added in v0.20.0
NewStatusCommand creates the status command
func NewTrialCommand ¶ added in v0.12.0
NewTrialCommand creates the trial command
func NewUpdateCommand ¶ added in v0.14.0
NewUpdateCommand creates the update command
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 or subpath (e.g., "a.md" -> ".github/workflows/a.md", "shared/b.md" -> ".github/workflows/shared/b.md")
func RunWorkflowOnGitHub ¶
func RunWorkflowOnGitHub(workflowIdOrName string, enable bool, engineOverride string, repoOverride string, autoMergePRs bool, pushSecrets bool, verbose bool) error
RunWorkflowOnGitHub runs an agentic workflow on GitHub Actions
func RunWorkflowTrials ¶ added in v0.12.0
func RunWorkflowTrials(workflowSpecs []string, logicalRepoSpec string, cloneRepoSpec string, hostRepoSpec string, deleteHostRepo, forceDeleteHostRepo, quiet bool, timeoutMinutes int, triggerContext string, repeatCount int, autoMergePRs bool, engineOverride string, appendText string, pushSecrets bool, verbose bool) error
RunWorkflowTrials executes the main logic for trialing one or more workflows
func RunWorkflowsOnGitHub ¶ added in v0.2.4
func RunWorkflowsOnGitHub(workflowNames []string, repeatCount int, enable bool, engineOverride string, repoOverride string, autoMergePRs bool, pushSecrets bool, verbose bool) error
RunWorkflowsOnGitHub runs multiple agentic workflows on GitHub Actions, optionally repeating a specified number of times
func SetVersionInfo ¶
func SetVersionInfo(v string)
SetVersionInfo sets the version information for the CLI
func UpdateFieldInFrontmatter ¶ added in v0.21.0
UpdateFieldInFrontmatter updates a field in the frontmatter while preserving the original formatting when possible. It tries to preserve whitespace, comments, and formatting by working with the raw frontmatter lines, similar to how addSourceToWorkflow works.
func UpdateWorkflows ¶ added in v0.14.0
func UpdateWorkflows(workflowNames []string, allowMajor, force, verbose bool, engineOverride string) error
UpdateWorkflows updates workflows from their source repositories
func UpdateWorkflowsWithExtensionCheck ¶ added in v0.19.0
func UpdateWorkflowsWithExtensionCheck(workflowNames []string, allowMajor, force, verbose bool, engineOverride string, createPR bool) error
UpdateWorkflowsWithExtensionCheck performs the complete update process: 1. Check for gh-aw extension updates 2. Update workflows from source repositories 3. Compile all workflows 4. Optionally create a PR
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 AccessLogSummary ¶ added in v0.21.0
type AccessLogSummary struct {
TotalRequests int `json:"total_requests" console:"header:Total Requests"`
AllowedCount int `json:"allowed_count" console:"header:Allowed"`
DeniedCount int `json:"denied_count" console:"header:Denied"`
AllowedDomains []string `json:"allowed_domains" console:"-"`
DeniedDomains []string `json:"denied_domains" console:"-"`
ByWorkflow map[string]*DomainAnalysis `json:"by_workflow,omitempty" console:"-"`
}
AccessLogSummary contains aggregated access log analysis
type AuditData ¶ added in v0.21.0
type AuditData struct {
Overview OverviewData `json:"overview"`
Metrics MetricsData `json:"metrics"`
Jobs []JobData `json:"jobs,omitempty"`
DownloadedFiles []FileInfo `json:"downloaded_files"`
MissingTools []MissingToolReport `json:"missing_tools,omitempty"`
MCPFailures []MCPFailureReport `json:"mcp_failures,omitempty"`
FirewallAnalysis *FirewallAnalysis `json:"firewall_analysis,omitempty"`
Errors []ErrorInfo `json:"errors,omitempty"`
Warnings []ErrorInfo `json:"warnings,omitempty"`
ToolUsage []ToolUsageInfo `json:"tool_usage,omitempty"`
}
AuditData represents the complete structured audit data for a workflow run
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"`
Steps AwInfoSteps `json:"steps,omitempty"` // Steps metadata
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"`
}
type AwInfoSteps ¶ added in v0.26.0
type AwInfoSteps struct {
Firewall string `json:"firewall,omitempty"` // Firewall type (e.g., "squid") or empty if no firewall
}
AwInfo represents the structure of aw_info.json files AwInfoSteps represents the steps information in aw_info.json files
type CombinedTrialResult ¶ added in v0.12.0
type CombinedTrialResult struct {
WorkflowNames []string `json:"workflow_names"`
Results []WorkflowTrialResult `json:"results"`
Timestamp time.Time `json:"timestamp"`
}
CombinedTrialResult represents the combined results of multiple workflow trials
type CompilationStats ¶ added in v0.22.0
type CompilationStats struct {
Total int
Errors int
Warnings int
FailedWorkflows []string // Names of workflows that failed compilation
}
CompilationStats tracks the results of workflow compilation
type CompileConfig ¶ added in v0.12.0
type CompileConfig struct {
MarkdownFiles []string // Files to compile (empty for all files)
Verbose bool // Enable verbose output
EngineOverride string // Override AI engine setting
Validate bool // Enable schema validation
Watch bool // Enable watch mode
WorkflowDir string // Custom workflow directory
SkipInstructions bool // Deprecated: Instructions are no longer written during compilation
NoEmit bool // Validate without generating lock files
Purge bool // Remove orphaned lock files
TrialMode bool // Enable trial mode (suppress safe outputs)
TrialLogicalRepoSlug string // Target repository for trial mode
Strict bool // Enable strict mode validation
Dependabot bool // Generate Dependabot manifests for npm dependencies
ForceOverwrite bool // Force overwrite of existing files (dependabot.yml)
Zizmor bool // Run zizmor security scanner on generated .lock.yml files
Poutine bool // Run poutine security scanner on generated .lock.yml files
Actionlint bool // Run actionlint linter on generated .lock.yml files
}
CompileConfig holds configuration options for compiling workflows
type ContinuationData ¶ added in v0.23.0
type ContinuationData struct {
Message string `json:"message"`
WorkflowName string `json:"workflow_name,omitempty"`
Count int `json:"count,omitempty"`
StartDate string `json:"start_date,omitempty"`
EndDate string `json:"end_date,omitempty"`
Engine string `json:"engine,omitempty"`
Branch string `json:"branch,omitempty"`
AfterRunID int64 `json:"after_run_id,omitempty"`
BeforeRunID int64 `json:"before_run_id,omitempty"`
Timeout int `json:"timeout,omitempty"`
}
ContinuationData provides parameters to continue querying when timeout is reached
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 DomainRequestStats ¶ added in v0.25.0
DomainRequestStats tracks request statistics per domain
type DownloadResult ¶ added in v0.0.25
type DownloadResult struct {
Run WorkflowRun
Metrics LogMetrics
AccessAnalysis *DomainAnalysis
FirewallAnalysis *FirewallAnalysis
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 ErrorInfo ¶ added in v0.21.0
type ErrorInfo struct {
File string `json:"file,omitempty"`
Line int `json:"line,omitempty"`
Type string `json:"type"`
Message string `json:"message"`
}
ErrorInfo contains detailed error information
type ErrorSummary ¶ added in v0.24.0
type ErrorSummary struct {
Type string `json:"type" console:"header:Type"`
Message string `json:"message" console:"header:Message,maxlen:80"`
Count int `json:"count" console:"header:Occurrences"`
Engine string `json:"engine,omitempty" console:"header:Engine,omitempty"`
RunID int64 `json:"run_id" console:"header:Sample Run"`
RunURL string `json:"run_url" console:"-"`
WorkflowName string `json:"workflow_name,omitempty" console:"-"`
PatternID string `json:"pattern_id,omitempty" console:"-"`
}
ErrorSummary contains aggregated error/warning statistics
type FileInfo ¶ added in v0.21.0
type FileInfo struct {
Path string `json:"path"`
Size int64 `json:"size"`
SizeFormatted string `json:"size_formatted"`
Description string `json:"description"`
IsDirectory bool `json:"is_directory"`
}
FileInfo contains information about downloaded artifact files
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 FirewallAnalysis ¶ added in v0.25.0
type FirewallAnalysis struct {
TotalRequests int
AllowedRequests int
DeniedRequests int
AllowedDomains []string
DeniedDomains []string
RequestsByDomain map[string]DomainRequestStats
}
FirewallAnalysis represents analysis of firewall logs This mirrors the structure from the JavaScript parser
type FirewallLogEntry ¶ added in v0.25.0
type FirewallLogEntry struct {
Timestamp string
ClientIPPort string
Domain string
DestIPPort string
Proto string
Method string
Status string
Decision string
URL string
UserAgent string
}
FirewallLogEntry represents a parsed firewall log entry Format: timestamp client_ip:port domain dest_ip:port proto method status decision url user_agent
type FirewallLogSummary ¶ added in v0.25.0
type FirewallLogSummary struct {
TotalRequests int `json:"total_requests" console:"header:Total Requests"`
AllowedRequests int `json:"allowed_requests" console:"header:Allowed"`
DeniedRequests int `json:"denied_requests" console:"header:Denied"`
AllowedDomains []string `json:"allowed_domains" console:"-"`
DeniedDomains []string `json:"denied_domains" console:"-"`
RequestsByDomain map[string]DomainRequestStats `json:"requests_by_domain,omitempty" console:"-"`
ByWorkflow map[string]*FirewallAnalysis `json:"by_workflow,omitempty" console:"-"`
}
FirewallLogSummary contains aggregated firewall log data
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 JobData ¶ added in v0.21.0
type JobData struct {
Name string `json:"name" console:"header:Name"`
Status string `json:"status" console:"header:Status"`
Conclusion string `json:"conclusion,omitempty" console:"header:Conclusion,omitempty"`
Duration string `json:"duration,omitempty" console:"header:Duration,omitempty"`
}
JobData contains information about individual jobs
type JobInfo ¶ added in v0.9.0
type JobInfo struct {
Name string `json:"name"`
Status string `json:"status"`
Conclusion string `json:"conclusion"`
StartedAt time.Time `json:"started_at,omitempty"`
CompletedAt time.Time `json:"completed_at,omitempty"`
}
JobInfo represents basic information about a workflow job
type JobInfoWithDuration ¶ added in v0.21.0
JobInfoWithDuration extends JobInfo with calculated duration
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 LogsData ¶ added in v0.21.0
type LogsData struct {
Summary LogsSummary `json:"summary" console:"title:Workflow Logs Summary"`
Runs []RunData `json:"runs" console:"title:Workflow Logs Overview"`
ToolUsage []ToolUsageSummary `json:"tool_usage,omitempty" console:"title:🛠️ Tool Usage Summary,omitempty"`
ErrorsAndWarnings []ErrorSummary `json:"errors_and_warnings,omitempty" console:"title:Errors and Warnings,omitempty"`
MissingTools []MissingToolSummary `json:"missing_tools,omitempty" console:"title:🛠️ Missing Tools Summary,omitempty"`
MCPFailures []MCPFailureSummary `json:"mcp_failures,omitempty" console:"title:⚠️ MCP Server Failures,omitempty"`
AccessLog *AccessLogSummary `json:"access_log,omitempty" console:"title:Access Log Analysis,omitempty"`
FirewallLog *FirewallLogSummary `json:"firewall_log,omitempty" console:"title:🔥 Firewall Log Analysis,omitempty"`
Continuation *ContinuationData `json:"continuation,omitempty" console:"-"`
LogsLocation string `json:"logs_location" console:"-"`
}
LogsData represents the complete structured data for logs output
type LogsDataSchema ¶ added in v0.26.0
type LogsDataSchema struct {
Description string `json:"description"`
Type string `json:"type"`
Fields map[string]SchemaField `json:"fields"`
}
LogsDataSchema describes the structure of the full logs output
type LogsSummary ¶ added in v0.21.0
type LogsSummary struct {
TotalRuns int `json:"total_runs" console:"header:Total Runs"`
TotalDuration string `json:"total_duration" console:"header:Total Duration"`
TotalTokens int `json:"total_tokens" console:"header:Total Tokens,format:number"`
TotalCost float64 `json:"total_cost" console:"header:Total Cost,format:cost"`
TotalTurns int `json:"total_turns" console:"header:Total Turns"`
TotalErrors int `json:"total_errors" console:"header:Total Errors"`
TotalWarnings int `json:"total_warnings" console:"header:Total Warnings"`
TotalMissingTools int `json:"total_missing_tools" console:"header:Total Missing Tools"`
}
LogsSummary contains aggregate metrics across all runs
type MCPConfig ¶ added in v0.27.0
type MCPConfig struct {
Servers map[string]MCPServerConfig `json:"servers"`
}
MCPConfig represents the structure of mcp.json
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 `json:"server_name" console:"header:Server"`
Count int `json:"count" console:"header:Failures"`
Workflows []string `json:"workflows" console:"-"` // List of workflow names that had this server fail
WorkflowsDisplay string `json:"-" console:"header:Workflows,maxlen:60"` // Formatted display of workflows
RunIDs []int64 `json:"run_ids" console:"-"` // List of run IDs where this server failed
}
MCPFailureSummary aggregates MCP server failures across runs
type MCPLogsGuardrailResponse ¶ added in v0.26.0
type MCPLogsGuardrailResponse struct {
Message string `json:"message"`
OutputTokens int `json:"output_tokens"`
OutputSizeLimit int `json:"output_size_limit"`
Schema LogsDataSchema `json:"schema"`
SuggestedQueries []SuggestedJqQuery `json:"suggested_queries"`
}
MCPLogsGuardrailResponse represents the response when output is too large
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 MCPServerConfig ¶ added in v0.27.0
type MCPServerConfig struct {
Command string `json:"command"`
Args []string `json:"args"`
CWD string `json:"cwd,omitempty"`
}
MCPServerConfig represents a single MCP server configuration
type MetricsData ¶ added in v0.21.0
type MetricsData struct {
TokenUsage int `json:"token_usage,omitempty" console:"header:Token Usage,format:number,omitempty"`
EstimatedCost float64 `json:"estimated_cost,omitempty" console:"header:Estimated Cost,format:cost,omitempty"`
Turns int `json:"turns,omitempty" console:"header:Turns,omitempty"`
ErrorCount int `json:"error_count" console:"header:Errors"`
WarningCount int `json:"warning_count" console:"header:Warnings"`
}
MetricsData contains execution metrics
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 `json:"tool" console:"header:Tool"`
Count int `json:"count" console:"header:Occurrences"`
Workflows []string `json:"workflows" console:"-"` // List of workflow names that reported this tool
WorkflowsDisplay string `json:"-" console:"header:Workflows,maxlen:40"` // Formatted display of workflows
FirstReason string `json:"first_reason" console:"-"` // Reason from the first occurrence
FirstReasonDisplay string `json:"-" console:"header:First Reason,maxlen:50"` // Formatted display of first reason
RunIDs []int64 `json:"run_ids" console:"-"` // List of run IDs where this tool was reported
}
MissingToolSummary aggregates missing tool reports across runs
type OverviewData ¶ added in v0.21.0
type OverviewData struct {
RunID int64 `json:"run_id" console:"header:Run ID"`
WorkflowName string `json:"workflow_name" console:"header:Workflow"`
Status string `json:"status" console:"header:Status"`
Conclusion string `json:"conclusion,omitempty" console:"header:Conclusion,omitempty"`
CreatedAt time.Time `json:"created_at" console:"header:Created At"`
StartedAt time.Time `json:"started_at,omitempty" console:"header:Started At,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty" console:"header:Updated At,omitempty"`
Duration string `json:"duration,omitempty" console:"header:Duration,omitempty"`
Event string `json:"event" console:"header:Event"`
Branch string `json:"branch" console:"header:Branch"`
URL string `json:"url" console:"header:URL"`
}
OverviewData contains basic information about the workflow run
type OverviewDisplay ¶ added in v0.21.0
type OverviewDisplay struct {
RunID int64 `console:"header:Run ID"`
Workflow string `console:"header:Workflow"`
Status string `console:"header:Status"`
Duration string `console:"header:Duration,omitempty"`
Event string `console:"header:Event"`
Branch string `console:"header:Branch"`
URL string `console:"header:URL"`
}
OverviewDisplay is a display-optimized version of OverviewData for console rendering
type PRInfo ¶ added in v0.22.2
type PRInfo struct {
Number int `json:"number"`
Title string `json:"title"`
Body string `json:"body"`
State string `json:"state"`
HeadSHA string `json:"headSHA"`
BaseBranch string `json:"baseBranch"`
HeadBranch string `json:"headBranch"`
SourceRepo string `json:"sourceRepo"`
TargetRepo string `json:"targetRepo"`
AuthorLogin string `json:"authorLogin"`
}
PRInfo represents the details of a pull request
type ProcessedRun ¶ added in v0.3.4
type ProcessedRun struct {
Run WorkflowRun
AccessAnalysis *DomainAnalysis
FirewallAnalysis *FirewallAnalysis
MissingTools []MissingToolReport
MCPFailures []MCPFailureReport
JobDetails []JobInfoWithDuration
}
ProcessedRun represents a workflow run with its associated analysis
type PullRequest ¶ added in v0.22.1
type PullRequest struct {
Number int `json:"number"`
Title string `json:"title"`
IsDraft bool `json:"isDraft"`
Mergeable string `json:"mergeable"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
PullRequest represents a GitHub Pull Request
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 RepeatOptions ¶ added in v0.22.0
type RepeatOptions struct {
// Number of times to repeat execution (0 = run once)
RepeatCount int
// Message to display when starting repeat mode
StartMessage string
// Message to display on each repeat iteration (optional, uses default if empty)
RepeatMessage string
// Function to execute on each iteration
ExecuteFunc func() error
// Function to execute on cleanup/exit (optional)
CleanupFunc func()
// Whether to use stderr for informational messages (default: true)
UseStderr bool
}
RepeatOptions contains configuration for the repeat functionality
type RepoSpec ¶ added in v0.14.0
type RepoSpec struct {
RepoSlug string // e.g., "owner/repo"
Version string // optional version/tag/SHA/branch
}
RepoSpec represents a parsed repository specification
type Repository ¶ added in v0.8.3
Repository represents the source repository information
type RunData ¶ added in v0.21.0
type RunData struct {
DatabaseID int64 `json:"database_id" console:"header:Run ID"`
Number int `json:"number" console:"-"`
WorkflowName string `json:"workflow_name" console:"header:Workflow"`
Agent string `json:"agent,omitempty" console:"header:Agent,omitempty"`
Status string `json:"status" console:"header:Status"`
Conclusion string `json:"conclusion,omitempty" console:"-"`
Duration string `json:"duration,omitempty" console:"header:Duration,omitempty"`
TokenUsage int `json:"token_usage,omitempty" console:"header:Tokens,format:number,omitempty"`
EstimatedCost float64 `json:"estimated_cost,omitempty" console:"header:Cost ($),format:cost,omitempty"`
Turns int `json:"turns,omitempty" console:"header:Turns,omitempty"`
ErrorCount int `json:"error_count" console:"header:Errors"`
WarningCount int `json:"warning_count" console:"header:Warnings"`
MissingToolCount int `json:"missing_tool_count" console:"header:Missing"`
CreatedAt time.Time `json:"created_at" console:"header:Created"`
URL string `json:"url" console:"-"`
LogsPath string `json:"logs_path" console:"header:Logs Path"`
Event string `json:"event" console:"-"`
Branch string `json:"branch" console:"-"`
}
RunData contains information about a single workflow run
type RunSummary ¶ added in v0.23.0
type RunSummary struct {
CLIVersion string `json:"cli_version"` // CLI version used to process this run
RunID int64 `json:"run_id"` // Workflow run database ID
ProcessedAt time.Time `json:"processed_at"` // When this summary was created
Run WorkflowRun `json:"run"` // Full workflow run metadata
Metrics LogMetrics `json:"metrics"` // Extracted log metrics
AccessAnalysis *DomainAnalysis `json:"access_analysis"` // Network access analysis
FirewallAnalysis *FirewallAnalysis `json:"firewall_analysis"` // Firewall log analysis
MissingTools []MissingToolReport `json:"missing_tools"` // Missing tool reports
MCPFailures []MCPFailureReport `json:"mcp_failures"` // MCP server failures
ArtifactsList []string `json:"artifacts_list"` // List of downloaded artifact files
JobDetails []JobInfoWithDuration `json:"job_details"` // Job execution details
}
RunSummary represents a complete summary of a workflow run's artifacts and metrics. This file is written to each run folder as "run_summary.json" to cache processing results and avoid re-downloading and re-processing already analyzed runs.
Key features: - Acts as a marker that a run has been fully processed - Stores all extracted metrics and analysis results - Includes CLI version for cache invalidation when the tool is updated - Enables fast reloading of run data without re-parsing logs
Cache invalidation: - If the CLI version in the summary doesn't match the current version, the run is reprocessed - This ensures that bug fixes and improvements in log parsing are automatically applied
type RunURLInfo ¶ added in v0.23.0
RunURLInfo contains the parsed information from a workflow run URL
type SchemaField ¶ added in v0.26.0
SchemaField describes a field in the schema
type SecretInfo ¶ added in v0.22.3
type SecretInfo struct {
Name string // Secret name (e.g., "DD_API_KEY")
EnvKey string // Environment variable key where it should be set
Available bool // Whether the secret is available
Source string // Where the secret was found ("env", "actions", or "")
Value string // The secret value (if fetched)
}
SecretInfo contains information about a required secret
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 SourceSpec ¶ added in v0.14.0
type SourceSpec struct {
Repo string // e.g., "owner/repo"
Path string // e.g., "workflows/workflow-name.md"
Ref string // optional ref (version/tag/SHA/branch)
}
SourceSpec represents a parsed source specification from workflow frontmatter
type SuggestedJqQuery ¶ added in v0.26.0
type SuggestedJqQuery struct {
Description string `json:"description"`
Query string `json:"query"`
Example string `json:"example,omitempty"`
}
SuggestedJqQuery represents a suggested jq filter
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 ToolUsageInfo ¶ added in v0.21.0
type ToolUsageInfo struct {
Name string `json:"name" console:"header:Tool"`
CallCount int `json:"call_count" console:"header:Calls"`
MaxInputSize int `json:"max_input_size,omitempty" console:"header:Max Input,format:number,omitempty"`
MaxOutputSize int `json:"max_output_size,omitempty" console:"header:Max Output,format:number,omitempty"`
MaxDuration string `json:"max_duration,omitempty" console:"header:Max Duration,omitempty"`
}
ToolUsageInfo contains aggregated tool usage statistics
type ToolUsageSummary ¶ added in v0.21.0
type ToolUsageSummary struct {
Name string `json:"name" console:"header:Tool"`
TotalCalls int `json:"total_calls" console:"header:Total Calls,format:number"`
Runs int `json:"runs" console:"header:Runs"` // Number of runs that used this tool
MaxOutputSize int `json:"max_output_size,omitempty" console:"header:Max Output,format:filesize,default:N/A,omitempty"`
MaxDuration string `json:"max_duration,omitempty" console:"header:Max Duration,default:N/A,omitempty"`
}
ToolUsageSummary contains aggregated tool usage statistics
type Transport ¶ added in v0.8.3
type Transport struct {
Type string `json:"type"`
}
Transport represents the transport configuration
type TrialArtifacts ¶ added in v0.14.3
type TrialArtifacts struct {
SafeOutputs map[string]interface{} `json:"safe_outputs"`
//AgentStdioLogs []string `json:"agent_stdio_logs,omitempty"`
AgenticRunInfo map[string]interface{} `json:"agentic_run_info,omitempty"`
AdditionalArtifacts map[string]interface{} `json:"additional_artifacts,omitempty"`
}
TrialArtifacts represents all artifacts downloaded from a workflow run
type TrialSecretTracker ¶ added in v0.18.0
type TrialSecretTracker struct {
RepoSlug string `json:"repo_slug"`
AddedSecrets map[string]bool `json:"added_secrets"` // secrets that were successfully added by trial
}
TrialSecretTracker tracks which secrets were added during a trial for cleanup
func NewTrialSecretTracker ¶ added in v0.18.0
func NewTrialSecretTracker(repoSlug string) *TrialSecretTracker
NewTrialSecretTracker creates a new secret tracker for a repository
type Workflow ¶ added in v0.27.0
type Workflow struct {
Name string `yaml:"name,omitempty"`
On any `yaml:"on,omitempty"`
Jobs map[string]WorkflowJob `yaml:"jobs,omitempty"`
}
Workflow represents a GitHub Actions workflow file
type WorkflowInfo ¶ added in v0.28.6
type WorkflowInfo struct {
ID string `console:"header:ID"`
Name string `console:"header:Name"`
Description string `console:"header:Description,omitempty"`
Path string `console:"-"` // Internal use only, not displayed
}
WorkflowInfo represents metadata about an available workflow
type WorkflowJob ¶ added in v0.27.0
type WorkflowJob struct {
RunsOn any `yaml:"runs-on,omitempty"`
Permissions map[string]any `yaml:"permissions,omitempty"`
Steps []WorkflowStep `yaml:"steps,omitempty"`
}
WorkflowJob represents a GitHub Actions workflow job
type WorkflowMCPMetadata ¶ added in v0.24.0
type WorkflowMCPMetadata struct {
FilePath string
FileName string
BaseName string
MCPConfigs []parser.MCPServerConfig
Frontmatter map[string]any
}
WorkflowMCPMetadata contains metadata about MCP servers in a workflow
func ScanWorkflowsForMCP ¶ added in v0.24.0
func ScanWorkflowsForMCP(workflowsDir string, serverFilter string, verbose bool) ([]WorkflowMCPMetadata, error)
ScanWorkflowsForMCP scans workflow files for MCP configurations Returns metadata for workflows that contain MCP servers
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
ErrorCount int
WarningCount int
MissingToolCount int
LogsPath string
}
WorkflowRun represents a GitHub Actions workflow run with metrics
type WorkflowRunInfo ¶ added in v0.12.2
type WorkflowRunInfo struct {
URL string
DatabaseID int64
Status string
Conclusion string
CreatedAt time.Time
}
WorkflowRunInfo contains information about a workflow run
type WorkflowSourceInfo ¶
type WorkflowSourceInfo struct {
PackagePath string
SourcePath string
CommitSHA string // The actual commit SHA used when the package was installed
}
WorkflowSourceInfo contains information about where a workflow was found
type WorkflowSpec ¶ added in v0.13.0
type WorkflowSpec struct {
RepoSpec // embedded RepoSpec for Repo and Version fields
WorkflowPath string // e.g., "workflows/workflow-name.md"
WorkflowName string // e.g., "workflow-name"
IsWildcard bool // true if this is a wildcard spec (e.g., "owner/repo/*")
}
WorkflowSpec represents a parsed workflow specification
func (*WorkflowSpec) String ¶ added in v0.14.0
func (w *WorkflowSpec) String() string
String returns the canonical string representation of the workflow spec in the format "owner/repo/path[@version]" or just the WorkflowPath for local specs
type WorkflowStatus ¶ added in v0.20.0
type WorkflowStatus struct {
Workflow string `json:"workflow" console:"header:Workflow"`
EngineID string `json:"engine_id" console:"header:Engine"`
Compiled string `json:"compiled" console:"header:Compiled"`
Status string `json:"status" console:"header:Status"`
TimeRemaining string `json:"time_remaining" console:"header:Time Remaining"`
On any `json:"on,omitempty" console:"-"`
}
WorkflowStatus represents the status of a single workflow for JSON output
type WorkflowStep ¶ added in v0.27.0
type WorkflowStep struct {
Name string `yaml:"name,omitempty"`
Uses string `yaml:"uses,omitempty"`
Run string `yaml:"run,omitempty"`
With map[string]any `yaml:"with,omitempty"`
Env map[string]any `yaml:"env,omitempty"`
}
WorkflowStep represents a GitHub Actions workflow step
type WorkflowTrialResult ¶ added in v0.12.0
type WorkflowTrialResult struct {
WorkflowName string `json:"workflow_name"`
RunID string `json:"run_id"`
SafeOutputs map[string]interface{} `json:"safe_outputs"`
//AgentStdioLogs []string `json:"agent_stdio_logs,omitempty"`
AgenticRunInfo map[string]interface{} `json:"agentic_run_info,omitempty"`
AdditionalArtifacts map[string]interface{} `json:"additional_artifacts,omitempty"`
Timestamp time.Time `json:"timestamp"`
}
WorkflowTrialResult represents the result of running a single workflow trial
Source Files
¶
- access_log.go
- actionlint.go
- actions.go
- add_command.go
- audit.go
- audit_report.go
- ci.go
- codespace.go
- commands.go
- compile_command.go
- copilot-agents.go
- copilot_setup.go
- enable.go
- file_tracker.go
- firewall_log.go
- frontmatter_utils.go
- git.go
- imports.go
- init.go
- init_command.go
- interactive.go
- jq.go
- list_command.go
- logs.go
- logs_report.go
- mcp.go
- mcp_add.go
- mcp_config_file.go
- mcp_inspect.go
- mcp_inspect_mcp.go
- mcp_list.go
- mcp_list_tools.go
- mcp_logs_guardrail.go
- mcp_registry.go
- mcp_registry_list.go
- mcp_registry_types.go
- mcp_schema.go
- mcp_secrets.go
- mcp_server.go
- mcp_validation.go
- mcp_workflow_loader.go
- mcp_workflow_scanner.go
- packages.go
- poutine.go
- pr_command.go
- remove_command.go
- repeat_utils.go
- repo.go
- resolver.go
- run.go
- run_command.go
- secrets.go
- semver.go
- shared_utils.go
- spec.go
- status.go
- status_command.go
- tool_graph.go
- trial_command.go
- update_command.go
- workflows.go
- zizmor.go