templates

package
v0.1.0-beta.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentPromptData

type AgentPromptData struct {
	Language       string          `json:"language"`
	Directory      string          `json:"directory,omitempty"`
	DirectoryPlans []DirectoryPlan `json:"directory_plans,omitempty"`
}

AgentPromptData contains all data needed for agent prompt generation

type DirectoryPlan

type DirectoryPlan struct {
	Directory                string              `json:"directory"`
	Language                 string              `json:"language"`
	Libraries                []string            `json:"libraries,omitempty"`
	Packages                 []string            `json:"packages,omitempty"`
	DetectedFrameworks       []string            `json:"detected_frameworks,omitempty"`
	ExistingInstrumentations []string            `json:"existing_instrumentations,omitempty"`
	InstallOTEL              bool                `json:"install_otel,omitempty"`
	InstallInstrumentations  []string            `json:"install_instrumentations,omitempty"`
	InstallComponents        map[string][]string `json:"install_components,omitempty"`
	RemoveComponents         map[string][]string `json:"remove_components,omitempty"`
	Issues                   []string            `json:"issues,omitempty"`
}

DirectoryPlan summarizes the tech stack and planned actions for a directory

type TemplateData

type TemplateData struct {
	Language         string   `json:"language"`
	Instrumentations []string `json:"instrumentations"`
	ServiceName      string   `json:"service_name"`
	Samplers         []string `json:"samplers,omitempty"`
	SamplerType      string   `json:"sampler_type,omitempty"`
	SamplerRatio     float64  `json:"sampler_ratio,omitempty"`
	Propagators      []string `json:"propagators,omitempty"`
	ContextProps     []string `json:"context_props,omitempty"`
	SpanProcessors   []string `json:"span_processors,omitempty"`

	// New fields for extended operations
	InstallOTEL       bool                `json:"install_otel,omitempty"`
	InstallComponents map[string][]string `json:"install_components,omitempty"`
	RemoveComponents  map[string][]string `json:"remove_components,omitempty"`

	// Exporter and endpoint hints
	TraceExporterType string            `json:"trace_exporter_type,omitempty"`
	TraceProtocol     string            `json:"trace_protocol,omitempty"`
	TraceEndpoint     string            `json:"trace_endpoint,omitempty"`
	TraceHeaders      map[string]string `json:"trace_headers,omitempty"`
	TraceHeadersJSON  string            `json:"trace_headers_json,omitempty"`
	TraceInsecure     bool              `json:"trace_insecure,omitempty"`
}

TemplateData contains all data needed for template generation

type TemplateEngine

type TemplateEngine struct {
	// contains filtered or unexported fields
}

TemplateEngine handles template loading and execution

func NewTemplateEngine

func NewTemplateEngine() (*TemplateEngine, error)

NewTemplateEngine creates a new template engine

func (*TemplateEngine) GenerateAgentPrompt

func (e *TemplateEngine) GenerateAgentPrompt(data AgentPromptData) (string, error)

GenerateAgentPrompt creates a prompt for coding agents

func (*TemplateEngine) GenerateInstructions

func (e *TemplateEngine) GenerateInstructions(lang string, data TemplateData) (string, error)

GenerateInstructions creates instructions based on language and method

func (*TemplateEngine) GetAvailableTemplates

func (e *TemplateEngine) GetAvailableTemplates() []string

GetAvailableTemplates returns all available template keys

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL