Documentation
¶
Index ¶
- func Configure(root *cli.Command, options Options)
- func InterruptedError(failure error) bool
- func RunBatchDirectoryHelper(args []string) (bool, error)
- func RunBatchOutputHelper(args []string) (bool, error)
- func ShowNextCommand(batch gjson.Result, opts HintOptions) error
- func WithErrorOutput(failure error, out io.Writer, render func(context.Context, io.Writer) error) error
- type HintOptions
- type Options
- type WorkflowError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InterruptedError ¶
InterruptedError reports cancellation or timeout of a local batch workflow.
func RunBatchDirectoryHelper ¶
RunBatchDirectoryHelper creates a directory without changing the parent's umask or changing permissions through a replaceable pathname.
func RunBatchOutputHelper ¶
RunBatchOutputHelper handles the private byte-copy process before CLI parsing. The helper owns no API client or saved files. Its lifeline stops blocked writes if the parent disappears, without changing the inherited stdout descriptor.
func ShowNextCommand ¶
func ShowNextCommand(batch gjson.Result, opts HintOptions) error
ShowNextCommand renders a safe follow-up hint after batch creation.
Types ¶
type HintOptions ¶
type HintOptions struct {
Context context.Context
Route string
Response bool
Terminal bool
Transform string
RawOutput bool
Format string
Stderr io.Writer
HumanTerminal func(context.Context, *cli.Command) bool
}
HintOptions carries the final destination and format policy for batch receipts.
type Options ¶
type Options struct {
DefaultRequestOptions func(*cli.Command) []option.RequestOption
RequestOptions func(*cli.Command, io.Reader) ([]option.RequestOption, error)
ShowResult func(context.Context, *cli.Command, gjson.Result, string, io.Writer, io.Writer) error
HumanTerminal func(context.Context, *cli.Command) bool
APIErrorMessage func(*cli.Command, error, *openai.Error) string
}
Options connects batch workflows to application request and presentation policies. Assembly supplies every callback, retaining feature middleware and output policy.
type WorkflowError ¶
type WorkflowError struct {
// contains filtered or unexported fields
}
WorkflowError contains only local guidance, never API prose or paths.
func (*WorkflowError) Error ¶
func (e *WorkflowError) Error() string
func (*WorkflowError) ExitCode ¶
func (e *WorkflowError) ExitCode() int
func (*WorkflowError) Unwrap ¶
func (e *WorkflowError) Unwrap() error