verifiers 0.3.2.dev87__py3-none-any.whl → 0.3.2.dev89__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.
- verifiers/v1/acp/__init__.py +2 -0
- verifiers/v1/acp/runner.py +3 -1
- verifiers/v1/harness.py +16 -6
- verifiers/v1/harnesses/codex/harness.py +18 -1
- {verifiers-0.3.2.dev87.dist-info → verifiers-0.3.2.dev89.dist-info}/METADATA +1 -1
- {verifiers-0.3.2.dev87.dist-info → verifiers-0.3.2.dev89.dist-info}/RECORD +9 -9
- {verifiers-0.3.2.dev87.dist-info → verifiers-0.3.2.dev89.dist-info}/WHEEL +0 -0
- {verifiers-0.3.2.dev87.dist-info → verifiers-0.3.2.dev89.dist-info}/entry_points.txt +0 -0
- {verifiers-0.3.2.dev87.dist-info → verifiers-0.3.2.dev89.dist-info}/licenses/LICENSE +0 -0
verifiers/v1/acp/__init__.py
CHANGED
|
@@ -58,6 +58,7 @@ class ACPConfig:
|
|
|
58
58
|
mcp_urls: dict[str, str] | None = None
|
|
59
59
|
system_prompt: str | None = None
|
|
60
60
|
session_meta: JsonObject | None = None
|
|
61
|
+
client_capabilities: JsonObject | None = None
|
|
61
62
|
|
|
62
63
|
|
|
63
64
|
class ACPHarness(Harness[ConfigT]):
|
|
@@ -265,6 +266,7 @@ class ACPHarnessSession(HarnessSession):
|
|
|
265
266
|
"mcp_urls": self.mcp_urls,
|
|
266
267
|
"system_prompt": self.config.system_prompt or "",
|
|
267
268
|
"session_meta": self.config.session_meta or {},
|
|
269
|
+
"client_capabilities": self.config.client_capabilities or {},
|
|
268
270
|
}
|
|
269
271
|
async with self._lock:
|
|
270
272
|
if self._closed:
|
verifiers/v1/acp/runner.py
CHANGED
|
@@ -194,7 +194,9 @@ class ACPSession:
|
|
|
194
194
|
self.connection = agent_process[0]
|
|
195
195
|
initialized = await self.connection.initialize(
|
|
196
196
|
protocol_version=PROTOCOL_VERSION,
|
|
197
|
-
client_capabilities=ClientCapabilities(
|
|
197
|
+
client_capabilities=ClientCapabilities.model_validate(
|
|
198
|
+
config["client_capabilities"]
|
|
199
|
+
),
|
|
198
200
|
)
|
|
199
201
|
self.capabilities = initialized.agent_capabilities
|
|
200
202
|
session = await self.connection.new_session(
|
verifiers/v1/harness.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import asyncio
|
|
3
4
|
import logging
|
|
4
5
|
import os
|
|
5
6
|
from abc import ABC, abstractmethod
|
|
@@ -99,23 +100,32 @@ class Harness(ABC, Generic[ConfigT]):
|
|
|
99
100
|
"""Upload each `config.skills` folder into `runtime` at `dest/<folder name>` —
|
|
100
101
|
the program's fixed skill discovery location, which a supporting harness's
|
|
101
102
|
`setup` passes."""
|
|
103
|
+
uploads = []
|
|
104
|
+
executables = []
|
|
102
105
|
for skill in self.config.skills:
|
|
103
106
|
# Resolve so `.`/`..` entries get their real folder name (and can't
|
|
104
107
|
# place files outside `dest`).
|
|
105
108
|
skill = skill.resolve()
|
|
106
109
|
if not skill.is_dir():
|
|
107
110
|
raise ValueError(f"skill {str(skill)!r} is not a folder")
|
|
108
|
-
|
|
109
|
-
for file in sorted(skill.rglob("*")):
|
|
111
|
+
for file in skill.rglob("*"):
|
|
110
112
|
if not file.is_file():
|
|
111
113
|
continue
|
|
112
114
|
target = f"{dest}/{skill.name}/{file.relative_to(skill).as_posix()}"
|
|
113
|
-
|
|
115
|
+
uploads.append((target, file.read_bytes()))
|
|
114
116
|
if os.access(file, os.X_OK):
|
|
115
117
|
executables.append(target)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
# Settle every upload before returning or surfacing an error.
|
|
119
|
+
results = await asyncio.gather(
|
|
120
|
+
*(runtime.write(target, data) for target, data in uploads),
|
|
121
|
+
return_exceptions=True,
|
|
122
|
+
)
|
|
123
|
+
for result in results:
|
|
124
|
+
if isinstance(result, BaseException):
|
|
125
|
+
raise result
|
|
126
|
+
if executables:
|
|
127
|
+
# `write` moves bytes, not modes; restore the execute bits scripts need.
|
|
128
|
+
await runtime.run(["chmod", "+x", *executables], {})
|
|
119
129
|
|
|
120
130
|
async def _check_result(
|
|
121
131
|
self, trace: Trace, runtime: Runtime, result: ProgramResult
|
|
@@ -6,7 +6,7 @@ import logging
|
|
|
6
6
|
import re
|
|
7
7
|
from collections import Counter
|
|
8
8
|
|
|
9
|
-
from verifiers.v1.acp import ACPConfig, ACPHarness
|
|
9
|
+
from verifiers.v1.acp import ACPConfig, ACPHarness, ACPTurn
|
|
10
10
|
from verifiers.v1.clients import ModelContext
|
|
11
11
|
from verifiers.v1.configs.harness import HarnessConfig, PinnedVersion
|
|
12
12
|
from verifiers.v1.harnesses.node import NODE_BIN_DIR, ensure_node
|
|
@@ -47,6 +47,16 @@ class CodexHarness(ACPHarness[CodexHarnessConfig]):
|
|
|
47
47
|
SUPPORTS_MCP = True
|
|
48
48
|
SUPPORTS_SKILLS = True
|
|
49
49
|
|
|
50
|
+
def acp_turn_result(self, trace: Trace, result: ACPTurn) -> None:
|
|
51
|
+
# codex-acp returns terminal failures in metadata with stop_reason=end_turn.
|
|
52
|
+
failure = (
|
|
53
|
+
result.response_metadata.get("jetbrains", {})
|
|
54
|
+
.get("air", {})
|
|
55
|
+
.get("sessionFailure")
|
|
56
|
+
)
|
|
57
|
+
if failure and failure["phase"] == "active":
|
|
58
|
+
raise RuntimeError(f"Codex {failure['category']}: {failure['safeMessage']}")
|
|
59
|
+
|
|
50
60
|
async def setup(self, runtime: Runtime) -> None:
|
|
51
61
|
await self.install_skills(runtime, SKILLS_DIR)
|
|
52
62
|
await ensure_node(runtime)
|
|
@@ -101,6 +111,13 @@ class CodexHarness(ACPHarness[CodexHarnessConfig]):
|
|
|
101
111
|
# Codex reads MCP servers from the config written by build_env().
|
|
102
112
|
mcp_urls={},
|
|
103
113
|
system_prompt=system_prompt,
|
|
114
|
+
client_capabilities={
|
|
115
|
+
"_meta": {
|
|
116
|
+
"jetbrains": {
|
|
117
|
+
"air": {"version": 1, "capabilities": ["sessionFailure"]}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
104
121
|
)
|
|
105
122
|
|
|
106
123
|
async def cleanup(self, trace: Trace, runtime: Runtime) -> None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: verifiers
|
|
3
|
-
Version: 0.3.2.
|
|
3
|
+
Version: 0.3.2.dev89
|
|
4
4
|
Summary: Verifiers: Environments for LLM Reinforcement Learning
|
|
5
5
|
Project-URL: Homepage, https://github.com/primeintellect-ai/verifiers
|
|
6
6
|
Project-URL: Documentation, https://github.com/primeintellect-ai/verifiers
|
|
@@ -6,7 +6,7 @@ verifiers/v1/env.py,sha256=CEhzjojhg5jqbOYruUnc5U7TtgDHDSx8NiiFA0qfbt8,18234
|
|
|
6
6
|
verifiers/v1/episode.py,sha256=Fft0R2W6INAVeJhoE9b8h7L_KQSz7XuxP4FT_XhcsUY,5741
|
|
7
7
|
verifiers/v1/errors.py,sha256=uQySmCUrjDYFkBIii1vBFPiEcPFPQZ9EGpas_6HvcQI,5279
|
|
8
8
|
verifiers/v1/graph.py,sha256=K6wKkoT_8TpNqPQISu2Xf0eHtAYW_KUGw0CteN5zr3c,36529
|
|
9
|
-
verifiers/v1/harness.py,sha256=
|
|
9
|
+
verifiers/v1/harness.py,sha256=sXEjVdrS4A2SO35C_uEebBVeUt8VL7dui7IneAp2MRs,14124
|
|
10
10
|
verifiers/v1/judge.py,sha256=uqn-djkK2_7Q3kOjkDo6ipOvV_HOvuLa9y6AoDjRux8,9618
|
|
11
11
|
verifiers/v1/rollout.py,sha256=SvMgs7YBNjiftp4vlGVBMEseUsJs1h7qrqAlxmWaNwY,23987
|
|
12
12
|
verifiers/v1/semantic.py,sha256=VQ_buw6Ya6QtRoh_fiYI5Avs5RmIQCfWH0H0bQc4aoc,4704
|
|
@@ -16,8 +16,8 @@ verifiers/v1/task.py,sha256=9YhllEDgoHSz72-1fcYwBADl-rOzASnrSVimLheWmwI,12237
|
|
|
16
16
|
verifiers/v1/taskset.py,sha256=fp2E0IEhL_Ybj9cegZwljfTmW27p_30zTWHFKw_kXE4,4374
|
|
17
17
|
verifiers/v1/trace.py,sha256=dBrStZXoEhVIKtcUzG6lZN0SEAjATOqBZCrgbaPdIXw,30398
|
|
18
18
|
verifiers/v1/types.py,sha256=PH1SxRWXOjPCgQD9aZgM18_bECvFSNQ25gkCbulmTKU,9857
|
|
19
|
-
verifiers/v1/acp/__init__.py,sha256=
|
|
20
|
-
verifiers/v1/acp/runner.py,sha256=
|
|
19
|
+
verifiers/v1/acp/__init__.py,sha256=N2J0WQsA1VjxCyyLdbQ3mY-M_kdgJucTSRhk4ObMc70,12839
|
|
20
|
+
verifiers/v1/acp/runner.py,sha256=vEYEkX3gEt1vVbYCYhlVq-5y7RIMecpspDwX2vUoXuI,11179
|
|
21
21
|
verifiers/v1/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
verifiers/v1/cli/debug.py,sha256=x3bqOwwbwwfwQQpxHrZeKdxsW3ZVtUT9cAn_r4aOro4,11631
|
|
23
23
|
verifiers/v1/cli/gepa.py,sha256=zyUbZ0ykTEq6c-YlPUSk0kqsbkzqR-mkeW4Cl0WGeJo,4180
|
|
@@ -92,7 +92,7 @@ verifiers/v1/harnesses/browser_use/program.py,sha256=5g5AnRS-brYSMmHcteLf8-XDLaT
|
|
|
92
92
|
verifiers/v1/harnesses/claude_code/__init__.py,sha256=JkZQylMSA3o1fvBx_NM41y_umuahmOSqFjTrJ2hryTw,171
|
|
93
93
|
verifiers/v1/harnesses/claude_code/harness.py,sha256=Racxbs1EAH3gRwSeUptAIa3kB-EUm_nreUnHMwRUHuE,4119
|
|
94
94
|
verifiers/v1/harnesses/codex/__init__.py,sha256=ocyBvlpSO8c3pT6D1ebrQohoXYESQcCyPT5kN3j1-N4,132
|
|
95
|
-
verifiers/v1/harnesses/codex/harness.py,sha256=
|
|
95
|
+
verifiers/v1/harnesses/codex/harness.py,sha256=S6WLiEpOmeGHbwCYHhQyNkXSVYFbwBbCvPgk2tAuDis,7516
|
|
96
96
|
verifiers/v1/harnesses/hermes_agent/__init__.py,sha256=k84Y8UTTf1KOw5LGqPb2dk-hYFagPevDJBOF7qsR_vo,176
|
|
97
97
|
verifiers/v1/harnesses/hermes_agent/harness.py,sha256=dSsE2VZ8jaM-U14QXO3J7P-U6NMpSuOz3DUMtDWpWk0,3622
|
|
98
98
|
verifiers/v1/harnesses/hermes_agent/program.py,sha256=RaIYm6NFD8KLXERGXp6rOE4QrQjlcTnm1Fu33xYsiHw,570
|
|
@@ -190,8 +190,8 @@ verifiers/v1/utils/prime.py,sha256=UTYRjp9cbjNb6CVmBHda-1wWZAIIfxNOmTyNuT7_wL4,9
|
|
|
190
190
|
verifiers/v1/utils/retries.py,sha256=Y2ZgrAjn-qNkRKZP_RVNL_7EK0iaRcZeCa404lpGYi4,5417
|
|
191
191
|
verifiers/v1/utils/score.py,sha256=493yJVMw8teCu9JxapxMFPFzI0hNUqdo0Y2nGW4kckk,6200
|
|
192
192
|
verifiers/v1/utils/version.py,sha256=-obEo_-l9-D8FLef4hYxncOe-uJpxrM1g2Hig_37Sgs,1607
|
|
193
|
-
verifiers-0.3.2.
|
|
194
|
-
verifiers-0.3.2.
|
|
195
|
-
verifiers-0.3.2.
|
|
196
|
-
verifiers-0.3.2.
|
|
197
|
-
verifiers-0.3.2.
|
|
193
|
+
verifiers-0.3.2.dev89.dist-info/METADATA,sha256=DY9UBh4G2UWBWU0GlGCI40TJ5AkQPxHrwW0J1dJH8kc,4237
|
|
194
|
+
verifiers-0.3.2.dev89.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
195
|
+
verifiers-0.3.2.dev89.dist-info/entry_points.txt,sha256=uqQje0TMsr7k6nXlWxlPs13Si0evb3pVCEDF6c-YL80,241
|
|
196
|
+
verifiers-0.3.2.dev89.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
|
|
197
|
+
verifiers-0.3.2.dev89.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|