Skip to content

Route onboarding prompts through /dev/tty - #2

Merged
BarneyChambers merged 1 commit into
mainfrom
fix/tty-onboarding-prompts
Jun 23, 2026
Merged

BarneyChambers merged 1 commit into
mainfrom
fix/tty-onboarding-prompts

Conversation

@BarneyChambers

Copy link
Copy Markdown
Contributor

Summary

Ports a fix that previously lived only on the deprecated Spectral-Finance repo. Routes the onboarding picker, name entry, multiselect, and model text input through /dev/tty so interactive prompts work reliably when stdin/stdout are piped or redirected (e.g. installer one-liners, non-TTY stdio).

  • Picker, name, multiselect, and model-text prompts read/write /dev/tty instead of inherited stdio
  • Adds packages/cli/src/picker.ts helpers and supporting changes in interactive.ts / shared/ui.ts
  • Adds interactive command tests

Test plan

  • npm run typecheck --workspace=@agentsea/cli (passes locally)
  • npm run test:cli
  • Manual: run agentsea interactively and via a piped invocation; confirm pickers/prompts render and accept input

…ev/tty

Converts the remaining Clack input prompts (which can't receive input in
curl|bash / remote contexts) to the /dev/tty readers:
- interactive.ts: agent/cloud/top-level selects → pickToTTY; "Name your agentsea"
  and custom Model ID → promptText; setup-options multiselect → multiPickToTTY.
- ui.ts: model-picker "Other…" manual entry → promptText; add promptText helper
  (validated /dev/tty text input with Clack fallback).
- picker.ts: add multiPickToTTY (space toggles, a=all, Enter confirms; non-
  interactive guard returns initial values).

Test: cmd-interactive mocks picker.js input fns gated by an `interceptPicker`
flag (delegating to the real picker otherwise) so the process-global mock.module
doesn't break picker.ts's own coverage tests.
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
agentsea-ui Skipped Skipped Jun 23, 2026 11:11am

Request Review

@BarneyChambers
BarneyChambers merged commit bf5e43c into main Jun 23, 2026
3 checks passed

This branch was previously deployed

1 inactive deployment
Preview — c95b33bd Deployed Jun 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant