Summary
Foundation layer for codex_wrapper. Mirror the claude_wrapper architecture:
CodexWrapper.Config struct: binary path, working_dir, env, timeout, verbose
- Binary discovery: explicit path >
CODEX_CLI env var > system PATH
CodexWrapper.Command behaviour with args/0 and parse_output/2 callbacks
- Generic
Command.run/3 that handles System.cmd execution, timeout via Task.async/yield
Acceptance criteria
Reference
- claude_wrapper:
lib/claude_wrapper/config.ex, lib/claude_wrapper/command.ex
- codex-wrapper (Rust):
src/lib.rs (Codex builder)
Summary
Foundation layer for codex_wrapper. Mirror the claude_wrapper architecture:
CodexWrapper.Configstruct: binary path, working_dir, env, timeout, verboseCODEX_CLIenv var > system PATHCodexWrapper.Commandbehaviour withargs/0andparse_output/2callbacksCommand.run/3that handles System.cmd execution, timeout via Task.async/yieldAcceptance criteria
Config.new/1accepts keyword opts, finds codex binaryConfig.cmd_opts/1returns opts for System.cmd (cd, env, stderr_to_stdout)Commandbehaviour defined withrun/3generic executorCodexWrapper.raw/2escape hatch for arbitrary CLI argsReference
lib/claude_wrapper/config.ex,lib/claude_wrapper/command.exsrc/lib.rs(Codex builder)