Documentation
¶
Index ¶
- type AgentConfig
- type Config
- type DatabaseConfig
- type DependencyGraph
- type DependencyNode
- type ExecutionPlan
- type ExecutionResult
- type LLMModel
- type LogConfig
- type Message
- type PatternMatch
- type ProjectContext
- type ProviderConfig
- type ServiceInfo
- type Session
- type Task
- type TaskResult
- type TaskStatus
- type TaskType
- type ToolCall
- type ToolConfig
- type ToolResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Model string `yaml:"model" json:"model"`
MaxTokens int `yaml:"max_tokens" json:"max_tokens"`
Temperature float64 `yaml:"temperature" json:"temperature"`
SystemPrompt string `yaml:"system_prompt,omitempty" json:"system_prompt,omitempty"`
}
AgentConfig holds agent-specific configuration
type Config ¶
type Config struct {
ActiveSession string `yaml:"active_session" json:"active_session"`
DefaultModel string `yaml:"default_model" json:"default_model"`
DefaultProvider string `yaml:"default_provider" json:"default_provider"`
Providers map[string]ProviderConfig `yaml:"providers" json:"providers"`
Agents map[string]AgentConfig `yaml:"agents" json:"agents"`
Tools map[string]ToolConfig `yaml:"tools" json:"tools"`
Logging LogConfig `yaml:"logging" json:"logging"`
Database DatabaseConfig `yaml:"database" json:"database"`
}
Config represents the application configuration
type DatabaseConfig ¶
type DatabaseConfig struct {
Driver string `yaml:"driver" json:"driver"`
DSN string `yaml:"dsn" json:"dsn"`
}
DatabaseConfig holds database configuration
type DependencyGraph ¶
type DependencyGraph struct {
Nodes map[string]*DependencyNode `json:"nodes"`
Edges map[string][]string `json:"edges"` // node ID -> dependent node IDs
}
DependencyGraph represents project dependencies
type DependencyNode ¶
type DependencyNode struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
Internal bool `json:"internal"`
DevOnly bool `json:"dev_only,omitempty"`
}
DependencyNode represents a single dependency
type ExecutionPlan ¶
type ExecutionPlan struct {
ID string `json:"id"`
Tasks []Task `json:"tasks"`
Dependencies map[string][]string `json:"dependencies"` // task ID -> dependent task IDs
Parallel map[string][]string `json:"parallel"` // tasks that can run in parallel
CreatedAt time.Time `json:"created_at"`
}
ExecutionPlan represents ordered tasks to execute
type ExecutionResult ¶
type ExecutionResult struct {
PlanID string `json:"plan_id"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Success bool `json:"success"`
TaskResults map[string]*TaskResult `json:"task_results"`
Error string `json:"error,omitempty"`
}
ExecutionResult is the outcome of executing a plan
type LLMModel ¶
type LLMModel struct {
ID string `json:"id"`
Name string `json:"name"`
Provider string `json:"provider"`
ContextWindow int `json:"context_window"`
OutputTokens int `json:"output_tokens"`
CostPer1kInput float64 `json:"cost_per_1k_input"`
CostPer1kOutput float64 `json:"cost_per_1k_output"`
ReleaseDate time.Time `json:"release_date,omitempty"`
Capabilities []string `json:"capabilities,omitempty"`
}
LLMModel represents an available LLM model
type LogConfig ¶
type LogConfig struct {
Level string `yaml:"level" json:"level"`
Format string `yaml:"format" json:"format"`
Output string `yaml:"output,omitempty" json:"output,omitempty"`
}
LogConfig holds logging configuration
type Message ¶
type Message struct {
ID string `json:"id"`
Role string `json:"role"` // "user", "assistant", "system", "tool"
Content string `json:"content"`
ToolCalls []ToolCall `json:"tool_calls,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
Message represents a single message in conversation
type PatternMatch ¶
type PatternMatch struct {
Pattern string `json:"pattern"`
Location string `json:"location"`
Confidence float64 `json:"confidence"`
Description string `json:"description"`
Category string `json:"category,omitempty"`
}
PatternMatch represents a detected code pattern
type ProjectContext ¶
type ProjectContext struct {
Path string `json:"path"`
Name string `json:"name"`
Framework string `json:"framework"` // "nextjs", "express", "fastapi", "gin", etc.
Language string `json:"language"` // "typescript", "python", "go", "rust", etc.
Architecture string `json:"architecture"` // "monolith", "microservices", "serverless"
MainEntry string `json:"main_entry"` // Entry point file
Services []ServiceInfo `json:"services,omitempty"`
Dependencies DependencyGraph `json:"dependencies"`
DetectedPatterns []PatternMatch `json:"detected_patterns,omitempty"`
TestFramework string `json:"test_framework,omitempty"`
PackageManager string `json:"package_manager,omitempty"`
BuildTool string `json:"build_tool,omitempty"`
LastAnalyzed time.Time `json:"last_analyzed"`
}
ProjectContext contains analyzed project metadata
type ProviderConfig ¶
type ProviderConfig struct {
APIKey string `yaml:"api_key" json:"api_key"`
BaseURL string `yaml:"base_url,omitempty" json:"base_url,omitempty"`
OrgID string `yaml:"org_id,omitempty" json:"org_id,omitempty"`
ExtraParams map[string]string `yaml:"extra_params,omitempty" json:"extra_params,omitempty"`
}
ProviderConfig holds provider-specific configuration
type ServiceInfo ¶
type ServiceInfo struct {
Name string `json:"name"`
Path string `json:"path"`
Language string `json:"language"`
Framework string `json:"framework,omitempty"`
Port int `json:"port,omitempty"`
Dependencies []string `json:"dependencies,omitempty"`
}
ServiceInfo describes a service in a microservices architecture
type Session ¶
type Session struct {
ID string `json:"id"`
Name string `json:"name"`
ProjectPath string `json:"project_path"`
Model string `json:"model"`
Provider string `json:"provider"`
Messages []Message `json:"messages"`
Config map[string]interface{} `json:"config"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Session represents a conversation session
type Task ¶
type Task struct {
ID string `json:"id"`
Description string `json:"description"`
Type TaskType `json:"type"`
Status TaskStatus `json:"status"`
Priority int `json:"priority"`
Subtasks []Task `json:"subtasks,omitempty"`
Context ProjectContext `json:"context"`
Constraints []string `json:"constraints,omitempty"`
Deadline time.Duration `json:"deadline,omitempty"`
Result *TaskResult `json:"result,omitempty"`
Data map[string]interface{} `json:"data,omitempty"` // Additional task-specific data
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Task represents a goal to be accomplished
type TaskResult ¶
type TaskResult struct {
TaskID string `json:"task_id"`
Success bool `json:"success"`
Output string `json:"output"`
Error string `json:"error,omitempty"`
Duration time.Duration `json:"duration"`
CompletedAt time.Time `json:"completed_at"`
Artifacts []string `json:"artifacts,omitempty"`
Data map[string]interface{} `json:"data,omitempty"` // Additional result-specific data
}
TaskResult is the outcome of executing a task
type TaskStatus ¶
type TaskStatus string
TaskStatus defines the current state of a task
const ( TaskStatusPending TaskStatus = "pending" TaskStatusRunning TaskStatus = "running" TaskStatusCompleted TaskStatus = "completed" TaskStatusFailed TaskStatus = "failed" TaskStatusCancelled TaskStatus = "cancelled" TaskStatusBlocked TaskStatus = "blocked" )
type ToolCall ¶
type ToolCall struct {
ID string `json:"id"`
Name string `json:"name"`
Input map[string]interface{} `json:"input"`
}
ToolCall represents an LLM's call to a tool
type ToolConfig ¶
type ToolConfig struct {
Name string `yaml:"name" json:"name"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Command string `yaml:"command,omitempty" json:"command,omitempty"`
Args []string `yaml:"args,omitempty" json:"args,omitempty"`
Timeout int `yaml:"timeout" json:"timeout"`
Enabled bool `yaml:"enabled" json:"enabled"`
}
ToolConfig holds tool-specific configuration