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.
Files changed (82) hide show
  1. {god_code-0.2.0 → god_code-0.2.2}/PKG-INFO +2 -1
  2. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/cli.py +15 -5
  3. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/llm/client.py +5 -2
  4. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/prompts/system.py +5 -2
  5. {god_code-0.2.0 → god_code-0.2.2}/pyproject.toml +2 -1
  6. {god_code-0.2.0 → god_code-0.2.2}/.github/workflows/publish.yml +0 -0
  7. {god_code-0.2.0 → god_code-0.2.2}/.gitignore +0 -0
  8. {god_code-0.2.0 → god_code-0.2.2}/CHANGELOG.md +0 -0
  9. {god_code-0.2.0 → god_code-0.2.2}/CLAUDE.md +0 -0
  10. {god_code-0.2.0 → god_code-0.2.2}/CONTRIBUTING.md +0 -0
  11. {god_code-0.2.0 → god_code-0.2.2}/LICENSE +0 -0
  12. {god_code-0.2.0 → god_code-0.2.2}/README.md +0 -0
  13. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/__init__.py +0 -0
  14. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/__init__.py +0 -0
  15. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/collision_planner.py +0 -0
  16. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/consistency_checker.py +0 -0
  17. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/dependency_graph.py +0 -0
  18. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/gdscript_linter.py +0 -0
  19. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/pattern_advisor.py +0 -0
  20. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/project.py +0 -0
  21. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/resource_validator.py +0 -0
  22. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/scene_parser.py +0 -0
  23. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/scene_writer.py +0 -0
  24. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/godot/tscn_validator.py +0 -0
  25. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/llm/__init__.py +0 -0
  26. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/llm/streaming.py +0 -0
  27. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/llm/vision.py +0 -0
  28. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/prompts/__init__.py +0 -0
  29. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/prompts/build_discipline.py +0 -0
  30. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/prompts/godot_playbook.py +0 -0
  31. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/prompts/knowledge_selector.py +0 -0
  32. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/py.typed +0 -0
  33. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/__init__.py +0 -0
  34. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/auth.py +0 -0
  35. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/config.py +0 -0
  36. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/context_manager.py +0 -0
  37. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/engine.py +0 -0
  38. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/error_loop.py +0 -0
  39. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/oauth.py +0 -0
  40. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/runtime/session.py +0 -0
  41. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/__init__.py +0 -0
  42. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/base.py +0 -0
  43. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/file_ops.py +0 -0
  44. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/git.py +0 -0
  45. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/godot_cli.py +0 -0
  46. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/list_dir.py +0 -0
  47. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/registry.py +0 -0
  48. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/screenshot.py +0 -0
  49. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/search.py +0 -0
  50. {god_code-0.2.0 → god_code-0.2.2}/godot_agent/tools/shell.py +0 -0
  51. {god_code-0.2.0 → god_code-0.2.2}/tests/__init__.py +0 -0
  52. {god_code-0.2.0 → god_code-0.2.2}/tests/godot/__init__.py +0 -0
  53. {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_collision_planner.py +0 -0
  54. {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_consistency.py +0 -0
  55. {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_dependency_graph.py +0 -0
  56. {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_linter.py +0 -0
  57. {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_pattern_advisor.py +0 -0
  58. {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_project.py +0 -0
  59. {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_resource_validator.py +0 -0
  60. {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_scene_parser.py +0 -0
  61. {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_scene_writer.py +0 -0
  62. {god_code-0.2.0 → god_code-0.2.2}/tests/godot/test_tscn_validator.py +0 -0
  63. {god_code-0.2.0 → god_code-0.2.2}/tests/llm/__init__.py +0 -0
  64. {god_code-0.2.0 → god_code-0.2.2}/tests/llm/test_client.py +0 -0
  65. {god_code-0.2.0 → god_code-0.2.2}/tests/llm/test_vision.py +0 -0
  66. {god_code-0.2.0 → god_code-0.2.2}/tests/prompts/__init__.py +0 -0
  67. {god_code-0.2.0 → god_code-0.2.2}/tests/prompts/test_knowledge_selector.py +0 -0
  68. {god_code-0.2.0 → god_code-0.2.2}/tests/prompts/test_system_prompt.py +0 -0
  69. {god_code-0.2.0 → god_code-0.2.2}/tests/runtime/__init__.py +0 -0
  70. {god_code-0.2.0 → god_code-0.2.2}/tests/runtime/test_config.py +0 -0
  71. {god_code-0.2.0 → god_code-0.2.2}/tests/runtime/test_context_manager.py +0 -0
  72. {god_code-0.2.0 → god_code-0.2.2}/tests/runtime/test_engine.py +0 -0
  73. {god_code-0.2.0 → god_code-0.2.2}/tests/runtime/test_error_loop.py +0 -0
  74. {god_code-0.2.0 → god_code-0.2.2}/tests/test_e2e.py +0 -0
  75. {god_code-0.2.0 → god_code-0.2.2}/tests/tools/__init__.py +0 -0
  76. {god_code-0.2.0 → god_code-0.2.2}/tests/tools/test_file_ops.py +0 -0
  77. {god_code-0.2.0 → god_code-0.2.2}/tests/tools/test_git.py +0 -0
  78. {god_code-0.2.0 → god_code-0.2.2}/tests/tools/test_godot_cli.py +0 -0
  79. {god_code-0.2.0 → god_code-0.2.2}/tests/tools/test_list_dir.py +0 -0
  80. {god_code-0.2.0 → god_code-0.2.2}/tests/tools/test_registry.py +0 -0
  81. {god_code-0.2.0 → god_code-0.2.2}/tests/tools/test_search.py +0 -0
  82. {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.0
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.0"
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 != _VERSION:
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
- if user_input.strip().startswith("/cd "):
413
- new_path = Path(user_input.strip()[4:]).expanduser().resolve()
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": self.config.model,
95
+ "model": model,
93
96
  "messages": [m.to_dict() for m in messages],
94
- "max_tokens": self.config.max_tokens,
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.0"
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