Skip to content

fix: agent-friendly auth login for non-TTY environments (SMI-1627)#701

Merged
arjunkmrm merged 2 commits intomainfrom
fix/agent-friendly-login
Mar 18, 2026
Merged

fix: agent-friendly auth login for non-TTY environments (SMI-1627)#701
arjunkmrm merged 2 commits intomainfrom
fix/agent-friendly-login

Conversation

@arjunkmrm
Copy link
Collaborator

Summary

  • When stdin is not a TTY (agent, pipe, CI), smithery auth login now:
    • Skips spinners and browser opening
    • Outputs JSON to stdout: {"auth_url": "...", "session_id": "..."}
    • Polls silently until auth completes
  • TTY behavior is unchanged (spinners + browser + formatted output)

This lets agents parse the auth URL and present it to the user, instead of getting stuck on interactive spinners or broken pipe.

Test plan

  • 365/365 tests pass
  • Biome check clean
  • Build succeeds
  • Manual TTY: smithery auth login — should show spinners and open browser as before
  • Manual non-TTY: echo | smithery auth login — should output JSON auth URL

🤖 Generated with Claude Code

arjunkmrm and others added 2 commits March 18, 2026 11:40
When stdin is not a TTY (e.g., running from an agent or piped),
skip spinners and browser opening. Instead, output the auth URL
as JSON to stdout so agents can parse and present it to the user.

TTY: spinners + browser open + formatted output (unchanged)
Non-TTY: {"auth_url": "...", "session_id": "..."} + silent polling

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@arjunkmrm arjunkmrm changed the title fix: agent-friendly auth login for non-TTY environments fix: agent-friendly auth login for non-TTY environments (SMI-1627) Mar 18, 2026
@arjunkmrm arjunkmrm merged commit 280917c into main Mar 18, 2026
4 checks passed
@arjunkmrm arjunkmrm deleted the fix/agent-friendly-login branch March 18, 2026 03:46
@smithery-chore-bot smithery-chore-bot bot mentioned this pull request Mar 18, 2026
arjunkmrm pushed a commit that referenced this pull request Mar 18, 2026
Automated Release PR
---


## [4.7.2](v4.7.1...v4.7.2)
(2026-03-18)


### Bug Fixes

* agent-friendly auth login for non-TTY environments (SMI-1627)
([#701](#701))
([280917c](280917c))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: smithery-chore-bot[bot] <259537197+smithery-chore-bot[bot]@users.noreply.github.com>
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