feat: Detect outdated CLI versions and auto-prompt/suggest upgrade path to users.#456
Conversation
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Broly Security ScanNote ✅ Clean scan Note Re-scan this PR anytime with
|
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
… into cursor/cli-version-upgrade-00e1 # Conflicts: # src/together/lib/cli/__init__.py # src/together/lib/cli/utils/_version_check.py # tests/cli/test_main.py # tests/cli/test_version_check.py Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
|
@cursoragent resolve conflicts |
…grade-00e1 # Conflicts: # src/together/lib/cli/utils/_console.py Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
| Parameter(name="json", group=global_options, negative=(), help="Output the response in JSON format"), | ||
| ] = False, | ||
| ) -> None: | ||
| version_check = VersionCheck() |
There was a problem hiding this comment.
if anything fails between here and the try at L346 ie. missing API key, project resolve we'll get noise on stderr.
lets move this right before the try?
| return | ||
|
|
||
| try: | ||
| latest_version = await self._latest_version |
There was a problem hiding this comment.
theres no timeout on this await, should we wrap this in a asyncio.wait_for
| if not no_auth_command and client.project_id is None: | ||
| client.project_id = await _resolve_project_id(client) | ||
|
|
||
| is_interactive = sys.stdin.isatty() and sys.stderr.isatty() and not _is_agent_or_ci() |
There was a problem hiding this comment.
stdout isn't checked here, but the prompt writes to stdout - so together models list | grep foo gets escape codes in the pipe. add sys.stdout.isatty()?
| flush_pending_events() | ||
| await client.close() | ||
| try: | ||
| flush_pending_events() |
There was a problem hiding this comment.
this runs even when the command failed, so users get an upgrade prompt right after an error. and ctrl-C at the prompt clobbers the exit code. maybe just print the notice, no prompt, on failure?
|
@cursoragent address all the feedback from Zain. Either respond on the comments if you disagree, or push changes addressing his concerns. |
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
There was a problem hiding this comment.
Docs update opened: https://github.com/togethercomputer/mintlify-docs/pull/1303
Sent by Cursor Automation: Update mintlify-docs from code changes



Summary
VersionCheck.inform()after command completion and resource cleanup, with a bounded wait for version resolutionmajor.minor.patchreleases without adding a runtime dependencyTesting
34 passedacross version-check, launcher, and console-theme testsuv buildsucceedsLinear: DX-774
Linear Issue: DX-774