minion-code 0.1.0__py3-none-any.whl → 0.1.2__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.
- examples/cli_entrypoint.py +60 -0
- examples/{agent_with_todos.py → components/agent_with_todos.py} +58 -47
- examples/{message_response_children_demo.py → components/message_response_children_demo.py} +61 -55
- examples/components/messages_component.py +199 -0
- examples/file_freshness_example.py +22 -22
- examples/file_watching_example.py +32 -26
- examples/interruptible_tui.py +921 -3
- examples/repl_tui.py +129 -0
- examples/skills/example_usage.py +57 -0
- examples/start.py +173 -0
- minion_code/__init__.py +1 -1
- minion_code/acp_server/__init__.py +34 -0
- minion_code/acp_server/agent.py +539 -0
- minion_code/acp_server/hooks.py +354 -0
- minion_code/acp_server/main.py +194 -0
- minion_code/acp_server/permissions.py +142 -0
- minion_code/acp_server/test_client.py +104 -0
- minion_code/adapters/__init__.py +22 -0
- minion_code/adapters/output_adapter.py +207 -0
- minion_code/adapters/rich_adapter.py +169 -0
- minion_code/adapters/textual_adapter.py +254 -0
- minion_code/agents/__init__.py +2 -2
- minion_code/agents/code_agent.py +517 -104
- minion_code/agents/hooks.py +378 -0
- minion_code/cli.py +538 -429
- minion_code/cli_simple.py +665 -0
- minion_code/commands/__init__.py +136 -29
- minion_code/commands/clear_command.py +19 -46
- minion_code/commands/help_command.py +33 -49
- minion_code/commands/history_command.py +37 -55
- minion_code/commands/model_command.py +194 -0
- minion_code/commands/quit_command.py +9 -12
- minion_code/commands/resume_command.py +181 -0
- minion_code/commands/skill_command.py +89 -0
- minion_code/commands/status_command.py +48 -73
- minion_code/commands/tools_command.py +54 -52
- minion_code/commands/version_command.py +34 -69
- minion_code/components/ConfirmDialog.py +430 -0
- minion_code/components/Message.py +318 -97
- minion_code/components/MessageResponse.py +30 -29
- minion_code/components/Messages.py +351 -0
- minion_code/components/PromptInput.py +499 -245
- minion_code/components/__init__.py +24 -17
- minion_code/const.py +7 -0
- minion_code/screens/REPL.py +1453 -469
- minion_code/screens/__init__.py +1 -1
- minion_code/services/__init__.py +20 -20
- minion_code/services/event_system.py +19 -14
- minion_code/services/file_freshness_service.py +223 -170
- minion_code/skills/__init__.py +25 -0
- minion_code/skills/skill.py +128 -0
- minion_code/skills/skill_loader.py +198 -0
- minion_code/skills/skill_registry.py +177 -0
- minion_code/subagents/__init__.py +31 -0
- minion_code/subagents/builtin/__init__.py +30 -0
- minion_code/subagents/builtin/claude_code_guide.py +32 -0
- minion_code/subagents/builtin/explore.py +36 -0
- minion_code/subagents/builtin/general_purpose.py +19 -0
- minion_code/subagents/builtin/plan.py +61 -0
- minion_code/subagents/subagent.py +116 -0
- minion_code/subagents/subagent_loader.py +147 -0
- minion_code/subagents/subagent_registry.py +151 -0
- minion_code/tools/__init__.py +8 -2
- minion_code/tools/bash_tool.py +16 -3
- minion_code/tools/file_edit_tool.py +201 -104
- minion_code/tools/file_read_tool.py +183 -26
- minion_code/tools/file_write_tool.py +17 -3
- minion_code/tools/glob_tool.py +23 -2
- minion_code/tools/grep_tool.py +229 -21
- minion_code/tools/ls_tool.py +28 -3
- minion_code/tools/multi_edit_tool.py +89 -84
- minion_code/tools/python_interpreter_tool.py +9 -1
- minion_code/tools/skill_tool.py +210 -0
- minion_code/tools/task_tool.py +287 -0
- minion_code/tools/todo_read_tool.py +28 -24
- minion_code/tools/todo_write_tool.py +82 -65
- minion_code/{types.py → type_defs.py} +15 -2
- minion_code/utils/__init__.py +45 -17
- minion_code/utils/config.py +610 -0
- minion_code/utils/history.py +114 -0
- minion_code/utils/logs.py +53 -0
- minion_code/utils/mcp_loader.py +153 -55
- minion_code/utils/output_truncator.py +233 -0
- minion_code/utils/session_storage.py +369 -0
- minion_code/utils/todo_file_utils.py +26 -22
- minion_code/utils/todo_storage.py +43 -33
- minion_code/web/__init__.py +9 -0
- minion_code/web/adapters/__init__.py +5 -0
- minion_code/web/adapters/web_adapter.py +524 -0
- minion_code/web/api/__init__.py +7 -0
- minion_code/web/api/chat.py +277 -0
- minion_code/web/api/interactions.py +136 -0
- minion_code/web/api/sessions.py +135 -0
- minion_code/web/server.py +149 -0
- minion_code/web/services/__init__.py +5 -0
- minion_code/web/services/session_manager.py +420 -0
- minion_code-0.1.2.dist-info/METADATA +476 -0
- minion_code-0.1.2.dist-info/RECORD +111 -0
- {minion_code-0.1.0.dist-info → minion_code-0.1.2.dist-info}/WHEEL +1 -1
- minion_code-0.1.2.dist-info/entry_points.txt +6 -0
- tests/test_adapter.py +67 -0
- tests/test_adapter_simple.py +79 -0
- tests/test_file_read_tool.py +144 -0
- tests/test_readonly_tools.py +0 -2
- tests/test_skills.py +441 -0
- examples/advance_tui.py +0 -508
- examples/rich_example.py +0 -4
- examples/simple_file_watching.py +0 -57
- examples/simple_tui.py +0 -267
- examples/simple_usage.py +0 -69
- minion_code-0.1.0.dist-info/METADATA +0 -350
- minion_code-0.1.0.dist-info/RECORD +0 -59
- minion_code-0.1.0.dist-info/entry_points.txt +0 -4
- {minion_code-0.1.0.dist-info → minion_code-0.1.2.dist-info}/licenses/LICENSE +0 -0
- {minion_code-0.1.0.dist-info → minion_code-0.1.2.dist-info}/top_level.txt +0 -0
|
@@ -4,83 +4,85 @@
|
|
|
4
4
|
Tools command - Show available tools
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
from
|
|
8
|
-
from rich.panel import Panel
|
|
9
|
-
from minion_code.commands import BaseCommand
|
|
7
|
+
from minion_code.commands import BaseCommand, CommandType
|
|
10
8
|
|
|
11
9
|
|
|
12
10
|
class ToolsCommand(BaseCommand):
|
|
13
11
|
"""Show available tools."""
|
|
14
|
-
|
|
12
|
+
|
|
15
13
|
name = "tools"
|
|
16
14
|
description = "List all available tools and their descriptions"
|
|
17
15
|
usage = "/tools [filter]"
|
|
18
16
|
aliases = ["t"]
|
|
19
|
-
|
|
17
|
+
command_type = CommandType.LOCAL
|
|
18
|
+
|
|
20
19
|
async def execute(self, args: str) -> None:
|
|
21
20
|
"""Execute the tools command."""
|
|
22
21
|
if not self.agent or not self.agent.tools:
|
|
23
|
-
|
|
24
|
-
"❌
|
|
25
|
-
title="
|
|
26
|
-
border_style="red"
|
|
22
|
+
self.output.panel(
|
|
23
|
+
"❌ No tools available or agent not initialized",
|
|
24
|
+
title="Error",
|
|
25
|
+
border_style="red",
|
|
27
26
|
)
|
|
28
|
-
self.console.print(error_panel)
|
|
29
27
|
return
|
|
30
|
-
|
|
28
|
+
|
|
31
29
|
filter_text = args.strip().lower()
|
|
32
30
|
tools = self.agent.tools
|
|
33
|
-
|
|
31
|
+
|
|
34
32
|
# Filter tools if filter text provided
|
|
35
33
|
if filter_text:
|
|
36
|
-
tools = [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
tools = [
|
|
35
|
+
tool
|
|
36
|
+
for tool in tools
|
|
37
|
+
if filter_text in tool.name.lower()
|
|
38
|
+
or filter_text in tool.description.lower()
|
|
39
|
+
]
|
|
40
|
+
|
|
40
41
|
if not tools:
|
|
41
|
-
|
|
42
|
-
f"❌
|
|
43
|
-
title="
|
|
44
|
-
border_style="yellow"
|
|
42
|
+
self.output.panel(
|
|
43
|
+
f"❌ No tools found matching '{filter_text}'",
|
|
44
|
+
title="No Results",
|
|
45
|
+
border_style="yellow",
|
|
45
46
|
)
|
|
46
|
-
self.console.print(no_tools_panel)
|
|
47
47
|
return
|
|
48
|
-
|
|
49
|
-
#
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
header_style="bold magenta"
|
|
54
|
-
)
|
|
55
|
-
tools_table.add_column("Tool Name", style="cyan", no_wrap=True)
|
|
56
|
-
tools_table.add_column("Description", style="white")
|
|
57
|
-
tools_table.add_column("Type", style="yellow")
|
|
58
|
-
tools_table.add_column("Inputs", style="green")
|
|
59
|
-
|
|
48
|
+
|
|
49
|
+
# Prepare tools table data
|
|
50
|
+
headers = ["Tool Name", "Description", "Type", "Inputs"]
|
|
51
|
+
rows = []
|
|
52
|
+
|
|
60
53
|
for tool in tools:
|
|
61
|
-
tool_type =
|
|
62
|
-
|
|
54
|
+
tool_type = (
|
|
55
|
+
"Read-only" if getattr(tool, "readonly", False) else "Read-write"
|
|
56
|
+
)
|
|
57
|
+
|
|
63
58
|
# Get input parameters
|
|
64
|
-
inputs = getattr(tool,
|
|
59
|
+
inputs = getattr(tool, "inputs", {})
|
|
65
60
|
input_names = list(inputs.keys()) if inputs else []
|
|
66
61
|
input_str = ", ".join(input_names[:3]) # Show first 3 inputs
|
|
67
62
|
if len(input_names) > 3:
|
|
68
63
|
input_str += f" (+{len(input_names) - 3} more)"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
|
|
65
|
+
rows.append(
|
|
66
|
+
[
|
|
67
|
+
tool.name,
|
|
68
|
+
(
|
|
69
|
+
tool.description[:50] + "..."
|
|
70
|
+
if len(tool.description) > 50
|
|
71
|
+
else tool.description
|
|
72
|
+
),
|
|
73
|
+
tool_type,
|
|
74
|
+
input_str or "-",
|
|
75
|
+
]
|
|
75
76
|
)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
# Show summary
|
|
80
|
-
summary_panel = Panel(
|
|
81
|
-
f"📊 [bold blue]Total: {len(tools)} tools[/bold blue]"
|
|
82
|
-
f"{f' (filtered from {len(self.agent.tools)} total)' if filter_text else ''}",
|
|
83
|
-
title="[bold green]Summary[/bold green]",
|
|
84
|
-
border_style="green"
|
|
77
|
+
|
|
78
|
+
title = (
|
|
79
|
+
f"🛠️ Available Tools{f' (filtered: {filter_text})' if filter_text else ''}"
|
|
85
80
|
)
|
|
86
|
-
self.
|
|
81
|
+
self.output.table(headers, rows, title=title)
|
|
82
|
+
|
|
83
|
+
# Show summary
|
|
84
|
+
summary_text = f"📊 Total: {len(tools)} tools"
|
|
85
|
+
if filter_text:
|
|
86
|
+
summary_text += f" (filtered from {len(self.agent.tools)} total)"
|
|
87
|
+
|
|
88
|
+
self.output.panel(summary_text, title="Summary", border_style="green")
|
|
@@ -4,101 +4,66 @@
|
|
|
4
4
|
Version command - Show version information
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
from
|
|
9
|
-
from minion_code.commands import BaseCommand
|
|
7
|
+
import sys
|
|
8
|
+
from minion_code.commands import BaseCommand, CommandType
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
class VersionCommand(BaseCommand):
|
|
13
12
|
"""Show version information."""
|
|
14
|
-
|
|
13
|
+
|
|
15
14
|
name = "version"
|
|
16
15
|
description = "Show version information for MinionCode and dependencies"
|
|
17
16
|
usage = "/version"
|
|
18
17
|
aliases = ["v", "ver"]
|
|
19
|
-
|
|
18
|
+
command_type = CommandType.LOCAL
|
|
19
|
+
|
|
20
20
|
async def execute(self, args: str) -> None:
|
|
21
21
|
"""Execute the version command."""
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
header_style="bold blue"
|
|
27
|
-
)
|
|
28
|
-
version_table.add_column("Component", style="cyan", no_wrap=True)
|
|
29
|
-
version_table.add_column("Version", style="white")
|
|
30
|
-
version_table.add_column("Status", style="green")
|
|
31
|
-
|
|
22
|
+
# Prepare version data
|
|
23
|
+
headers = ["Component", "Version", "Status"]
|
|
24
|
+
rows = []
|
|
25
|
+
|
|
32
26
|
# MinionCode version
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"0.1.0",
|
|
36
|
-
"✅ Active"
|
|
37
|
-
)
|
|
38
|
-
|
|
27
|
+
rows.append(["MinionCode", "0.1.0", "✅ Active"])
|
|
28
|
+
|
|
39
29
|
# Python version
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"Python",
|
|
43
|
-
f"{sys.version.split()[0]}",
|
|
44
|
-
"✅ Compatible"
|
|
45
|
-
)
|
|
46
|
-
|
|
30
|
+
rows.append(["Python", sys.version.split()[0], "✅ Compatible"])
|
|
31
|
+
|
|
47
32
|
# Rich version
|
|
48
33
|
try:
|
|
49
34
|
import rich
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
version,
|
|
54
|
-
"✅ Loaded"
|
|
55
|
-
)
|
|
35
|
+
|
|
36
|
+
version = getattr(rich, "__version__", "Unknown")
|
|
37
|
+
rows.append(["Rich", version, "✅ Loaded"])
|
|
56
38
|
except ImportError:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"Not installed",
|
|
60
|
-
"❌ Missing"
|
|
61
|
-
)
|
|
62
|
-
|
|
39
|
+
rows.append(["Rich", "Not installed", "❌ Missing"])
|
|
40
|
+
|
|
63
41
|
# Textual version
|
|
64
42
|
try:
|
|
65
43
|
import textual
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
version,
|
|
70
|
-
"✅ Available"
|
|
71
|
-
)
|
|
44
|
+
|
|
45
|
+
version = getattr(textual, "__version__", "Unknown")
|
|
46
|
+
rows.append(["Textual", version, "✅ Available"])
|
|
72
47
|
except ImportError:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"Not installed",
|
|
76
|
-
"⚠️ Optional"
|
|
77
|
-
)
|
|
78
|
-
|
|
48
|
+
rows.append(["Textual", "Not installed", "⚠️ Optional"])
|
|
49
|
+
|
|
79
50
|
# Minion version
|
|
80
51
|
try:
|
|
81
52
|
import minion
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
getattr(minion,
|
|
85
|
-
"✅ Core"
|
|
53
|
+
|
|
54
|
+
rows.append(
|
|
55
|
+
["Minion", getattr(minion, "__version__", "Unknown"), "✅ Core"]
|
|
86
56
|
)
|
|
87
57
|
except ImportError:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
)
|
|
93
|
-
|
|
94
|
-
self.console.print(version_table)
|
|
95
|
-
|
|
58
|
+
rows.append(["Minion", "Not found", "❌ Required"])
|
|
59
|
+
|
|
60
|
+
self.output.table(headers, rows, title="📦 Version Information")
|
|
61
|
+
|
|
96
62
|
# Additional info
|
|
97
|
-
|
|
98
|
-
"🚀
|
|
63
|
+
self.output.panel(
|
|
64
|
+
"🚀 MinionCode TUI - Advanced AI-powered development assistant\n"
|
|
99
65
|
"🔗 Built with Rich for beautiful terminal interfaces\n"
|
|
100
66
|
"🤖 Powered by Minion framework for AI agent capabilities",
|
|
101
|
-
title="
|
|
102
|
-
border_style="green"
|
|
67
|
+
title="About",
|
|
68
|
+
border_style="green",
|
|
103
69
|
)
|
|
104
|
-
self.console.print(info_panel)
|