Documentation
¶
Index ¶
- Constants
- func CacheDir(repoRoot string) string
- func LastGuardPath(repoRoot string) string
- type ErrorEntry
- type EventStream
- func (s *EventStream) EmitApprovalRequired(task string, reason string, metadata map[string]any)
- func (s *EventStream) EmitComplete(status string, durationMS int64)
- func (s *EventStream) EmitDone(task, status string, durationMS int64)
- func (s *EventStream) EmitIteration(task string, iteration int, max int, status string)
- func (s *EventStream) EmitOutput(task, stream, line string)
- func (s *EventStream) EmitPlan(rootTask string)
- func (s *EventStream) EmitPlanGraph(rootTask string, nodes []string, edges [][2]string)
- func (s *EventStream) EmitRetry(task string, attempt int, max int, reason string, delayMS int64)
- func (s *EventStream) EmitSkipped(task, reason string)
- func (s *EventStream) EmitStart(task string)
- func (s *EventStream) Err() error
- type ExecutionContext
- type Executor
- type Options
- type Result
- type Runner
- type StepResult
Constants ¶
View Source
const ( // DotQPDir is the top-level project state directory. DotQPDir = ".qp" // CacheSubdir is the subdirectory for task result caches. CacheSubdir = "cache" // LastGuardFile is the filename for the last guard run result. LastGuardFile = "last-guard.json" )
View Source
const ( StatusPass = "pass" StatusFail = "fail" StatusSkipped = "skipped" StatusCancelled = "cancelled" StatusTimeout = "timeout" )
Variables ¶
This section is empty.
Functions ¶
func CacheDir ¶ added in v0.5.2
CacheDir returns the absolute path to the cache directory for a given repo root.
func LastGuardPath ¶ added in v0.5.2
LastGuardPath returns the absolute path to the last-guard.json file.
Types ¶
type ErrorEntry ¶
type EventStream ¶
type EventStream struct {
// contains filtered or unexported fields
}
func NewEventStream ¶
func NewEventStream(w io.Writer) *EventStream
func (*EventStream) EmitApprovalRequired ¶ added in v0.5.0
func (s *EventStream) EmitApprovalRequired(task string, reason string, metadata map[string]any)
func (*EventStream) EmitComplete ¶
func (s *EventStream) EmitComplete(status string, durationMS int64)
func (*EventStream) EmitDone ¶
func (s *EventStream) EmitDone(task, status string, durationMS int64)
func (*EventStream) EmitIteration ¶ added in v0.5.0
func (s *EventStream) EmitIteration(task string, iteration int, max int, status string)
func (*EventStream) EmitOutput ¶
func (s *EventStream) EmitOutput(task, stream, line string)
func (*EventStream) EmitPlan ¶
func (s *EventStream) EmitPlan(rootTask string)
func (*EventStream) EmitPlanGraph ¶ added in v0.5.0
func (s *EventStream) EmitPlanGraph(rootTask string, nodes []string, edges [][2]string)
func (*EventStream) EmitSkipped ¶
func (s *EventStream) EmitSkipped(task, reason string)
func (*EventStream) EmitStart ¶
func (s *EventStream) EmitStart(task string)
func (*EventStream) Err ¶ added in v0.5.2
func (s *EventStream) Err() error
Err returns the first encoding error encountered during event emission, or nil if no errors occurred.
type ExecutionContext ¶ added in v0.5.2
type ExecutionContext struct {
// State will hold the shared JSON state map in P2.
// Parallel nodes receive a snapshot; outputs are merged after completion.
State map[string]any
}
ExecutionContext carries shared state through the runner execution pipeline. For now it is a pass-through placeholder — P2 will add a flowing JSON state object that nodes read from and write to.
func NewExecutionContext ¶ added in v0.5.2
func NewExecutionContext() *ExecutionContext
NewExecutionContext returns an empty execution context.
type Executor ¶ added in v0.5.2
Executor is the interface for running tasks. External consumers (e.g. MCP) should depend on this interface rather than constructing a Runner directly.
type Result ¶
type Result struct {
Task string `json:"task"`
Type string `json:"type"`
Needs []Result `json:"needs,omitempty"`
ResolvedCmd *string `json:"resolved_cmd,omitempty"`
Parallel bool `json:"parallel,omitempty"`
Status string `json:"status"`
ExitCode int `json:"exit_code"`
Stdout string `json:"stdout,omitempty"`
Stderr string `json:"stderr,omitempty"`
Errors []ErrorEntry `json:"errors,omitempty"`
SkipReason string `json:"skip_reason,omitempty"`
Cached bool `json:"cached,omitempty"`
DurationMS int64 `json:"duration_ms"`
StartedAt string `json:"started_at"`
FinishedAt string `json:"finished_at"`
Steps []StepResult `json:"steps,omitempty"`
}
type StepResult ¶
type StepResult struct {
Index int `json:"index"`
Name string `json:"name"`
Type string `json:"type,omitempty"`
ResolvedCmd *string `json:"resolved_cmd"`
Parallel bool `json:"parallel,omitempty"`
Status string `json:"status"`
ExitCode int `json:"exit_code"`
Stdout *string `json:"stdout"`
Stderr *string `json:"stderr"`
Errors []ErrorEntry `json:"errors,omitempty"`
SkipReason string `json:"skip_reason,omitempty"`
DurationMS *int64 `json:"duration_ms"`
StartedAt *string `json:"started_at"`
FinishedAt *string `json:"finished_at"`
Steps []StepResult `json:"steps,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.