alpiecode 2.0.11__tar.gz → 2.0.12__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.
- {alpiecode-2.0.11 → alpiecode-2.0.12}/PKG-INFO +1 -1
- {alpiecode-2.0.11 → alpiecode-2.0.12}/pyproject.toml +1 -1
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/alpiecode.egg-info/PKG-INFO +1 -1
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/alpiecode.egg-info/SOURCES.txt +1 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/__init__.py +1 -1
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/executor.py +39 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/orchestrator.py +7 -2
- alpiecode-2.0.12/test/test_nested_xml_tools.py +41 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_report_convergence.py +11 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/README.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/setup.cfg +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/setup.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/alpiecode/__init__.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/alpiecode.egg-info/dependency_links.txt +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/alpiecode.egg-info/entry_points.txt +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/alpiecode.egg-info/requires.txt +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/alpiecode.egg-info/top_level.txt +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/__main__.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/agent.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/assessment.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/backends/__init__.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/backends/base.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/backends/local_backend.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/backends/openai_backend.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/blueprints.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/cache.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/capabilities.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/chat_tags.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/cli.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/client.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/compaction.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/config.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/context.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/convergence.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/diff_preview.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/discovery.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/doctor.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/dream_rsi.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/evaluation.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/execution_safety.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/git_ops.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/github.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/grounding.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/guardian.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/guardrails.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/ipython_ext.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/lifecycle.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/local_model.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/media.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/memory.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/metrics.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/onboarding.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/paths.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/progress.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/project_template.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/prompt.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/rephraser.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/server.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/session.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/accessibility-audit/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/accessibility-testing/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/accessibility-ui-components/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/agentic-workflows/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/api-design/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/architecture-design/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/backend-engineering/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/browser-automation/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/cli-development/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/cloud-infrastructure/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/code-generation/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/code-review/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/codebase-onboarding/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/cost-optimization/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/data-analysis/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/data-engineering/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/database-engineering/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/dependency-management/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/dependency-security/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/dependency-upgrades/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/devops-ci-cd/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/docker-containers/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/documentation/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/documentation-site/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/e2e-testing/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/error-handling-resilience/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/feature-development/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/frontend-engineering/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/git-workflow/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/incident-response/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/legacy-code-modernization/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/llm-application-engineering/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/localization-i18n/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/mcp-server-development/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/migration-engineering/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/mobile-development/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/model-evaluation/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/nodejs-services/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/observability/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/performance-optimization/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/privacy-data-protection/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/prompt-engineering/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/python-engineering/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/rag-retrieval/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/react-engineering/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/release-management/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/requirements-analysis/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/responsive-design/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/safe-refactoring/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/secure-coding/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/systematic-debugging/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/technical-planning/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/technical-research/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/technical-writing/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/test-engineering/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/tool-integration/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/typescript-engineering/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/visual-regression-testing/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/web-performance/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/web-security-testing/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/workflow-automation/SKILL.md +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/slash.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/subagent.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/system1.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/tools.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/updater.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/verifier.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/vision.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/vscode_installer.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/walkthrough.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_adaptive_resilience.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_chat_tags_and_offline_multimodal.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_cli_ui.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_context_and_trajectory.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_deloop_and_sessions.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_dream_rsi.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_execution_recovery.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_frontier_architecture.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_gpu_detection.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_lifecycle_and_portfolio.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_local_model_download.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_memory_optimization.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_non_thinking_and_local_stream.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_onboarding.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_project_templates.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_release_foundations.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_repair_evidence.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_security_config.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_skills_engine.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_slash_and_diff.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_subagents.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_task_assessment.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_token_economy_and_256k.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_truncation_resilience.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_verifier.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_visual_grounding.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_walkthrough.py +0 -0
- {alpiecode-2.0.11 → alpiecode-2.0.12}/test/test_web_resilience_and_guardrails.py +0 -0
|
@@ -136,6 +136,7 @@ test/test_gpu_detection.py
|
|
|
136
136
|
test/test_lifecycle_and_portfolio.py
|
|
137
137
|
test/test_local_model_download.py
|
|
138
138
|
test/test_memory_optimization.py
|
|
139
|
+
test/test_nested_xml_tools.py
|
|
139
140
|
test/test_non_thinking_and_local_stream.py
|
|
140
141
|
test/test_onboarding.py
|
|
141
142
|
test/test_project_templates.py
|
|
@@ -17,7 +17,7 @@ Supports:
|
|
|
17
17
|
from pathlib import Path
|
|
18
18
|
from typing import Optional, Any, Dict
|
|
19
19
|
|
|
20
|
-
__version__ = "2.0.
|
|
20
|
+
__version__ = "2.0.12"
|
|
21
21
|
|
|
22
22
|
def run(task: str, workdir: str = ".", reasoning_level: str = "thinking", **kwargs):
|
|
23
23
|
"""Run an autonomous coding task programmatically."""
|
|
@@ -134,6 +134,45 @@ def parse_text_tool_calls(text: str) -> List[dict]:
|
|
|
134
134
|
if tool_calls:
|
|
135
135
|
return tool_calls
|
|
136
136
|
|
|
137
|
+
# Native checkpoints may emit nested XML instead of JSON. The inner call
|
|
138
|
+
# must be complete; a missing outer </tool_call> is only a wrapper omission.
|
|
139
|
+
# Parse parameter bodies as raw text so Python comparisons and indentation
|
|
140
|
+
# survive unchanged. Never recover a partially generated edit or command.
|
|
141
|
+
from .tools import TOOLS
|
|
142
|
+
allowed_names = {tool["function"]["name"] for tool in TOOLS}
|
|
143
|
+
nested_calls = re.finditer(
|
|
144
|
+
r"<tool_call>\s*<([A-Za-z_][A-Za-z0-9_]*)>(.*?)</\1>", text, re.DOTALL
|
|
145
|
+
)
|
|
146
|
+
for call in nested_calls:
|
|
147
|
+
name, body = call.group(1), call.group(2)
|
|
148
|
+
if name not in allowed_names:
|
|
149
|
+
continue
|
|
150
|
+
args = {}
|
|
151
|
+
cursor = 0
|
|
152
|
+
valid = True
|
|
153
|
+
for param in re.finditer(r"<([A-Za-z_][A-Za-z0-9_]*)>(.*?)</\1>", body, re.DOTALL):
|
|
154
|
+
if body[cursor:param.start()].strip() or param.group(1) in args:
|
|
155
|
+
valid = False
|
|
156
|
+
break
|
|
157
|
+
key, value = param.group(1), param.group(2)
|
|
158
|
+
# Strip wrapper line breaks, not indentation inside code parameters.
|
|
159
|
+
value = value.removeprefix("\r\n").removeprefix("\n")
|
|
160
|
+
value = value.removesuffix("\r\n").removesuffix("\n")
|
|
161
|
+
if key in ("path", "command", "pattern", "name"):
|
|
162
|
+
value = value.strip()
|
|
163
|
+
if key in ("start_line", "end_line", "max_depth"):
|
|
164
|
+
try:
|
|
165
|
+
value = int(value.strip())
|
|
166
|
+
except ValueError:
|
|
167
|
+
valid = False
|
|
168
|
+
break
|
|
169
|
+
args[key] = value
|
|
170
|
+
cursor = param.end()
|
|
171
|
+
if valid and args and not body[cursor:].strip():
|
|
172
|
+
_process_item({"name": name, "arguments": args})
|
|
173
|
+
if tool_calls:
|
|
174
|
+
return tool_calls
|
|
175
|
+
|
|
137
176
|
# Some local checkpoints emit a complete self-closing XML function inside
|
|
138
177
|
# the tool wrapper. Accept only a standalone call, never prose/examples or
|
|
139
178
|
# incomplete XML. Dispatch restrictions and approval gates still apply.
|
|
@@ -999,8 +999,13 @@ class AgentOrchestrator:
|
|
|
999
999
|
|
|
1000
1000
|
# Clean any stray </think> tags from content
|
|
1001
1001
|
if resp.content and "</think>" in resp.content:
|
|
1002
|
-
|
|
1003
|
-
|
|
1002
|
+
if "<think>" in resp.content:
|
|
1003
|
+
parts = resp.content.split("</think>", 1)
|
|
1004
|
+
resp.content = parts[1].strip()
|
|
1005
|
+
else:
|
|
1006
|
+
# A stray closing tag is not a boundary for hidden reasoning.
|
|
1007
|
+
# Preserve complete tool calls that precede it.
|
|
1008
|
+
resp.content = resp.content.replace("</think>", "").strip()
|
|
1004
1009
|
|
|
1005
1010
|
# Extract tool calls immediately so resp.tool_calls is populated before saving to context
|
|
1006
1011
|
extracted_tcs = session.executor.extract_tool_calls(resp)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"""Tool format regressions from the local multimodal repair conversation."""
|
|
2
|
+
from codeagent.executor import ToolExecutor, parse_text_tool_calls
|
|
3
|
+
from codeagent.backends.base import ChatResponse
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_nested_xml_read_executes_through_shared_executor(tmp_path):
|
|
7
|
+
(tmp_path / "bigram.py").write_text("import torch\n")
|
|
8
|
+
response = ChatResponse("<tool_call>\n<read_file>\n<path>\nbigram.py\n</path>\n</read_file>", None, None)
|
|
9
|
+
executor = ToolExecutor(tmp_path)
|
|
10
|
+
calls = executor.extract_tool_calls(response)
|
|
11
|
+
assert len(calls) == 1
|
|
12
|
+
results = executor.execute_tool_calls(calls)
|
|
13
|
+
assert "import torch" in results[0].content
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def test_xml_edit_preserves_python_indentation_and_comparisons():
|
|
17
|
+
text = '''<tool_call><edit_file><path>bigram.py</path><old_str>
|
|
18
|
+
if x < 3:
|
|
19
|
+
print(x)
|
|
20
|
+
</old_str><new_str>
|
|
21
|
+
if x < 4:
|
|
22
|
+
print(x)
|
|
23
|
+
</new_str></edit_file>'''
|
|
24
|
+
call, = parse_text_tool_calls(text)
|
|
25
|
+
assert call["arguments"]["old_str"] == " if x < 3:\n print(x)"
|
|
26
|
+
assert call["arguments"]["new_str"] == " if x < 4:\n print(x)"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def test_xml_duplicate_reads_are_deduplicated():
|
|
30
|
+
call = "<tool_call><read_file><path>bigram.py</path></read_file>"
|
|
31
|
+
assert len(parse_text_tool_calls(call + call)) == 1
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def test_incomplete_xml_mutations_and_unknown_calls_are_rejected():
|
|
35
|
+
for text in (
|
|
36
|
+
"<tool_call><edit_file><path>bigram.py</path><new_str>partial",
|
|
37
|
+
"<tool_call><bash><command>python bigram.py</command>",
|
|
38
|
+
"<tool_call><unknown><path>bigram.py</path></unknown>",
|
|
39
|
+
"<tool_call><edit_file><path>x</path><new_str>partial</edit_file>",
|
|
40
|
+
):
|
|
41
|
+
assert parse_text_tool_calls(text) == []
|
|
@@ -41,6 +41,17 @@ def write_response(content, path="RESEARCH_REPORT.md"):
|
|
|
41
41
|
return ChatResponse(None, None, [ToolCall("w", "write_file", {"path": path, "content": content})])
|
|
42
42
|
|
|
43
43
|
|
|
44
|
+
@pytest.mark.parametrize("offline", [True, False])
|
|
45
|
+
def test_xml_call_before_stray_think_tag_executes(run_agent, offline):
|
|
46
|
+
xml = "<tool_call><write_file><path>output.txt</path><content>Observed evidence.</content></write_file></think>"
|
|
47
|
+
events, backend, session = run_agent([
|
|
48
|
+
ChatResponse(xml, None, None),
|
|
49
|
+
ChatResponse("DONE: output.txt contains the requested observed evidence.", None, None),
|
|
50
|
+
], task="Create output.txt", offline=offline)
|
|
51
|
+
assert (session.workdir / "output.txt").read_text() == "Observed evidence."
|
|
52
|
+
assert events[-1].data["success"]
|
|
53
|
+
|
|
54
|
+
|
|
44
55
|
@pytest.mark.parametrize("offline", [True, False])
|
|
45
56
|
def test_report_draft_expansion_then_summary_finishes(run_agent, offline):
|
|
46
57
|
summary = "The comparison report is ready. Current prices remain unverified and only sampled video frames were available."
|
|
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
|
{alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/accessibility-ui-components/SKILL.md
RENAMED
|
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
|
{alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/error-handling-resilience/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/legacy-code-modernization/SKILL.md
RENAMED
|
File without changes
|
{alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/llm-application-engineering/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/performance-optimization/SKILL.md
RENAMED
|
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
|
{alpiecode-2.0.11 → alpiecode-2.0.12}/src/codeagent/skills/visual-regression-testing/SKILL.md
RENAMED
|
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
|