huskies: merge 1169 story Gateway pulls signed artifacts from a release channel into its local store

This commit is contained in:
Huskies Agent
2026-07-16 14:03:31 +00:00
parent 1e0e581bd7
commit 77e0394195
23 changed files with 1643 additions and 7 deletions
@@ -548,6 +548,33 @@ pub(in crate::chat::transport::matrix::bot) async fn on_room_message(
return;
}
// In gateway mode, handle the `pull <channel>` command: fetch, verify, and
// install a signed release-channel artifact into the artifact store.
if ctx.is_gateway()
&& let Some(channel) = super::super::super::pull::extract_pull_command(
&user_message,
&ctx.services.bot_name,
ctx.matrix_user_id.as_str(),
)
{
slog!("[matrix-bot] Handling 'pull {channel}' from {sender}");
let response = if let Some(ref store) = ctx.gateway_channels_store {
super::super::super::pull::handle_pull(&channel, store).await
} else {
"Gateway release channels unavailable — cannot pull.".to_string()
};
let html = markdown_to_html(&response);
if let Ok(msg_id) = ctx
.transport
.send_message(&room_id_str, &response, &html)
.await
&& let Ok(event_id) = msg_id.parse()
{
ctx.bot_sent_event_ids.lock().await.insert(event_id);
}
return;
}
// In gateway mode, handle the `upgrade [<project>]` command to upgrade a
// sled's binary in-container, streaming phase markers to the room.
if ctx.is_gateway()