Skip to main content

Crate kcode_codex_runtime_v2

Crate kcode_codex_runtime_v2 

Source
Expand description

Native Codex app-server turns with caller-implemented dynamic tools.

Codex::start_turn preserves the standard text-and-dynamic-tool flow. Codex::start_image_turn is a separate fresh, ephemeral, tool-free flow that sends caller-owned image bytes as inline data URLs.

AgentTurn yields exact client-to-Codex JSONL records, dynamic tool calls, and the completed turn. For an image turn, the turn/start AgentEvent::ProviderInput contains the Base64-encoded image bytes and must be handled as media-bearing data.

Structs§

AgentRequest
One standard Codex turn request.
AgentTurn
Interactive handle for a running Codex turn.
Codex
Cloneable Codex app-server runtime.
CodexConfig
Runtime configuration applied to every Codex app-server process.
CompletedTurn
Successful terminal state of one Codex turn.
DynamicTool
A dynamic function exposed to Codex for a fresh thread.
DynamicToolCall
A dynamic function call requested by Codex.
Error
One safe runtime error.
ImageInput
One in-memory image supplied to a dedicated image turn.
ImageTurnRequest
A fresh, ephemeral, tool-free Codex image-analysis turn.
TokenUsage
Normalized cumulative and latest-turn token accounting.
ToolResult
Caller-provided result for one dynamic function call.

Enums§

AgentEvent
Event yielded while a Codex turn is running.
ErrorKind
Stable classification for a runtime failure.
ImageMediaType
A supported image media type for an inline image turn.
ReasoningEffort
Model reasoning effort accepted by Codex.

Constants§

DEFAULT_CODEX_EXECUTABLE
Default sandboxed Codex launcher.

Type Aliases§

Result
Result returned by this crate.