huskies: merge 1144 story Gateway trampoline-restart: detached helper survives the gateway's own death

This commit is contained in:
dave
2026-05-19 18:13:26 +00:00
parent 20ec690e22
commit de638603cd
12 changed files with 656 additions and 1 deletions
+8
View File
@@ -51,6 +51,8 @@ pub mod sled_uplink;
mod startup;
mod state;
mod store;
/// Detached trampoline — kills the running gateway and starts the new binary.
pub mod trampoline;
/// In-container binary self-update — fetch, atomic replace, and re-exec.
pub mod upgrade;
/// Validated input layer — transport-agnostic newtypes and request structs for all MCP write tools.
@@ -162,6 +164,11 @@ async fn main() -> Result<(), std::io::Error> {
}
}
// ── Trampoline mode: kill old gateway, start new one ─────────────────────
if let Some(ref job_path) = cli.trampoline {
trampoline::run_trampoline(std::path::Path::new(job_path)).await;
}
// ── Upgrade mode: fetch new binary, replace, exit ───────────────────────
if cli.upgrade {
let source = cli
@@ -414,6 +421,7 @@ async fn main() -> Result<(), std::io::Error> {
None,
timer_store_for_bot,
None,
None,
);
} else {
drop(matrix_shutdown_rx);