Documentation
¶
Overview ¶
Package codex runs the Codex CLI in non-interactive mode and parses its JSONL event stream.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ParseResult ¶
type ParseResult struct {
ThreadID string
Usage *Usage
Failure string
LastMessage string
Events int
BadLines int
}
ParseResult is the metadata extracted from a JSONL event stream.
func ParseEvents ¶
func ParseEvents(r io.Reader, dump io.Writer) ParseResult
ParseEvents copies every raw line to dump (when non-nil) and extracts the handful of fields the job manager needs. Malformed lines are counted, not fatal: Codex may emit warnings on stdout.
type RunResult ¶
type RunResult struct {
ExitCode int
ThreadID string
Usage *Usage
Failure string
Events int
BadLines int
LastMessage string
}
RunResult describes a finished (or failed to start) Codex process.
type RunSpec ¶
type RunSpec struct {
Prompt string
Cwd string
Sandbox string
Network bool
Model string
Profile string
ThreadID string
Ephemeral bool
IgnoreUserConfig bool
SkipGitRepoCheck bool
AddDirs []string
Images []string
OutputSchemaPath string
FinalPath string
EventsPath string
StderrPath string
}
RunSpec is one `codex exec` invocation.