Documentation
¶
Index ¶
- Constants
- func ConvertToFloat(val interface{}) float64
- func ConvertToInt(val interface{}) int
- func ExtractFirstMatch(text, pattern string) string
- func ExtractJSONCost(data map[string]interface{}) float64
- func ExtractJSONTokenUsage(data map[string]interface{}) int
- func FormatJavaScriptForYAML(script string) []string
- func GenerateConcurrencyConfig(workflowData *WorkflowData, isAliasTrigger bool) string
- func GetAllowedDomains(engineConfig *EngineConfig) []string
- func GetWorkflowDir() string
- func HasNetworkPermissions(engineConfig *EngineConfig) bool
- func ResolveRelativeDate(dateStr string, baseTime time.Time) (string, error)
- func ResolveWorkflowName(workflowInput string) (string, error)
- func ShouldEnforceNetworkPermissions(engineConfig *EngineConfig) bool
- func ValidateMCPConfigs(tools map[string]any) error
- func WriteJavaScriptToYAML(yaml *strings.Builder, script string)
- type AddIssueCommentConfig
- type AddIssueLabelsConfig
- type AgenticEngine
- type AndNode
- type BaseEngine
- func (e *BaseEngine) GetDeclaredOutputFiles() []string
- func (e *BaseEngine) GetDescription() string
- func (e *BaseEngine) GetDisplayName() string
- func (e *BaseEngine) GetID() string
- func (e *BaseEngine) IsExperimental() bool
- func (e *BaseEngine) SupportsHTTPTransport() bool
- func (e *BaseEngine) SupportsMaxTurns() bool
- func (e *BaseEngine) SupportsToolsWhitelist() bool
- type BooleanLiteralNode
- type ClaudeEngine
- func (e *ClaudeEngine) GetDeclaredOutputFiles() []string
- func (e *ClaudeEngine) GetExecutionConfig(workflowName string, logFile string, engineConfig *EngineConfig, ...) ExecutionConfig
- func (e *ClaudeEngine) GetInstallationSteps(engineConfig *EngineConfig) []GitHubActionStep
- func (e *ClaudeEngine) ParseLogMetrics(logContent string, verbose bool) LogMetrics
- func (e *ClaudeEngine) RenderMCPConfig(yaml *strings.Builder, tools map[string]any, mcpTools []string)
- type ClaudeSettings
- type ClaudeSettingsGenerator
- type CodexEngine
- func (e *CodexEngine) GetExecutionConfig(workflowName string, logFile string, engineConfig *EngineConfig, ...) ExecutionConfig
- func (e *CodexEngine) GetInstallationSteps(engineConfig *EngineConfig) []GitHubActionStep
- func (e *CodexEngine) ParseLogMetrics(logContent string, verbose bool) LogMetrics
- func (e *CodexEngine) RenderMCPConfig(yaml *strings.Builder, tools map[string]any, mcpTools []string)
- type ComparisonNode
- func BuildActionEquals(action string) *ComparisonNode
- func BuildComparison(left ConditionNode, operator string, right ConditionNode) *ComparisonNode
- func BuildEquals(left ConditionNode, right ConditionNode) *ComparisonNode
- func BuildEventTypeEquals(eventType string) *ComparisonNode
- func BuildNotEquals(left ConditionNode, right ConditionNode) *ComparisonNode
- type Compiler
- type ConditionNode
- type ContainsNode
- type CreateIssueConfig
- type CreatePullRequestConfig
- type DisjunctionNode
- type EngineConfig
- type EnginePermissions
- type EngineRegistry
- func (r *EngineRegistry) GetAllEngines() []AgenticEngine
- func (r *EngineRegistry) GetDefaultEngine() AgenticEngine
- func (r *EngineRegistry) GetEngine(id string) (AgenticEngine, error)
- func (r *EngineRegistry) GetEngineByPrefix(prefix string) (AgenticEngine, error)
- func (r *EngineRegistry) GetSupportedEngines() []string
- func (r *EngineRegistry) IsValidEngine(id string) bool
- func (r *EngineRegistry) Register(engine AgenticEngine)
- type ExecutionConfig
- type ExpressionNode
- type FileTracker
- type FunctionCallNode
- type GitHubActionStep
- type HookConfiguration
- type HookEntry
- type Job
- type JobManager
- func (jm *JobManager) AddJob(job *Job) error
- func (jm *JobManager) GetAllJobs() map[string]*Job
- func (jm *JobManager) GetJob(name string) (*Job, bool)
- func (jm *JobManager) GetTopologicalOrder() ([]string, error)
- func (jm *JobManager) RenderToYAML() string
- func (jm *JobManager) ValidateDependencies() error
- type LogMetrics
- type MCPConfigRenderer
- type NetworkHookGenerator
- type NetworkPermissions
- type NotNode
- type NumberLiteralNode
- type OrNode
- type PreToolUseHook
- type PropertyAccessNode
- type SafeOutputsConfig
- type StringLiteralNode
- type TernaryNode
- type TimeDelta
- type WorkflowData
Constants ¶
const (
// DefaultClaudeActionVersion is the default version of the Claude Code base action
DefaultClaudeActionVersion = "v0.0.56"
)
const (
// OutputArtifactName is the standard name for GITHUB_AW_OUTPUT artifact
OutputArtifactName = "aw_output.txt"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertToFloat ¶ added in v0.0.22
func ConvertToFloat(val interface{}) float64
ConvertToFloat safely converts interface{} to float64
func ConvertToInt ¶ added in v0.0.22
func ConvertToInt(val interface{}) int
ConvertToInt safely converts interface{} to int
func ExtractFirstMatch ¶ added in v0.0.22
ExtractFirstMatch extracts the first regex match from a string
func ExtractJSONCost ¶ added in v0.0.22
ExtractJSONCost extracts cost information from JSON data
func ExtractJSONTokenUsage ¶ added in v0.0.22
ExtractJSONTokenUsage extracts token usage from JSON data
func FormatJavaScriptForYAML ¶ added in v0.2.0
FormatJavaScriptForYAML formats a JavaScript script with proper indentation for embedding in YAML
func GenerateConcurrencyConfig ¶
func GenerateConcurrencyConfig(workflowData *WorkflowData, isAliasTrigger bool) string
GenerateConcurrencyConfig generates the concurrency configuration for a workflow based on its trigger types and characteristics.
func GetAllowedDomains ¶ added in v0.2.3
func GetAllowedDomains(engineConfig *EngineConfig) []string
GetAllowedDomains returns the allowed domains from engine config Returns nil if no network permissions configured (unrestricted for backwards compatibility) Returns empty slice if network permissions configured but no domains allowed (deny all) Returns domain list if network permissions configured with allowed domains
func GetWorkflowDir ¶ added in v0.2.0
func GetWorkflowDir() string
func HasNetworkPermissions ¶ added in v0.2.3
func HasNetworkPermissions(engineConfig *EngineConfig) bool
HasNetworkPermissions is deprecated - use ShouldEnforceNetworkPermissions instead Kept for backwards compatibility but will be removed in future versions
func ResolveRelativeDate ¶ added in v0.2.0
ResolveRelativeDate resolves a relative date string to an absolute date string suitable for use with GitHub CLI (YYYY-MM-DD format). If the date string is not relative, it returns the original string.
func ResolveWorkflowName ¶
ResolveWorkflowName converts an agentic workflow ID to the GitHub Actions workflow name. It normalizes the input by removing .md and .lock.yml extensions, then finds the corresponding workflow files and extracts the actual workflow name from the lock.yml file.
The agentic workflow ID is the basename of the markdown file without the .md extension. The GitHub Actions workflow name is extracted from the "name:" field in the corresponding .lock.yml file.
Examples:
- "weekly-research" -> "Weekly Research" (from weekly-research.lock.yml name field)
- "weekly-research.md" -> "Weekly Research" (from weekly-research.lock.yml name field)
- "weekly-research.lock.yml" -> "Weekly Research" (from weekly-research.lock.yml name field)
func ShouldEnforceNetworkPermissions ¶ added in v0.2.3
func ShouldEnforceNetworkPermissions(engineConfig *EngineConfig) bool
ShouldEnforceNetworkPermissions checks if network permissions should be enforced Returns true if the engine config has a network permissions block configured (regardless of whether the allowed list is empty or has domains)
func ValidateMCPConfigs ¶
validateMCPConfigs validates all MCP configurations in the tools section using JSON schema
func WriteJavaScriptToYAML ¶ added in v0.2.0
WriteJavaScriptToYAML writes a JavaScript script with proper indentation to a strings.Builder
Types ¶
type AddIssueCommentConfig ¶ added in v0.2.3
type AddIssueCommentConfig struct {
}
AddIssueCommentConfig holds configuration for creating GitHub issue/PR comments from agent output
type AddIssueLabelsConfig ¶ added in v0.2.3
type AddIssueLabelsConfig struct {
Allowed []string `yaml:"allowed,omitempty"` // Optional list of allowed labels. If omitted, any labels are allowed (including creating new ones).
MaxCount *int `yaml:"max-count,omitempty"` // Optional maximum number of labels to add (default: 3)
}
AddIssueLabelsConfig holds configuration for adding labels to issues/PRs from agent output
type AgenticEngine ¶
type AgenticEngine interface {
// GetID returns the unique identifier for this engine
GetID() string
// GetDisplayName returns the human-readable name for this engine
GetDisplayName() string
// GetDescription returns a description of this engine's capabilities
GetDescription() string
// IsExperimental returns true if this engine is experimental
IsExperimental() bool
// SupportsToolsWhitelist returns true if this engine supports MCP tool allow-listing
SupportsToolsWhitelist() bool
// SupportsHTTPTransport returns true if this engine supports HTTP transport for MCP servers
SupportsHTTPTransport() bool
// SupportsMaxTurns returns true if this engine supports the max-turns feature
SupportsMaxTurns() bool
// GetDeclaredOutputFiles returns a list of output files that this engine may produce
// These files will be automatically uploaded as artifacts if they exist
GetDeclaredOutputFiles() []string
// GetInstallationSteps returns the GitHub Actions steps needed to install this engine
GetInstallationSteps(engineConfig *EngineConfig) []GitHubActionStep
// GetExecutionConfig returns the configuration for executing this engine
GetExecutionConfig(workflowName string, logFile string, engineConfig *EngineConfig, hasOutput bool) ExecutionConfig
// RenderMCPConfig renders the MCP configuration for this engine to the given YAML builder
RenderMCPConfig(yaml *strings.Builder, tools map[string]any, mcpTools []string)
// ParseLogMetrics extracts metrics from engine-specific log content
ParseLogMetrics(logContent string, verbose bool) LogMetrics
}
AgenticEngine represents an AI engine that can be used to execute agentic workflows
type AndNode ¶
type AndNode struct {
Left, Right ConditionNode
}
AndNode represents an AND operation between two conditions
type BaseEngine ¶
type BaseEngine struct {
// contains filtered or unexported fields
}
BaseEngine provides common functionality for agentic engines
func (*BaseEngine) GetDeclaredOutputFiles ¶ added in v0.2.0
func (e *BaseEngine) GetDeclaredOutputFiles() []string
GetDeclaredOutputFiles returns an empty list by default (engines can override)
func (*BaseEngine) GetDescription ¶
func (e *BaseEngine) GetDescription() string
func (*BaseEngine) GetDisplayName ¶
func (e *BaseEngine) GetDisplayName() string
func (*BaseEngine) GetID ¶
func (e *BaseEngine) GetID() string
func (*BaseEngine) IsExperimental ¶
func (e *BaseEngine) IsExperimental() bool
func (*BaseEngine) SupportsHTTPTransport ¶
func (e *BaseEngine) SupportsHTTPTransport() bool
func (*BaseEngine) SupportsMaxTurns ¶ added in v0.1.0
func (e *BaseEngine) SupportsMaxTurns() bool
func (*BaseEngine) SupportsToolsWhitelist ¶
func (e *BaseEngine) SupportsToolsWhitelist() bool
type BooleanLiteralNode ¶
type BooleanLiteralNode struct {
Value bool
}
BooleanLiteralNode represents a boolean literal value
func BuildBooleanLiteral ¶
func BuildBooleanLiteral(value bool) *BooleanLiteralNode
BuildBooleanLiteral creates a boolean literal node
func (*BooleanLiteralNode) Render ¶
func (b *BooleanLiteralNode) Render() string
type ClaudeEngine ¶
type ClaudeEngine struct {
BaseEngine
}
ClaudeEngine represents the Claude Code agentic engine
func NewClaudeEngine ¶
func NewClaudeEngine() *ClaudeEngine
func (*ClaudeEngine) GetDeclaredOutputFiles ¶ added in v0.2.0
func (e *ClaudeEngine) GetDeclaredOutputFiles() []string
GetDeclaredOutputFiles returns the output files that Claude may produce
func (*ClaudeEngine) GetExecutionConfig ¶
func (e *ClaudeEngine) GetExecutionConfig(workflowName string, logFile string, engineConfig *EngineConfig, hasOutput bool) ExecutionConfig
func (*ClaudeEngine) GetInstallationSteps ¶
func (e *ClaudeEngine) GetInstallationSteps(engineConfig *EngineConfig) []GitHubActionStep
func (*ClaudeEngine) ParseLogMetrics ¶ added in v0.0.22
func (e *ClaudeEngine) ParseLogMetrics(logContent string, verbose bool) LogMetrics
ParseLogMetrics implements engine-specific log parsing for Claude
func (*ClaudeEngine) RenderMCPConfig ¶
type ClaudeSettings ¶ added in v0.2.3
type ClaudeSettings struct {
Hooks *HookConfiguration `json:"hooks,omitempty"`
}
ClaudeSettings represents the structure of Claude Code settings.json
type ClaudeSettingsGenerator ¶ added in v0.2.3
type ClaudeSettingsGenerator struct{}
ClaudeSettingsGenerator generates Claude Code settings configurations
func (*ClaudeSettingsGenerator) GenerateSettingsJSON ¶ added in v0.2.3
func (g *ClaudeSettingsGenerator) GenerateSettingsJSON() string
GenerateSettingsJSON generates Claude Code settings JSON for network permissions
func (*ClaudeSettingsGenerator) GenerateSettingsWorkflowStep ¶ added in v0.2.3
func (g *ClaudeSettingsGenerator) GenerateSettingsWorkflowStep() GitHubActionStep
GenerateSettingsWorkflowStep generates a GitHub Actions workflow step that creates the settings file
type CodexEngine ¶
type CodexEngine struct {
BaseEngine
}
CodexEngine represents the Codex agentic engine (experimental)
func NewCodexEngine ¶
func NewCodexEngine() *CodexEngine
func (*CodexEngine) GetExecutionConfig ¶
func (e *CodexEngine) GetExecutionConfig(workflowName string, logFile string, engineConfig *EngineConfig, hasOutput bool) ExecutionConfig
func (*CodexEngine) GetInstallationSteps ¶
func (e *CodexEngine) GetInstallationSteps(engineConfig *EngineConfig) []GitHubActionStep
func (*CodexEngine) ParseLogMetrics ¶ added in v0.0.22
func (e *CodexEngine) ParseLogMetrics(logContent string, verbose bool) LogMetrics
ParseLogMetrics implements engine-specific log parsing for Codex
func (*CodexEngine) RenderMCPConfig ¶
type ComparisonNode ¶
type ComparisonNode struct {
Left ConditionNode
Operator string
Right ConditionNode
}
ComparisonNode represents comparison operations like ==, !=, <, >, <=, >=
func BuildActionEquals ¶
func BuildActionEquals(action string) *ComparisonNode
BuildActionEquals creates a condition to check if the event action equals a specific value
func BuildComparison ¶
func BuildComparison(left ConditionNode, operator string, right ConditionNode) *ComparisonNode
BuildComparison creates a comparison node with the specified operator
func BuildEquals ¶
func BuildEquals(left ConditionNode, right ConditionNode) *ComparisonNode
BuildEquals creates an equality comparison
func BuildEventTypeEquals ¶
func BuildEventTypeEquals(eventType string) *ComparisonNode
BuildEventTypeEquals creates a condition to check if the event type equals a specific value
func BuildNotEquals ¶
func BuildNotEquals(left ConditionNode, right ConditionNode) *ComparisonNode
BuildNotEquals creates an inequality comparison
func (*ComparisonNode) Render ¶
func (c *ComparisonNode) Render() string
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
Compiler handles converting markdown workflows to GitHub Actions YAML
func NewCompiler ¶
NewCompiler creates a new workflow compiler with optional configuration
func NewCompilerWithCustomOutput ¶
func NewCompilerWithCustomOutput(verbose bool, engineOverride string, customOutput string, version string) *Compiler
NewCompilerWithCustomOutput creates a new workflow compiler with custom output path
func (*Compiler) CompileWorkflow ¶
CompileWorkflow converts a markdown workflow to GitHub Actions YAML
func (*Compiler) SetFileTracker ¶ added in v0.0.22
func (c *Compiler) SetFileTracker(tracker FileTracker)
SetFileTracker sets the file tracker for tracking created files
func (*Compiler) SetSkipValidation ¶
SetSkipValidation configures whether to skip schema validation
type ConditionNode ¶
type ConditionNode interface {
Render() string
}
ConditionNode represents a node in a condition expression tree
type ContainsNode ¶
type ContainsNode struct {
Array ConditionNode
Value ConditionNode
}
ContainsNode represents array membership checks using contains() function
func BuildContains ¶
func BuildContains(array ConditionNode, value ConditionNode) *ContainsNode
BuildContains creates a contains() function call node
func BuildLabelContains ¶
func BuildLabelContains(labelName string) *ContainsNode
BuildLabelContains creates a condition to check if an issue/PR contains a specific label
func (*ContainsNode) Render ¶
func (c *ContainsNode) Render() string
type CreateIssueConfig ¶ added in v0.2.3
type CreateIssueConfig struct {
TitlePrefix string `yaml:"title-prefix,omitempty"`
Labels []string `yaml:"labels,omitempty"`
}
CreateIssueConfig holds configuration for creating GitHub issues from agent output
type CreatePullRequestConfig ¶ added in v0.2.3
type CreatePullRequestConfig struct {
TitlePrefix string `yaml:"title-prefix,omitempty"`
Labels []string `yaml:"labels,omitempty"`
Draft *bool `yaml:"draft,omitempty"` // Pointer to distinguish between unset (nil) and explicitly false
}
CreatePullRequestConfig holds configuration for creating GitHub pull requests from agent output
type DisjunctionNode ¶
type DisjunctionNode struct {
Terms []ConditionNode
Multiline bool // If true, render each term on separate line with comments
}
DisjunctionNode represents an OR operation with multiple terms to avoid deep nesting
func BuildMultilineDisjunction ¶
func BuildMultilineDisjunction(terms ...ConditionNode) *DisjunctionNode
BuildMultilineDisjunction creates a disjunction node with multiline rendering enabled
func (*DisjunctionNode) Render ¶
func (d *DisjunctionNode) Render() string
func (*DisjunctionNode) RenderMultiline ¶
func (d *DisjunctionNode) RenderMultiline() string
RenderMultiline renders the disjunction with each term on a separate line, including comments for expressions that have descriptions
type EngineConfig ¶
type EngineConfig struct {
ID string
Version string
Model string
MaxTurns string
Permissions *EnginePermissions `yaml:"permissions,omitempty"`
}
EngineConfig represents the parsed engine configuration
type EnginePermissions ¶ added in v0.2.3
type EnginePermissions struct {
Network *NetworkPermissions `yaml:"network,omitempty"`
}
EnginePermissions represents the permissions configuration for an engine
type EngineRegistry ¶
type EngineRegistry struct {
// contains filtered or unexported fields
}
EngineRegistry manages available agentic engines
func GetGlobalEngineRegistry ¶ added in v0.0.22
func GetGlobalEngineRegistry() *EngineRegistry
GetGlobalEngineRegistry returns the singleton engine registry
func NewEngineRegistry ¶
func NewEngineRegistry() *EngineRegistry
NewEngineRegistry creates a new engine registry with built-in engines
func (*EngineRegistry) GetAllEngines ¶ added in v0.0.22
func (r *EngineRegistry) GetAllEngines() []AgenticEngine
GetAllEngines returns all registered engines
func (*EngineRegistry) GetDefaultEngine ¶
func (r *EngineRegistry) GetDefaultEngine() AgenticEngine
GetDefaultEngine returns the default engine (Claude)
func (*EngineRegistry) GetEngine ¶
func (r *EngineRegistry) GetEngine(id string) (AgenticEngine, error)
GetEngine retrieves an engine by ID
func (*EngineRegistry) GetEngineByPrefix ¶
func (r *EngineRegistry) GetEngineByPrefix(prefix string) (AgenticEngine, error)
GetEngineByPrefix returns an engine that matches the given prefix This is useful for backward compatibility with strings like "codex-experimental"
func (*EngineRegistry) GetSupportedEngines ¶
func (r *EngineRegistry) GetSupportedEngines() []string
GetSupportedEngines returns a list of all supported engine IDs
func (*EngineRegistry) IsValidEngine ¶
func (r *EngineRegistry) IsValidEngine(id string) bool
IsValidEngine checks if an engine ID is valid
func (*EngineRegistry) Register ¶
func (r *EngineRegistry) Register(engine AgenticEngine)
Register adds an engine to the registry
type ExecutionConfig ¶
type ExecutionConfig struct {
// StepName is the name of the GitHub Actions step
StepName string
// Command is the shell command to execute (for CLI-based engines)
Command string
// Action is the GitHub Action to use (for action-based engines)
Action string
// Inputs are the inputs to pass to the action
Inputs map[string]string
// Environment variables needed for execution
Environment map[string]string
}
ExecutionConfig contains the configuration for executing an agentic engine
type ExpressionNode ¶
type ExpressionNode struct {
Expression string
Description string // Optional comment/description for the expression
}
ExpressionNode represents a leaf expression
func BuildExpressionWithDescription ¶
func BuildExpressionWithDescription(expression, description string) *ExpressionNode
BuildExpressionWithDescription creates an expression node with an optional description
func (*ExpressionNode) Render ¶
func (e *ExpressionNode) Render() string
type FileTracker ¶ added in v0.0.22
type FileTracker interface {
TrackCreated(filePath string)
}
FileTracker interface for tracking files created during compilation
type FunctionCallNode ¶
type FunctionCallNode struct {
FunctionName string
Arguments []ConditionNode
}
FunctionCallNode represents a function call expression like contains(array, value)
func BuildFunctionCall ¶
func BuildFunctionCall(functionName string, args ...ConditionNode) *FunctionCallNode
BuildFunctionCall creates a function call node
func BuildRefStartsWith ¶
func BuildRefStartsWith(prefix string) *FunctionCallNode
BuildRefStartsWith creates a condition to check if github.ref starts with a prefix
func (*FunctionCallNode) Render ¶
func (f *FunctionCallNode) Render() string
type GitHubActionStep ¶
type GitHubActionStep []string
GitHubActionStep represents the YAML lines for a single step in a GitHub Actions workflow
type HookConfiguration ¶ added in v0.2.3
type HookConfiguration struct {
PreToolUse []PreToolUseHook `json:"PreToolUse,omitempty"`
}
HookConfiguration represents the hooks section of settings
type Job ¶
type Job struct {
Name string
RunsOn string
If string
Permissions string
TimeoutMinutes int
Steps []string
Depends []string // Job dependencies (needs clause)
Outputs map[string]string
}
Job represents a GitHub Actions job with all its properties
type JobManager ¶
type JobManager struct {
// contains filtered or unexported fields
}
JobManager manages a collection of jobs and handles dependency validation
func NewJobManager ¶
func NewJobManager() *JobManager
NewJobManager creates a new JobManager instance
func (*JobManager) AddJob ¶
func (jm *JobManager) AddJob(job *Job) error
AddJob adds a job to the manager
func (*JobManager) GetAllJobs ¶
func (jm *JobManager) GetAllJobs() map[string]*Job
GetAllJobs returns all jobs in the manager
func (*JobManager) GetJob ¶
func (jm *JobManager) GetJob(name string) (*Job, bool)
GetJob retrieves a job by name
func (*JobManager) GetTopologicalOrder ¶
func (jm *JobManager) GetTopologicalOrder() ([]string, error)
GetTopologicalOrder returns jobs in topological order (dependencies before dependents)
func (*JobManager) RenderToYAML ¶
func (jm *JobManager) RenderToYAML() string
RenderToYAML generates the jobs section of a GitHub Actions workflow
func (*JobManager) ValidateDependencies ¶
func (jm *JobManager) ValidateDependencies() error
ValidateDependencies checks that all job dependencies exist and there are no cycles
type LogMetrics ¶ added in v0.0.22
LogMetrics represents extracted metrics from log files
func ExtractJSONMetrics ¶ added in v0.0.22
func ExtractJSONMetrics(line string, verbose bool) LogMetrics
ExtractJSONMetrics extracts metrics from streaming JSON log lines
type MCPConfigRenderer ¶
type MCPConfigRenderer struct {
// IndentLevel controls the indentation level for properties (e.g., " " for JSON, " " for TOML)
IndentLevel string
// Format specifies the output format ("json" for JSON-like, "toml" for TOML-like)
Format string
}
MCPConfigRenderer contains configuration options for rendering MCP config
type NetworkHookGenerator ¶ added in v0.2.3
type NetworkHookGenerator struct{}
NetworkHookGenerator generates network permission hooks for engine configurations
func (*NetworkHookGenerator) GenerateNetworkHookScript ¶ added in v0.2.3
func (g *NetworkHookGenerator) GenerateNetworkHookScript(allowedDomains []string) string
GenerateNetworkHookScript generates a Python hook script for network permissions
func (*NetworkHookGenerator) GenerateNetworkHookWorkflowStep ¶ added in v0.2.3
func (g *NetworkHookGenerator) GenerateNetworkHookWorkflowStep(allowedDomains []string) GitHubActionStep
GenerateNetworkHookWorkflowStep generates a GitHub Actions workflow step that creates the network permissions hook
type NetworkPermissions ¶ added in v0.2.3
type NetworkPermissions struct {
Allowed []string `yaml:"allowed,omitempty"`
}
NetworkPermissions represents network access permissions
type NotNode ¶
type NotNode struct {
Child ConditionNode
}
NotNode represents a NOT operation on a condition
type NumberLiteralNode ¶
type NumberLiteralNode struct {
Value string
}
NumberLiteralNode represents a numeric literal value
func BuildNumberLiteral ¶
func BuildNumberLiteral(value string) *NumberLiteralNode
BuildNumberLiteral creates a number literal node
func (*NumberLiteralNode) Render ¶
func (n *NumberLiteralNode) Render() string
type OrNode ¶
type OrNode struct {
Left, Right ConditionNode
}
OrNode represents an OR operation between two conditions
type PreToolUseHook ¶ added in v0.2.3
PreToolUseHook represents a pre-tool-use hook configuration
type PropertyAccessNode ¶
type PropertyAccessNode struct {
PropertyPath string
}
PropertyAccessNode represents property access like github.event.action
func BuildPropertyAccess ¶
func BuildPropertyAccess(path string) *PropertyAccessNode
BuildPropertyAccess creates a property access node for GitHub context properties
func (*PropertyAccessNode) Render ¶
func (p *PropertyAccessNode) Render() string
type SafeOutputsConfig ¶ added in v0.2.3
type SafeOutputsConfig struct {
CreateIssue *CreateIssueConfig `yaml:"create-issue,omitempty"`
AddIssueComment *AddIssueCommentConfig `yaml:"add-issue-comment,omitempty"`
CreatePullRequest *CreatePullRequestConfig `yaml:"create-pull-request,omitempty"`
AddIssueLabels *AddIssueLabelsConfig `yaml:"add-issue-labels,omitempty"`
AllowedDomains []string `yaml:"allowed-domains,omitempty"`
}
SafeOutputsConfig holds configuration for automatic output routes
type StringLiteralNode ¶
type StringLiteralNode struct {
Value string
}
StringLiteralNode represents a string literal value
func BuildStringLiteral ¶
func BuildStringLiteral(value string) *StringLiteralNode
BuildStringLiteral creates a string literal node
func (*StringLiteralNode) Render ¶
func (s *StringLiteralNode) Render() string
type TernaryNode ¶
type TernaryNode struct {
Condition ConditionNode
TrueValue ConditionNode
FalseValue ConditionNode
}
TernaryNode represents ternary conditional expressions like condition ? true_value : false_value
func BuildTernary ¶
func BuildTernary(condition ConditionNode, trueValue ConditionNode, falseValue ConditionNode) *TernaryNode
BuildTernary creates a ternary conditional expression
func (*TernaryNode) Render ¶
func (t *TernaryNode) Render() string
type TimeDelta ¶ added in v0.1.0
TimeDelta represents a time duration that can be added to a base time
type WorkflowData ¶
type WorkflowData struct {
Name string
On string
Permissions string
Concurrency string
RunName string
Env string
If string
TimeoutMinutes string
CustomSteps string
PostSteps string // steps to run after AI execution
RunsOn string
Tools map[string]any
MarkdownContent string
AllowedTools string
AI string // "claude" or "codex" (for backwards compatibility)
EngineConfig *EngineConfig // Extended engine configuration
StopTime string
Alias string // for @alias trigger support
AliasOtherEvents map[string]any // for merging alias with other events
AIReaction string // AI reaction type like "eyes", "heart", etc.
Jobs map[string]any // custom job configurations with dependencies
Cache string // cache configuration
NeedsTextOutput bool // whether the workflow uses ${{ needs.task.outputs.text }}
SafeOutputs *SafeOutputsConfig // output configuration for automatic output routes
}
WorkflowData holds all the data needed to generate a GitHub Actions workflow
Source Files
¶
- agentic_engine.go
- alias.go
- cache.go
- claude_engine.go
- claude_settings.go
- codex_engine.go
- compiler.go
- concurrency.go
- docker_compose.go
- engine.go
- engine_network_hooks.go
- engine_output.go
- expression_safety.go
- expressions.go
- frontmatter_error.go
- git_patch.go
- jobs.go
- js.go
- mcp-config.go
- metrics.go
- network_proxy.go
- output_labels.go
- resolve.go
- time_delta.go