mini-swe-agent 1.11.0__py3-none-any.whl → 1.12.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.11.0.dist-info → mini_swe_agent-1.12.0.dist-info}/METADATA +5 -3
- {mini_swe_agent-1.11.0.dist-info → mini_swe_agent-1.12.0.dist-info}/RECORD +15 -15
- minisweagent/__init__.py +1 -1
- minisweagent/agents/default.py +1 -1
- minisweagent/environments/docker.py +2 -2
- minisweagent/environments/extra/bubblewrap.py +2 -2
- minisweagent/environments/extra/swerex_docker.py +2 -2
- minisweagent/environments/local.py +2 -2
- minisweagent/environments/singularity.py +2 -2
- minisweagent/models/litellm_model.py +3 -3
- minisweagent/models/openrouter_model.py +1 -1
- {mini_swe_agent-1.11.0.dist-info → mini_swe_agent-1.12.0.dist-info}/WHEEL +0 -0
- {mini_swe_agent-1.11.0.dist-info → mini_swe_agent-1.12.0.dist-info}/entry_points.txt +0 -0
- {mini_swe_agent-1.11.0.dist-info → mini_swe_agent-1.12.0.dist-info}/licenses/LICENSE.md +0 -0
- {mini_swe_agent-1.11.0.dist-info → mini_swe_agent-1.12.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.12.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
|
|
@@ -237,7 +237,8 @@ agent.run("Write a sudoku game")
|
|
|
237
237
|
* [Quick start](https://mini-swe-agent.com/latest/quickstart/)
|
|
238
238
|
* [`mini`](https://mini-swe-agent.com/latest/usage/mini/)
|
|
239
239
|
* [FAQ](https://mini-swe-agent.com/latest/faq/)
|
|
240
|
-
* [
|
|
240
|
+
* [Global configuration](https://mini-swe-agent.com/latest/advanced/global_configuration/)
|
|
241
|
+
* [Yaml configuration files](https://mini-swe-agent.com/latest/advanced/yaml_configuration/)
|
|
241
242
|
* [Power up](https://mini-swe-agent.com/latest/advanced/cookbook/)
|
|
242
243
|
|
|
243
244
|
</td>
|
|
@@ -273,7 +274,8 @@ Read more in our [documentation](https://mini-swe-agent.com/latest/):
|
|
|
273
274
|
|
|
274
275
|
* [Quick start guide](https://mini-swe-agent.com/latest/quickstart/)
|
|
275
276
|
* More on [`mini`](https://mini-swe-agent.com/latest/usage/mini/) and [`mini -v`](https://mini-swe-agent.com/latest/usage/mini_v/)
|
|
276
|
-
* [
|
|
277
|
+
* [Global configuration](https://mini-swe-agent.com/latest/advanced/global_configuration/)
|
|
278
|
+
* [Yaml configuration files](https://mini-swe-agent.com/latest/advanced/yaml_configuration/)
|
|
277
279
|
* [Power up with the cookbook](https://mini-swe-agent.com/latest/advanced/cookbook/)
|
|
278
280
|
* [FAQ](https://mini-swe-agent.com/latest/faq/)
|
|
279
281
|
* [Contribute!](https://mini-swe-agent.com/latest/contributing/)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
mini_swe_agent-1.
|
|
2
|
-
minisweagent/__init__.py,sha256=
|
|
1
|
+
mini_swe_agent-1.12.0.dist-info/licenses/LICENSE.md,sha256=D3luWPkdHAe7LBsdD4vzqDAXw6Xewb3G-uczss0uh1s,1094
|
|
2
|
+
minisweagent/__init__.py,sha256=Pz8DDlFm1wJkbLSGvLgg4ejkc-R413muhKqEuhSN4r8,2014
|
|
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=9YG6s8Ea6RLq2cAv7hjERCR8B2vtuwh94EcmWezDyZw,5693
|
|
7
7
|
minisweagent/agents/interactive.py,sha256=NBeNamRuqww9ZRhOg1q8xPO9ziUw2gpAVV6hCPbpBxU,7470
|
|
8
8
|
minisweagent/agents/interactive_textual.py,sha256=9RAJ-gUVVNL2qEq_HT2UcwJJorrSlp6WYoRwOgoCngI,18054
|
|
9
9
|
minisweagent/config/README.md,sha256=ABd9anA4aRWtx7Oh37z36Wv6ARvcxD2w9lPUE24R2mY,435
|
|
@@ -17,16 +17,16 @@ minisweagent/config/extra/__init__.py,sha256=e1MoAlDn_wc9HnXNoncf1P-B4DQ-iRf6n7Q
|
|
|
17
17
|
minisweagent/config/extra/swebench.yaml,sha256=2LzqIM60eYqZZhB0U1q9e6fBiL1MvHvSUF63xI5U6kE,7738
|
|
18
18
|
minisweagent/config/extra/swebench_roulette.yaml,sha256=in235myH4BCJ8fyGtXuTlv16Ky3JTytV4H9-wvd-iTM,7801
|
|
19
19
|
minisweagent/environments/__init__.py,sha256=x80Ulx0UK21GAwg5jSTkOFeiZ7CQsGBP8cI_5BhazAo,1266
|
|
20
|
-
minisweagent/environments/docker.py,sha256=
|
|
21
|
-
minisweagent/environments/local.py,sha256=
|
|
22
|
-
minisweagent/environments/singularity.py,sha256=
|
|
20
|
+
minisweagent/environments/docker.py,sha256=Gq-0asaNPpEDtKtzddScPkRVgBQCdR-qhifRbzbFHSA,4323
|
|
21
|
+
minisweagent/environments/local.py,sha256=sOM-8Hc-bmGW6NEMebKz47vFR2Nb0xqvm1Daj6A_mPY,1278
|
|
22
|
+
minisweagent/environments/singularity.py,sha256=HSwRTWef7cMCgBiGAh5DIrxW8HkZ9C9ZGtwn0ktD_cw,3675
|
|
23
23
|
minisweagent/environments/extra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
|
-
minisweagent/environments/extra/bubblewrap.py,sha256=
|
|
25
|
-
minisweagent/environments/extra/swerex_docker.py,sha256=
|
|
24
|
+
minisweagent/environments/extra/bubblewrap.py,sha256=G12Dm63N30qByfLb1SKNsI4G4gLyKBfomnOIsPqRNZk,3662
|
|
25
|
+
minisweagent/environments/extra/swerex_docker.py,sha256=WPYbohT_vqTHkde9cxpbV6chLXCpLl0PDAcgMbZsV0M,1707
|
|
26
26
|
minisweagent/models/__init__.py,sha256=Boq3-r9eo4ptqnADMxAwtfevq9TmmE75mxSK5rS4ij0,4016
|
|
27
27
|
minisweagent/models/anthropic.py,sha256=D8nHvvbgzPjla0He8p0O9kaXASPWg1Sai0pHsAj_Yn8,855
|
|
28
|
-
minisweagent/models/litellm_model.py,sha256=
|
|
29
|
-
minisweagent/models/openrouter_model.py,sha256=
|
|
28
|
+
minisweagent/models/litellm_model.py,sha256=RSvNzK6ksOOcTEY-kM36KJql9-iSH29kq0cKYXj2mxE,3034
|
|
29
|
+
minisweagent/models/openrouter_model.py,sha256=ugI3322pyUQ8wBOuMysPoKlp0oRAmR38a6GcdjE6qHI,3748
|
|
30
30
|
minisweagent/models/test_models.py,sha256=ItCA6ddntzkYA7dzSuUEaLMV-AE8TBuXBFP8CzpiO3U,1351
|
|
31
31
|
minisweagent/models/extra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
minisweagent/models/extra/roulette.py,sha256=SqLj_wz9Vkbxou7i9Ef4Uzmg_eheDouNySkkV7pm2Ys,2093
|
|
@@ -49,8 +49,8 @@ minisweagent/run/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
49
49
|
minisweagent/run/utils/save.py,sha256=2xd-UnUzI7Fr_AUZ5KEJ53Aa4kpuuGYxkLwyUcvqyMM,2503
|
|
50
50
|
minisweagent/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
51
|
minisweagent/utils/log.py,sha256=ruDMNKMrVC9NPvCeHwO3QYz5jsVNUGQB2dRAEAPAWp8,996
|
|
52
|
-
mini_swe_agent-1.
|
|
53
|
-
mini_swe_agent-1.
|
|
54
|
-
mini_swe_agent-1.
|
|
55
|
-
mini_swe_agent-1.
|
|
56
|
-
mini_swe_agent-1.
|
|
52
|
+
mini_swe_agent-1.12.0.dist-info/METADATA,sha256=_Om37mtSfMAUudlH9y90u1qXd4JfNlaCPheYJIl4dOM,14102
|
|
53
|
+
mini_swe_agent-1.12.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
54
|
+
mini_swe_agent-1.12.0.dist-info/entry_points.txt,sha256=d1_yRbTaGjs1UXHa6JQK0sKDGBIVGm8oeW0k2kfbJgQ,182
|
|
55
|
+
mini_swe_agent-1.12.0.dist-info/top_level.txt,sha256=zKF4t8bFpV87fdVABZt2Da-vnb4Vkh_CxkwQx5YT4Ew,13
|
|
56
|
+
mini_swe_agent-1.12.0.dist-info/RECORD,,
|
minisweagent/__init__.py
CHANGED
minisweagent/agents/default.py
CHANGED
|
@@ -106,7 +106,7 @@ class DefaultAgent:
|
|
|
106
106
|
|
|
107
107
|
def parse_action(self, response: dict) -> dict:
|
|
108
108
|
"""Parse the action from the message. Returns the action."""
|
|
109
|
-
actions = re.findall(r"```bash\n(.*?)\n```", response["content"], re.DOTALL)
|
|
109
|
+
actions = re.findall(r"```bash\s*\n(.*?)\n```", response["content"], re.DOTALL)
|
|
110
110
|
if len(actions) == 1:
|
|
111
111
|
return {"action": actions[0].strip(), **response}
|
|
112
112
|
raise FormatError(self.render_template(self.config.format_error_template, actions=actions))
|
|
@@ -73,7 +73,7 @@ class DockerEnvironment:
|
|
|
73
73
|
self.logger.info(f"Started container {container_name} with ID {result.stdout.strip()}")
|
|
74
74
|
self.container_id = result.stdout.strip()
|
|
75
75
|
|
|
76
|
-
def execute(self, command: str, cwd: str = "") -> dict[str, Any]:
|
|
76
|
+
def execute(self, command: str, cwd: str = "", *, timeout: int | None = None) -> dict[str, Any]:
|
|
77
77
|
"""Execute a command in the Docker container and return the result as a dict."""
|
|
78
78
|
cwd = cwd or self.config.cwd
|
|
79
79
|
assert self.container_id, "Container not started"
|
|
@@ -89,7 +89,7 @@ class DockerEnvironment:
|
|
|
89
89
|
result = subprocess.run(
|
|
90
90
|
cmd,
|
|
91
91
|
text=True,
|
|
92
|
-
timeout=self.config.timeout,
|
|
92
|
+
timeout=timeout or self.config.timeout,
|
|
93
93
|
encoding="utf-8",
|
|
94
94
|
errors="replace",
|
|
95
95
|
stdout=subprocess.PIPE,
|
|
@@ -77,7 +77,7 @@ class BubblewrapEnvironment:
|
|
|
77
77
|
self.working_dir = Path(tempfile.gettempdir()) / f"minisweagent-{uuid.uuid4().hex[:8]}"
|
|
78
78
|
self.working_dir.mkdir(parents=True)
|
|
79
79
|
|
|
80
|
-
def execute(self, command: str, cwd: str = "") -> dict[str, Any]:
|
|
80
|
+
def execute(self, command: str, cwd: str = "", *, timeout: int | None = None) -> dict[str, Any]:
|
|
81
81
|
"""Execute a command in the bubblewrap environment and return the result as a dict."""
|
|
82
82
|
cwd = cwd or self.config.cwd or str(self.working_dir)
|
|
83
83
|
|
|
@@ -92,7 +92,7 @@ class BubblewrapEnvironment:
|
|
|
92
92
|
result = subprocess.run(
|
|
93
93
|
cmd,
|
|
94
94
|
text=True,
|
|
95
|
-
timeout=self.config.timeout,
|
|
95
|
+
timeout=timeout or self.config.timeout,
|
|
96
96
|
encoding="utf-8",
|
|
97
97
|
errors="replace",
|
|
98
98
|
stdout=subprocess.PIPE,
|
|
@@ -24,7 +24,7 @@ class SwerexDockerEnvironment:
|
|
|
24
24
|
self.deployment = DockerDeployment(image=self.config.image, **self.config.deployment_extra_kwargs)
|
|
25
25
|
asyncio.run(self.deployment.start())
|
|
26
26
|
|
|
27
|
-
def execute(self, command: str, cwd: str = "") -> dict[str, Any]:
|
|
27
|
+
def execute(self, command: str, cwd: str = "", *, timeout: int | None = None) -> dict[str, Any]:
|
|
28
28
|
"""Execute a command in the environment and return the raw output."""
|
|
29
29
|
output = asyncio.run(
|
|
30
30
|
self.deployment.runtime.execute(
|
|
@@ -33,7 +33,7 @@ class SwerexDockerEnvironment:
|
|
|
33
33
|
shell=True,
|
|
34
34
|
check=False,
|
|
35
35
|
cwd=cwd or self.config.cwd,
|
|
36
|
-
timeout=self.config.timeout,
|
|
36
|
+
timeout=timeout or self.config.timeout,
|
|
37
37
|
merge_output_streams=True,
|
|
38
38
|
)
|
|
39
39
|
)
|
|
@@ -17,7 +17,7 @@ class LocalEnvironment:
|
|
|
17
17
|
"""This class executes bash commands directly on the local machine."""
|
|
18
18
|
self.config = config_class(**kwargs)
|
|
19
19
|
|
|
20
|
-
def execute(self, command: str, cwd: str = ""):
|
|
20
|
+
def execute(self, command: str, cwd: str = "", *, timeout: int | None = None):
|
|
21
21
|
"""Execute a command in the local environment and return the result as a dict."""
|
|
22
22
|
cwd = cwd or self.config.cwd or os.getcwd()
|
|
23
23
|
result = subprocess.run(
|
|
@@ -26,7 +26,7 @@ class LocalEnvironment:
|
|
|
26
26
|
text=True,
|
|
27
27
|
cwd=cwd,
|
|
28
28
|
env=os.environ | self.config.env,
|
|
29
|
-
timeout=self.config.timeout,
|
|
29
|
+
timeout=timeout or self.config.timeout,
|
|
30
30
|
encoding="utf-8",
|
|
31
31
|
errors="replace",
|
|
32
32
|
stdout=subprocess.PIPE,
|
|
@@ -60,7 +60,7 @@ class SingularityEnvironment:
|
|
|
60
60
|
def get_template_vars(self) -> dict[str, Any]:
|
|
61
61
|
return asdict(self.config)
|
|
62
62
|
|
|
63
|
-
def execute(self, command: str, cwd: str = "") -> dict[str, Any]:
|
|
63
|
+
def execute(self, command: str, cwd: str = "", *, timeout: int | None = None) -> dict[str, Any]:
|
|
64
64
|
"""Execute a command in a Singularity container and return the result as a dict."""
|
|
65
65
|
cmd = [self.config.executable, "exec"]
|
|
66
66
|
|
|
@@ -81,7 +81,7 @@ class SingularityEnvironment:
|
|
|
81
81
|
result = subprocess.run(
|
|
82
82
|
cmd,
|
|
83
83
|
text=True,
|
|
84
|
-
timeout=self.config.timeout,
|
|
84
|
+
timeout=timeout or self.config.timeout,
|
|
85
85
|
encoding="utf-8",
|
|
86
86
|
errors="replace",
|
|
87
87
|
stdout=subprocess.PIPE,
|
|
@@ -66,8 +66,8 @@ class LitellmModel:
|
|
|
66
66
|
except Exception as e:
|
|
67
67
|
logger.critical(
|
|
68
68
|
f"Error calculating cost for model {self.config.model_name}: {e}. "
|
|
69
|
-
"Please check the 'Updating the model registry' section in the documentation
|
|
70
|
-
"
|
|
69
|
+
"Please check the 'Updating the model registry' section in the documentation at "
|
|
70
|
+
"https://klieret.short.gy/litellm-model-registry Still stuck? Please open a github issue for help!"
|
|
71
71
|
)
|
|
72
72
|
raise
|
|
73
73
|
self.n_calls += 1
|
|
@@ -76,7 +76,7 @@ class LitellmModel:
|
|
|
76
76
|
return {
|
|
77
77
|
"content": response.choices[0].message.content or "", # type: ignore
|
|
78
78
|
"extra": {
|
|
79
|
-
"response": response,
|
|
79
|
+
"response": response.model_dump(),
|
|
80
80
|
},
|
|
81
81
|
}
|
|
82
82
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|