mini-swe-agent 1.16.0__py3-none-any.whl → 1.17.0__py3-none-any.whl
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.
- {mini_swe_agent-1.16.0.dist-info → mini_swe_agent-1.17.0.dist-info}/METADATA +1 -1
- {mini_swe_agent-1.16.0.dist-info → mini_swe_agent-1.17.0.dist-info}/RECORD +8 -8
- minisweagent/__init__.py +1 -1
- minisweagent/agents/default.py +5 -6
- {mini_swe_agent-1.16.0.dist-info → mini_swe_agent-1.17.0.dist-info}/WHEEL +0 -0
- {mini_swe_agent-1.16.0.dist-info → mini_swe_agent-1.17.0.dist-info}/entry_points.txt +0 -0
- {mini_swe_agent-1.16.0.dist-info → mini_swe_agent-1.17.0.dist-info}/licenses/LICENSE.md +0 -0
- {mini_swe_agent-1.16.0.dist-info → mini_swe_agent-1.17.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mini-swe-agent
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.17.0
|
|
4
4
|
Summary: Nano SWE Agent - A simple AI software engineering agent
|
|
5
5
|
Author-email: Kilian Lieret <kilian.lieret@posteo.de>, "Carlos E. Jimenez" <carlosej@princeton.edu>
|
|
6
6
|
License: MIT License
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
mini_swe_agent-1.
|
|
2
|
-
minisweagent/__init__.py,sha256=
|
|
1
|
+
mini_swe_agent-1.17.0.dist-info/licenses/LICENSE.md,sha256=D3luWPkdHAe7LBsdD4vzqDAXw6Xewb3G-uczss0uh1s,1094
|
|
2
|
+
minisweagent/__init__.py,sha256=tEnWAHcxFqNTVuv6G73e1YvEsTIPmiInXGGvSnXEcVw,2016
|
|
3
3
|
minisweagent/__main__.py,sha256=FIyAOiw--c3FQ2g240FOM1FdL0lk_PxSpixu0pQ7WFo,194
|
|
4
4
|
minisweagent/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
minisweagent/agents/__init__.py,sha256=cpjJLzg1IGxLM-tZpoMJV9S33ye13XtdBO0x7DU_Lrk,48
|
|
6
|
-
minisweagent/agents/default.py,sha256=
|
|
6
|
+
minisweagent/agents/default.py,sha256=6XQEf4bawQL-J2r4ClsDsO_1uQ-VM7WrW3hGaHxKcQE,5657
|
|
7
7
|
minisweagent/agents/interactive.py,sha256=NBeNamRuqww9ZRhOg1q8xPO9ziUw2gpAVV6hCPbpBxU,7470
|
|
8
8
|
minisweagent/agents/interactive_textual.py,sha256=yUDMkuvhhnZAP8LtiBWmt5J5WzfWBeR0zNlJbdbEGa0,18153
|
|
9
9
|
minisweagent/config/README.md,sha256=ABd9anA4aRWtx7Oh37z36Wv6ARvcxD2w9lPUE24R2mY,435
|
|
@@ -55,8 +55,8 @@ minisweagent/run/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
55
55
|
minisweagent/run/utils/save.py,sha256=bokvblZ1SaIvCXimkRQqgvERKmVM0jn8SF7UoHBeerQ,2546
|
|
56
56
|
minisweagent/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
57
|
minisweagent/utils/log.py,sha256=ruDMNKMrVC9NPvCeHwO3QYz5jsVNUGQB2dRAEAPAWp8,996
|
|
58
|
-
mini_swe_agent-1.
|
|
59
|
-
mini_swe_agent-1.
|
|
60
|
-
mini_swe_agent-1.
|
|
61
|
-
mini_swe_agent-1.
|
|
62
|
-
mini_swe_agent-1.
|
|
58
|
+
mini_swe_agent-1.17.0.dist-info/METADATA,sha256=Rbjq535rsiT5FfY89a1SydrveyAD8Sr9JUWaQMAUw9Y,14851
|
|
59
|
+
mini_swe_agent-1.17.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
60
|
+
mini_swe_agent-1.17.0.dist-info/entry_points.txt,sha256=d1_yRbTaGjs1UXHa6JQK0sKDGBIVGm8oeW0k2kfbJgQ,182
|
|
61
|
+
mini_swe_agent-1.17.0.dist-info/top_level.txt,sha256=zKF4t8bFpV87fdVABZt2Da-vnb4Vkh_CxkwQx5YT4Ew,13
|
|
62
|
+
mini_swe_agent-1.17.0.dist-info/RECORD,,
|
minisweagent/__init__.py
CHANGED
minisweagent/agents/default.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import re
|
|
4
4
|
import subprocess
|
|
5
|
+
import time
|
|
5
6
|
from dataclasses import asdict, dataclass
|
|
6
7
|
|
|
7
8
|
from jinja2 import StrictUndefined, Template
|
|
@@ -68,7 +69,7 @@ class DefaultAgent:
|
|
|
68
69
|
)
|
|
69
70
|
|
|
70
71
|
def add_message(self, role: str, content: str, **kwargs):
|
|
71
|
-
self.messages.append({"role": role, "content": content, **kwargs})
|
|
72
|
+
self.messages.append({"role": role, "content": content, "timestamp": time.time(), **kwargs})
|
|
72
73
|
|
|
73
74
|
def run(self, task: str, **kwargs) -> tuple[str, str]:
|
|
74
75
|
"""Run step() until agent is finished. Return exit status & message"""
|
|
@@ -114,15 +115,13 @@ class DefaultAgent:
|
|
|
114
115
|
def execute_action(self, action: dict) -> dict:
|
|
115
116
|
try:
|
|
116
117
|
output = self.env.execute(action["action"])
|
|
117
|
-
except subprocess.TimeoutExpired as e:
|
|
118
|
-
output = e.output.decode("utf-8", errors="replace") if e
|
|
118
|
+
except (TimeoutError, subprocess.TimeoutExpired) as e:
|
|
119
|
+
output = e.output.decode("utf-8", errors="replace") if getattr(e, "output", None) else ""
|
|
119
120
|
raise ExecutionTimeoutError(
|
|
120
121
|
self.render_template(self.config.timeout_template, action=action, output=output)
|
|
121
122
|
)
|
|
122
|
-
except TimeoutError:
|
|
123
|
-
raise ExecutionTimeoutError(self.render_template(self.config.timeout_template, action=action, output=""))
|
|
124
123
|
self.has_finished(output)
|
|
125
|
-
return output
|
|
124
|
+
return output | {"action": action["action"]}
|
|
126
125
|
|
|
127
126
|
def has_finished(self, output: dict[str, str]):
|
|
128
127
|
"""Raises Submitted exception with final output if the agent has finished its task."""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|