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
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/ttyviapickToTTY./dev/tty.pickToTTY: whenAGENTSEA_NON_INTERACTIVE=1it returns the default instead of blocking on a/dev/ttyread — 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).exec 0</dev/tty) context:selectFromListarrow-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 (bareagentseain a normal terminal whereprocess.stdinworks). Tracking separately to avoid destabilizing the entry point.