Expand description
CodexProjector — maps a ConversationView back to a Codex
crate::Session.
This is the inverse of crate::provider::to_view: where to_view
reads a Codex rollout JSONL into a provider-agnostic view,
CodexProjector serializes that view back into the on-disk shape
(a sequence of RolloutLines starting with a session_meta
line, followed by a turn_context, then per-turn response_item
and event_msg lines).
The projector consumes provider-specific data the forward path
stashed under Turn.extra["codex"]:
reasoning_encrypted: opaque ciphertext blobs that round-trip verbatim asReasoning::encrypted_contenttool_extras: per-call_idextras (exec exit_codes, custom-call statuses, patch-change manifests, etc.) preserved on the matchingfunction_call_output/custom_tool_call_outputline
For non-Codex sources, the projector synthesizes sensible defaults
(originator: "codex-toolpath", source: "cli", model_provider:
"openai").
Foreign-namespace extras (Turn.extra["claude"],
Turn.extra["gemini"], …) are dropped — they have no meaning in
Codex’s protocol and would pollute the JSONL.
Structs§
- Codex
Projector - Project a
ConversationViewinto a Codexcrate::types::Session.