/**
 * gateway.redeploy — Self-update tool for the Jait gateway.
 *
 * Detects the runtime environment and uses the appropriate strategy:
 *
 * **systemd** (detected when INVOCATION_ID is set):
 *   1. npm install -g @jait/gateway@latest
 *   2. Spawn canary on PORT+1, health-check it
 *   3. If healthy → kill canary, exit process.
 *      systemd's Restart=always automatically brings up the new version.
 *   4. If unhealthy → kill canary, report failure, stay running.
 *
 * **Bare process** (no service manager):
 *   1. npm install -g @jait/gateway@latest
 *   2. Spawn canary on PORT+1, health-check it
 *   3. If healthy → spawn fresh gateway on original port (detached),
 *      kill canary, then gracefully shut down current process.
 *   4. If unhealthy → kill canary, report failure, stay running.
 */
import type { ToolDefinition } from "./contracts.js";
interface RedeployInput {
    /** Version/tag to install. Defaults to "latest". */
    version?: string;
    /** Skip the canary health check (not recommended). */
    skipCanary?: boolean;
}
interface RedeployDeps {
    /** Current gateway port (from config) */
    port: number;
    /** Graceful shutdown callback — will be called when cutover succeeds */
    shutdown: () => Promise<void>;
}
export declare function createRedeployTool(deps: RedeployDeps): ToolDefinition<RedeployInput>;
export {};
//# sourceMappingURL=redeploy-tools.d.ts.map