verifiers 0.4.1.dev80__py3-none-any.whl → 0.4.1.dev81__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.
@@ -233,9 +233,19 @@ class ServerBase(Generic[ConfigT, StateT]):
233
233
  token = _call_state.set(state)
234
234
  try:
235
235
  before = self._state_adapter.dump_json(state) if sync_state else None
236
- result = fn(*args, **kwargs)
237
- if inspect.isawaitable(result):
238
- result = await result
236
+ try:
237
+ result = fn(*args, **kwargs)
238
+ if inspect.isawaitable(result):
239
+ result = await result
240
+ except Exception as e:
241
+ from mcp.server.mcpserver.exceptions import ToolError
242
+ from mcp.shared.exceptions import MCPError
243
+
244
+ if isinstance(e, (ToolError, MCPError)):
245
+ raise
246
+ # MCPServer withholds an unexpected exception's text from the client, but
247
+ # tools raise to tell the model what went wrong.
248
+ raise ToolError(str(e)) from e
239
249
  if before is not None:
240
250
  await self._push_state(before)
241
251
  return result
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: verifiers
3
- Version: 0.4.1.dev80
3
+ Version: 0.4.1.dev81
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
@@ -30,7 +30,7 @@ Requires-Dist: httpx2>=2.12.0
30
30
  Requires-Dist: httpx>=0.27.0
31
31
  Requires-Dist: loguru>=0.7.0
32
32
  Requires-Dist: math-verify>=0.8.0
33
- Requires-Dist: mcp==2.0.0
33
+ Requires-Dist: mcp==2.2.0
34
34
  Requires-Dist: msgpack>=1.1.2
35
35
  Requires-Dist: numpy>=2.1.0
36
36
  Requires-Dist: openai<3.0.0,>=2.54.0
@@ -149,7 +149,7 @@ verifiers/v1/judges/rubric.py,sha256=yRaOnc6S6cqrLuySkMsgxsBFCRUA2bBjYSa5qOT-inQ
149
149
  verifiers/v1/judges/rubric.txt,sha256=3KA2ZeYYdcDweJhUGopxu9EFgARhu2aWft5S5cj8Bc8,323
150
150
  verifiers/v1/mcp/__init__.py,sha256=pm8ZWBiL1q1tY4wHvJzM_QrZ9oR8aGm-bIRWiRJsgHI,408
151
151
  verifiers/v1/mcp/launch.py,sha256=nZHHOHaHirTVcr6Vevh9iflJQQfm9xYjStHRaXp9-Q8,30574
152
- verifiers/v1/mcp/server.py,sha256=Jqi8OMT8DnoZegXqM3UNNRzhVnbdrPEwx0DjOJo_K2A,13256
152
+ verifiers/v1/mcp/server.py,sha256=DT3xRf3Gx9lpYM7IdHOrB1yUoDaylqHEAmJ1QO_HoDs,13771
153
153
  verifiers/v1/mcp/toolset.py,sha256=Il_SVt8LG-vIXfPi5TmURZ5O94lXSuNsSO-G0SjjaAI,2290
154
154
  verifiers/v1/runtimes/__init__.py,sha256=JrBktZBcRLSnnZh_Er9IuGOVBGYUybJSPHi1q_b-UrI,3386
155
155
  verifiers/v1/runtimes/base.py,sha256=9hFlybPMQn0yo3efsVLAPJshMHIttuIme4FPqfdowno,15529
@@ -207,8 +207,8 @@ verifiers/v1/utils/scope.py,sha256=bzUEiWDOVdbj7dXOwGOlzsQ_-Xu0j9NR5TalQB-8TS8,8
207
207
  verifiers/v1/utils/score.py,sha256=493yJVMw8teCu9JxapxMFPFzI0hNUqdo0Y2nGW4kckk,6200
208
208
  verifiers/v1/utils/trace_store.py,sha256=Qo9qvsJAl8PoRUavjQAfUB2VNxmUtYQtU2ejLKPzY9c,3382
209
209
  verifiers/v1/utils/version.py,sha256=-obEo_-l9-D8FLef4hYxncOe-uJpxrM1g2Hig_37Sgs,1607
210
- verifiers-0.4.1.dev80.dist-info/METADATA,sha256=mnfV3X0CeBJIqvI0Ld_Z_W6FYxaX8d0p9PhfwOSHyUA,5234
211
- verifiers-0.4.1.dev80.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
212
- verifiers-0.4.1.dev80.dist-info/entry_points.txt,sha256=O1bIO0gyJWuLfWtTGF0h-JkNz6FkyXP7Z9iMFYnjeMI,222
213
- verifiers-0.4.1.dev80.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
214
- verifiers-0.4.1.dev80.dist-info/RECORD,,
210
+ verifiers-0.4.1.dev81.dist-info/METADATA,sha256=SwcQACnMNH2Dt1B2qaO7T3pLopy7HB7DncjDQuznc_Q,5234
211
+ verifiers-0.4.1.dev81.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
212
+ verifiers-0.4.1.dev81.dist-info/entry_points.txt,sha256=O1bIO0gyJWuLfWtTGF0h-JkNz6FkyXP7Z9iMFYnjeMI,222
213
+ verifiers-0.4.1.dev81.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
214
+ verifiers-0.4.1.dev81.dist-info/RECORD,,