executor

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteAgentInstructionsUpdate added in v0.0.3

func ExecuteAgentInstructionsUpdate(ctx context.Context, milestone config.Milestone, milestoneScoped bool, runner string, opts RunOptions, ch chan tea.Msg)

ExecuteAgentInstructionsUpdate runs a single selected runner to produce a human-reviewable root AGENTS.md replacement proposal. Any direct mutation of root AGENTS.md is intercepted and restored before completion.

func ExecuteCycle

func ExecuteCycle(ctx context.Context, milestone config.Milestone, pipeline []config.Agent, opts RunOptions, state *config.State, ch chan tea.Msg)

ExecuteCycle runs the milestone cycle as a background task.

func ExecuteMilestoneCreation

func ExecuteMilestoneCreation(ctx context.Context, runner string, prompt string, opts RunOptions, ch chan tea.Msg, milestoneID string, defaultTitle string)

ExecuteMilestoneCreation runs the creation prompt through a supported runner in the background.

Types

type AgentCompletedMsg

type AgentCompletedMsg struct {
	AgentID    string
	ExitCode   int
	Timestamp  time.Time
	OutputFile string
}

AgentCompletedMsg is sent when an agent finishes execution.

type AgentProgressMsg

type AgentProgressMsg struct {
	AgentID string
	LogLine string
}

AgentProgressMsg is sent when an agent outputs a line to stdout/stderr.

type AgentStartedMsg

type AgentStartedMsg struct {
	AgentID string
}

AgentStartedMsg is sent when an agent starts execution.

type CreateMilestoneFinishedMsg

type CreateMilestoneFinishedMsg struct {
	Error error
}

CreateMilestoneFinishedMsg is sent when the creation agent finishes execution.

type CreateMilestoneProgressMsg

type CreateMilestoneProgressMsg struct {
	LogLine string
}

CreateMilestoneProgressMsg is sent when the creation agent outputs a line to stdout/stderr.

type CycleFinishedMsg

type CycleFinishedMsg struct {
	MilestoneID string
	CycleNumber int
	Status      string // "approved", "blocked", "failed"
	ReportFile  string
	Error       error
}

CycleFinishedMsg is sent when the milestone cycle completes.

type CycleMetadata

type CycleMetadata struct {
	MilestoneID           string                   `json:"milestone_id"`
	CycleNumber           int                      `json:"cycle_number"`
	Timestamp             string                   `json:"timestamp"`
	BranchSnapshot        []git.RepoBranchSnapshot `json:"branch_snapshot,omitempty"`
	GitContext            string                   `json:"git_context"`
	InformationalWarnings []string                 `json:"informational_warnings,omitempty"`
}

CycleMetadata holds the aggregated context and state validation info for a milestone cycle.

type DeveloperOutputContract

type DeveloperOutputContract struct {
	ChangedFiles        []string `yaml:"changed_files"`
	ImplementedBehavior []string `yaml:"implemented_behavior"`
	ChecksRun           []string `yaml:"checks_run"`
	Decisions           []string `yaml:"decisions"`
	Risks               []string `yaml:"risks"`
}

type PackageJSON

type PackageJSON struct {
	Scripts map[string]string `json:"scripts"`
}

type QACriterionResult

type QACriterionResult struct {
	Criterion string `yaml:"criterion"`
	Result    string `yaml:"result"`
	Notes     string `yaml:"notes,omitempty"`
}

type QAOutputContract

type QAOutputContract struct {
	Verdict         string              `yaml:"verdict"`
	CriteriaResults []QACriterionResult `yaml:"criteria_results"`
	ReviewedFiles   []string            `yaml:"reviewed_files"`
	FailingChecks   []string            `yaml:"failing_checks"`
	RequiredFixes   []string            `yaml:"required_fixes"`
}

type RecommenderOutputContract

type RecommenderOutputContract struct {
	Score                        int      `yaml:"score"`
	AgentInstructionsUpdateScore int      `yaml:"agent_instructions_update_score"`
	Verdict                      string   `yaml:"verdict"`
	Reason                       string   `yaml:"reason"`
	NextCycleFocus               []string `yaml:"next_cycle_focus"`
}

type RunOptions

type RunOptions struct {
	ConfigPath     string
	StatePath      string
	NoBranchChange bool
	Unrestricted   bool
	SingleAgentID  string // if non-empty, only run this agent
	CycleNote      string
	// HandoffYAMLPath is the dedicated temp YAML handoff file path the agent is
	// instructed to write (substituted into the prompt as {{HANDOFF_YAML_PATH}}).
	// For Aider/ollama runners it is also passed to Aider with --file so the
	// agent can write structured YAML there instead of relying on log scraping.
	HandoffYAMLPath string
}

RunOptions defines options for a milestone cycle run.

type RunnerStatusMsg

type RunnerStatusMsg struct {
	MilestoneID         string
	CycleNumber         int
	CycleStatus         string
	Phase               string
	AgentID             string
	Runner              string
	Model               string
	Mode                string
	ReportFile          string
	OutputFile          string
	LatestCommand       string
	LatestToolCall      string
	ModelCalls          int
	ToolCalls           int
	EstimatedTokens     int
	PromptTokens        int
	CompletionTokens    int
	MaxModelCalls       int
	MaxTokenBudget      int
	StopOrDoneReason    string
	LastError           string
	NextSuggestedAction string
}

RunnerStatusMsg carries structured live-runner details that are unsafe or brittle to infer from free-form streamed logs.

type Tool

type Tool struct {
	Name        string
	Description string
	Parameters  interface{}
}

type UnifiedMessage

type UnifiedMessage struct {
	Role       string            `json:"role"`
	Content    string            `json:"content"`
	ToolCalls  []UnifiedToolCall `json:"tool_calls,omitempty"`
	ToolCallID string            `json:"tool_call_id,omitempty"`
	ToolName   string            `json:"tool_name,omitempty"`
}

type UnifiedToolCall

type UnifiedToolCall struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Arguments string `json:"arguments"`
}

Jump to

Keyboard shortcuts

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