Skip to main content

AgentAvailabilityProbe

Trait AgentAvailabilityProbe 

Source
pub trait AgentAvailabilityProbe: Send + Sync {
    // Required method
    fn available_agent_kinds(&self) -> Vec<AgentKind>;

    // Provided methods
    fn available_agent_clis(&self) -> Vec<AgentCliInfo> { ... }
    fn native_harness_models<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Vec<HarnessModelOption>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn sign_in_chatgpt<'life0, 'async_trait>(
        &'life0 self,
        _on_url: ChatGptSignInUrlHandler,
    ) -> Pin<Box<dyn Future<Output = Result<ChatGptSignInOutcome, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Detects which provider CLIs and harness models are runnable on the current machine.

Required Methods§

Source

fn available_agent_kinds(&self) -> Vec<AgentKind>

Returns the agent kinds whose backing CLI executable is available.

Provided Methods§

Source

fn available_agent_clis(&self) -> Vec<AgentCliInfo>

Returns available agent CLI executables and their refreshed versions.

Source

fn native_harness_models<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Vec<HarnessModelOption>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the AgentKind::Harness models a user can choose: models the local OpenAI-compatible server serves, then the hosted catalog models with their configuration status. Implementations bound every network probe with short timeouts. Probes without harness discovery report none.

Source

fn sign_in_chatgpt<'life0, 'async_trait>( &'life0 self, _on_url: ChatGptSignInUrlHandler, ) -> Pin<Box<dyn Future<Output = Result<ChatGptSignInOutcome, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Runs the browser sign-in that lets chatgpt/… harness models use the user’s ChatGPT plan, passing its URL to on_url before waiting for the browser callback. Probes without harness discovery do not support it.

§Errors

Returns a user-facing message when the sign-in cannot start, is denied, or cannot be stored.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§