Skip to content
This repository was archived by the owner on Jun 23, 2026. It is now read-only.

Route cloud region/size pickers + DO account confirm through /dev/tty - #66

Merged
BarneyChambers merged 1 commit into
mainfrom
fix/tty-cloud-pickers
Jun 16, 2026
Merged

Route cloud region/size pickers + DO account confirm through /dev/tty#66
BarneyChambers merged 1 commit into
mainfrom
fix/tty-cloud-pickers

Conversation

@BarneyChambers

Copy link
Copy Markdown
Collaborator

Summary

Proactive hardening of the remaining provisioning prompts that read Clack/process.stdin (which can't receive input in curl|bash / remote contexts):

  • selectFromList — used by all cloud providers (DO/Hetzner/Daytona/GCP/AWS) for region/size selection → now reads /dev/tty via pickToTTY.
  • DigitalOcean "switch account?" confirm → /dev/tty.
  • Non-interactive guard added to pickToTTY: when AGENTSEA_NON_INTERACTIVE=1 it returns the default instead of blocking on a /dev/tty read — so headless/CI/tests never hang on a picker (this is also what made the earlier naive attempt unsafe).

Verified

  • npm run test:cli: 905 pass / 0 fail, no hang (the guard prevents the test-env block).
  • On real macOS in the curl|bash (exec 0</dev/tty) context: selectFromList arrow-select works (↓+Enter → correct value). ✅

Deliberately NOT in this PR

The interactive onboarding picker (selectAgent/selectCloud), name/model text, and multiselects still use Clack — converting them is intertwined with shared test mocks and is the lowest-risk context (bare agentsea in a normal terminal where process.stdin works). Tracking separately to avoid destabilizing the entry point.

selectFromList (used by all cloud providers for region/size selection) and the
DigitalOcean "switch account?" confirm used Clack's process.stdin reader, which
can't receive input in curl|bash / remote contexts (the input-hang bug). Route
them through pickToTTY.

Add a non-interactive guard to pickToTTY: when AGENTSEA_NON_INTERACTIVE=1 it
returns the default instead of blocking on a /dev/tty read — so headless/CI runs
(and tests) never hang on a picker.
@BarneyChambers
BarneyChambers merged commit dd671eb into main Jun 16, 2026
2 checks passed
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grid-spawn-ui Ready Ready Preview, Comment Jun 16, 2026 9:35am

Request Review

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant