Documentation
¶
Index ¶
- func BrowserStatus(batch gjson.Result) (string, string)
- 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 SubmissionErrorValue(err error, value gjson.Result) gjson.Result
- func WithErrorOutput(failure error, out io.Writer, render func(context.Context, io.Writer) error) error
- func WorkflowErrorMessage(failure error) string
- type HintOptions
- type Options
- type RecordItem
- type RecordOutput
- type RecordTextStyle
- type WorkflowError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BrowserStatus ¶ added in v1.44.2
BrowserStatus keeps detail presentation consistent with the browser overview.
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.
func SubmissionErrorValue ¶ added in v1.44.2
SubmissionErrorValue retains recovery data alongside the original API error. Only the new submit workflow adds this envelope; existing commands stay unchanged.
func WithErrorOutput ¶
func WithErrorOutput(failure error, out io.Writer, render func(context.Context, io.Writer) error) error
WithErrorOutput gives cancellation diagnostics a separate bounded delivery window. A failed delivery must not trigger another unbounded write to the same error sink.
func WorkflowErrorMessage ¶ added in v1.44.2
WorkflowErrorMessage retains safe outcome and cleanup messages from joined failures. Arbitrary cause text remains available through explicit error modes.
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)
CreateRequestOptions func(*cli.Command, io.Reader) ([]option.RequestOption, gjson.Result, error)
ShowResult func(context.Context, *cli.Command, gjson.Result, string, io.Writer, io.Writer) error
ShowRecords func(context.Context, *cli.Command, RecordOutput, io.Writer, io.Writer) error
ShowBrowserDetails func(context.Context, gjson.Result, io.Writer, func(RecordTextStyle)) 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 RecordItem ¶ added in v1.44.2
RecordItem exposes one stored record, or a group's matching metadata. WriteJSON streams that item without retaining its payload or duplicate group. The visitor must finish reading before its callback returns.
type RecordOutput ¶ added in v1.44.2
type RecordOutput struct {
Operation string
WriteJSON func(io.Writer) error
TemporaryFile func() (*os.File, func() error, error)
BatchID, File, FileID string
Visit func(func(RecordItem) error) error
// StopSource interrupts an active download after presentation fails.
// Stored records need no interruption and leave this callback nil.
StopSource context.CancelCauseFunc
// Detail omits repeated file metadata inside an already labeled browser pane.
Detail bool
// Decorate marks trusted presentation spans in one bounded browser projection.
// Raw, standalone, and complete streaming fallback output do not use it.
Decorate func(RecordTextStyle)
}
RecordOutput lets presentation stream validated records and borrow private scratch storage for unusually large labels. The workflow owns all cleanup.
type RecordTextStyle ¶ added in v1.44.2
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
Source Files
¶
- batch_browser.go
- batch_browser_catalog.go
- batch_browser_choose_input.go
- batch_browser_create.go
- batch_browser_document.go
- batch_browser_flow.go
- batch_browser_messages.go
- batch_browser_progress.go
- batch_browser_raw_json.go
- batch_browser_records.go
- batch_browser_requests.go
- batch_browser_save_path.go
- batch_browser_screen.go
- batch_browser_session.go
- batch_browser_viewer.go
- batch_directory_unix.go
- batch_download.go
- batch_error_messages.go
- batch_input.go
- batch_input_picker.go
- batch_input_unix.go
- batch_inputs.go
- batch_inputs_store.go
- batch_list_store.go
- batch_output.go
- batch_output_unix.go
- batch_records.go
- batch_records_scan.go
- batch_records_store.go
- batch_records_stream.go
- batch_records_visit.go
- batch_signals.go
- batch_submission.go
- batch_submit.go
- batch_submit_endpoint.go
- batch_submit_snapshot.go
- batch_wait.go
- batch_watch.go
- batch_watch_store.go
- options.go