Skip to main content

CodexPack

Struct CodexPack 

Source
pub struct CodexPack;
Expand description

The Codex CLI harness pack (a zero-sized &'static singleton).

Trait Implementations§

Source§

impl Clone for CodexPack

Source§

fn clone(&self) -> CodexPack

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for CodexPack

Source§

impl Debug for CodexPack

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CodexPack

Source§

fn default() -> CodexPack

Returns the “default value” for a type. Read more
Source§

impl Pack for CodexPack

Source§

fn name(&self) -> &'static str

The --harness selector and the report-envelope harness value.
Source§

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]>

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>

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

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.
Source§

fn build_registry(&self, host: &Arc<Host>) -> Registry

Convenience: a fresh Registry holding exactly this pack’s tools, over host. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.