hey-cli-python 1.0.4__tar.gz → 1.0.6__tar.gz

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.
Files changed (20) hide show
  1. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/PKG-INFO +1 -1
  2. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/hey_cli/cli.py +3 -2
  3. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/hey_cli/llm.py +2 -2
  4. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/hey_cli/runner.py +3 -1
  5. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/hey_cli_python.egg-info/PKG-INFO +1 -1
  6. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/pyproject.toml +1 -1
  7. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/LICENSE +0 -0
  8. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/README.md +0 -0
  9. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/hey_cli/__init__.py +0 -0
  10. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/hey_cli/governance.py +0 -0
  11. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/hey_cli/history.py +0 -0
  12. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/hey_cli/models.py +0 -0
  13. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/hey_cli/skills.py +0 -0
  14. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/hey_cli_python.egg-info/SOURCES.txt +0 -0
  15. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/hey_cli_python.egg-info/dependency_links.txt +0 -0
  16. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/hey_cli_python.egg-info/entry_points.txt +0 -0
  17. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/hey_cli_python.egg-info/requires.txt +0 -0
  18. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/hey_cli_python.egg-info/top_level.txt +0 -0
  19. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/setup.cfg +0 -0
  20. {hey_cli_python-1.0.4 → hey_cli_python-1.0.6}/tests/test_cli.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hey-cli-python
3
- Version: 1.0.4
3
+ Version: 1.0.6
4
4
  Summary: A secure, zero-bloat CLI companion that turns natural language and error logs into executable commands.
5
5
  Author: Mohit Singh Sinsniwal
6
6
  Project-URL: Homepage, https://github.com/sinsniwal/hey-cli
@@ -95,8 +95,9 @@ def main():
95
95
  past_messages = history_mgr.load()
96
96
  try:
97
97
  response = generate_command(objective, context=piped_data, model_name=model_name, history=past_messages)
98
- except urllib.error.URLError:
99
- check_ollama() # always fails here — shows the panel and exits
98
+ except (urllib.error.URLError, ConnectionError, OSError):
99
+ check_ollama() # shows the panel and exits
100
+ sys.exit(1) # fallback — should never reach here
100
101
 
101
102
  # Save the user query to history IMMEDIATELY
102
103
  history_mgr.append("user", user_prompt)
@@ -85,7 +85,7 @@ def generate_command(prompt: str, context: str = "", model_name: str = DEFAULT_M
85
85
  data = json.loads(content_str)
86
86
  return CommandResponse(**data)
87
87
 
88
- except urllib.error.URLError:
88
+ except (urllib.error.URLError, ConnectionError, OSError):
89
89
  raise # Ollama not reachable — don't retry, bubble up to cli
90
90
  except Exception as e:
91
91
  last_error = e
@@ -152,7 +152,7 @@ def generate_troubleshoot_step(objective: str, history: list, model_name: str =
152
152
  data = json.loads(content_str)
153
153
  return TroubleshootResponse(**data)
154
154
 
155
- except urllib.error.URLError:
155
+ except (urllib.error.URLError, ConnectionError, OSError):
156
156
  raise # Ollama not reachable — don't retry, bubble up to cli
157
157
  except Exception as e:
158
158
  last_error = e
@@ -1,5 +1,7 @@
1
1
  import subprocess
2
2
  import sys
3
+ import json
4
+ import dataclasses
3
5
  from typing import Optional
4
6
 
5
7
  from .governance import GovernanceEngine, Action
@@ -121,7 +123,7 @@ class CommandRunner:
121
123
  if not cmd or cmd.startswith("echo ") or cmd.startswith("printf "):
122
124
  self.history_mgr.append("assistant", current_response.explanation)
123
125
  else:
124
- self.history_mgr.append("assistant", current_response.model_dump_json())
126
+ self.history_mgr.append("assistant", json.dumps(dataclasses.asdict(current_response)))
125
127
 
126
128
  # Level 0 = Dry Run
127
129
  if self.level == 0:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hey-cli-python
3
- Version: 1.0.4
3
+ Version: 1.0.6
4
4
  Summary: A secure, zero-bloat CLI companion that turns natural language and error logs into executable commands.
5
5
  Author: Mohit Singh Sinsniwal
6
6
  Project-URL: Homepage, https://github.com/sinsniwal/hey-cli
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "hey-cli-python"
7
- version = "1.0.4"
7
+ version = "1.0.6"
8
8
  description = "A secure, zero-bloat CLI companion that turns natural language and error logs into executable commands."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
File without changes
File without changes
File without changes