regcode 0.6.1__tar.gz → 0.6.3__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.
- {regcode-0.6.1 → regcode-0.6.3}/.gitlab-ci.yml +12 -0
- {regcode-0.6.1 → regcode-0.6.3}/GOALS.md +33 -3
- {regcode-0.6.1 → regcode-0.6.3}/PKG-INFO +2 -2
- {regcode-0.6.1 → regcode-0.6.3}/pyproject.toml +2 -2
- {regcode-0.6.1 → regcode-0.6.3}/regcode/__init__.py +1 -1
- {regcode-0.6.1 → regcode-0.6.3}/regcode/main.py +322 -255
- {regcode-0.6.1 → regcode-0.6.3}/regcode/tui.py +273 -284
- {regcode-0.6.1 → regcode-0.6.3}/tests/test_osv_cve.py +98 -55
- {regcode-0.6.1 → regcode-0.6.3}/uv.lock +5 -5
- {regcode-0.6.1 → regcode-0.6.3}/.gitignore +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/.python-version +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/.qwen/settings.json +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/AGENTS.md +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/README.md +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/config.yaml.template +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/main.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/cli.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/config.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/conversation_manager.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/dependencies.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/monty_sandbox.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/permissions.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/sandbox.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/tools/__init__.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/tools/base.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/tools/builtins.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/tools/registry.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/tools/review_notes.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/tools/web_crawl.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/tools/web_search.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/regcode/tracing.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/tests/__init__.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/tests/conftest.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/tests/test_api.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/tests/test_cli.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/tests/test_config.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/tests/test_context_manager.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/tests/test_dependencies.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/tests/test_main.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/tests/test_monty_sandbox.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/tests/test_provider_extra.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/tests/test_review_notes.py +0 -0
- {regcode-0.6.1 → regcode-0.6.3}/tests/test_web_search.py +0 -0
|
@@ -41,6 +41,14 @@ build:
|
|
|
41
41
|
paths:
|
|
42
42
|
- dist/
|
|
43
43
|
expire_in: 1 week
|
|
44
|
+
rules:
|
|
45
|
+
- if: $CI_COMMIT_BRANCH == "main"
|
|
46
|
+
changes:
|
|
47
|
+
paths:
|
|
48
|
+
- "regcode/**/*"
|
|
49
|
+
- "pyproject.toml"
|
|
50
|
+
when: on_success
|
|
51
|
+
- when: never
|
|
44
52
|
|
|
45
53
|
publish:
|
|
46
54
|
stage: publish
|
|
@@ -51,5 +59,9 @@ publish:
|
|
|
51
59
|
- uv publish --token $UV_PUBLISH_TOKEN
|
|
52
60
|
rules:
|
|
53
61
|
- if: $CI_COMMIT_BRANCH == "main"
|
|
62
|
+
changes:
|
|
63
|
+
paths:
|
|
64
|
+
- "regcode/**/*"
|
|
65
|
+
- "pyproject.toml"
|
|
54
66
|
when: on_success
|
|
55
67
|
- when: never
|
|
@@ -497,7 +497,7 @@ All phases complete. 50/50 tests passing. Lint clean.
|
|
|
497
497
|
|
|
498
498
|
1. ✅ **Remove model config params from AgentConfig** — `model`, `max_tokens`, `temperature` moved from `Config.agent` to `Config.provider`. `AgentConfig` now only holds `context_window`, `compaction_threshold`, and `enable_compaction`. All tests updated to use new format.
|
|
499
499
|
|
|
500
|
-
2. ✅ **TUI complete overhaul** — `tui.py` rewritten from scratch. New layout: (1) top status bar showing `[RegCode <version>] [model] [$cost] [tokens]`, (2) large chat history area with clearly separated user/agent/tool/system message blocks, (3) bottom bar with progress indicator and input field. Streaming works correctly: text chunks stream live, then on completion full Markdown is rendered. Tool calls are interleaved after streaming text (stream buffer flushed before status rendering). Context compaction shows status indicators. All
|
|
500
|
+
2. ✅ **TUI complete overhaul** — `tui.py` rewritten from scratch. New layout: (1) top status bar showing `[RegCode <version>] [model] [$cost] [tokens]`, (2) large chat history area with RichLog widget and clearly separated user/agent/tool/system message blocks, (3) bottom bar with progress indicator and input field. Streaming works correctly: text chunks stream live, then on completion full Markdown is rendered. Tool calls are interleaved after streaming text (stream buffer flushed before status rendering). Context compaction shows status indicators. RichLog renders Rich markup for colors; text selection is available via terminal scrollback. All 164 tests pass, lint clean.
|
|
501
501
|
|
|
502
502
|
3. ✅ **WebSearchTool** — New `regcode/tools/web_search.py` tool connecting to SearXNG instances. Defaults to `https://search.regmi.dev`, supports custom SearXNG URL, language code, and result count (1-20). Uses only stdlib `urllib` — no extra dependencies. Registered in `create_default_tools()`. 15 tests pass.
|
|
503
503
|
|
|
@@ -505,5 +505,35 @@ All phases complete. 50/50 tests passing. Lint clean.
|
|
|
505
505
|
|
|
506
506
|
- ✅ WebSearchTool: connects to SearXNG, defaults to https://search.regmi.dev, no extra deps needed
|
|
507
507
|
|
|
508
|
-
##
|
|
509
|
-
|
|
508
|
+
## Completed (2026-06-30 — TUI fixes)
|
|
509
|
+
|
|
510
|
+
1. ✅ AGENTS.md injection — Agent now reads AGENTS.md/agents.md from CWD or allowed directory and injects it into system prompt (both `_build_system_prompt` and `_build_system_prompt_no_tools`). Appended after base system_prompt, before tool descriptions.
|
|
511
|
+
|
|
512
|
+
2. ✅ TUI text selectability — Replaced RichLog with TextArea for the chat area. TextArea is the only Textual widget with real text selection and copy support (`action_copy`, `action_select_all`, `selected_text`). All write paths use `_append_text()` which converts Rich markup to ANSI escape codes via Rich's `Console.print()`, so text displays with colors AND remains selectable/copyable.
|
|
513
|
+
|
|
514
|
+
3. ✅ Context window config — Hardcoded `_context_window: int = 128000` replaced with 0 default, with fallback chain in `_update_progress()`: `_context_window` → `self._agent.config.agent.context_window` → 128000.
|
|
515
|
+
|
|
516
|
+
4. ✅ Hardcoded context window — Fixed `_update_progress()` to check `self._agent.config.agent.context_window` before falling back to 128000.
|
|
517
|
+
|
|
518
|
+
## Completed (2026-06-30 — TUI overhaul)
|
|
519
|
+
|
|
520
|
+
- ✅ `tui.py` rewritten: 3-zone layout (status bar, chat area, input bar). Chat area uses TextArea (selectable/copyable) instead of RichLog. All Rich markup tags are stripped before insertion so text is readable. Agent runs in background thread, callbacks use `call_from_thread`.
|
|
521
|
+
- ✅ All 164 tests pass, lint clean.
|
|
522
|
+
|
|
523
|
+
## Completed (2026-06-30 — TUI cleanup)
|
|
524
|
+
|
|
525
|
+
1. ✅ **Added `textual>=2.0.0` dependency** — was imported but missing from `pyproject.toml`.
|
|
526
|
+
2. ✅ **Replaced top-bar `TextArea` with `Label`** — the status bar only displays plain text; Label is lighter-weight and semantically correct. Same for progress bar widget.
|
|
527
|
+
3. ✅ **Simplified streaming state machine** — reduced from 7 state variables (`_streaming`, `_streaming_started`, `_stream_pending`, `_stream_has_label`, `_stream_line_open`, `_stream_trim_leading`, `_current_response`) and 5 flushing methods down to 2 (`_streaming`, `_current_response`) and 1 flush method (`_flush_stream_for_status`). The old code buffered partial lines with complex state tracking; the new approach simply accumulates chunks in `_current_response` and flushes them as a single block when needed.
|
|
528
|
+
4. ✅ **Optimized `_rich_to_ansi`** — replaced per-call `Console()` instantiation with a cached `_rich_console` instance created once in `__init__`, eliminating redundant object allocation on every text write.
|
|
529
|
+
5. ✅ **All 164 tests pass**, lint clean.
|
|
530
|
+
|
|
531
|
+
## Completed (2026-06-30 — TUI rewrite)
|
|
532
|
+
|
|
533
|
+
Complete rewrite of `tui.py` from scratch using Textual's `RichLog` widget instead of `TextArea`:
|
|
534
|
+
|
|
535
|
+
1. ✅ **`RichLog` instead of `TextArea`** — RichLog natively renders Rich markup (`[bold]`, `[dim]`, etc.) so no fragile Rich→ANSI conversion is needed. Users see properly colored, styled text. RichLog also supports scrollback selection/copy via terminal features.
|
|
536
|
+
2. ✅ **Clean Catppuccin Mocha dark theme** — uses the Catppuccin color palette (`#1e1e2e` background, `#cdd6f4` text, `#313244` surfaces, `#89b4fa` accents) for a modern, polished look.
|
|
537
|
+
3. ✅ **Proper three-zone layout** — status bar (version | model | cost | tokens), scrollable chat history, bottom input bar with progress indicator. No raw markup tags visible.
|
|
538
|
+
4. ✅ **Same backward-compatible API** — `ChatUI` facade, `ChatApp` class, `_ColorFormatter`, all callback methods (`handle_status`, `handle_result`, `handle_cost`, `print_text_chunk`, etc.) preserved exactly as before for CLI integration.
|
|
539
|
+
5. ✅ **All 164 tests pass**, lint clean.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: regcode
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.3
|
|
4
4
|
Summary: Minimalistic coding agent with Python API and CLI
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Requires-Dist: click>=8.0
|
|
@@ -12,7 +12,7 @@ Requires-Dist: pydantic-settings>=2.14.2
|
|
|
12
12
|
Requires-Dist: pytest>=8.0
|
|
13
13
|
Requires-Dist: pyyaml>=6.0
|
|
14
14
|
Requires-Dist: ruff>=0.8
|
|
15
|
-
Requires-Dist: textual>=
|
|
15
|
+
Requires-Dist: textual>=2.0.0
|
|
16
16
|
Provides-Extra: dev
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "regcode"
|
|
3
|
-
version = "0.6.
|
|
3
|
+
version = "0.6.3"
|
|
4
4
|
description = "Minimalistic coding agent with Python API and CLI"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -13,8 +13,8 @@ dependencies = [
|
|
|
13
13
|
"pytest>=8.0",
|
|
14
14
|
"ruff>=0.8",
|
|
15
15
|
"pydantic-monty>=0.0.18",
|
|
16
|
-
"textual>=8.2.7",
|
|
17
16
|
"mlflow>=3.14.0",
|
|
17
|
+
"textual>=2.0.0",
|
|
18
18
|
]
|
|
19
19
|
|
|
20
20
|
[project.scripts]
|