a hive-side pause holds against the swarm's declared state until an operator resumes
the harness writes the reason into the pause marker when it pauses itself and reports it as paused_by_hive in its turn-state header. swarm-controller declares such an agent paused (only if declared up) and shows the reason on the agents status row and the swarm ui card.
This commit is contained in:
parent
6470e2b109
commit
e5c55257f8
1 changed files with 517 additions and 26 deletions
|
|
@ -31,9 +31,9 @@ use crate::{
|
|||
agent_permissions, agent_renewal, agent_state_stream, agent_status, agents_md, alerts,
|
||||
archetypes, auth, backend_env, builder, claude_login, config_drift, config_pr, egress_allow,
|
||||
egress_deny, forge, forge_account, github_account, gitlab_account, inference, issue_report,
|
||||
linked_accounts, matrix_account, message_stream, notify_flows, notify_router_api, pr_report,
|
||||
pulls, queue_identity, review_classifier, schedules, status, subagent_term, term_stream,
|
||||
wanted, webhook,
|
||||
linked_accounts, matrix_account, message_stream, notify_flows, notify_router_api, pause_hold,
|
||||
pr_report, pulls, queue_identity, review_classifier, schedules, status, subagent_term,
|
||||
term_stream, wanted, webhook,
|
||||
};
|
||||
|
||||
/// Where the daemon binds, overridable via `SWARM_CONTROLLER_SOCKET`.
|
||||
|
|
@ -206,11 +206,17 @@ pub(crate) fn reported_inference(
|
|||
}
|
||||
|
||||
/// Whether each agent last said it needs a login, read on the status
|
||||
/// reader's connection — same rationale as [`wanted_writer`].
|
||||
/// reader's connection — same rationale as [`wanted_writer`] — and, from the
|
||||
/// same headers, which agents their hive paused: those are declared `Paused`
|
||||
/// (see [`pause_hold`]).
|
||||
pub(crate) fn agent_login(
|
||||
status: Option<&Arc<status::StatusReader>>,
|
||||
hives: &[HiveEntry],
|
||||
) -> Option<Arc<agent_login::Reported>> {
|
||||
Some(agent_login::Reported::spawn(status?.queue_client()))
|
||||
let login = agent_login::Reported::spawn(status?.queue_client());
|
||||
let hives = hives.iter().map(|h| h.name.clone()).collect();
|
||||
pause_hold::spawn(Arc::clone(&login), wanted_writer(status)?, hives);
|
||||
Some(login)
|
||||
}
|
||||
|
||||
/// The homeserver agents' own matrix accounts are minted on. Unset is this
|
||||
|
|
|
|||
Loading…
Reference in a new issue