hanzo 0.3.16__tar.gz → 0.3.18__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.
- {hanzo-0.3.16 → hanzo-0.3.18}/PKG-INFO +1 -1
- {hanzo-0.3.16 → hanzo-0.3.18}/pyproject.toml +1 -1
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/cli.py +1 -1
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/dev.py +96 -13
- {hanzo-0.3.16 → hanzo-0.3.18}/.gitignore +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/README.md +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/__init__.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/__main__.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/commands/__init__.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/commands/agent.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/commands/auth.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/commands/chat.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/commands/cluster.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/commands/config.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/commands/mcp.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/commands/miner.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/commands/network.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/commands/repl.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/commands/tools.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/interactive/__init__.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/interactive/dashboard.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/interactive/repl.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/mcp_server.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/orchestrator_config.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/repl.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/router/__init__.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/utils/__init__.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/utils/config.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/src/hanzo/utils/net_check.py +0 -0
- {hanzo-0.3.16 → hanzo-0.3.18}/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.
|
|
3
|
+
Version: 0.3.18
|
|
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
|
|
@@ -664,15 +664,64 @@ class HanzoDevREPL:
|
|
|
664
664
|
|
|
665
665
|
async def run(self):
|
|
666
666
|
"""Run the REPL."""
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
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
|
+
# Use a predefined box style that's similar to Claude
|
|
682
|
+
from rich.box import ROUNDED
|
|
683
|
+
LIGHT_GRAY_BOX = ROUNDED
|
|
684
|
+
|
|
685
|
+
# Header
|
|
686
|
+
console.print()
|
|
687
|
+
console.print(Panel(
|
|
688
|
+
"[bold cyan]Hanzo Dev - AI Chat[/bold cyan]\n"
|
|
689
|
+
"[dim]Chat naturally or use /commands • Type /help for available commands[/dim]",
|
|
690
|
+
box=LIGHT_GRAY_BOX,
|
|
691
|
+
style="dim white",
|
|
692
|
+
padding=(0, 1)
|
|
693
|
+
))
|
|
694
|
+
console.print()
|
|
670
695
|
|
|
671
696
|
while True:
|
|
672
697
|
try:
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
698
|
+
# Draw input box border (top)
|
|
699
|
+
console.print("[dim white]╭" + "─" * 78 + "╮[/dim white]")
|
|
700
|
+
|
|
701
|
+
# Get input with styled prompt inside the box
|
|
702
|
+
console.print("[dim white]│[/dim white] ", end="")
|
|
703
|
+
|
|
704
|
+
try:
|
|
705
|
+
# Get input - using simple input() wrapped in executor for async
|
|
706
|
+
# The visual box is drawn by console.print statements
|
|
707
|
+
user_input = await asyncio.get_event_loop().run_in_executor(
|
|
708
|
+
None,
|
|
709
|
+
input,
|
|
710
|
+
'› ' # Using › instead of > for a more modern look
|
|
711
|
+
)
|
|
712
|
+
|
|
713
|
+
# Draw input box border (bottom)
|
|
714
|
+
console.print("[dim white]╰" + "─" * 78 + "╯[/dim white]")
|
|
715
|
+
|
|
716
|
+
except EOFError:
|
|
717
|
+
console.print() # New line before exit
|
|
718
|
+
console.print("[dim white]╰" + "─" * 78 + "╯[/dim white]")
|
|
719
|
+
break
|
|
720
|
+
except KeyboardInterrupt:
|
|
721
|
+
console.print() # Complete the box
|
|
722
|
+
console.print("[dim white]╰" + "─" * 78 + "╯[/dim white]")
|
|
723
|
+
console.print("\n[dim yellow]Use /exit to quit[/dim]")
|
|
724
|
+
continue
|
|
676
725
|
|
|
677
726
|
if not user_input:
|
|
678
727
|
continue
|
|
@@ -881,20 +930,38 @@ Examples:
|
|
|
881
930
|
)
|
|
882
931
|
|
|
883
932
|
if result.get("output"):
|
|
884
|
-
|
|
933
|
+
# Display AI response in a styled panel
|
|
934
|
+
console.print()
|
|
935
|
+
from rich.panel import Panel
|
|
936
|
+
console.print(Panel(
|
|
937
|
+
result['output'],
|
|
938
|
+
title="[bold cyan]AI Response[/bold cyan]",
|
|
939
|
+
title_align="left",
|
|
940
|
+
border_style="dim cyan",
|
|
941
|
+
padding=(1, 2)
|
|
942
|
+
))
|
|
885
943
|
elif result.get("error"):
|
|
886
|
-
console.print(f"[red]Error:[/red] {result['error']}")
|
|
944
|
+
console.print(f"\n[red]Error:[/red] {result['error']}")
|
|
887
945
|
else:
|
|
888
|
-
console.print("[yellow]No response from agent[/yellow]")
|
|
946
|
+
console.print("\n[yellow]No response from agent[/yellow]")
|
|
889
947
|
|
|
890
948
|
elif hasattr(self.orchestrator, 'execute_with_critique'):
|
|
891
949
|
# Use multi-Claude orchestrator - but now it will use real AI!
|
|
892
950
|
result = await self.orchestrator.execute_with_critique(message)
|
|
893
951
|
|
|
894
952
|
if result.get("output"):
|
|
895
|
-
|
|
953
|
+
# Display AI response in a styled panel
|
|
954
|
+
console.print()
|
|
955
|
+
from rich.panel import Panel
|
|
956
|
+
console.print(Panel(
|
|
957
|
+
result['output'],
|
|
958
|
+
title="[bold cyan]AI Response[/bold cyan]",
|
|
959
|
+
title_align="left",
|
|
960
|
+
border_style="dim cyan",
|
|
961
|
+
padding=(1, 2)
|
|
962
|
+
))
|
|
896
963
|
else:
|
|
897
|
-
console.print("[yellow]No response from agent[/yellow]")
|
|
964
|
+
console.print("\n[yellow]No response from agent[/yellow]")
|
|
898
965
|
|
|
899
966
|
else:
|
|
900
967
|
# Fallback to direct API call if available
|
|
@@ -958,7 +1025,15 @@ Examples:
|
|
|
958
1025
|
)
|
|
959
1026
|
|
|
960
1027
|
if response.choices:
|
|
961
|
-
|
|
1028
|
+
from rich.panel import Panel
|
|
1029
|
+
console.print()
|
|
1030
|
+
console.print(Panel(
|
|
1031
|
+
response.choices[0].message.content,
|
|
1032
|
+
title="[bold cyan]GPT-4[/bold cyan]",
|
|
1033
|
+
title_align="left",
|
|
1034
|
+
border_style="dim cyan",
|
|
1035
|
+
padding=(1, 2)
|
|
1036
|
+
))
|
|
962
1037
|
return
|
|
963
1038
|
|
|
964
1039
|
except Exception as e:
|
|
@@ -977,7 +1052,15 @@ Examples:
|
|
|
977
1052
|
)
|
|
978
1053
|
|
|
979
1054
|
if response.content:
|
|
980
|
-
|
|
1055
|
+
from rich.panel import Panel
|
|
1056
|
+
console.print()
|
|
1057
|
+
console.print(Panel(
|
|
1058
|
+
response.content[0].text,
|
|
1059
|
+
title="[bold cyan]Claude[/bold cyan]",
|
|
1060
|
+
title_align="left",
|
|
1061
|
+
border_style="dim cyan",
|
|
1062
|
+
padding=(1, 2)
|
|
1063
|
+
))
|
|
981
1064
|
return
|
|
982
1065
|
|
|
983
1066
|
except Exception as e:
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|