pub struct CodexHarness;Expand description
OpenAI Codex CLI as a Harness.
Implementations§
Source§impl CodexHarness
impl CodexHarness
Trait Implementations§
Source§impl Clone for CodexHarness
impl Clone for CodexHarness
Source§fn clone(&self) -> CodexHarness
fn clone(&self) -> CodexHarness
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CodexHarness
impl Debug for CodexHarness
Source§impl Default for CodexHarness
impl Default for CodexHarness
Source§fn default() -> CodexHarness
fn default() -> CodexHarness
Returns the “default value” for a type. Read more
Source§impl Harness for CodexHarness
impl Harness for CodexHarness
Source§fn info(&self) -> HarnessInfo
fn info(&self) -> HarnessInfo
Static metadata for the UI.
Source§fn readiness(&self) -> HarnessReadiness
fn readiness(&self) -> HarnessReadiness
Probe availability / version / auth. May shell out; callers
should treat it as blocking and run it off the UI thread.
Source§fn install(&self, on_event: InstallCallback) -> Result<(), HarnessError>
fn install(&self, on_event: InstallCallback) -> Result<(), HarnessError>
Stream a one-time install. Harnesses that need no install
(e.g. a hosted-API adapter) return
Ok(()) immediately.Source§fn run(
&self,
request: RunRequest,
on_event: RunCallback,
) -> Result<RunHandle, HarnessError>
fn run( &self, request: RunRequest, on_event: RunCallback, ) -> Result<RunHandle, HarnessError>
Start a run, streaming events through
on_event. Returns a
handle immediately; work continues on background threads.Source§fn credential(&self) -> CredentialSpec
fn credential(&self) -> CredentialSpec
The credential this harness needs.
Source§fn login(&self, on_event: InstallCallback) -> Result<(), HarnessError>
fn login(&self, on_event: InstallCallback) -> Result<(), HarnessError>
Trigger the harness’s own interactive sign-in (its CLI’s OAuth),
streaming progress as
InstallEvents — the same subprocess
stream shape as install. The flow opens the
user’s browser; this blocks until the login process exits, then
Done { ok } reports success. Default: unsupported — harnesses
that Compose authenticates itself (bob, via its API key) keep it.Source§fn run_channel(
&self,
request: RunRequest,
) -> Result<(RunHandle, Receiver<RunEvent>), HarnessError>
fn run_channel( &self, request: RunRequest, ) -> Result<(RunHandle, Receiver<RunEvent>), HarnessError>
Convenience over
run for callers that want to
pull events off a channel instead of supplying a push callback.
Forwards each RunEvent into an mpsc channel and hands the
receiver back alongside the run handle, so the caller can simply
for event in rx { … } rather than re-write the
Arc::new(move |ev| tx.send(ev)) plumbing at every call site. Read moreAuto Trait Implementations§
impl Freeze for CodexHarness
impl RefUnwindSafe for CodexHarness
impl Send for CodexHarness
impl Sync for CodexHarness
impl Unpin for CodexHarness
impl UnsafeUnpin for CodexHarness
impl UnwindSafe for CodexHarness
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