Documentation
¶
Index ¶
- Constants
- func AppendLinesToBuffer(buf *LineBuffer, lines []string)
- func AtLeastOne(value int) int
- func CloneGroups(src map[string][]model.IssueEntry) map[string][]model.IssueEntry
- func CountTotalIssues(job *Job) int
- func CreateLogWriters(outFile *os.File, errFile *os.File, useUI bool, emitHuman bool) (io.Writer, io.Writer)
- func RuntimeLogger(enabled bool) *slog.Logger
- func RuntimeLoggerFor(cfg *Config, useUI bool) *slog.Logger
- func SilentLogger() *slog.Logger
- func WriterOrNil(file *os.File) io.Writer
- type ActivityMonitor
- type Config
- type FailInfo
- type Job
- type JobAttemptResult
- type JobAttemptStatus
- type JobPhase
- type LineBuffer
- type ReusableAgentExecution
- type ShutdownPhase
- type ShutdownSource
- type ShutdownState
Constants ¶
View Source
const ( ProcessTerminationGracePeriod = 3 * time.Second GracefulShutdownTimeout = 3 * time.Second )
View Source
const ( ExitCodeTimeout = -2 ExitCodeCanceled = -1 ActivityCheckInterval = 5 * time.Second RunStatusSucceeded = "succeeded" RunStatusFailed = "failed" RunStatusCanceled = "canceled" )
Variables ¶
This section is empty.
Functions ¶
func AppendLinesToBuffer ¶
func AppendLinesToBuffer(buf *LineBuffer, lines []string)
func AtLeastOne ¶
func CloneGroups ¶
func CloneGroups(src map[string][]model.IssueEntry) map[string][]model.IssueEntry
func CountTotalIssues ¶
func CreateLogWriters ¶
func RuntimeLogger ¶
func SilentLogger ¶
Types ¶
type ActivityMonitor ¶
type ActivityMonitor struct {
// contains filtered or unexported fields
}
func NewActivityMonitor ¶
func NewActivityMonitor() *ActivityMonitor
func (*ActivityMonitor) BeginActivity ¶
func (a *ActivityMonitor) BeginActivity()
func (*ActivityMonitor) EndActivity ¶
func (a *ActivityMonitor) EndActivity()
func (*ActivityMonitor) RecordActivity ¶
func (a *ActivityMonitor) RecordActivity()
func (*ActivityMonitor) TimeSinceLastActivity ¶
func (a *ActivityMonitor) TimeSinceLastActivity() time.Duration
type Config ¶
type Config struct {
WorkspaceRoot string
Name string
Round int
Provider string
PR string
ReviewsDir string
TasksDir string
DryRun bool
AutoCommit bool
Concurrent int
BatchSize int
IDE string
Model string
AddDirs []string
TailLines int
ReasoningEffort string
AccessMode string
TaskRuntimeRules []model.TaskRuntimeRule
Mode model.ExecutionMode
OutputFormat model.OutputFormat
Verbose bool
Persist bool
DaemonOwned bool
DetachOnly bool
RunID string
RunArtifacts model.RunArtifacts
RuntimeManager model.RuntimeManager
IncludeCompleted bool
IncludeResolved bool
Timeout time.Duration
MaxRetries int
RetryBackoffMultiplier float64
SoundEnabled bool
SoundOnCompleted string
SoundOnFailed string
}
func NewConfig ¶
func NewConfig(src *model.RuntimeConfig, runArtifacts model.RunArtifacts) *Config
func (*Config) EventStreamEnabled ¶
func (*Config) HumanOutputEnabled ¶
func (*Config) ResolvedOutputFormat ¶
func (cfg *Config) ResolvedOutputFormat() model.OutputFormat
type Job ¶
type Job struct {
CodeFiles []string
Groups map[string][]model.IssueEntry
TaskTitle string
TaskType string
SafeName string
IDE string
Model string
ReasoningEffort string
ReusableAgent *ReusableAgentExecution
Prompt []byte
SystemPrompt string
MCPServers []model.MCPServer
ResumeRunID string
ResumeSession string
OutPromptPath string
OutLog string
ErrLog string
Status string
Failure string
ExitCode int
Usage model.Usage
OutBuffer *LineBuffer
ErrBuffer *LineBuffer
}
func (Job) CodeFileLabel ¶
type JobAttemptResult ¶
type JobAttemptResult struct {
Status JobAttemptStatus
ExitCode int
Failure *FailInfo
Retryable bool
}
func (JobAttemptResult) IsCanceled ¶
func (r JobAttemptResult) IsCanceled() bool
func (JobAttemptResult) NeedsRetry ¶
func (r JobAttemptResult) NeedsRetry() bool
func (JobAttemptResult) Successful ¶
func (r JobAttemptResult) Successful() bool
type JobAttemptStatus ¶
type JobAttemptStatus string
const ( AttemptStatusSuccess JobAttemptStatus = "success" AttemptStatusFailure JobAttemptStatus = "failure" AttemptStatusTimeout JobAttemptStatus = "timeout" AttemptStatusCanceled JobAttemptStatus = "canceled" AttemptStatusSetupFailed JobAttemptStatus = "setup_failed" )
type LineBuffer ¶
type LineBuffer struct {
// contains filtered or unexported fields
}
func NewLineBuffer ¶
func NewLineBuffer(n int) *LineBuffer
func (*LineBuffer) AppendLine ¶
func (r *LineBuffer) AppendLine(s string)
func (*LineBuffer) Snapshot ¶
func (r *LineBuffer) Snapshot() []string
type ReusableAgentExecution ¶
ReusableAgentExecution carries reusable-agent metadata needed for runtime observability once the job prompt and MCP servers are fully prepared.
type ShutdownPhase ¶
type ShutdownPhase string
const ( ShutdownPhaseIdle ShutdownPhase = "" ShutdownPhaseDraining ShutdownPhase = "draining" ShutdownPhaseForcing ShutdownPhase = "forcing" )
type ShutdownSource ¶
type ShutdownSource string
const ( ShutdownSourceSignal ShutdownSource = "signal" ShutdownSourceTimer ShutdownSource = "timer" )
type ShutdownState ¶
type ShutdownState struct {
Phase ShutdownPhase
Source ShutdownSource
RequestedAt time.Time
DeadlineAt time.Time
}
func (ShutdownState) Active ¶
func (s ShutdownState) Active() bool
Click to show internal directories.
Click to hide internal directories.