agencode 0.1.1__tar.gz → 0.1.2__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.
- {agencode-0.1.1 → agencode-0.1.2}/PKG-INFO +1 -1
- {agencode-0.1.1 → agencode-0.1.2}/agencli/cli.py +14 -8
- {agencode-0.1.1 → agencode-0.1.2}/pyproject.toml +1 -1
- {agencode-0.1.1 → agencode-0.1.2}/tests/test_cli.py +23 -0
- {agencode-0.1.1 → agencode-0.1.2}/.gitignore +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/README.md +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/__init__.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/__main__.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/agents/__init__.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/agents/editor.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/agents/factory.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/agents/management_tools.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/agents/prebuilt/__init__.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/agents/prebuilt/catalog.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/agents/registry.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/agents/runtime.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/agents/supervisor.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/core/__init__.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/core/config.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/core/keystore.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/core/logger.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/core/paths.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/core/session.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/mcp/__init__.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/mcp/client.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/mcp/config.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/providers/__init__.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/providers/model.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/skills/__init__.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/skills/cli_backend.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/skills/loader.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/skills/manager.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/tools/__init__.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/tools/mcp.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/tui/__init__.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/tui/app.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/tui/commands.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/tui/screens.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/tui/trace.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/agencli/tui/voice.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/tests/test_agent_editor.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/tests/test_mcp_tools.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/tests/test_runtime.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/tests/test_skills.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/tests/test_tui_app.py +0 -0
- {agencode-0.1.1 → agencode-0.1.2}/tests/test_tui_commands.py +0 -0
|
@@ -45,7 +45,7 @@ from agencli.providers.model import describe_api_key_source
|
|
|
45
45
|
from agencli.skills.manager import install_skill, list_installed_skills
|
|
46
46
|
from agencli.tui.app import AgenCLIApp
|
|
47
47
|
|
|
48
|
-
app = typer.Typer(help="AgenCLI: a multi-agent terminal workspace.")
|
|
48
|
+
app = typer.Typer(help="AgenCLI: a multi-agent terminal workspace.", invoke_without_command=True)
|
|
49
49
|
console = Console()
|
|
50
50
|
|
|
51
51
|
|
|
@@ -66,10 +66,21 @@ def _resolve_project_config_path(config_path: Path | None, workspace: Path) -> P
|
|
|
66
66
|
return ensure_config(root=workspace / ".agencode")
|
|
67
67
|
|
|
68
68
|
|
|
69
|
+
def _launch_tui(*, config_path: Path | None, workspace: Path | None, inline: bool) -> None:
|
|
70
|
+
launch_workspace = (workspace or Path.cwd()).expanduser().resolve()
|
|
71
|
+
resolved_config_path = _resolve_project_config_path(config_path, launch_workspace)
|
|
72
|
+
config = load_config(resolved_config_path)
|
|
73
|
+
config = replace(config, workspace_dir=str(launch_workspace))
|
|
74
|
+
save_config(config, resolved_config_path)
|
|
75
|
+
AgenCLIApp(config=config, config_path=resolved_config_path).run(inline=inline)
|
|
76
|
+
|
|
77
|
+
|
|
69
78
|
@app.callback()
|
|
70
|
-
def main() -> None:
|
|
79
|
+
def main(ctx: typer.Context) -> None:
|
|
71
80
|
"""Initialize CLI state shared by all commands."""
|
|
72
81
|
configure_logging()
|
|
82
|
+
if ctx.invoked_subcommand is None:
|
|
83
|
+
_launch_tui(config_path=None, workspace=None, inline=True)
|
|
73
84
|
|
|
74
85
|
|
|
75
86
|
@app.command()
|
|
@@ -87,12 +98,7 @@ def tui(
|
|
|
87
98
|
),
|
|
88
99
|
) -> None:
|
|
89
100
|
"""Launch the Textual UI."""
|
|
90
|
-
|
|
91
|
-
resolved_config_path = _resolve_project_config_path(config_path, launch_workspace)
|
|
92
|
-
config = load_config(resolved_config_path)
|
|
93
|
-
config = replace(config, workspace_dir=str(launch_workspace))
|
|
94
|
-
save_config(config, resolved_config_path)
|
|
95
|
-
AgenCLIApp(config=config, config_path=resolved_config_path).run(inline=inline)
|
|
101
|
+
_launch_tui(config_path=config_path, workspace=workspace, inline=inline)
|
|
96
102
|
|
|
97
103
|
|
|
98
104
|
@app.command("init-config")
|
|
@@ -58,6 +58,29 @@ class CLITest(unittest.TestCase):
|
|
|
58
58
|
self.assertEqual(config.agents_dir, str((workspace / ".agencode" / "agents").resolve()))
|
|
59
59
|
self.assertEqual(config.sessions_dir, str((workspace / ".agencode" / "sessions").resolve()))
|
|
60
60
|
|
|
61
|
+
def test_no_subcommand_invokes_tui(self) -> None:
|
|
62
|
+
workspace = self.root / "workspace"
|
|
63
|
+
workspace.mkdir()
|
|
64
|
+
|
|
65
|
+
captured: dict[str, object] = {}
|
|
66
|
+
|
|
67
|
+
class FakeApp:
|
|
68
|
+
def __init__(self, *, config, config_path) -> None:
|
|
69
|
+
captured["config"] = config
|
|
70
|
+
captured["config_path"] = config_path
|
|
71
|
+
|
|
72
|
+
def run(self, *, inline: bool) -> None:
|
|
73
|
+
captured["inline"] = inline
|
|
74
|
+
|
|
75
|
+
with (
|
|
76
|
+
patch("agencli.cli.AgenCLIApp", FakeApp),
|
|
77
|
+
patch("agencli.cli.Path.cwd", return_value=workspace),
|
|
78
|
+
):
|
|
79
|
+
result = self.runner.invoke(app, [], catch_exceptions=False)
|
|
80
|
+
|
|
81
|
+
self.assertEqual(result.exit_code, 0)
|
|
82
|
+
self.assertEqual(captured["config"].workspace_dir, str(workspace.resolve()))
|
|
83
|
+
|
|
61
84
|
|
|
62
85
|
if __name__ == "__main__":
|
|
63
86
|
unittest.main()
|
|
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
|
|
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
|