nimcode 0.8.4__tar.gz → 0.8.7__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.
- {nimcode-0.8.4 → nimcode-0.8.7}/PKG-INFO +9 -7
- {nimcode-0.8.4 → nimcode-0.8.7}/README.md +8 -6
- nimcode-0.8.7/src/nimcode/__version__.py +1 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/agent.py +4 -2
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/agents/qa_agent.py +1 -1
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/cli.py +1 -1
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/config.py +1 -1
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/model_registry.py +1 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/nim_client.py +1 -1
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/tools.py +4 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode.egg-info/PKG-INFO +9 -7
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_config.py +2 -2
- nimcode-0.8.4/src/nimcode/__version__.py +0 -1
- {nimcode-0.8.4 → nimcode-0.8.7}/setup.cfg +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/setup.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/__init__.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/agents/__init__.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/lenient_parser.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/mcp_client.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/memory.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/permissions.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/plugin_manager.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/rag.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/repl.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/repo_map.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/task_manager.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/updater.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode/watcher.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode.egg-info/SOURCES.txt +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode.egg-info/dependency_links.txt +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode.egg-info/entry_points.txt +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode.egg-info/requires.txt +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/src/nimcode.egg-info/top_level.txt +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_advanced_blockers.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_agent.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_bash_blockers.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_cli.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_lazy_blockers.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_lenient_parser.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_mcp_client.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_memory.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_model_registry.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_nim_client.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_permissions.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_plan_injection.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_plugin_manager.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_qa_agent.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_repl.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_repl_extra.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_repl_fixes.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_repl_trust.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_repo_map.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_task_manager.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_tools.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_updater.py +0 -0
- {nimcode-0.8.4 → nimcode-0.8.7}/tests/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nimcode
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.7
|
|
4
4
|
Summary: A standalone, robust coding agent for NVIDIA NIM models.
|
|
5
5
|
Home-page: https://github.com/Batunash/nimcode
|
|
6
6
|
Author: Autonomous Agent
|
|
@@ -193,12 +193,14 @@ NimCode's behavior can be fully customized through `~/.nimcode/settings.json` (g
|
|
|
193
193
|
|
|
194
194
|
## 📋 Changelog
|
|
195
195
|
|
|
196
|
-
### v0.8.
|
|
197
|
-
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
-
|
|
201
|
-
- 🧪 **
|
|
196
|
+
### v0.8.6 (Latest)
|
|
197
|
+
- 🚀 **Default Model Bump**: Made `deepseek-ai/deepseek-v4-pro` the default model across the entire agent for superior reasoning and tool performance.
|
|
198
|
+
|
|
199
|
+
### v0.8.4
|
|
200
|
+
- 🧠 **Native DeepSeek XML Support**: Re-engineered the internal parser (`lenient_parser.py`) into a hybrid parser that seamlessly handles both strict JSON (`<tool_call>`) and fine-tuned XML formats (`<tool_call name=\"...\">`). DeepSeek V4 Pro, Mistral Large 2, and others now work flawlessly out of the box!
|
|
201
|
+
- 🧪 **224 tests passing**
|
|
202
|
+
|
|
203
|
+
### v0.8.0
|
|
202
204
|
|
|
203
205
|
### v0.7.0
|
|
204
206
|
- 🛡️ **Strict Markdown Validator**: `/plan` mode now physically blocks tasks that are under 150 characters or missing required Markdown headers (`Target Files`, `Implementation Details`, `Checklist`).
|
|
@@ -172,12 +172,14 @@ NimCode's behavior can be fully customized through `~/.nimcode/settings.json` (g
|
|
|
172
172
|
|
|
173
173
|
## 📋 Changelog
|
|
174
174
|
|
|
175
|
-
### v0.8.
|
|
176
|
-
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
-
|
|
180
|
-
- 🧪 **
|
|
175
|
+
### v0.8.6 (Latest)
|
|
176
|
+
- 🚀 **Default Model Bump**: Made `deepseek-ai/deepseek-v4-pro` the default model across the entire agent for superior reasoning and tool performance.
|
|
177
|
+
|
|
178
|
+
### v0.8.4
|
|
179
|
+
- 🧠 **Native DeepSeek XML Support**: Re-engineered the internal parser (`lenient_parser.py`) into a hybrid parser that seamlessly handles both strict JSON (`<tool_call>`) and fine-tuned XML formats (`<tool_call name=\"...\">`). DeepSeek V4 Pro, Mistral Large 2, and others now work flawlessly out of the box!
|
|
180
|
+
- 🧪 **224 tests passing**
|
|
181
|
+
|
|
182
|
+
### v0.8.0
|
|
181
183
|
|
|
182
184
|
### v0.7.0
|
|
183
185
|
- 🛡️ **Strict Markdown Validator**: `/plan` mode now physically blocks tasks that are under 150 characters or missing required Markdown headers (`Target Files`, `Implementation Details`, `Checklist`).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.8.7"
|
|
@@ -188,7 +188,7 @@ class Agent:
|
|
|
188
188
|
def __init__(self, api_key: str, model: str = None, max_turns: int = None, permission_mode: PermissionMode = PermissionMode.DEFAULT, max_tokens: int = None):
|
|
189
189
|
# Load global settings
|
|
190
190
|
self.settings = load_settings()
|
|
191
|
-
self.model = model or self.settings.get("model", "
|
|
191
|
+
self.model = model or self.settings.get("model", "deepseek-ai/deepseek-v4-pro")
|
|
192
192
|
api_base_url = self.settings.get("api_base_url", "https://integrate.api.nvidia.com/v1")
|
|
193
193
|
self.client = NimClient(
|
|
194
194
|
api_key=api_key,
|
|
@@ -277,7 +277,9 @@ class Agent:
|
|
|
277
277
|
self.max_turns = max_turns if max_turns is not None else (0 if cfg_max_turns == 0 else cfg_max_turns)
|
|
278
278
|
|
|
279
279
|
cfg_max_tokens = self.settings.get("max_tokens", 120000)
|
|
280
|
-
|
|
280
|
+
from .model_registry import get_context_window
|
|
281
|
+
model_limit = get_context_window(self.model)
|
|
282
|
+
effective_max_tokens = max_tokens if max_tokens is not None else min(cfg_max_tokens, model_limit)
|
|
281
283
|
self.memory = MemoryManager(max_tokens=effective_max_tokens)
|
|
282
284
|
|
|
283
285
|
self.permission_engine = PermissionEngine(mode=permission_mode)
|
|
@@ -19,7 +19,7 @@ class QAAgent:
|
|
|
19
19
|
import json
|
|
20
20
|
settings_path = os.path.join(self.cwd, ".nimcode", "settings.json")
|
|
21
21
|
api_key = os.environ.get("NVIDIA_API_KEY")
|
|
22
|
-
model = "
|
|
22
|
+
model = "deepseek-ai/deepseek-v4-pro"
|
|
23
23
|
if os.path.exists(settings_path):
|
|
24
24
|
try:
|
|
25
25
|
with open(settings_path, "r") as f:
|
|
@@ -101,7 +101,7 @@ def main():
|
|
|
101
101
|
# Main CLI arguments
|
|
102
102
|
parser.add_argument("prompt", nargs="?", default=None, help="The task you want NimCode to accomplish. If omitted, starts interactive REPL.")
|
|
103
103
|
parser.add_argument("--api-key", "-k", default=None, help="NVIDIA NIM API Key. Can also be set via NIM_API_KEY environment variable.")
|
|
104
|
-
parser.add_argument("--model", "-m", default="
|
|
104
|
+
parser.add_argument("--model", "-m", default="deepseek-ai/deepseek-v4-pro", help="Model ID to use from NIM.")
|
|
105
105
|
parser.add_argument("--max-turns", "-t", type=int, default=None, help="Maximum number of turns the agent is allowed to run. If omitted, uses settings.json max_turns (default 200; 0 = unlimited).")
|
|
106
106
|
parser.add_argument("--permission-mode", "-p", type=PermissionMode, choices=list(PermissionMode), default=PermissionMode.DEFAULT, help="Permission mode for mutating tools.")
|
|
107
107
|
parser.add_argument("--resume", "-r", action="store_true", help="Resume from the last session stored in .nimcode/sessions/session.json.")
|
|
@@ -8,7 +8,7 @@ logger = logging.getLogger(__name__)
|
|
|
8
8
|
def load_settings() -> Dict[str, Any]:
|
|
9
9
|
"""Loads configuration from ~/.nimcode/settings.json and .nimcode/settings.json"""
|
|
10
10
|
settings = {
|
|
11
|
-
"model": "
|
|
11
|
+
"model": "deepseek-ai/deepseek-v4-pro",
|
|
12
12
|
"api_base_url": "https://integrate.api.nvidia.com/v1",
|
|
13
13
|
"mcp_servers": {},
|
|
14
14
|
# Timeouts (0 = disabled/infinite)
|
|
@@ -8,7 +8,7 @@ from typing import List, Dict, Any, Optional, AsyncGenerator
|
|
|
8
8
|
logger = logging.getLogger(__name__)
|
|
9
9
|
|
|
10
10
|
class NimClient:
|
|
11
|
-
def __init__(self, api_key: str, base_url: str = "https://integrate.api.nvidia.com/v1", model: str = "
|
|
11
|
+
def __init__(self, api_key: str, base_url: str = "https://integrate.api.nvidia.com/v1", model: str = "deepseek-ai/deepseek-v4-pro", timeout: float = 120.0, max_retries: int = 15, retry_base_delay: float = 2.0, retry_max_delay: float = 60.0):
|
|
12
12
|
self.api_key = api_key
|
|
13
13
|
self.base_url = base_url.rstrip("/")
|
|
14
14
|
self.model = model
|
|
@@ -306,6 +306,8 @@ class ToolRegistry:
|
|
|
306
306
|
|
|
307
307
|
@staticmethod
|
|
308
308
|
def _check_lazy_code(content: str, file_path: str):
|
|
309
|
+
if file_path.lower().endswith(('.md', '.txt', '.json', '.yaml', '.yml', '.csv', '.ini', '.toml')):
|
|
310
|
+
return
|
|
309
311
|
import re
|
|
310
312
|
# Broad regex for // TO DO, // TODO, # TODO, // FIXME, etc. with flexible spaces
|
|
311
313
|
if re.search(r'(?i)(?://|#)\s*(?:to\s*do|fix\s*me)', content):
|
|
@@ -680,6 +682,8 @@ class ToolRegistry:
|
|
|
680
682
|
|
|
681
683
|
@staticmethod
|
|
682
684
|
def _check_dependency_hallucination(content: str, file_path: str, cwd: str):
|
|
685
|
+
if file_path.lower().endswith(('.md', '.txt', '.json', '.yaml', '.yml', '.csv', '.ini', '.toml')):
|
|
686
|
+
return
|
|
683
687
|
import re
|
|
684
688
|
pass
|
|
685
689
|
import json
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nimcode
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.7
|
|
4
4
|
Summary: A standalone, robust coding agent for NVIDIA NIM models.
|
|
5
5
|
Home-page: https://github.com/Batunash/nimcode
|
|
6
6
|
Author: Autonomous Agent
|
|
@@ -193,12 +193,14 @@ NimCode's behavior can be fully customized through `~/.nimcode/settings.json` (g
|
|
|
193
193
|
|
|
194
194
|
## 📋 Changelog
|
|
195
195
|
|
|
196
|
-
### v0.8.
|
|
197
|
-
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
-
|
|
201
|
-
- 🧪 **
|
|
196
|
+
### v0.8.6 (Latest)
|
|
197
|
+
- 🚀 **Default Model Bump**: Made `deepseek-ai/deepseek-v4-pro` the default model across the entire agent for superior reasoning and tool performance.
|
|
198
|
+
|
|
199
|
+
### v0.8.4
|
|
200
|
+
- 🧠 **Native DeepSeek XML Support**: Re-engineered the internal parser (`lenient_parser.py`) into a hybrid parser that seamlessly handles both strict JSON (`<tool_call>`) and fine-tuned XML formats (`<tool_call name=\"...\">`). DeepSeek V4 Pro, Mistral Large 2, and others now work flawlessly out of the box!
|
|
201
|
+
- 🧪 **224 tests passing**
|
|
202
|
+
|
|
203
|
+
### v0.8.0
|
|
202
204
|
|
|
203
205
|
### v0.7.0
|
|
204
206
|
- 🛡️ **Strict Markdown Validator**: `/plan` mode now physically blocks tasks that are under 150 characters or missing required Markdown headers (`Target Files`, `Implementation Details`, `Checklist`).
|
|
@@ -7,7 +7,7 @@ from nimcode.config import load_settings, save_global_setting
|
|
|
7
7
|
def test_load_settings_default():
|
|
8
8
|
with patch("os.path.exists", return_value=False):
|
|
9
9
|
settings = load_settings()
|
|
10
|
-
assert settings["model"] == "
|
|
10
|
+
assert settings["model"] == "deepseek-ai/deepseek-v4-pro"
|
|
11
11
|
assert settings["mcp_servers"] == {}
|
|
12
12
|
# New configurable settings
|
|
13
13
|
assert settings["max_turns"] == 200
|
|
@@ -74,4 +74,4 @@ def test_load_settings_error_handling():
|
|
|
74
74
|
with patch("os.path.exists", return_value=True):
|
|
75
75
|
with patch("builtins.open", side_effect=Exception("Read error")):
|
|
76
76
|
settings = load_settings()
|
|
77
|
-
assert settings["model"] == "
|
|
77
|
+
assert settings["model"] == "deepseek-ai/deepseek-v4-pro"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.8.4"
|
|
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
|