Documentation
¶
Overview ¶
Package agent provides autonomous agent functionality for iterative plan generation and execution.
Package agent provides autonomous agent functionality for iterative plan generation and execution.
Index ¶
- func BuildPrompt(input PlanInput) (string, string, error)
- func CollectChangedFiles(repoRoot string) ([]string, error)
- func ComputePlanHash(planBytes []byte) string
- func NextIterationNumber(repoRoot string) (int, error)
- func SanitizePlan(rawOutput string) ([]byte, error)
- func SavePlan(repoRoot string, iterNum int, planBytes []byte) string
- func WriteIterationLog(repoRoot string, log *IterationLog) (string, error)
- type DiffStat
- type IterationLog
- type IterationSummary
- type LoopResult
- type PlanInput
- type RunOptions
- type Snapshot
- type StopReason
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectChangedFiles ¶
func ComputePlanHash ¶
func NextIterationNumber ¶
func SanitizePlan ¶
func WriteIterationLog ¶
func WriteIterationLog(repoRoot string, log *IterationLog) (string, error)
Types ¶
type DiffStat ¶
type DiffStat struct {
Files int `json:"files"`
Insertions int `json:"insertions"`
Deletions int `json:"deletions"`
}
func CollectDiffStat ¶
type IterationLog ¶
type IterationLog struct {
Iteration int `json:"iteration"`
Goal string `json:"goal"`
PlanHash string `json:"plan_hash"`
Status string `json:"status"`
ChangedFiles []string `json:"changed_files"`
DiffStat DiffStat `json:"diff_stat"`
Artifacts []string `json:"artifacts"`
Provider string `json:"provider,omitempty"`
Model string `json:"model,omitempty"`
ValidationError string `json:"validation_error,omitempty"`
ExecutionError string `json:"execution_error,omitempty"`
AssertionsFailed int `json:"assertions_failed,omitempty"`
}
func Run ¶
func Run(opts RunOptions) (*IterationLog, error)
type IterationSummary ¶
type LoopResult ¶
type LoopResult struct {
Iterations []IterationLog
StopReason StopReason
FinalLog *IterationLog
}
func RunLoop ¶
func RunLoop(opts RunOptions) (*LoopResult, error)
type PlanInput ¶
type PlanInput struct {
Goal string
Snapshot []byte
LastIteration *IterationSummary
}
type RunOptions ¶
type StopReason ¶
type StopReason string
const ( StopSuccess StopReason = "success" StopNoProgress StopReason = "no_progress" StopNoChange StopReason = "no_change" StopFailed StopReason = "failed" StopMaxReached StopReason = "max_iterations" )
Click to show internal directories.
Click to hide internal directories.