codee-agent 0.9.4__tar.gz → 0.9.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.
- {codee_agent-0.9.4 → codee_agent-0.9.6}/PKG-INFO +23 -1
- {codee_agent-0.9.4 → codee_agent-0.9.6}/README.md +22 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/pyproject.toml +1 -1
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/agent_cli.py +2 -1
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/init_cli.py +18 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/setup_wizard.py +25 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/test_agent_cli.py +45 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/test_init_cli.py +42 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/test_setup_wizard.py +70 -2
- {codee_agent-0.9.4 → codee_agent-0.9.6}/LICENSE +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/.gitignore +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/__init__.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/admin.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/admin_api.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/admin_cli.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/admin_service.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/coding_agents.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/executor.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/__init__.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/claude_key_rotation.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/cron_describe.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/mcp_config.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/runs_db.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/runtime_control.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/test_claude_key_rotation.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/test_mcp_config.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/test_runs_db.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/test_trigger_cron_skills.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/test_trigger_email_skills.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/test_trigger_issue_skills.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/trigger_aws_sqs_skills.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/trigger_cron_skills.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/trigger_email_skills.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/lib/trigger_issue_skills.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/mail_server.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/start_cli.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/tasks_providers.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/AGENTS.md +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/CLAUDE.md +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/aws-sqs-alarm-response/SKILL.md +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/cron-research-5xx-errors/SKILL.md +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/story-code-reviewer/SKILL.md +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/story-developer/SKILL.md +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/story-planner/SKILL.md +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/story-planner/assets/readme-template.md +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/story-qa/SKILL.md +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/story-security-reviewer/SKILL.md +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/task-code-reviewer/SKILL.md +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/task-developer/SKILL.md +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/task-qa/SKILL.md +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/task-security-reviewer/SKILL.md +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/test_admin.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/test_admin_api.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/test_admin_cli.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/test_admin_service.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/test_coding_agents.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/test_executor.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/test_memory_index.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/test_start_cli.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/workflow_graph.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_admin/__init__.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_admin/codee_admin.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_abstract/__init__.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_abstract/acp.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_abstract/provider.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_abstract/test.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_abstract/transcript.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_claude_code/__init__.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_claude_code/account.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_claude_code/credentials.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_claude_code/oauth.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_claude_code/provider.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_claude_code/test.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_claude_code/usage.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_codex/__init__.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_codex/provider.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_codex/test.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_github_copilot/__init__.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_github_copilot/provider.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_github_copilot/test.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_opencode/__init__.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_opencode/provider.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_agent_opencode/test.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_database/__init__.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_database/claude_code_accounts.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_database/database.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_database/oauth_tokens.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_main_context/__init__.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_main_context/context.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_main_context/logging.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_main_context/test_context.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_main_context/test_logging.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_tasks_abstract/__init__.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_tasks_abstract/provider.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_tasks_azure_devops/__init__.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_tasks_azure_devops/oauth.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_tasks_azure_devops/provider.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_tasks_azure_devops/test.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_tasks_jira/__init__.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_tasks_jira/provider.py +0 -0
- {codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee_tasks_jira/test.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codee-agent
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.6
|
|
4
4
|
Summary: A virtual co-worker that picks up Jira and Azure DevOps tasks and solves them with coding agents.
|
|
5
5
|
Keywords: ai,agent,jira,azure-devops,claude-code,github-copilot,codex,opencode,automation
|
|
6
6
|
Author: Denis Kibalko
|
|
@@ -48,6 +48,28 @@ installation, configuration and tutorials for working on tasks in Jira and Azure
|
|
|
48
48
|
[click-through demo of the admin UI](https://fusebase-dev.github.io/codee/demo/) that runs without installing
|
|
49
49
|
anything.
|
|
50
50
|
|
|
51
|
+
## Prerequisites
|
|
52
|
+
|
|
53
|
+
Codee is installed and run with [uv](https://docs.astral.sh/uv/). Install it first:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh # macOS / Linux
|
|
57
|
+
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" # Windows
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
uv downloads Python 3.12+ for you if it isn't already on the machine.
|
|
61
|
+
|
|
62
|
+
On Linux (including WSL), Reflex also needs the system `unzip` command to install Bun
|
|
63
|
+
for the admin UI. On Ubuntu/Debian, run:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
sudo apt update && sudo apt install unzip
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`init` warns if `unzip` is missing, but continues setup without installing system
|
|
70
|
+
packages. macOS normally includes `unzip`; native Windows uses PowerShell instead
|
|
71
|
+
and does not need it.
|
|
72
|
+
|
|
51
73
|
## Run Codee
|
|
52
74
|
|
|
53
75
|
Codee lives in its own directory, where it keeps skills, memory, temp files and config.
|
|
@@ -13,6 +13,28 @@ installation, configuration and tutorials for working on tasks in Jira and Azure
|
|
|
13
13
|
[click-through demo of the admin UI](https://fusebase-dev.github.io/codee/demo/) that runs without installing
|
|
14
14
|
anything.
|
|
15
15
|
|
|
16
|
+
## Prerequisites
|
|
17
|
+
|
|
18
|
+
Codee is installed and run with [uv](https://docs.astral.sh/uv/). Install it first:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh # macOS / Linux
|
|
22
|
+
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" # Windows
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
uv downloads Python 3.12+ for you if it isn't already on the machine.
|
|
26
|
+
|
|
27
|
+
On Linux (including WSL), Reflex also needs the system `unzip` command to install Bun
|
|
28
|
+
for the admin UI. On Ubuntu/Debian, run:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
sudo apt update && sudo apt install unzip
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`init` warns if `unzip` is missing, but continues setup without installing system
|
|
35
|
+
packages. macOS normally includes `unzip`; native Windows uses PowerShell instead
|
|
36
|
+
and does not need it.
|
|
37
|
+
|
|
16
38
|
## Run Codee
|
|
17
39
|
|
|
18
40
|
Codee lives in its own directory, where it keeps skills, memory, temp files and config.
|
|
@@ -10,7 +10,7 @@ import sys
|
|
|
10
10
|
from pathlib import Path
|
|
11
11
|
|
|
12
12
|
from codee.admin_service import DEFAULT_ADMIN_PORT
|
|
13
|
-
from codee.init_cli import confirm_overwrite, scaffold
|
|
13
|
+
from codee.init_cli import confirm_overwrite, scaffold, warn_missing_unzip
|
|
14
14
|
from codee import setup_wizard
|
|
15
15
|
|
|
16
16
|
|
|
@@ -41,6 +41,7 @@ def init(arguments: argparse.Namespace) -> int:
|
|
|
41
41
|
print("codee-agent init: cancelled")
|
|
42
42
|
return 1
|
|
43
43
|
|
|
44
|
+
warn_missing_unzip()
|
|
44
45
|
setup_wizard.heading("Codee project")
|
|
45
46
|
setup_wizard.wrapped(str(destination))
|
|
46
47
|
setup_wizard.line()
|
|
@@ -38,6 +38,23 @@ dependencies = ["codee-agent"]
|
|
|
38
38
|
FALLBACK_PROJECT_NAME = "codee-project"
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
def warn_missing_unzip() -> None:
|
|
42
|
+
"""Explain the missing Bun prerequisite without changing the system."""
|
|
43
|
+
if sys.platform == "win32" or shutil.which("unzip") is not None:
|
|
44
|
+
return
|
|
45
|
+
|
|
46
|
+
print(
|
|
47
|
+
"Warning: system command 'unzip' is missing. Reflex needs it to install "
|
|
48
|
+
"Bun for the admin UI.\n"
|
|
49
|
+
"Install it through your system package manager before starting Codee "
|
|
50
|
+
"(not pip or uv):\n"
|
|
51
|
+
" Ubuntu/Debian (including WSL): sudo apt update && sudo apt install unzip\n"
|
|
52
|
+
" Fedora/RHEL: sudo dnf install unzip\n"
|
|
53
|
+
" Other systems: install the unzip package using your system package manager.",
|
|
54
|
+
file=sys.stderr,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
41
58
|
def _ignored_patterns(gitignore: Path) -> set[str]:
|
|
42
59
|
"""Patterns already listed, normalized so `/temp`, `temp/` and `temp` match."""
|
|
43
60
|
if not gitignore.is_file():
|
|
@@ -162,6 +179,7 @@ def main() -> int:
|
|
|
162
179
|
print("codee-init: cancelled")
|
|
163
180
|
return 1
|
|
164
181
|
|
|
182
|
+
warn_missing_unzip()
|
|
165
183
|
print("Created " + ", ".join(scaffold(destination)))
|
|
166
184
|
return 0
|
|
167
185
|
|
|
@@ -132,6 +132,27 @@ def wrapped(text: str, indent: str = INDENT, style: str = "") -> None:
|
|
|
132
132
|
print(f"{indent}{_style(style, row[len(indent):])}")
|
|
133
133
|
|
|
134
134
|
|
|
135
|
+
def describe_guides(provider: TasksProvider | None = None) -> None:
|
|
136
|
+
docs_url = "https://fusebase-dev.github.io/codee"
|
|
137
|
+
guides = [
|
|
138
|
+
("Configuration", f"{docs_url}/configuration"),
|
|
139
|
+
("Updating skills through Git",
|
|
140
|
+
f"{docs_url}/tutorials/updating-skills-through-git"),
|
|
141
|
+
]
|
|
142
|
+
if provider == TasksProvider.JIRA:
|
|
143
|
+
guides.append(("Working on tasks in Jira",
|
|
144
|
+
f"{docs_url}/tutorials/working-on-tasks-in-jira"))
|
|
145
|
+
elif provider == TasksProvider.AZURE_DEVOPS:
|
|
146
|
+
guides.append(("Working on tasks in Azure DevOps",
|
|
147
|
+
f"{docs_url}/tutorials/working-on-tasks-in-azure-devops"))
|
|
148
|
+
|
|
149
|
+
heading("Continue with these guides")
|
|
150
|
+
for title, url in guides:
|
|
151
|
+
line(title)
|
|
152
|
+
wrapped(url)
|
|
153
|
+
line()
|
|
154
|
+
|
|
155
|
+
|
|
135
156
|
def ask(label: str, secret: bool = False) -> str:
|
|
136
157
|
"""Read one answer at the wizard's margin."""
|
|
137
158
|
return (getpass if secret else input)(f"{INDENT}{label}").strip()
|
|
@@ -417,6 +438,8 @@ def hand_off_to_admin_ui(service: "AdminService", provider: TasksProvider,
|
|
|
417
438
|
for field in TASKS_PROVIDER_FIELDS[provider]:
|
|
418
439
|
line(f" \u00b7 {field.label}")
|
|
419
440
|
|
|
441
|
+
describe_guides(provider)
|
|
442
|
+
|
|
420
443
|
url = f"http://localhost:{port}{SETTINGS_ROUTE}"
|
|
421
444
|
line()
|
|
422
445
|
wrapped("Starting Codee. This can take a few minutes the first time, "
|
|
@@ -466,6 +489,7 @@ def run(destination: Path, port: int) -> int:
|
|
|
466
489
|
else:
|
|
467
490
|
wrapped("Codee is set up but not connected yet. Run "
|
|
468
491
|
"`uv run codee-start` and finish on the Settings page.")
|
|
492
|
+
describe_guides(provider)
|
|
469
493
|
return 0
|
|
470
494
|
|
|
471
495
|
return hand_off_to_admin_ui(service, provider, coding_agent, port)
|
|
@@ -478,3 +502,4 @@ def describe_manual_setup(port: int) -> None:
|
|
|
478
502
|
"`uv run codee-start` and open "
|
|
479
503
|
f"http://localhost:{port}{SETTINGS_ROUTE} to choose a coding "
|
|
480
504
|
"agent and a tasks provider.")
|
|
505
|
+
describe_guides()
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import io
|
|
1
2
|
import os
|
|
2
3
|
import tempfile
|
|
3
4
|
import unittest
|
|
5
|
+
from contextlib import redirect_stderr, redirect_stdout
|
|
4
6
|
from pathlib import Path
|
|
5
7
|
from unittest.mock import patch
|
|
6
8
|
|
|
@@ -12,6 +14,29 @@ class AgentCliTest(unittest.TestCase):
|
|
|
12
14
|
with patch("sys.argv", ["codee-agent", *argv]):
|
|
13
15
|
return agent_cli.main()
|
|
14
16
|
|
|
17
|
+
def test_missing_unzip_warns_in_all_setup_modes(self) -> None:
|
|
18
|
+
for argv, interactive in ((["init"], True),
|
|
19
|
+
(["init", "--scaffold-only"], True),
|
|
20
|
+
(["init"], False)):
|
|
21
|
+
with self.subTest(argv=argv, interactive=interactive):
|
|
22
|
+
output = io.StringIO()
|
|
23
|
+
with redirect_stderr(output), \
|
|
24
|
+
patch("codee.init_cli.sys.platform", "linux"), \
|
|
25
|
+
patch("codee.init_cli.shutil.which", return_value=None), \
|
|
26
|
+
patch.object(agent_cli, "confirm_overwrite",
|
|
27
|
+
return_value=True), \
|
|
28
|
+
patch.object(agent_cli, "scaffold", return_value=[]), \
|
|
29
|
+
patch.object(agent_cli.setup_wizard, "run",
|
|
30
|
+
return_value=0) as wizard, \
|
|
31
|
+
patch("sys.stdin.isatty", return_value=interactive):
|
|
32
|
+
self.assertEqual(self._init(argv), 0)
|
|
33
|
+
self.assertIn("system command 'unzip' is missing",
|
|
34
|
+
output.getvalue())
|
|
35
|
+
if "--scaffold-only" in argv or not interactive:
|
|
36
|
+
wizard.assert_not_called()
|
|
37
|
+
else:
|
|
38
|
+
wizard.assert_called_once()
|
|
39
|
+
|
|
15
40
|
def test_init_scaffolds_then_runs_the_wizard(self) -> None:
|
|
16
41
|
original_directory = Path.cwd()
|
|
17
42
|
with tempfile.TemporaryDirectory() as temporary_directory:
|
|
@@ -41,6 +66,26 @@ class AgentCliTest(unittest.TestCase):
|
|
|
41
66
|
finally:
|
|
42
67
|
os.chdir(original_directory)
|
|
43
68
|
|
|
69
|
+
def test_manual_setup_shows_only_the_common_guides(self) -> None:
|
|
70
|
+
for argv, interactive in ((["init", "--scaffold-only"], True),
|
|
71
|
+
(["init"], False)):
|
|
72
|
+
with self.subTest(argv=argv, interactive=interactive):
|
|
73
|
+
output = io.StringIO()
|
|
74
|
+
with redirect_stdout(output), \
|
|
75
|
+
patch.object(agent_cli, "scaffold", return_value=[]), \
|
|
76
|
+
patch.object(agent_cli, "confirm_overwrite",
|
|
77
|
+
return_value=True), \
|
|
78
|
+
patch("sys.stdin.isatty", return_value=interactive):
|
|
79
|
+
self.assertEqual(self._init(argv), 0)
|
|
80
|
+
text = output.getvalue()
|
|
81
|
+
self.assertIn(
|
|
82
|
+
"https://fusebase-dev.github.io/codee/configuration", text)
|
|
83
|
+
self.assertIn(
|
|
84
|
+
"https://fusebase-dev.github.io/codee/tutorials/updating-skills-through-git",
|
|
85
|
+
text)
|
|
86
|
+
self.assertNotIn("working-on-tasks-in-jira", text)
|
|
87
|
+
self.assertNotIn("working-on-tasks-in-azure-devops", text)
|
|
88
|
+
|
|
44
89
|
def test_a_pipe_still_scaffolds_but_asks_nothing(self) -> None:
|
|
45
90
|
original_directory = Path.cwd()
|
|
46
91
|
with tempfile.TemporaryDirectory() as temporary_directory:
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import io
|
|
1
2
|
import os
|
|
2
3
|
import subprocess
|
|
3
4
|
import tempfile
|
|
4
5
|
import unittest
|
|
6
|
+
from contextlib import redirect_stderr
|
|
5
7
|
from pathlib import Path
|
|
6
8
|
from unittest.mock import patch
|
|
7
9
|
|
|
@@ -11,6 +13,46 @@ from codee.init_cli import ensure_git_repository, main, project_name
|
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
class InitCliTest(unittest.TestCase):
|
|
16
|
+
def test_missing_unzip_warns_without_blocking_initialization(self) -> None:
|
|
17
|
+
for platform in ("linux", "darwin"):
|
|
18
|
+
with self.subTest(platform=platform):
|
|
19
|
+
output = io.StringIO()
|
|
20
|
+
with redirect_stderr(output), \
|
|
21
|
+
patch("codee.init_cli.sys.platform", platform), \
|
|
22
|
+
patch("codee.init_cli.shutil.which", return_value=None), \
|
|
23
|
+
patch("codee.init_cli.confirm_overwrite", return_value=True), \
|
|
24
|
+
patch("codee.init_cli.scaffold", return_value=[]) as scaffold, \
|
|
25
|
+
patch("codee.init_cli.subprocess.run") as run:
|
|
26
|
+
self.assertEqual(main(), 0)
|
|
27
|
+
scaffold.assert_called_once()
|
|
28
|
+
run.assert_not_called()
|
|
29
|
+
self.assertIn("system command 'unzip' is missing", output.getvalue())
|
|
30
|
+
self.assertIn("sudo apt update && sudo apt install unzip",
|
|
31
|
+
output.getvalue())
|
|
32
|
+
self.assertIn("before starting Codee", output.getvalue())
|
|
33
|
+
|
|
34
|
+
def test_installed_unzip_produces_no_warning(self) -> None:
|
|
35
|
+
output = io.StringIO()
|
|
36
|
+
with redirect_stderr(output), \
|
|
37
|
+
patch("codee.init_cli.sys.platform", "linux"), \
|
|
38
|
+
patch("codee.init_cli.shutil.which",
|
|
39
|
+
return_value="/usr/bin/unzip"), \
|
|
40
|
+
patch("codee.init_cli.confirm_overwrite", return_value=True), \
|
|
41
|
+
patch("codee.init_cli.scaffold", return_value=[]):
|
|
42
|
+
self.assertEqual(main(), 0)
|
|
43
|
+
self.assertEqual(output.getvalue(), "")
|
|
44
|
+
|
|
45
|
+
def test_native_windows_does_not_check_for_unzip(self) -> None:
|
|
46
|
+
output = io.StringIO()
|
|
47
|
+
with redirect_stderr(output), \
|
|
48
|
+
patch("codee.init_cli.sys.platform", "win32"), \
|
|
49
|
+
patch("codee.init_cli.shutil.which") as which, \
|
|
50
|
+
patch("codee.init_cli.confirm_overwrite", return_value=True), \
|
|
51
|
+
patch("codee.init_cli.scaffold", return_value=[]):
|
|
52
|
+
self.assertEqual(main(), 0)
|
|
53
|
+
which.assert_not_called()
|
|
54
|
+
self.assertEqual(output.getvalue(), "")
|
|
55
|
+
|
|
14
56
|
def test_copies_packaged_templates_to_current_directory(self) -> None:
|
|
15
57
|
original_directory = Path.cwd()
|
|
16
58
|
with tempfile.TemporaryDirectory() as temporary_directory:
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import io
|
|
1
2
|
import unittest
|
|
3
|
+
from contextlib import redirect_stdout
|
|
2
4
|
from unittest.mock import MagicMock, patch
|
|
3
5
|
|
|
4
6
|
from codee_main_context.context import CodingAgent, Settings, TasksProvider
|
|
@@ -6,6 +8,31 @@ from codee_main_context.context import CodingAgent, Settings, TasksProvider
|
|
|
6
8
|
from codee import setup_wizard
|
|
7
9
|
|
|
8
10
|
|
|
11
|
+
class DescribeGuidesTest(unittest.TestCase):
|
|
12
|
+
def test_shows_common_guides_and_only_the_selected_provider_tutorial(self) -> None:
|
|
13
|
+
docs_url = "https://fusebase-dev.github.io/codee"
|
|
14
|
+
provider_guides = {
|
|
15
|
+
TasksProvider.JIRA: f"{docs_url}/tutorials/working-on-tasks-in-jira",
|
|
16
|
+
TasksProvider.AZURE_DEVOPS:
|
|
17
|
+
f"{docs_url}/tutorials/working-on-tasks-in-azure-devops",
|
|
18
|
+
}
|
|
19
|
+
for provider in (None, *TasksProvider):
|
|
20
|
+
with self.subTest(provider=provider):
|
|
21
|
+
output = io.StringIO()
|
|
22
|
+
with redirect_stdout(output), \
|
|
23
|
+
patch.object(setup_wizard, "_width", return_value=40):
|
|
24
|
+
setup_wizard.describe_guides(provider)
|
|
25
|
+
text = output.getvalue()
|
|
26
|
+
self.assertIn(f"{docs_url}/configuration", text)
|
|
27
|
+
self.assertIn(
|
|
28
|
+
f"{docs_url}/tutorials/updating-skills-through-git", text)
|
|
29
|
+
for source, url in provider_guides.items():
|
|
30
|
+
if source == provider:
|
|
31
|
+
self.assertIn(url, text)
|
|
32
|
+
else:
|
|
33
|
+
self.assertNotIn(url, text)
|
|
34
|
+
|
|
35
|
+
|
|
9
36
|
class ChooseCodingAgentTest(unittest.TestCase):
|
|
10
37
|
def test_single_detected_agent_is_used_without_asking(self) -> None:
|
|
11
38
|
with patch.object(setup_wizard, "installed_coding_agents",
|
|
@@ -153,9 +180,24 @@ class HandOffToAdminUiTest(unittest.TestCase):
|
|
|
153
180
|
process = MagicMock()
|
|
154
181
|
process.wait.return_value = 0
|
|
155
182
|
process.poll.return_value = 0
|
|
156
|
-
|
|
183
|
+
|
|
184
|
+
def start_process(*args, **kwargs):
|
|
185
|
+
text = output.getvalue()
|
|
186
|
+
self.assertIn("https://fusebase-dev.github.io/codee/configuration", text)
|
|
187
|
+
self.assertIn(
|
|
188
|
+
"https://fusebase-dev.github.io/codee/tutorials/updating-skills-through-git",
|
|
189
|
+
text)
|
|
190
|
+
self.assertIn(
|
|
191
|
+
"https://fusebase-dev.github.io/codee/tutorials/working-on-tasks-in-azure-devops",
|
|
192
|
+
text)
|
|
193
|
+
self.assertNotIn("working-on-tasks-in-jira", text)
|
|
194
|
+
return process
|
|
195
|
+
|
|
196
|
+
output = io.StringIO()
|
|
197
|
+
with redirect_stdout(output), \
|
|
198
|
+
patch("builtins.input", return_value=""), \
|
|
157
199
|
patch.object(setup_wizard.subprocess, "Popen",
|
|
158
|
-
|
|
200
|
+
side_effect=start_process) as popen, \
|
|
159
201
|
patch.object(setup_wizard, "wait_for_admin_ui",
|
|
160
202
|
return_value=True), \
|
|
161
203
|
patch.object(setup_wizard.webbrowser, "open") as browser:
|
|
@@ -204,6 +246,32 @@ class WaitForAdminUiTest(unittest.TestCase):
|
|
|
204
246
|
|
|
205
247
|
|
|
206
248
|
class RunTest(unittest.TestCase):
|
|
249
|
+
def test_terminal_setup_shows_guides_even_if_not_connected(self) -> None:
|
|
250
|
+
for configured in (True, False):
|
|
251
|
+
with self.subTest(configured=configured):
|
|
252
|
+
output = io.StringIO()
|
|
253
|
+
with redirect_stdout(output), \
|
|
254
|
+
patch("codee.admin_service.AdminService",
|
|
255
|
+
return_value=_service()), \
|
|
256
|
+
patch.object(setup_wizard, "choose_coding_agent",
|
|
257
|
+
return_value=CodingAgent.CLAUDE_CODE), \
|
|
258
|
+
patch.object(setup_wizard, "choose_tasks_provider",
|
|
259
|
+
return_value=TasksProvider.JIRA), \
|
|
260
|
+
patch.object(setup_wizard, "setup_in_terminal",
|
|
261
|
+
return_value=configured):
|
|
262
|
+
self.assertEqual(
|
|
263
|
+
setup_wizard.run(setup_wizard.Path("."), 8501), 0)
|
|
264
|
+
text = output.getvalue()
|
|
265
|
+
self.assertIn(
|
|
266
|
+
"https://fusebase-dev.github.io/codee/configuration", text)
|
|
267
|
+
self.assertIn(
|
|
268
|
+
"https://fusebase-dev.github.io/codee/tutorials/updating-skills-through-git",
|
|
269
|
+
text)
|
|
270
|
+
self.assertIn(
|
|
271
|
+
"https://fusebase-dev.github.io/codee/tutorials/working-on-tasks-in-jira",
|
|
272
|
+
text)
|
|
273
|
+
self.assertNotIn("working-on-tasks-in-azure-devops", text)
|
|
274
|
+
|
|
207
275
|
def test_a_terminal_provider_never_starts_the_admin_ui(self) -> None:
|
|
208
276
|
service = _service()
|
|
209
277
|
service.verify_tasks_connection.return_value = iter([
|
|
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
|
{codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/aws-sqs-alarm-response/SKILL.md
RENAMED
|
File without changes
|
{codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/cron-research-5xx-errors/SKILL.md
RENAMED
|
File without changes
|
{codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/story-code-reviewer/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/story-security-reviewer/SKILL.md
RENAMED
|
File without changes
|
{codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/task-code-reviewer/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codee_agent-0.9.4 → codee_agent-0.9.6}/src/codee/templates/skills/task-security-reviewer/SKILL.md
RENAMED
|
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
|
|
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
|