Watch
0
0
Fork
You've already forked hyperhive
0

move the builder and claude login wire contracts into swarm-wire

This commit is contained in:
atlas 2026-10-18 07:27:43 +02:00 • committed by mara
commit 0c3d128de1
23 changed files with 224 additions and 81 deletions

View file

@ -118,6 +118,8 @@ swarm-queue-client = { workspace = true, features = [
# name and the object's shape are agreements between the two ends, and a
# second spelling here would be a store this hive could not read.
swarm-secret-client.workspace = true
# The builder and claude login subjects, requests and replies it sends.
swarm-wire.workspace = true
# The appservice calls `matrix_account::agent_token` mints agents' accounts
# with — shared with `swarm-matrix-ctl`, which pins the same device id.
swarm-matrix-client.workspace = true

View file

@ -16,7 +16,7 @@ use hive_sh4re::permissions::Permission;
use problem_details::ProblemDetails;
use serde::{Deserialize, Serialize};
use swarm_queue_client::archetypes::{ArchetypeMeta, BUILTIN_SOURCE, SourceRecord};
use swarm_queue_client::builder::{
use swarm_wire::builder::{
ARCHETYPES_DEADLINE, ARCHETYPES_SUBJECT, ArchetypesReply, EvalArchetypes,
};
use utoipa::ToSchema;
@ -361,7 +361,7 @@ mod tests {
let mut requests = builder
.queue_subscribe(
ARCHETYPES_SUBJECT,
swarm_queue_client::builder::QUEUE_GROUP.to_owned(),
swarm_wire::builder::QUEUE_GROUP.to_owned(),
)
.await
.expect("subscribe");

View file

@ -16,7 +16,7 @@ use std::future::Future;
use forgejo_api::structs::CommitStatusState;
use hive_jobq::scheduler::Outcome;
use swarm_queue_client::builder::{BuildAgent, REPLY_DEADLINE, Reply, SUBJECT};
use swarm_wire::builder::{BuildAgent, REPLY_DEADLINE, Reply, SUBJECT};
use crate::agent_renewal::unix_now;
use crate::forge::{self, CONFIG_ORG};
@ -534,7 +534,7 @@ mod tests {
let builder = nats.client().await;
let mut requests = builder
.queue_subscribe(SUBJECT, swarm_queue_client::builder::QUEUE_GROUP.to_owned())
.queue_subscribe(SUBJECT, swarm_wire::builder::QUEUE_GROUP.to_owned())
.await
.expect("subscribe");
// A message the builder sends itself and receives back proves the

View file

@ -21,7 +21,7 @@ use axum::extract::{Path, State};
use axum::http::{HeaderMap, StatusCode};
use problem_details::ProblemDetails;
use serde::{Deserialize, Serialize};
use swarm_queue_client::claude_login::{REPLY_DEADLINE, Reply, Request, SUBJECT};
use swarm_wire::claude_login::{REPLY_DEADLINE, Reply, Request, SUBJECT};
use utoipa::ToSchema;
use crate::{AppState, error_problem};
@ -243,7 +243,7 @@ mod tests {
use std::sync::Mutex;
use axum::http::StatusCode;
use swarm_queue_client::claude_login::{Reply, Request};
use swarm_wire::claude_login::{Reply, Request};
use super::{LoginSink, relay};

View file

@ -601,7 +601,7 @@ async fn build_agent(
rev: String,
pr: u64,
) -> hive_jobq::scheduler::Outcome {
let job = swarm_queue_client::builder::BuildAgent { agent, rev, pr };
let job = swarm_wire::builder::BuildAgent { agent, rev, pr };
let builds = builder::runs::Builds::Live(deps.queue.clone());
let link_base = std::env::var(PUBLIC_URL_ENV).ok();
builder::run(