Watch
0
0
Fork
You've already forked hyperhive
0

move the review classifier, agent login and inference types into swarm-wire

This commit is contained in:
atlas 2026-10-18 08:58:13 +02:00 • committed by mara
commit 6ea13c02e3
44 changed files with 344 additions and 332 deletions

View file

@ -16,10 +16,10 @@ use std::sync::atomic::{AtomicU64, Ordering};
use std::time::{Duration, Instant};
use hive_claude::{Attach, Config, Sink};
use swarm_queue_client::agent_inference::Effort;
use swarm_queue_client::review_classifier::{CLASSIFICATION_DEADLINE, Reply, Row, Runtime, TryOut};
use swarm_secret_client::acp::ProviderKey;
use swarm_secret_client::review_classifier::{ApiKey, acp_provider_key_path, api_key_path};
use swarm_wire::agent_inference::Effort;
use swarm_wire::review_classifier::{CLASSIFICATION_DEADLINE, Reply, Row, Runtime, TryOut};
use crate::prompt::Prompt;
use crate::{aggregate, answer, prompt};
@ -373,7 +373,7 @@ impl Sink for ResultSink {
#[cfg(test)]
mod tests {
use swarm_queue_client::review_classifier::{Classification, Overall, Polarity};
use swarm_wire::review_classifier::{Classification, Overall, Polarity};
use super::*;
@ -449,10 +449,10 @@ mod tests {
fn acp_run(descriptions: &[&str]) -> TryOut {
TryOut {
runtime: Runtime::Acp(swarm_queue_client::review_classifier::Acp {
runtime: Runtime::Acp(swarm_wire::review_classifier::Acp {
base_url: "https://llm.example/v1".to_owned(),
model: "qwen".to_owned(),
prices: swarm_queue_client::review_classifier::Prices {
prices: swarm_wire::review_classifier::Prices {
input: 1.0,
output: 1.0,
cache_read: None,
@ -654,7 +654,7 @@ mod tests {
let answer = classify_slow(&model).await.expect("the retry answers");
assert_eq!(
answer.verdict,
swarm_queue_client::review_classifier::Verdict::NoMatch
swarm_wire::review_classifier::Verdict::NoMatch
);
let [first, second] = model.deadlines().try_into().expect("two asks");
assert_eq!(first, BUDGET);