pub struct CodexPack;Expand description
The Codex CLI harness pack (a zero-sized &'static singleton).
Trait Implementations§
impl Copy for CodexPack
Source§impl Pack for CodexPack
impl Pack for CodexPack
Source§fn register(&self, host: &Arc<Host>, registry: &mut Registry)
fn register(&self, host: &Arc<Host>, registry: &mut Registry)
Register this pack’s tools into
registry, each under its harness’s real wire
name (Tool has no name of its own — the name is assigned here). Tools are
constructed here holding an Arc<Host> (the only OS seam; ToolCtx is too small
to carry it). A duplicate name is a wiring bug and panics inside
Registry::register.Source§fn required_api_schemas(&self) -> Option<&'static [&'static str]>
fn required_api_schemas(&self) -> Option<&'static [&'static str]>
The provider wire schemas this pack’s tools require, or
None when the pack
is wire-agnostic (grok, claude). The codex pack pins ["openai-responses"]
because its apply_patch is a freeform (custom-grammar) tool that only
round-trips on the OpenAI Responses wire (ADR-0012, D5). Checked pre-run
against the resolved provider: a real schema not in the set fails before the
loop with an actionable message. The mock wire (keyless CI) is a universal
escape hatch and is always allowed, independent of this list.Source§fn preamble(&self, ctx: &PackContext) -> Vec<Message>
fn preamble(&self, ctx: &PackContext) -> Vec<Message>
The pack’s base preamble: the ordered, role-tagged
System/Developer
messages that seed the conversation (ADR-0013). Each pack maps its harness onto
our roles faithfully — a single System message, or System + Developer, etc.
The wire (Task 12) places each role in the right slot. Task 8 ships a scaffold;
the real content lands in Task 13.Source§fn shape_user_prompt(&self, text: &str) -> String
fn shape_user_prompt(&self, text: &str) -> String
Shape a raw user prompt the way this harness expects it. Some harnesses wrap
the task in a tag their system prompt refers to (grok’s
<user_query>);
Claude Code sends it verbatim. The default is verbatim; a pack overrides only
if its prompt is written against a wrapper. Keeps harness-specific shaping in
the pack rather than spread across the exec/tui layers.Auto Trait Implementations§
impl Freeze for CodexPack
impl RefUnwindSafe for CodexPack
impl Send for CodexPack
impl Sync for CodexPack
impl Unpin for CodexPack
impl UnsafeUnpin for CodexPack
impl UnwindSafe for CodexPack
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more