Documentation
¶
Overview ¶
Copyright 2026 Teradata
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2026 Teradata ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func CategorizeAgent(agentID string) (category int, color string, categoryName string)
- func ExtractKeyInstructions(promptTemplate string) []string
- func ExtractKeyMarkers(promptTemplate string) []string
- func ExtractStageTitle(promptTemplate string) string
- func FindSharedMemoryConnections(stages []WorkflowStage) []struct{ ... }
- func GenerateHTML(data *VisualizationData, outputPath string) error
- type Category
- type ChartLink
- type ChartNode
- type EdgeLabel
- type ItemStyle
- type LineStyle
- type NodeItemStyle
- type NodeLabel
- type NodeTooltip
- type VisualizationData
- type Workflow
- type WorkflowMetadata
- type WorkflowPipeline
- type WorkflowSpec
- type WorkflowStage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CategorizeAgent ¶
CategorizeAgent returns category info based on agent ID
func ExtractKeyInstructions ¶
ExtractKeyInstructions extracts important instructions from prompt
func ExtractKeyMarkers ¶
ExtractKeyMarkers identifies important markers in the prompt
func ExtractStageTitle ¶
ExtractStageTitle extracts the stage title from prompt template Looks for pattern: ## STAGE N: TITLE
func FindSharedMemoryConnections ¶
func FindSharedMemoryConnections(stages []WorkflowStage) []struct{ From, To int }
FindSharedMemoryConnections detects shared memory connections between stages
func GenerateHTML ¶
func GenerateHTML(data *VisualizationData, outputPath string) error
GenerateHTML creates the final HTML file
Types ¶
type ChartLink ¶
type ChartLink struct {
Source string `json:"source"`
Target string `json:"target"`
LineStyle *LineStyle `json:"lineStyle,omitempty"`
Label *EdgeLabel `json:"label,omitempty"`
}
ChartLink represents an ECharts graph link
type ChartNode ¶
type ChartNode struct {
Name string `json:"name"`
Category int `json:"category"`
Value int `json:"value"`
SymbolSize int `json:"symbolSize"`
Tooltip NodeTooltip `json:"tooltip"`
Label NodeLabel `json:"label"`
ItemStyle *NodeItemStyle `json:"itemStyle,omitempty"`
}
ChartNode represents an ECharts graph node
type ItemStyle ¶
type ItemStyle struct {
Color string `json:"color"`
}
ItemStyle represents node item style
type LineStyle ¶
type LineStyle struct {
Type string `json:"type"`
Color string `json:"color"`
Width int `json:"width"`
}
LineStyle represents edge line style
type NodeItemStyle ¶
type NodeItemStyle struct {
BorderColor string `json:"borderColor,omitempty"`
BorderWidth int `json:"borderWidth,omitempty"`
}
NodeItemStyle represents node visual style
type NodeLabel ¶
type NodeLabel struct {
Show bool `json:"show"`
FontSize int `json:"fontSize"`
FontWeight string `json:"fontWeight,omitempty"`
}
NodeLabel represents node label configuration
type NodeTooltip ¶
type NodeTooltip struct {
Formatter string `json:"formatter"`
}
NodeTooltip represents node tooltip configuration
type VisualizationData ¶
type VisualizationData struct {
Title string
Subtitle string
ChartTitle string
ChartSubtitle string
NodesJSON template.JS
LinksJSON template.JS
CategoriesJSON template.JS
Categories []struct{ Name, Color string }
}
VisualizationData holds all data needed for HTML template
func GenerateVisualization ¶
func GenerateVisualization(workflow *Workflow) (*VisualizationData, error)
GenerateVisualization creates nodes, links, and categories from workflow
type Workflow ¶
type Workflow struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
Metadata WorkflowMetadata `yaml:"metadata"`
Spec WorkflowSpec `yaml:"spec"`
}
Workflow represents the complete workflow structure
func ParseWorkflow ¶
ParseWorkflow reads and parses a workflow YAML file
type WorkflowMetadata ¶
type WorkflowMetadata struct {
Name string `yaml:"name"`
Version string `yaml:"version"`
Description string `yaml:"description"`
Labels map[string]string `yaml:"labels"`
}
WorkflowMetadata represents the workflow metadata
type WorkflowPipeline ¶
type WorkflowPipeline struct {
InitialPrompt string `yaml:"initial_prompt"`
Stages []WorkflowStage `yaml:"stages"`
}
WorkflowPipeline represents the pipeline configuration
type WorkflowSpec ¶
type WorkflowSpec struct {
Type string `yaml:"type"`
MaxIterations int `yaml:"max_iterations"`
RestartTopic string `yaml:"restart_topic"`
RestartPolicy map[string]any `yaml:"restart_policy"`
RestartTriggers []string `yaml:"restart_triggers"`
Pipeline WorkflowPipeline `yaml:"pipeline"`
}
WorkflowSpec represents the workflow specification
type WorkflowStage ¶
type WorkflowStage struct {
AgentID string `yaml:"agent_id"`
PromptTemplate string `yaml:"prompt_template"`
}
WorkflowStage represents a single stage in the pipeline