regcode 0.2.0__tar.gz → 0.3.0__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 (35) hide show
  1. regcode-0.3.0/.qwen/settings.json +9 -0
  2. {regcode-0.2.0 → regcode-0.3.0}/PKG-INFO +1 -1
  3. {regcode-0.2.0 → regcode-0.3.0}/pyproject.toml +1 -1
  4. {regcode-0.2.0 → regcode-0.3.0}/regcode/cli.py +5 -1
  5. {regcode-0.2.0 → regcode-0.3.0}/regcode/config.py +6 -0
  6. {regcode-0.2.0 → regcode-0.3.0}/regcode/tools/__init__.py +1 -1
  7. {regcode-0.2.0 → regcode-0.3.0}/regcode/tui.py +5 -2
  8. {regcode-0.2.0 → regcode-0.3.0}/uv.lock +1 -1
  9. {regcode-0.2.0 → regcode-0.3.0}/.gitignore +0 -0
  10. {regcode-0.2.0 → regcode-0.3.0}/.python-version +0 -0
  11. {regcode-0.2.0 → regcode-0.3.0}/AGENTS.md +0 -0
  12. {regcode-0.2.0 → regcode-0.3.0}/GOALS.md +0 -0
  13. {regcode-0.2.0 → regcode-0.3.0}/README.md +0 -0
  14. {regcode-0.2.0 → regcode-0.3.0}/config.yaml.template +0 -0
  15. {regcode-0.2.0 → regcode-0.3.0}/main.py +0 -0
  16. {regcode-0.2.0 → regcode-0.3.0}/regcode/__init__.py +0 -0
  17. {regcode-0.2.0 → regcode-0.3.0}/regcode/conversation_manager.py +0 -0
  18. {regcode-0.2.0 → regcode-0.3.0}/regcode/main.py +0 -0
  19. {regcode-0.2.0 → regcode-0.3.0}/regcode/monty_sandbox.py +0 -0
  20. {regcode-0.2.0 → regcode-0.3.0}/regcode/permissions.py +0 -0
  21. {regcode-0.2.0 → regcode-0.3.0}/regcode/sandbox.py +0 -0
  22. {regcode-0.2.0 → regcode-0.3.0}/regcode/tools/base.py +0 -0
  23. {regcode-0.2.0 → regcode-0.3.0}/regcode/tools/builtins.py +0 -0
  24. {regcode-0.2.0 → regcode-0.3.0}/regcode/tools/registry.py +0 -0
  25. {regcode-0.2.0 → regcode-0.3.0}/regcode/tools/review_notes.py +0 -0
  26. {regcode-0.2.0 → regcode-0.3.0}/tests/__init__.py +0 -0
  27. {regcode-0.2.0 → regcode-0.3.0}/tests/conftest.py +0 -0
  28. {regcode-0.2.0 → regcode-0.3.0}/tests/test_api.py +0 -0
  29. {regcode-0.2.0 → regcode-0.3.0}/tests/test_cli.py +0 -0
  30. {regcode-0.2.0 → regcode-0.3.0}/tests/test_config.py +0 -0
  31. {regcode-0.2.0 → regcode-0.3.0}/tests/test_context_manager.py +0 -0
  32. {regcode-0.2.0 → regcode-0.3.0}/tests/test_main.py +0 -0
  33. {regcode-0.2.0 → regcode-0.3.0}/tests/test_monty_sandbox.py +0 -0
  34. {regcode-0.2.0 → regcode-0.3.0}/tests/test_provider_extra.py +0 -0
  35. {regcode-0.2.0 → regcode-0.3.0}/tests/test_review_notes.py +0 -0
@@ -0,0 +1,9 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Agent(Explore)",
5
+ "Bash(uv *)"
6
+ ]
7
+ },
8
+ "$version": 4
9
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: regcode
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Minimalistic coding agent with Python API and CLI
5
5
  Requires-Python: >=3.12
6
6
  Requires-Dist: click>=8.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "regcode"
3
- version = "0.2.0"
3
+ version = "0.3.0"
4
4
  description = "Minimalistic coding agent with Python API and CLI"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -1,4 +1,5 @@
1
1
  import sys
2
+ from pathlib import Path
2
3
 
3
4
  import click
4
5
  import yaml
@@ -42,7 +43,10 @@ def cli(ctx):
42
43
  )
43
44
  def chat(model, config_path, stream, full, no_color):
44
45
  """Chat with the agent using a Textual TUI with sticky bottom bar."""
45
- config = regcode.Config.load(config_path)
46
+ # Pass None if the file doesn't exist so Config.load falls back
47
+ # to ~/.regcode/config.yaml (matching the TUI's expected behaviour).
48
+ _effective_path = config_path if Path(config_path).exists() else None
49
+ config = regcode.Config.load(_effective_path)
46
50
  if model:
47
51
  config.provider.model = model
48
52
  if full:
@@ -1,3 +1,4 @@
1
+ import logging
1
2
  import os
2
3
  from pathlib import Path
3
4
  from textwrap import dedent
@@ -40,6 +41,7 @@ default_system_prompt = dedent(
40
41
  """
41
42
  )
42
43
 
44
+ logger = logging.getLogger(__name__)
43
45
 
44
46
  class AgentConfig(BaseModel):
45
47
  model_config = ConfigDict(extra="allow")
@@ -95,8 +97,12 @@ class Config(BaseModel):
95
97
  def load(cls, path: str | None = None) -> "Config":
96
98
  # get default home dir for user first
97
99
  if path is None:
100
+ logger.warning(
101
+ "No config path provided, looking for ~/.regcode/config.yaml"
102
+ )
98
103
  alt_config_path = Path.home() / ".regcode" / "config.yaml"
99
104
  if alt_config_path.exists():
105
+ logger.warning(f"Loading from config at {alt_config_path}")
100
106
  _path = alt_config_path
101
107
  else:
102
108
  _path = Path("config.yaml")
@@ -4,7 +4,7 @@ from regcode.tools.base import BaseTool, ToolParam, ToolResult
4
4
  from regcode.tools.builtins import create_default_tools
5
5
  from regcode.tools.registry import ToolRegistry
6
6
 
7
- __version__ = "0.2.0"
7
+ __version__ = "0.3.0"
8
8
 
9
9
  __all__ = [
10
10
  "BaseTool",
@@ -8,6 +8,7 @@ Provides a clean, modern chat interface with:
8
8
 
9
9
  from __future__ import annotations
10
10
 
11
+ import logging
11
12
  import re
12
13
  import threading
13
14
 
@@ -23,6 +24,7 @@ from textual.widgets import Input, RichLog, Static
23
24
  from regcode import __version__
24
25
  from regcode.main import ToolCall
25
26
 
27
+ _logger = logging.getLogger(__name__)
26
28
 
27
29
  class ChatApp(App):
28
30
  """Textual chat app with clean modern UI."""
@@ -368,8 +370,9 @@ class ChatApp(App):
368
370
  self.call_from_thread(
369
371
  self._write_error_line, "Agent not initialized!"
370
372
  )
371
- except Exception:
372
- self.call_from_thread(self._write_error_line, "Agent error!")
373
+ except Exception as e:
374
+ _logger.exception("Agent error: %s", e)
375
+ self.call_from_thread(self._write_error_line, f"Agent error! {e}")
373
376
  finally:
374
377
  self.call_from_thread(self._finish_message)
375
378
 
@@ -1277,7 +1277,7 @@ wheels = [
1277
1277
 
1278
1278
  [[package]]
1279
1279
  name = "regcode"
1280
- version = "0.2.0"
1280
+ version = "0.3.0"
1281
1281
  source = { editable = "." }
1282
1282
  dependencies = [
1283
1283
  { name = "click" },
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