god-code 0.2.0__tar.gz → 0.2.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.
- {god_code-0.2.0 → god_code-0.2.2}/PKG-INFO +2 -1
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/cli.py +15 -5
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/llm/client.py +5 -2
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/prompts/system.py +5 -2
- {god_code-0.2.0 → god_code-0.2.2}/pyproject.toml +2 -1
- {god_code-0.2.0 → god_code-0.2.2}/.github/workflows/publish.yml +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/.gitignore +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/CHANGELOG.md +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/CLAUDE.md +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/CONTRIBUTING.md +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/LICENSE +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/README.md +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/__init__.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/__init__.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/collision_planner.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/consistency_checker.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/dependency_graph.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/gdscript_linter.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/pattern_advisor.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/project.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/resource_validator.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/scene_parser.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/scene_writer.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/tscn_validator.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/llm/__init__.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/llm/streaming.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/llm/vision.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/prompts/__init__.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/prompts/build_discipline.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/prompts/godot_playbook.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/prompts/knowledge_selector.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/py.typed +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/__init__.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/auth.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/config.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/context_manager.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/engine.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/error_loop.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/oauth.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/session.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/__init__.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/base.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/file_ops.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/git.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/godot_cli.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/list_dir.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/registry.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/screenshot.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/search.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/shell.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/__init__.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/godot/__init__.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_collision_planner.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_consistency.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_dependency_graph.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_linter.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_pattern_advisor.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_project.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_resource_validator.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_scene_parser.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_scene_writer.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_tscn_validator.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/llm/__init__.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/llm/test_client.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/llm/test_vision.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/prompts/__init__.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/prompts/test_knowledge_selector.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/prompts/test_system_prompt.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/runtime/__init__.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/runtime/test_config.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/runtime/test_context_manager.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/runtime/test_engine.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/runtime/test_error_loop.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/test_e2e.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/tools/__init__.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/tools/test_file_ops.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/tools/test_git.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/tools/test_godot_cli.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/tools/test_list_dir.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/tools/test_registry.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/tools/test_search.py +0 -0
- {god_code-0.2.0 → god_code-0.2.2}/tests/tools/test_shell.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: god-code
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: AI coding agent specialized for Godot game development
|
|
5
5
|
Project-URL: Homepage, https://github.com/chuisiufai/god-code
|
|
6
6
|
Project-URL: Repository, https://github.com/chuisiufai/god-code
|
|
@@ -11,6 +11,7 @@ Requires-Python: >=3.9
|
|
|
11
11
|
Requires-Dist: click>=8.1
|
|
12
12
|
Requires-Dist: eval-type-backport>=0.2.0; python_version < '3.10'
|
|
13
13
|
Requires-Dist: httpx>=0.27
|
|
14
|
+
Requires-Dist: packaging>=21.0
|
|
14
15
|
Requires-Dist: pillow>=10.3
|
|
15
16
|
Requires-Dist: pydantic>=2.7
|
|
16
17
|
Requires-Dist: rich>=13.0
|
|
@@ -75,7 +75,7 @@ def build_engine(config: AgentConfig, project_root: Path) -> ConversationEngine:
|
|
|
75
75
|
)
|
|
76
76
|
client = LLMClient(llm_config)
|
|
77
77
|
registry = build_registry()
|
|
78
|
-
system_prompt = build_system_prompt(project_root)
|
|
78
|
+
system_prompt = build_system_prompt(project_root, godot_path=config.godot_path)
|
|
79
79
|
return ConversationEngine(
|
|
80
80
|
client=client,
|
|
81
81
|
registry=registry,
|
|
@@ -195,17 +195,18 @@ def _run_setup_wizard() -> None:
|
|
|
195
195
|
click.echo()
|
|
196
196
|
|
|
197
197
|
|
|
198
|
-
_VERSION = "0.2.
|
|
198
|
+
_VERSION = "0.2.2"
|
|
199
199
|
|
|
200
200
|
|
|
201
201
|
def _check_update() -> None:
|
|
202
202
|
"""Check PyPI for a newer version. Non-blocking, fails silently."""
|
|
203
203
|
try:
|
|
204
204
|
import httpx as _httpx
|
|
205
|
+
from packaging.version import Version
|
|
205
206
|
resp = _httpx.get("https://pypi.org/pypi/god-code/json", timeout=3)
|
|
206
207
|
if resp.status_code == 200:
|
|
207
208
|
latest = resp.json()["info"]["version"]
|
|
208
|
-
if latest
|
|
209
|
+
if Version(latest) > Version(_VERSION):
|
|
209
210
|
click.secho(f" Update available: {_VERSION} → {latest}", fg="yellow")
|
|
210
211
|
click.echo(f" Run: pip install --upgrade god-code")
|
|
211
212
|
click.echo()
|
|
@@ -409,8 +410,17 @@ def chat(project: str = ".", config: str | None = None):
|
|
|
409
410
|
console.print(Panel(st, title="Status", border_style="blue"))
|
|
410
411
|
continue
|
|
411
412
|
|
|
412
|
-
|
|
413
|
-
|
|
413
|
+
# Support both /cd and cd
|
|
414
|
+
cd_input = user_input.strip()
|
|
415
|
+
if cd_input.startswith("/cd "):
|
|
416
|
+
cd_input = cd_input[4:]
|
|
417
|
+
elif cd_input.startswith("cd "):
|
|
418
|
+
cd_input = cd_input[3:]
|
|
419
|
+
else:
|
|
420
|
+
cd_input = None
|
|
421
|
+
|
|
422
|
+
if cd_input is not None:
|
|
423
|
+
new_path = Path(cd_input).expanduser().resolve()
|
|
414
424
|
if not new_path.exists():
|
|
415
425
|
console.print(f"[red] Path not found: {new_path}[/]")
|
|
416
426
|
continue
|
|
@@ -88,10 +88,13 @@ class LLMClient:
|
|
|
88
88
|
messages: list[Message],
|
|
89
89
|
tools: list[dict] | None = None,
|
|
90
90
|
) -> dict:
|
|
91
|
+
# gpt-5+ models use max_completion_tokens instead of max_tokens
|
|
92
|
+
model = self.config.model
|
|
93
|
+
token_key = "max_completion_tokens" if model.startswith("gpt-5") else "max_tokens"
|
|
91
94
|
body: dict[str, Any] = {
|
|
92
|
-
"model":
|
|
95
|
+
"model": model,
|
|
93
96
|
"messages": [m.to_dict() for m in messages],
|
|
94
|
-
|
|
97
|
+
token_key: self.config.max_tokens,
|
|
95
98
|
"temperature": self.config.temperature,
|
|
96
99
|
}
|
|
97
100
|
if tools:
|
|
@@ -13,6 +13,7 @@ def build_system_prompt(
|
|
|
13
13
|
project_root: Path,
|
|
14
14
|
user_hint: str = "",
|
|
15
15
|
file_paths: list[str] | None = None,
|
|
16
|
+
godot_path: str = "godot",
|
|
16
17
|
) -> str:
|
|
17
18
|
sections = [_core_identity()]
|
|
18
19
|
|
|
@@ -28,7 +29,7 @@ def build_system_prompt(
|
|
|
28
29
|
project_file = project_root / "project.godot"
|
|
29
30
|
if project_file.exists():
|
|
30
31
|
proj = parse_project_godot(project_file)
|
|
31
|
-
sections.append(_project_context(proj, project_root))
|
|
32
|
+
sections.append(_project_context(proj, project_root, godot_path))
|
|
32
33
|
else:
|
|
33
34
|
sections.append("## Project Context\n\nNo project.godot found in working directory.")
|
|
34
35
|
|
|
@@ -52,11 +53,13 @@ You have tools to read/write files, search code, run GUT tests, take screenshots
|
|
|
52
53
|
5. **_physics_process for movement** — NEVER use _process for physics/collision logic"""
|
|
53
54
|
|
|
54
55
|
|
|
55
|
-
def _project_context(proj, project_root: Path | None = None) -> str:
|
|
56
|
+
def _project_context(proj, project_root: Path | None = None, godot_path: str = "godot") -> str:
|
|
56
57
|
lines = ["## Project Context", ""]
|
|
57
58
|
if project_root:
|
|
58
59
|
lines.append(f"- **Project Root**: `{project_root}`")
|
|
59
60
|
lines.append(f" Use this absolute path for ALL tool calls (read_file, glob, grep, etc.)")
|
|
61
|
+
lines.append(f"- **Godot Path**: `{godot_path}`")
|
|
62
|
+
lines.append(f" Use this path for run_godot tool's godot_path parameter.")
|
|
60
63
|
lines.append(f"- **Project**: {proj.name}")
|
|
61
64
|
if proj.version:
|
|
62
65
|
lines.append(f"- **Version**: {proj.version}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "god-code"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.2"
|
|
4
4
|
description = "AI coding agent specialized for Godot game development"
|
|
5
5
|
requires-python = ">=3.9"
|
|
6
6
|
license = {text = "GPL-3.0-or-later"}
|
|
@@ -11,6 +11,7 @@ dependencies = [
|
|
|
11
11
|
"pydantic>=2.7",
|
|
12
12
|
"Pillow>=10.3",
|
|
13
13
|
"rich>=13.0",
|
|
14
|
+
"packaging>=21.0",
|
|
14
15
|
"eval_type_backport>=0.2.0; python_version < '3.10'",
|
|
15
16
|
]
|
|
16
17
|
|
|
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
|
|
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
|