Versions in this module Expand all Collapse all v1 v1.5.1 Nov 6, 2026 Changes in this version + const WarnPlanReviewIncomplete + const WarnPlanReviewSkipped + const WarnSteeringMalformed v1.5.0 Nov 6, 2026 Changes in this version + const ArtifactComment + const ArtifactMarkdownFile + const ArtifactSpecPackage + const DefaultModel + const DefaultRepoMapTokens + const DescriptionTag + const EffortEnv + const ExitFailed + const ExitOK + const ExitUsage + const MaxInputBytes + const ModelEnv + const ModelEnvFallback + const NoInputMessage + const SameInputPlaceholder + const SchemaDialect + const SiblingCommands + const ToolErrorWarnThreshold + const WarnActivationFailed + const WarnArchitectureNotWritten + const WarnCodeSearchUnavailable + const WarnCommentNotPosted + const WarnCommentsTruncated + const WarnCommentsUnreadable + const WarnEffortClamped + const WarnInputLooksLikePath + const WarnInputTruncated + const WarnNameFlagIgnored + const WarnOutputNotWritten + const WarnOverBudget + const WarnPRDReviewIncomplete + const WarnProjectLanguageUnknown + const WarnRelevantFilesUnavailable + const WarnRepoMapBuildFailed + const WarnScopeCountMismatch + const WarnScopeRenamed + const WarnSectionAbsent + const WarnSpecInvalid + const WarnSpecsDirUnreadable + const WarnSplitPlanForeign + const WarnSplitPlanNotRemoved + const WarnSplitPlanStale + const WarnSplitPlanUnreadable + const WarnSplitPlanUpdateFailed + const WarnSupersedesNotRecorded + const WarnTaskNotReady + const WarnTaskStateForced + const WarnTasksOpen + const WarnToolErrors + var ErrNoInput = errors.New("no input given") + func Emit(w io.Writer, env Envelope) int + func EmitWithOutput(w io.Writer, outPath string, env Envelope) int + func EncodeJSON(v any) ([]byte, error) + func ExitCodeFor(category string) int + func FormatDuration(d time.Duration) string + func FormatTokens(n int64) string + func IsTerminal(w io.Writer) bool + func PhaseSummary(res agentrun.Result) string + func RenderThread(ref issuex.IssueRef, t issuex.IssueThread) string + func ResumePlaceholder(in Input) string + func RetryableFor(category string) bool + func SetProvider(p core.ProviderClient) (restore func()) + func SplitArgs(fs *flag.FlagSet, argv []string) (positional string, err error) + func StatusFor(code int) string + func Truncate(s string) (string, bool) + func Usagef(format string, args ...any) error + func WarnStage(code WarnCode) (string, bool) + func WarningMessages(ws []Warning) []string + func WriteAtomic(path string, data []byte) error + type App struct + CheckInput func(Input) error + DefaultBounds agentrun.Bounds + Exec func(context.Context, Deps) (int, any, *ErrorInfo) + Flags func(*flag.FlagSet) + Name string + PreCheck func(*Common) error + PreflightExec func(context.Context, Deps) (int, any, *ErrorInfo) + SinglePhase bool + Usage string + Version string + func (a App) Main(ctx context.Context, argv []string, stdin io.Reader, stdout, stderr io.Writer) int + type Artifact = envelope.Artifact + type ArtifactKind = envelope.ArtifactKind + type ArtifactsProvider interface + Artifacts func() []Artifact + type Common struct + Budget float64 + Context []string + Detail string + Dir string + DryRun bool + Effort string + InputKind string + MaxTokens int + MaxTurns int + Model string + Output string + PhaseModels []agentrun.PhaseChoice + Preflight bool + Quiet bool + RepoMapTokens int + ShowText bool + Timeout time.Duration + TotalBudgetUSD float64 + TrustProject bool + Verbose bool + Version bool + func (c *Common) Bounds(defaults agentrun.Bounds, singlePhase bool) agentrun.Bounds + func (c *Common) ContextBlock() string + func (c *Common) ModelSpec() string + func (c *Common) Register(fs *flag.FlagSet) + func (c *Common) ResolveModels() (agentrun.Plan, error) + func (c *Common) ResolveOutput() (string, error) + func (c *Common) Validate() error + func (c *Common) Workspace() (*workspace.Workspace, error) + type Deps struct + Common *Common + Forge issuex.Client + Index tools.Index + IndexUnavailable string + Input Input + Models agentrun.Plan + Progress *Progress + Run *Run + Runner *agentrun.Runner + Workspace *workspace.Workspace + type DetailedResult interface + SetDetail func(string) + type Envelope = envelope.Envelope[any] + type ErrorInfo = envelope.ErrorInfo + func ErrorFrom(defaultStage string, err error) *ErrorInfo + type Estimate = envelope.Estimate + type FixHint = envelope.FixHint + func FixHintFor(category, stage string, bounds agentrun.Bounds, err error) *FixHint + type Input struct + Body string + CommentsTruncated bool + Context string + Issue *issuex.IssueRef + Kind SourceKind + Origin string + Thread *issuex.IssueThread + Truncated bool + func Resolve(ctx context.Context, arg string, stdin io.Reader, forge issuex.Client, ...) (Input, error) + func ResolveForced(ctx context.Context, kind, arg string, stdin io.Reader, forge issuex.Client) (Input, error) + type InputInfo = envelope.InputInfo + type ModelInfo = envelope.ModelInfo + type Next = envelope.Next + type NextProvider interface + Next func() []Next + type PhaseInfo = envelope.PhaseInfo + func PhaseFromResult(res agentrun.Result, scope string) PhaseInfo + type PhaseModelInfo = envelope.PhaseModelInfo + type PreflightCheck = envelope.PreflightCheck + type Progress struct + func NewProgress(w io.Writer, tool string, verbose, quiet, showText bool) *Progress + func (p *Progress) Begin(format string, args ...any) func(summary string) + func (p *Progress) Detail(format string, args ...any) + func (p *Progress) PhaseEnd(phase, stopReason string, turns int, costUSD float64, elapsed time.Duration) + func (p *Progress) PhaseStart(phase, model string, maxTurns int, budgetUSD float64) + func (p *Progress) Raw(s string) + func (p *Progress) Step(stage, format string, args ...any) + func (p *Progress) Turn(phase string, turn int, costUSD float64) + type Resumabler interface + Resumable func() bool + type Run struct + func NewRun(tool, version string) *Run + func (r *Run) AddPhase(p PhaseInfo) + func (r *Run) CostUSD() float64 + func (r *Run) Envelope(code int, result any, failure *ErrorInfo) Envelope + func (r *Run) RecordSideEffect(action, kind, target, url string, ok bool, warn WarnCode) + func (r *Run) SetBounds(b agentrun.Bounds) + func (r *Run) SetInput(in Input) + func (r *Run) SetModels(plan agentrun.Plan) + func (r *Run) SideEffects() []SideEffect + func (r *Run) Warn(code WarnCode, severity string, format string, args ...any) + func (r *Run) Warnings() []Warning + type SchemaField struct + Key string + Value any + type SchemaObject []SchemaField + func EnvelopeDocument(result any, omit ...string) SchemaObject + func FlagsDocument(fs *flag.FlagSet, enums map[string][]string) SchemaObject + func SchemaFor(t reflect.Type) SchemaObject + func (o *SchemaObject) Set(key string, value any) + func (o SchemaObject) Get(key string) (any, bool) + func (o SchemaObject) MarshalJSON() ([]byte, error) + type SchemaProvider interface + JSONSchema func() SchemaObject + type SideEffect = envelope.SideEffect + type SourceKind string + const KindFile + const KindIssue + const KindStdin + const KindText + func (k SourceKind) String() string + type StageError interface + CategoryName func() string + StageName func() string + type Summarizable interface + SummaryView func() any + type Summarizer interface + Summary func() string + type UsageError struct + func (e *UsageError) Category() string + func (e *UsageError) Error() string + type UsageInfo = envelope.UsageInfo + type WarnCode = envelope.WarnCode + type Warning = envelope.Warning