hanzo 0.3.15__tar.gz → 0.3.17__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.

Potentially problematic release.


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

Files changed (30) hide show
  1. {hanzo-0.3.15 → hanzo-0.3.17}/PKG-INFO +1 -1
  2. {hanzo-0.3.15 → hanzo-0.3.17}/pyproject.toml +1 -1
  3. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/cli.py +1 -1
  4. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/dev.py +104 -16
  5. {hanzo-0.3.15 → hanzo-0.3.17}/.gitignore +0 -0
  6. {hanzo-0.3.15 → hanzo-0.3.17}/README.md +0 -0
  7. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/__init__.py +0 -0
  8. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/__main__.py +0 -0
  9. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/commands/__init__.py +0 -0
  10. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/commands/agent.py +0 -0
  11. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/commands/auth.py +0 -0
  12. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/commands/chat.py +0 -0
  13. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/commands/cluster.py +0 -0
  14. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/commands/config.py +0 -0
  15. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/commands/mcp.py +0 -0
  16. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/commands/miner.py +0 -0
  17. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/commands/network.py +0 -0
  18. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/commands/repl.py +0 -0
  19. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/commands/tools.py +0 -0
  20. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/interactive/__init__.py +0 -0
  21. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/interactive/dashboard.py +0 -0
  22. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/interactive/repl.py +0 -0
  23. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/mcp_server.py +0 -0
  24. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/orchestrator_config.py +0 -0
  25. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/repl.py +0 -0
  26. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/router/__init__.py +0 -0
  27. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/utils/__init__.py +0 -0
  28. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/utils/config.py +0 -0
  29. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/utils/net_check.py +0 -0
  30. {hanzo-0.3.15 → hanzo-0.3.17}/src/hanzo/utils/output.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hanzo
3
- Version: 0.3.15
3
+ Version: 0.3.17
4
4
  Summary: Hanzo AI - Complete AI Infrastructure Platform with CLI, Router, MCP, and Agent Runtime
5
5
  Project-URL: Homepage, https://hanzo.ai
6
6
  Project-URL: Repository, https://github.com/hanzoai/python-sdk
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "hanzo"
3
- version = "0.3.15"
3
+ version = "0.3.17"
4
4
  description = "Hanzo AI - Complete AI Infrastructure Platform with CLI, Router, MCP, and Agent Runtime"
5
5
  authors = [
6
6
  {name = "Hanzo AI", email = "dev@hanzo.ai"},
@@ -26,7 +26,7 @@ from .utils.output import console
26
26
  from .interactive.repl import HanzoREPL
27
27
 
28
28
  # Version
29
- __version__ = "0.3.15"
29
+ __version__ = "0.3.17"
30
30
 
31
31
 
32
32
  @click.group(invoke_without_command=True)
@@ -664,15 +664,69 @@ class HanzoDevREPL:
664
664
 
665
665
  async def run(self):
666
666
  """Run the REPL."""
667
- console.print("[bold cyan]Hanzo Dev - AI Chat[/bold cyan]")
668
- console.print("Chat naturally or use /commands")
669
- console.print("Type /help for available commands\n")
667
+ from rich.panel import Panel
668
+ from rich.box import Box
669
+ from rich.text import Text
670
+ from rich.console import Group
671
+ from rich.align import Align
672
+ from prompt_toolkit import prompt
673
+ from prompt_toolkit.styles import Style
674
+
675
+ # Define Claude-like style for prompt_toolkit
676
+ claude_style = Style.from_dict({
677
+ '': '#333333', # Default text color
678
+ 'prompt': '#666666', # Gray prompt arrow
679
+ })
680
+
681
+ # Custom light gray box for Rich panels
682
+ LIGHT_GRAY_BOX = Box(
683
+ "╭─╮\n"
684
+ "│ │\n"
685
+ "╰─╯\n"
686
+ )
687
+
688
+ # Header
689
+ console.print()
690
+ console.print(Panel(
691
+ "[bold cyan]Hanzo Dev - AI Chat[/bold cyan]\n"
692
+ "[dim]Chat naturally or use /commands • Type /help for available commands[/dim]",
693
+ box=LIGHT_GRAY_BOX,
694
+ style="dim white",
695
+ padding=(0, 1)
696
+ ))
697
+ console.print()
670
698
 
671
699
  while True:
672
700
  try:
673
- user_input = await asyncio.get_event_loop().run_in_executor(
674
- None, input, "> "
675
- )
701
+ # Draw input box border (top)
702
+ console.print("[dim white]╭" + "─" * 78 + "╮[/dim white]")
703
+
704
+ # Get input with styled prompt inside the box
705
+ console.print("[dim white]│[/dim white] ", end="")
706
+
707
+ try:
708
+ # Use prompt_toolkit for input with Claude-like styling
709
+ user_input = await asyncio.get_event_loop().run_in_executor(
710
+ None,
711
+ lambda: prompt(
712
+ '› ', # Using › instead of > for a more modern look
713
+ style=claude_style,
714
+ message=''
715
+ )
716
+ )
717
+
718
+ # Draw input box border (bottom)
719
+ console.print("[dim white]╰" + "─" * 78 + "╯[/dim white]")
720
+
721
+ except EOFError:
722
+ console.print() # New line before exit
723
+ console.print("[dim white]╰" + "─" * 78 + "╯[/dim white]")
724
+ break
725
+ except KeyboardInterrupt:
726
+ console.print() # Complete the box
727
+ console.print("[dim white]╰" + "─" * 78 + "╯[/dim white]")
728
+ console.print("\n[dim yellow]Use /exit to quit[/dim]")
729
+ continue
676
730
 
677
731
  if not user_input:
678
732
  continue
@@ -881,20 +935,38 @@ Examples:
881
935
  )
882
936
 
883
937
  if result.get("output"):
884
- console.print(f"[cyan]AI:[/cyan] {result['output']}")
938
+ # Display AI response in a styled panel
939
+ console.print()
940
+ from rich.panel import Panel
941
+ console.print(Panel(
942
+ result['output'],
943
+ title="[bold cyan]AI Response[/bold cyan]",
944
+ title_align="left",
945
+ border_style="dim cyan",
946
+ padding=(1, 2)
947
+ ))
885
948
  elif result.get("error"):
886
- console.print(f"[red]Error:[/red] {result['error']}")
949
+ console.print(f"\n[red]Error:[/red] {result['error']}")
887
950
  else:
888
- console.print("[yellow]No response from agent[/yellow]")
951
+ console.print("\n[yellow]No response from agent[/yellow]")
889
952
 
890
953
  elif hasattr(self.orchestrator, 'execute_with_critique'):
891
954
  # Use multi-Claude orchestrator - but now it will use real AI!
892
955
  result = await self.orchestrator.execute_with_critique(message)
893
956
 
894
957
  if result.get("output"):
895
- console.print(f"[cyan]AI:[/cyan] {result['output']}")
958
+ # Display AI response in a styled panel
959
+ console.print()
960
+ from rich.panel import Panel
961
+ console.print(Panel(
962
+ result['output'],
963
+ title="[bold cyan]AI Response[/bold cyan]",
964
+ title_align="left",
965
+ border_style="dim cyan",
966
+ padding=(1, 2)
967
+ ))
896
968
  else:
897
- console.print("[yellow]No response from agent[/yellow]")
969
+ console.print("\n[yellow]No response from agent[/yellow]")
898
970
 
899
971
  else:
900
972
  # Fallback to direct API call if available
@@ -958,7 +1030,15 @@ Examples:
958
1030
  )
959
1031
 
960
1032
  if response.choices:
961
- console.print(f"[cyan]AI:[/cyan] {response.choices[0].message.content}")
1033
+ from rich.panel import Panel
1034
+ console.print()
1035
+ console.print(Panel(
1036
+ response.choices[0].message.content,
1037
+ title="[bold cyan]GPT-4[/bold cyan]",
1038
+ title_align="left",
1039
+ border_style="dim cyan",
1040
+ padding=(1, 2)
1041
+ ))
962
1042
  return
963
1043
 
964
1044
  except Exception as e:
@@ -977,7 +1057,15 @@ Examples:
977
1057
  )
978
1058
 
979
1059
  if response.content:
980
- console.print(f"[cyan]AI:[/cyan] {response.content[0].text}")
1060
+ from rich.panel import Panel
1061
+ console.print()
1062
+ console.print(Panel(
1063
+ response.content[0].text,
1064
+ title="[bold cyan]Claude[/bold cyan]",
1065
+ title_align="left",
1066
+ border_style="dim cyan",
1067
+ padding=(1, 2)
1068
+ ))
981
1069
  return
982
1070
 
983
1071
  except Exception as e:
@@ -1100,8 +1188,8 @@ Examples:
1100
1188
  console.print("Then use: hanzo dev --orchestrator codex")
1101
1189
  return
1102
1190
 
1103
- # Use openai CLI to chat
1104
- cmd = ["openai", "api", "chat", "-m", "gpt-4", "-p", message]
1191
+ # Use openai CLI to chat - correct syntax
1192
+ cmd = ["openai", "api", "chat.completions.create", "-m", "gpt-4", "-g", message]
1105
1193
 
1106
1194
  process = subprocess.Popen(
1107
1195
  cmd,
@@ -2336,7 +2424,7 @@ class MultiClaudeOrchestrator(HanzoDevOrchestrator):
2336
2424
  try:
2337
2425
  import subprocess
2338
2426
  result = subprocess.run(
2339
- ["openai", "api", "chat", "-m", "gpt-4", "-p", prompt],
2427
+ ["openai", "api", "chat.completions.create", "-m", "gpt-4", "-g", prompt],
2340
2428
  capture_output=True,
2341
2429
  text=True,
2342
2430
  timeout=30
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes