move agent_token from swarm-queue-client to swarm-agent-verify
per #5471, verifiers stop depending on the queue client. the module is store-free and needs only thiserror, so swarm-agent-verify gains one dependency and loses its swarm-queue-client edge. consumers import it from swarm_agent_verify; swarm-logs and swarm-metrics, whose only use of swarm-queue-client was this module, drop that dependency, as does swarm-logs-auth.
This commit is contained in:
parent
741fe388f9
commit
87b1f94ac6
18 changed files with 34 additions and 33 deletions
|
|
@ -52,6 +52,8 @@ swarm-queue-client = { workspace = true, features = [
|
|||
"agents-md-initial",
|
||||
"operator-profiles",
|
||||
] }
|
||||
# The spelling of the token the queue connection presents.
|
||||
swarm-agent-verify.workspace = true
|
||||
# This agent's own queue secret, read from the store under its own certificate.
|
||||
swarm-secret-client.workspace = true
|
||||
# The directory an AGENTS.md edit is applied in, and the file it is written
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ async fn connect_as_agent<S: SecretSource>(
|
|||
// `Sync` as async-nats's auth callback requires; the store read is not.
|
||||
let attempt = tokio::spawn(async move {
|
||||
let value = secret.for_attempt().await.map_err(|e| format!("{e:#}"))?;
|
||||
swarm_queue_client::agent_token::format_agent_token(&name, &value)
|
||||
swarm_agent_verify::agent_token::format_agent_token(&name, &value)
|
||||
.map_err(|e| e.to_string())
|
||||
});
|
||||
async move { attempt.await.map_err(|e| e.to_string())? }
|
||||
|
|
|
|||
Loading…
Reference in a new issue