huskies: merge 1144 story Gateway trampoline-restart: detached helper survives the gateway's own death
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user