openhands 1.0.0__py3-none-any.whl → 1.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of openhands might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openhands
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: OpenHands CLI - Terminal User Interface for OpenHands AI Agent
5
5
  Author-email: OpenHands Team <contact@all-hands.dev>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
- openhands_cli/__init__.py,sha256=4DT8Cs_RNlhjkZ_VIeDNf2-p1HmwjJLgnTjmNICwGXc,52
2
- openhands_cli/agent_chat.py,sha256=ZhraJa63rus417cfzzBfCxlx_WhqOsTJ79oQe_42FZY,6223
3
- openhands_cli/gui_launcher.py,sha256=U-j-Kmestu88q_EwZF0Xcjs3u4HC9Skk1Ij1vX31X3g,7457
1
+ openhands_cli/__init__.py,sha256=AqdjE-Up0uBSDyHvNjF0zWHNmA4ps-lsQWFpUWCWNEc,187
2
+ openhands_cli/agent_chat.py,sha256=FZ1NC31xJPXqyFGUtS-JqDI_HVP5155xEz59AHp3DIw,6224
3
+ openhands_cli/gui_launcher.py,sha256=EnZGcZMQzOHLwkmiHcYvt4WX2HfK0aT6L0t5ADWEfT0,7198
4
4
  openhands_cli/llm_utils.py,sha256=eRhAjysm77GvzArKb-75agqTlR_4zzxTrYD1eQbgqbg,1606
5
5
  openhands_cli/locations.py,sha256=zG5OnpJiX0kQ1fprEsOSi_cNqydEvxunPBCTpNrVaJ0,438
6
6
  openhands_cli/pt_style.py,sha256=UxCxV-t88n5JjjYYMD0jf5apg4B5-WkfQ4EX_Eusj1I,1266
@@ -14,18 +14,18 @@ openhands_cli/listeners/loading_listener.py,sha256=9sbuy64iAPqgvNojS-3RlWvepmaMC
14
14
  openhands_cli/listeners/pause_listener.py,sha256=FtWxj8T5r2lYIoquueeCf-3kF3zFMJ2e25wqOeF7QtM,2622
15
15
  openhands_cli/tui/__init__.py,sha256=2KA7nugQxpIj4sEVDJavBbGHqcnySJFSvbPu1WRonPg,84
16
16
  openhands_cli/tui/status.py,sha256=QNbS9OEK6d_c0P1eEQKfytuUF1R7uPxFl5nN-yv3cdA,3628
17
- openhands_cli/tui/tui.py,sha256=9JeH0OJ7JY9RkZ-KQdAT0fkQ6uJCopPKY97fNZVe8Ro,3623
17
+ openhands_cli/tui/tui.py,sha256=JBahocaunF0LwJJLkcCmwSZN9xydb3SmH7fb8Jw8rFc,3545
18
18
  openhands_cli/tui/utils.py,sha256=t7vJHU_AcLzuLTPku88Aqd51jyWY8HwH5Y2n-Bpa-WU,536
19
19
  openhands_cli/tui/settings/mcp_screen.py,sha256=LMdcGD6DfwZQ4jnp-KM4gYiPXfNGHHPAqtEAXLKZtmA,8215
20
20
  openhands_cli/tui/settings/settings_screen.py,sha256=CRekM2ZgWJ_YgzC-Jg1SgX2YeviU69Hb1cuzi5pVdio,7087
21
21
  openhands_cli/tui/settings/store.py,sha256=tTMvYbdu9gs4GDNBoHFGFJnwm1PfjShgsVoMDjpQJ2Y,3485
22
22
  openhands_cli/user_actions/__init__.py,sha256=Tf-lQj7-6bNl5rohSdcAFApkKbQb-N9JcKZgHa1HF60,501
23
- openhands_cli/user_actions/agent_action.py,sha256=V_Asm9nzBy-MGoqvy3PHXCr3Kn_dMBFkHKJgdmPEpuk,3258
23
+ openhands_cli/user_actions/agent_action.py,sha256=0v6kQPh8iE4CGjARA8vVD_TqSpS-aiscE3ucLC7jlZA,3283
24
24
  openhands_cli/user_actions/exit_session.py,sha256=3u1CqWeYAEYfZi9BFh_dUwvy9aXXuvFbsZUHNGjVzuY,624
25
- openhands_cli/user_actions/settings_action.py,sha256=bxeaIL1kc2nXjVGaK1Tt-BSr8U3o-Ho1ffBzSdZtcws,5481
25
+ openhands_cli/user_actions/settings_action.py,sha256=QqWj37CAlrkV6FW9SEmmwsvKzdGyUYv4DlGjUweKsmg,5707
26
26
  openhands_cli/user_actions/types.py,sha256=zMHoJqxmtbxAIq6O3RC-XoGzgbZzWZvRFNMOGW4MViQ,407
27
27
  openhands_cli/user_actions/utils.py,sha256=qPTgP_1shnWgA7itrzTyfEGb_meXO-zq98JzFMUqCx4,6362
28
- openhands-1.0.0.dist-info/METADATA,sha256=hkYC8h0AsMLQxqpwyVaxZQvagB-B7ZQK8-jl1d65DKg,1370
29
- openhands-1.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
30
- openhands-1.0.0.dist-info/entry_points.txt,sha256=CltyhTfx4lPndNPQXrZZDj5LmXrYXykVyIqoedPXsas,61
31
- openhands-1.0.0.dist-info/RECORD,,
28
+ openhands-1.0.1.dist-info/METADATA,sha256=GV83vM7e_TD4avAskm3v-ZbwzJ_1EZ-A9jEAOzEF94I,1370
29
+ openhands-1.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
30
+ openhands-1.0.1.dist-info/entry_points.txt,sha256=CltyhTfx4lPndNPQXrZZDj5LmXrYXykVyIqoedPXsas,61
31
+ openhands-1.0.1.dist-info/RECORD,,
openhands_cli/__init__.py CHANGED
@@ -1,3 +1,8 @@
1
- """OpenHands CLI package."""
1
+ """OpenHands package."""
2
2
 
3
- __version__ = '0.1.0'
3
+ from importlib.metadata import version, PackageNotFoundError
4
+
5
+ try:
6
+ __version__ = version("openhands")
7
+ except PackageNotFoundError:
8
+ __version__ = "0.0.0"
@@ -54,6 +54,7 @@ def _print_exit_hint(conversation_id: str) -> None:
54
54
  )
55
55
 
56
56
 
57
+
57
58
  def run_cli_entry(resume_conversation_id: str | None = None) -> None:
58
59
  """Run the agent chat session using the agent SDK.
59
60
 
@@ -113,21 +113,12 @@ def launch_gui_server(mount_cwd: bool = False, gpu: bool = False) -> None:
113
113
  pull_cmd = ['docker', 'pull', runtime_image]
114
114
  print_formatted_text(HTML(_format_docker_command_for_logging(pull_cmd)))
115
115
  try:
116
- subprocess.run(
117
- pull_cmd,
118
- check=True,
119
- timeout=300, # 5 minutes timeout
120
- )
116
+ subprocess.run(pull_cmd, check=True)
121
117
  except subprocess.CalledProcessError:
122
118
  print_formatted_text(
123
119
  HTML('<ansired>❌ Failed to pull runtime image.</ansired>')
124
120
  )
125
121
  sys.exit(1)
126
- except subprocess.TimeoutExpired:
127
- print_formatted_text(
128
- HTML('<ansired>❌ Timeout while pulling runtime image.</ansired>')
129
- )
130
- sys.exit(1)
131
122
 
132
123
  print_formatted_text('')
133
124
  print_formatted_text(
openhands_cli/tui/tui.py CHANGED
@@ -57,8 +57,6 @@ def display_banner(conversation_id: str, resume: bool = False) -> None:
57
57
  style=DEFAULT_STYLE,
58
58
  )
59
59
 
60
- print_formatted_text(HTML(f'<grey>OpenHands CLI v{__version__}</grey>'))
61
-
62
60
  print_formatted_text('')
63
61
  if not resume:
64
62
  print_formatted_text(
@@ -1,3 +1,4 @@
1
+ import html
1
2
  from prompt_toolkit import HTML, print_formatted_text
2
3
 
3
4
  from openhands.sdk.security.confirmation_policy import (
@@ -37,7 +38,7 @@ def ask_user_confirmation(
37
38
  or '[unknown action]'
38
39
  )
39
40
  print_formatted_text(
40
- HTML(f'<grey> {i}. {tool_name}: {action_content}...</grey>')
41
+ HTML(f'<grey> {i}. {tool_name}: {html.escape(action_content)}...</grey>')
41
42
  )
42
43
 
43
44
  question = 'Choose an option:'
@@ -123,9 +123,15 @@ def prompt_api_key(
123
123
  validator = NonEmptyValueValidator()
124
124
 
125
125
  question = helper_text + step_counter.next_step(question)
126
- return cli_text_input(
126
+ user_input = cli_text_input(
127
127
  question, escapable=escapable, validator=validator, is_password=True
128
128
  )
129
+
130
+ # If user pressed ENTER with existing key (empty input), return the existing key
131
+ if existing_api_key and not user_input.strip():
132
+ return existing_api_key.get_secret_value()
133
+
134
+ return user_input
129
135
 
130
136
 
131
137
  # Advanced settings functions