Documentation
¶
Index ¶
- func ExpandIncludes(content, baseDir string, extractTools bool) (string, error)
- func ExtractFrontmatterString(content string) (string, error)
- func ExtractMarkdown(filePath string) (string, error)
- func ExtractMarkdownContent(content string) (string, error)
- func ExtractMarkdownSection(content, sectionName string) (string, error)
- func ExtractWorkflowNameFromMarkdown(filePath string) (string, error)
- func ExtractYAMLError(err error, frontmatterStartLine int) (line int, column int, message string)
- func ExtractYamlChunk(yamlContent, key string) (string, error)
- func GetGitHubToken() (string, error)
- func MergeTools(base, additional map[string]any) (map[string]any, error)
- func ProcessIncludes(content, baseDir string, extractTools bool) (string, error)
- func StripANSI(s string) string
- func ValidateIncludedFileFrontmatterWithSchema(frontmatter map[string]any) error
- func ValidateIncludedFileFrontmatterWithSchemaAndLocation(frontmatter map[string]any, filePath string) error
- func ValidateMCPConfigWithSchema(mcpConfig map[string]any, toolName string) error
- func ValidateMainWorkflowFrontmatterWithSchema(frontmatter map[string]any) error
- func ValidateMainWorkflowFrontmatterWithSchemaAndLocation(frontmatter map[string]any, filePath string) error
- type FrontmatterResult
- type MCPResourceInfo
- type MCPRootInfo
- type MCPServerConfig
- type MCPServerInfo
- type MCPToolInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandIncludes ¶
ExpandIncludes recursively expands @include directives until no more remain This matches the bash expand_includes function behavior
func ExtractFrontmatterString ¶
ExtractFrontmatterString extracts only the YAML frontmatter as a string This matches the bash extract_frontmatter function
func ExtractMarkdown ¶
ExtractMarkdown extracts markdown content from a file (excluding frontmatter) This matches the bash extract_markdown function
func ExtractMarkdownContent ¶
ExtractMarkdownContent extracts only the markdown content (excluding frontmatter) This matches the bash extract_markdown function
func ExtractMarkdownSection ¶
ExtractMarkdownSection extracts a specific section from markdown content Supports H1-H3 headers and proper nesting (matches bash implementation)
func ExtractWorkflowNameFromMarkdown ¶
ExtractWorkflowNameFromMarkdown extracts workflow name from first H1 header This matches the bash extract_workflow_name_from_markdown function exactly
func ExtractYAMLError ¶
ExtractYAMLError extracts line and column information from YAML parsing errors
func ExtractYamlChunk ¶
ExtractYamlChunk extracts a specific YAML section with proper indentation handling This matches the bash extract_yaml_chunk function exactly
func GetGitHubToken ¶
GetGitHubToken attempts to get GitHub token from environment or gh CLI
func MergeTools ¶
MergeTools merges two tool objects and returns errors for conflicts
func ProcessIncludes ¶
ProcessIncludes processes @include directives in markdown content This matches the bash process_includes function behavior
func StripANSI ¶
StripANSI removes all ANSI escape sequences from a string This handles: - CSI (Control Sequence Introducer) sequences: \x1b[... - OSC (Operating System Command) sequences: \x1b]...\x07 or \x1b]...\x1b\\ - Simple escape sequences: \x1b followed by a single character
func ValidateIncludedFileFrontmatterWithSchema ¶
ValidateIncludedFileFrontmatterWithSchema validates included file frontmatter using JSON schema
func ValidateIncludedFileFrontmatterWithSchemaAndLocation ¶
func ValidateIncludedFileFrontmatterWithSchemaAndLocation(frontmatter map[string]any, filePath string) error
ValidateIncludedFileFrontmatterWithSchemaAndLocation validates included file frontmatter with file location info
func ValidateMCPConfigWithSchema ¶
ValidateMCPConfigWithSchema validates MCP configuration using JSON schema
func ValidateMainWorkflowFrontmatterWithSchema ¶
ValidateMainWorkflowFrontmatterWithSchema validates main workflow frontmatter using JSON schema
Types ¶
type FrontmatterResult ¶
type FrontmatterResult struct {
Frontmatter map[string]any
Markdown string
// Additional fields for error context
FrontmatterLines []string // Original frontmatter lines for error context
FrontmatterStart int // Line number where frontmatter starts (1-based)
}
FrontmatterResult holds parsed frontmatter and markdown content
func ExtractFrontmatterFromContent ¶
func ExtractFrontmatterFromContent(content string) (*FrontmatterResult, error)
ExtractFrontmatterFromContent parses YAML frontmatter from markdown content string
type MCPResourceInfo ¶
type MCPResourceInfo struct {
URI string `json:"uri"`
Name string `json:"name"`
Description string `json:"description"`
MimeType string `json:"mimeType"`
}
MCPResourceInfo represents a resource available from an MCP server
type MCPRootInfo ¶
MCPRootInfo represents a root available from an MCP server
type MCPServerConfig ¶
type MCPServerConfig struct {
Name string `json:"name"`
Type string `json:"type"` // stdio, http, docker
Command string `json:"command"` // for stdio
Args []string `json:"args"` // for stdio
Container string `json:"container"` // for docker
URL string `json:"url"` // for http
Headers map[string]string `json:"headers"` // for http
Env map[string]string `json:"env"` // environment variables
Allowed []string `json:"allowed"` // allowed tools
}
MCPServerConfig represents a parsed MCP server configuration
func ExtractMCPConfigurations ¶
func ExtractMCPConfigurations(frontmatter map[string]any, serverFilter string) ([]MCPServerConfig, error)
ExtractMCPConfigurations extracts MCP server configurations from workflow frontmatter
func ParseMCPConfig ¶
func ParseMCPConfig(toolName string, mcpSection any, toolConfig map[string]any) (MCPServerConfig, error)
ParseMCPConfig parses MCP configuration from various formats (map or JSON string)
type MCPServerInfo ¶
type MCPServerInfo struct {
Config MCPServerConfig
Connected bool
Error error
Tools []MCPToolInfo
Resources []MCPResourceInfo
Roots []MCPRootInfo
}
MCPServerInfo contains the inspection results for an MCP server
type MCPToolInfo ¶
MCPToolInfo represents a tool available from an MCP server