fix(ux): add 'spawn last' to reconnect hints in cloud modules (#3337)

The reconnect hints shown after provisioning in all 5 cloud providers
(Hetzner, AWS, DigitalOcean, GCP, Sprite) only showed raw SSH/CLI
commands. Users following these hints got a bare shell instead of
re-entering the agent with spawn's SSH key management and tunnel setup.

Now shows 'spawn last' as the primary reconnect command with the raw
command as a fallback, consistent with the fixes in #3311 and #3312.

Agent: ux-engineer

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Ahmed Abushagur <ahmed@abushagur.com>
This commit is contained in:
A 2026-04-21 21:18:38 -07:00 committed by GitHub
parent de2883ee2b
commit ede351e2b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 11 additions and 6 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@openrouter/spawn",
"version": "1.0.18",
"version": "1.0.19",
"type": "module",
"bin": {
"spawn": "cli.js"

View file

@ -1235,7 +1235,8 @@ export async function interactiveSession(cmd: string): Promise<number> {
logInfo("To delete from CLI:");
logInfo(" spawn delete");
logInfo("To reconnect:");
logInfo(` ssh ${SSH_USER}@${_state.instanceIp}`);
logInfo(" spawn last");
logInfo(` or: ssh ${SSH_USER}@${_state.instanceIp}`);
return exitCode;
}

View file

@ -1516,7 +1516,8 @@ export async function interactiveSession(cmd: string, ip?: string): Promise<numb
logInfo("To delete from CLI:");
logInfo(" spawn delete");
logInfo("To reconnect:");
logInfo(` ssh root@${serverIp}`);
logInfo(" spawn last");
logInfo(` or: ssh root@${serverIp}`);
return exitCode;
}

View file

@ -1136,7 +1136,8 @@ export async function interactiveSession(cmd: string): Promise<number> {
logInfo("To delete from CLI:");
logInfo(" spawn delete");
logInfo("To reconnect:");
logInfo(` gcloud compute ssh ${_state.instanceName} --zone=${_state.zone} --project=${_state.project}`);
logInfo(" spawn last");
logInfo(` or: gcloud compute ssh ${_state.instanceName} --zone=${_state.zone} --project=${_state.project}`);
return exitCode;
}

View file

@ -938,7 +938,8 @@ export async function interactiveSession(cmd: string, ip?: string): Promise<numb
logInfo("To delete from CLI:");
logInfo(" spawn delete");
logInfo("To reconnect:");
logInfo(` ssh root@${serverIp}`);
logInfo(" spawn last");
logInfo(` or: ssh root@${serverIp}`);
return exitCode;
}

View file

@ -789,7 +789,8 @@ export async function interactiveSession(cmd: string, spawnFn?: (args: string[])
logInfo("To destroy:");
logInfo(` sprite destroy ${_state.name}`);
logInfo("To reconnect:");
logInfo(` sprite console -s ${_state.name}`);
logInfo(" spawn last");
logInfo(` or: sprite console -s ${_state.name}`);
return exitCode;
}