Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resolver = "3"
members = ["crates/client", "crates/protocol", "crates/proxy"]

[workspace.package]
version = "0.1.9"
version = "0.1.10"
edition = "2024"
license = "Apache-2.0"
publish = true
Expand Down
2 changes: 1 addition & 1 deletion crates/proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage.workspace = true
repository.workspace = true

[dependencies]
agent-abstraction = "0.4.19"
agent-abstraction = "0.4.21"
agency-proxy-protocol.workspace = true
async-trait.workspace = true
clap.workspace = true
Expand Down
18 changes: 10 additions & 8 deletions crates/proxy/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ pub enum RuntimeError {

impl RuntimeRegistry {
pub async fn account_usage(&self) -> Vec<agency_proxy_protocol::ProviderAccountUsage> {
futures::future::join_all([Agent::Claude, Agent::Codex, Agent::Copilot].map(
|agent| async move {
futures::future::join_all(
[Agent::Claude, Agent::Codex, Agent::Copilot, Agent::Grok].map(|agent| async move {
let provider = agent_name(agent).to_string();
if !agent.reports_account_usage() {
return agency_proxy_protocol::ProviderAccountUsage {
Expand All @@ -139,14 +139,14 @@ impl RuntimeRegistry {
error: Some(error.to_string()),
},
}
},
))
}),
)
.await
}

pub async fn probe_providers(&self) -> Vec<agency_proxy_protocol::ProviderStatus> {
futures::future::join_all([Agent::Claude, Agent::Codex, Agent::Copilot].map(
|agent| async move {
futures::future::join_all(
[Agent::Claude, Agent::Codex, Agent::Copilot, Agent::Grok].map(|agent| async move {
let probe = Probe::run(agent).await;
let auth = AuthStatus::check(agent).await;
let installed =
Expand Down Expand Up @@ -194,8 +194,8 @@ impl RuntimeRegistry {
plan,
login_hint,
}
},
))
}),
)
.await
}

Expand Down Expand Up @@ -601,6 +601,7 @@ fn agent_name(agent: Agent) -> &'static str {
Agent::Claude => "claude",
Agent::Codex => "codex",
Agent::Copilot => "copilot",
Agent::Grok => "grok",
}
}

Expand All @@ -609,6 +610,7 @@ fn agent_for_provider(provider: &str) -> Result<Agent, RuntimeError> {
"claude" => Ok(Agent::Claude),
"codex" => Ok(Agent::Codex),
"copilot" => Ok(Agent::Copilot),
"grok" => Ok(Agent::Grok),
other => Err(RuntimeError::Provider(other.into())),
}
}
Expand Down
Loading