verifiers 0.4.2.dev55__py3-none-any.whl → 0.4.2.dev56__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/interception/__init__.py +10 -8
- verifiers/v1/mcp/launch.py +69 -125
- verifiers/v1/mcp/toolset.py +18 -4
- verifiers/v1/runtimes/private_network.py +4 -2
- verifiers/v1/tasksets/harbor/taskset.py +2 -2
- verifiers/v1/tasksets/harbor/toolset.py +17 -5
- {verifiers-0.4.2.dev55.dist-info → verifiers-0.4.2.dev56.dist-info}/METADATA +1 -1
- {verifiers-0.4.2.dev55.dist-info → verifiers-0.4.2.dev56.dist-info}/RECORD +11 -11
- {verifiers-0.4.2.dev55.dist-info → verifiers-0.4.2.dev56.dist-info}/WHEEL +0 -0
- {verifiers-0.4.2.dev55.dist-info → verifiers-0.4.2.dev56.dist-info}/entry_points.txt +0 -0
- {verifiers-0.4.2.dev55.dist-info → verifiers-0.4.2.dev56.dist-info}/licenses/LICENSE +0 -0
|
@@ -32,20 +32,22 @@ def requires_tunnel(
|
|
|
32
32
|
"""Whether the interception must be exposed via a tunnel — some consumer is off the
|
|
33
33
|
host network: the harness itself, a live `shared` server in a remote runtime, or a
|
|
34
34
|
tool server config placing one there (each reaches the `/state` channel from
|
|
35
|
-
its own runtime).
|
|
36
|
-
|
|
35
|
+
its own runtime). Task-format adapters share the harness's locality. Skipped as
|
|
36
|
+
non-consumers: a config-`url` server (external —
|
|
37
37
|
it connects out), and an `external` shared server (outside the state machinery
|
|
38
38
|
entirely). False means every consumer reaches the server at localhost."""
|
|
39
|
+
from verifiers.v1.mcp.toolset import BaseToolsetConfig
|
|
40
|
+
|
|
39
41
|
if not harness_is_local:
|
|
40
42
|
return True
|
|
41
43
|
if any(not s.external and not s.local for s in shared):
|
|
42
44
|
return True
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
return any(
|
|
46
|
+
isinstance(config, BaseToolsetConfig)
|
|
47
|
+
and not config.url
|
|
48
|
+
and not runtime_is_local(config.runtime)
|
|
49
|
+
for config in server_configs
|
|
50
|
+
)
|
|
49
51
|
|
|
50
52
|
|
|
51
53
|
def make_interception(
|
verifiers/v1/mcp/launch.py
CHANGED
|
@@ -265,7 +265,7 @@ async def _install_in_sandbox(server: ServerBase, agent_runtime: Runtime) -> str
|
|
|
265
265
|
venv = str(PurePosixPath(workdir) / ".vf-venv")
|
|
266
266
|
python_dir = str(PurePosixPath(workdir) / ".vf-python")
|
|
267
267
|
root_q, temp_q, cache_q, venv_q = map(shlex.quote, (root, temp, cache, venv))
|
|
268
|
-
#
|
|
268
|
+
# Servers in the same service install into one physical environment.
|
|
269
269
|
# Serialize its mutations and only remember sources after a successful install.
|
|
270
270
|
async with runtime.backend.cache.mcp_lock:
|
|
271
271
|
sources = dict.fromkeys((_package_dir(ServerBase), _package_dir(type(server))))
|
|
@@ -353,9 +353,9 @@ async def serve_in_runtime(
|
|
|
353
353
|
) -> int:
|
|
354
354
|
"""Start a server and return its bound port.
|
|
355
355
|
|
|
356
|
-
Exposed
|
|
357
|
-
the OS
|
|
358
|
-
the current rollout task from the adjacent `/task` endpoint
|
|
356
|
+
Exposed servers use the runtime's forwarded port when one is configured. Otherwise,
|
|
357
|
+
the OS chooses a port and reports it through a file. With a state channel, the server
|
|
358
|
+
fetches the current rollout task from the adjacent `/task` endpoint.
|
|
359
359
|
"""
|
|
360
360
|
# A shared server has a private service secret but no fixed state URL. Set
|
|
361
361
|
# both controls explicitly so a subprocess cannot inherit stale host values.
|
|
@@ -435,21 +435,9 @@ async def reachable_url(
|
|
|
435
435
|
service_runtime: Runtime,
|
|
436
436
|
port: int,
|
|
437
437
|
*,
|
|
438
|
-
colocated: bool,
|
|
439
438
|
consumer_is_local: bool,
|
|
440
439
|
) -> AsyncIterator[str]:
|
|
441
|
-
"""
|
|
442
|
-
primitives: `Runtime.expose` (publish a port out of a sandbox) and a host `Tunnel` (reach
|
|
443
|
-
into the host from a remote runtime). `colocated` = the server shares the consumer's
|
|
444
|
-
runtime; `consumer_is_local` = the consumer can use a host-local URL without a tunnel.
|
|
445
|
-
|
|
446
|
-
- `colocated` -> localhost (same runtime, in-sandbox or host loopback);
|
|
447
|
-
- else the runtime publishes the port (`expose`): a remote sandbox's URL is reachable
|
|
448
|
-
anywhere, a host-local URL directly by a local consumer and through a host tunnel
|
|
449
|
-
by a remote one."""
|
|
450
|
-
if colocated:
|
|
451
|
-
yield f"http://127.0.0.1:{port}"
|
|
452
|
-
return
|
|
440
|
+
"""Publish a service port, tunneling host-local URLs for remote consumers."""
|
|
453
441
|
url = await service_runtime.expose(port)
|
|
454
442
|
if service_runtime.is_local and not consumer_is_local:
|
|
455
443
|
async with PrimeTunnel().expose(urlsplit(url).port or 80) as public:
|
|
@@ -478,34 +466,52 @@ async def _serve(
|
|
|
478
466
|
placements: Mapping[str, Runtime] | None = None,
|
|
479
467
|
):
|
|
480
468
|
cfg = server.config
|
|
481
|
-
colocated = getattr(cfg, "colocated", False)
|
|
482
469
|
service = getattr(cfg, "service", None)
|
|
483
470
|
own_vm = (placements or {}).get(server.server_name)
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
471
|
+
async with contextlib.AsyncExitStack() as stack:
|
|
472
|
+
host = None
|
|
473
|
+
if service is not None or own_vm is not None:
|
|
474
|
+
if own_vm is not None:
|
|
475
|
+
runtime = own_vm
|
|
476
|
+
host = (hosts or {})[server.server_name]
|
|
477
|
+
elif services is None or service not in services:
|
|
478
|
+
raise ToolsetError(
|
|
479
|
+
f"server {server.server_name!r} runs in service {service!r}, "
|
|
480
|
+
"which needs a task whose services define it"
|
|
481
|
+
)
|
|
482
|
+
else:
|
|
483
|
+
runtime = services[service]
|
|
484
|
+
host = (hosts or {}).get(service, service)
|
|
485
|
+
if runtime.is_local:
|
|
486
|
+
raise ToolsetError(
|
|
487
|
+
f"server {server.server_name!r} runs in service {service!r}, "
|
|
488
|
+
"which needs a native Prime service VM"
|
|
489
|
+
)
|
|
495
490
|
else:
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
491
|
+
if (
|
|
492
|
+
isinstance(cfg.runtime, NetworkPolicyConfig)
|
|
493
|
+
and cfg.runtime.network_restricted
|
|
494
|
+
):
|
|
495
|
+
raise ToolsetError(
|
|
496
|
+
f"server {server.server_name!r} restricts its runtime's network, "
|
|
497
|
+
"which needs a Prime runtime of its own beside a Prime workspace "
|
|
498
|
+
"without a task service spec (it then joins the rollout's "
|
|
499
|
+
"private network)"
|
|
500
|
+
)
|
|
501
|
+
if not backend_cls(cfg.runtime).SUPPORTS_PORT_EXPOSURE:
|
|
502
|
+
raise ToolsetError(
|
|
503
|
+
f"server {server.server_name!r} runs in its own runtime, but the "
|
|
504
|
+
f"{cfg.runtime.type} runtime cannot expose a port; "
|
|
505
|
+
"use a runtime that supports port exposure"
|
|
506
|
+
)
|
|
507
|
+
backend = await stack.enter_async_context(provision_backend(cfg.runtime))
|
|
508
|
+
runtime = backend.bind()
|
|
509
|
+
|
|
504
510
|
port = await serve_in_runtime(
|
|
505
511
|
server,
|
|
506
512
|
runtime,
|
|
507
|
-
exposed=
|
|
508
|
-
listen_all=
|
|
513
|
+
exposed=host is None,
|
|
514
|
+
listen_all=host is not None,
|
|
509
515
|
state_url=(
|
|
510
516
|
runtime.host_url(f"{state_base.rstrip('/')}/state")
|
|
511
517
|
if state_base
|
|
@@ -513,82 +519,27 @@ async def _serve(
|
|
|
513
519
|
),
|
|
514
520
|
state_secret=state_secret,
|
|
515
521
|
)
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
# server has neither that lifecycle nor a published port after isolation;
|
|
521
|
-
# reject it instead of silently leaving its requested policy unenforced.
|
|
522
|
-
if (
|
|
523
|
-
isinstance(cfg.runtime, NetworkPolicyConfig)
|
|
524
|
-
and cfg.runtime.network_restricted
|
|
525
|
-
and not (colocated and harness_runtime is not None)
|
|
526
|
-
):
|
|
527
|
-
raise ToolsetError(
|
|
528
|
-
f"server {server.server_name!r} restricts its runtime's network, which "
|
|
529
|
-
"needs the server colocated with the harness, or on a Prime runtime "
|
|
530
|
-
"of its own beside a Prime workspace without a task service spec (it then "
|
|
531
|
-
"joins the rollout's private network)"
|
|
532
|
-
)
|
|
533
|
-
if colocated and harness_runtime is not None:
|
|
534
|
-
runtime = harness_runtime
|
|
535
|
-
elif not backend_cls(cfg.runtime).SUPPORTS_PORT_EXPOSURE:
|
|
536
|
-
raise ToolsetError(
|
|
537
|
-
f"server {server.server_name!r} runs in its own runtime, but the "
|
|
538
|
-
f"{cfg.runtime.type} runtime cannot expose a port; colocate it with the "
|
|
539
|
-
"harness or use a supported runtime"
|
|
540
|
-
)
|
|
541
|
-
else:
|
|
542
|
-
backend = await stack.enter_async_context(provision_backend(cfg.runtime))
|
|
543
|
-
runtime = backend.bind()
|
|
544
|
-
# Only consumers outside the server runtime need its fixed published port. Colocated tools
|
|
545
|
-
# use independent OS-assigned ports, avoiding clashes on the runtime's service port.
|
|
546
|
-
exposed = runtime is not harness_runtime
|
|
547
|
-
# The shared-state channel: every server reaches the interception at the rollout's
|
|
548
|
-
# `state_base`, which is universally reachable (the interception is exposed via a tunnel
|
|
549
|
-
# whenever any consumer is remote). Eval-level shared servers get no per-rollout channel
|
|
550
|
-
# (`state_base` is None for them).
|
|
551
|
-
state_url = (
|
|
552
|
-
runtime.host_url(f"{state_base.rstrip('/')}/state") if state_base else None
|
|
553
|
-
)
|
|
554
|
-
port = await serve_in_runtime(
|
|
555
|
-
server,
|
|
556
|
-
runtime,
|
|
557
|
-
exposed=exposed,
|
|
558
|
-
state_url=state_url,
|
|
559
|
-
state_secret=state_secret,
|
|
560
|
-
)
|
|
561
|
-
# The harness consumes the server, and decides reachability: colocated when the
|
|
562
|
-
# server shares the harness's runtime, reached with the harness's locality (read
|
|
563
|
-
# off the harness runtime when there is one, else `harness_is_local` for an
|
|
564
|
-
# eval-level shared tool).
|
|
565
|
-
colocated = runtime is harness_runtime
|
|
522
|
+
if host is not None:
|
|
523
|
+
yield _ServedServer(f"http://{host}:{port}/mcp", runtime)
|
|
524
|
+
return
|
|
525
|
+
|
|
566
526
|
consumer_is_local = (
|
|
567
527
|
harness_runtime.is_local
|
|
568
528
|
if harness_runtime is not None
|
|
569
529
|
else harness_is_local
|
|
570
530
|
)
|
|
571
|
-
if
|
|
572
|
-
|
|
573
|
-
and runtime.
|
|
574
|
-
and not colocated
|
|
575
|
-
and not consumer_is_local
|
|
576
|
-
):
|
|
577
|
-
backend = await runtime.expose(port)
|
|
578
|
-
# Register after startup, and revoke/drain before releasing the runtime.
|
|
531
|
+
if proxy_mcp is not None and runtime.is_local and not consumer_is_local:
|
|
532
|
+
backend_url = await runtime.expose(port)
|
|
533
|
+
# Revoke and drain the proxy before releasing the runtime.
|
|
579
534
|
url = await stack.enter_async_context(
|
|
580
|
-
proxy_mcp(f"{
|
|
535
|
+
proxy_mcp(f"{backend_url.rstrip('/')}/mcp")
|
|
581
536
|
)
|
|
582
537
|
yield _ServedServer(url, runtime)
|
|
583
538
|
return
|
|
584
539
|
base = await stack.enter_async_context(
|
|
585
|
-
reachable_url(
|
|
586
|
-
runtime, port, colocated=colocated, consumer_is_local=consumer_is_local
|
|
587
|
-
)
|
|
540
|
+
reachable_url(runtime, port, consumer_is_local=consumer_is_local)
|
|
588
541
|
)
|
|
589
|
-
if
|
|
590
|
-
base = base.replace("127.0.0.1", "localhost", 1)
|
|
591
|
-
elif not colocated and harness_runtime is not None:
|
|
542
|
+
if harness_runtime is not None:
|
|
592
543
|
base = harness_runtime.host_url(base)
|
|
593
544
|
yield _ServedServer(f"{base.rstrip('/')}/mcp", runtime)
|
|
594
545
|
|
|
@@ -730,10 +681,9 @@ async def serve_tools(
|
|
|
730
681
|
placements: Mapping[str, Runtime] | None = None,
|
|
731
682
|
):
|
|
732
683
|
"""Bring up a rollout's tool servers and yield `{name: url}` the harness reaches: the
|
|
733
|
-
task-scoped `toolsets`
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
running eval-level (see `serve_shared`) — join under their per-rollout state tag.
|
|
684
|
+
task-scoped `toolsets` own their connections through `Toolset.serve`, and
|
|
685
|
+
taskset-scoped `shared` servers, already running eval-level (see `serve_shared`),
|
|
686
|
+
join under their per-rollout state tag.
|
|
737
687
|
`state_secret` is private to task-scoped servers; shared servers keep an
|
|
738
688
|
eval-level service secret and receive only signed `state_route` coordinates.
|
|
739
689
|
`state_base` is universally reachable from either placement."""
|
|
@@ -757,22 +707,16 @@ async def serve_tools(
|
|
|
757
707
|
f"tool server name '{name}' is declared both taskset-scoped (shared) "
|
|
758
708
|
f"and task-scoped — pick one scope, or give one a distinct TOOL_PREFIX"
|
|
759
709
|
)
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
state_secret=state_secret,
|
|
770
|
-
state_base=state_base,
|
|
771
|
-
proxy_mcp=proxy_mcp,
|
|
772
|
-
services=services,
|
|
773
|
-
hosts=hosts,
|
|
774
|
-
placements=placements,
|
|
775
|
-
)
|
|
710
|
+
urls[name] = await stack.enter_async_context(
|
|
711
|
+
toolset.serve(
|
|
712
|
+
harness_runtime,
|
|
713
|
+
state_secret=state_secret,
|
|
714
|
+
state_base=state_base,
|
|
715
|
+
proxy_mcp=proxy_mcp,
|
|
716
|
+
services=services,
|
|
717
|
+
hosts=hosts,
|
|
718
|
+
placements=placements,
|
|
776
719
|
)
|
|
777
|
-
|
|
720
|
+
)
|
|
721
|
+
logger.debug("Connected tool server %s", name)
|
|
778
722
|
yield urls
|
verifiers/v1/mcp/toolset.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from collections.abc import AsyncIterator
|
|
4
|
+
from contextlib import asynccontextmanager
|
|
3
5
|
from typing import TYPE_CHECKING
|
|
4
6
|
|
|
5
7
|
from pydantic import Field, model_validator
|
|
@@ -13,6 +15,8 @@ from verifiers.v1.utils.decorators import discover_decorated
|
|
|
13
15
|
if TYPE_CHECKING:
|
|
14
16
|
from mcp.server.mcpserver import MCPServer
|
|
15
17
|
|
|
18
|
+
from verifiers.v1.runtimes import Runtime
|
|
19
|
+
|
|
16
20
|
|
|
17
21
|
class ToolsetTimeoutConfig(BaseConfig):
|
|
18
22
|
"""Timeouts (in seconds) for a launched tool server; `None` waits indefinitely."""
|
|
@@ -22,7 +26,7 @@ class ToolsetTimeoutConfig(BaseConfig):
|
|
|
22
26
|
|
|
23
27
|
|
|
24
28
|
class BaseToolsetConfig(BaseConfig):
|
|
25
|
-
"""
|
|
29
|
+
"""Runtime and connection settings for per-task and shared tool servers."""
|
|
26
30
|
|
|
27
31
|
runtime: RuntimeConfig = SubprocessConfig()
|
|
28
32
|
"""Where the server runs: the evaluator by default."""
|
|
@@ -35,7 +39,6 @@ class ToolsetConfig(BaseToolsetConfig):
|
|
|
35
39
|
service spec is a VM of the server's own that joins the workspace over the rollout's
|
|
36
40
|
private network, under its own egress policy."""
|
|
37
41
|
|
|
38
|
-
colocated: bool = False
|
|
39
42
|
service: str | None = None
|
|
40
43
|
"""Run the server in a named native Prime service VM. The harness reaches it
|
|
41
44
|
over the deployment's private network, using its LAN hostname."""
|
|
@@ -44,9 +47,9 @@ class ToolsetConfig(BaseToolsetConfig):
|
|
|
44
47
|
def _one_placement(self):
|
|
45
48
|
if self.service is None:
|
|
46
49
|
return self
|
|
47
|
-
if self.
|
|
50
|
+
if self.url:
|
|
48
51
|
raise ValueError(
|
|
49
|
-
"a tool server placed in a service
|
|
52
|
+
"a tool server placed in a service cannot use a remote URL"
|
|
50
53
|
)
|
|
51
54
|
# The service is the server's runtime; another one, or its policy, would go unused.
|
|
52
55
|
if not isinstance(self.runtime, SubprocessConfig):
|
|
@@ -62,6 +65,17 @@ class SharedToolsetConfig(BaseToolsetConfig):
|
|
|
62
65
|
|
|
63
66
|
|
|
64
67
|
class Toolset(ServerBase[ConfigT, StateT]):
|
|
68
|
+
@asynccontextmanager
|
|
69
|
+
async def serve(self, runtime: Runtime, **kwargs) -> AsyncIterator[str]:
|
|
70
|
+
"""Connect a rollout to this server; task-format adapters own their transport."""
|
|
71
|
+
from verifiers.v1.mcp.launch import serve
|
|
72
|
+
|
|
73
|
+
if self.config.url:
|
|
74
|
+
yield runtime.host_url(self.config.url)
|
|
75
|
+
else:
|
|
76
|
+
async with serve(self, runtime, **kwargs) as url:
|
|
77
|
+
yield url
|
|
78
|
+
|
|
65
79
|
def register(self, mcp: MCPServer) -> None:
|
|
66
80
|
for fn in discover_decorated(self, "tool"):
|
|
67
81
|
mcp.add_tool(
|
|
@@ -37,13 +37,15 @@ def tool_vms(
|
|
|
37
37
|
network, by server name: those on Prime runtimes of their own beside a Prime
|
|
38
38
|
workspace of the rollout's own, without a task service spec. Any other server keeps its
|
|
39
39
|
runtime's published port, which takes no network policy."""
|
|
40
|
+
from verifiers.v1.mcp.toolset import ToolsetConfig
|
|
41
|
+
|
|
40
42
|
if composed or borrowed or not isinstance(workspace, PrimeConfig):
|
|
41
43
|
return {}
|
|
42
44
|
vms = {
|
|
43
45
|
toolset.server_name: toolset.config.runtime
|
|
44
46
|
for toolset in toolsets
|
|
45
|
-
if isinstance(toolset.config
|
|
46
|
-
and
|
|
47
|
+
if isinstance(toolset.config, ToolsetConfig)
|
|
48
|
+
and isinstance(toolset.config.runtime, PrimeConfig)
|
|
47
49
|
and not toolset.config.url
|
|
48
50
|
and toolset.config.service is None
|
|
49
51
|
}
|
|
@@ -208,10 +208,10 @@ class HarborTask(Task[HarborData, State, HarborTaskConfig]):
|
|
|
208
208
|
|
|
209
209
|
@classmethod
|
|
210
210
|
def toolsets(cls, config: HarborTaskConfig):
|
|
211
|
-
from .toolset import
|
|
211
|
+
from .toolset import HarborMCPAdapter, HarborMCPConfig
|
|
212
212
|
|
|
213
213
|
return super().toolsets(config) + [
|
|
214
|
-
|
|
214
|
+
HarborMCPAdapter(HarborMCPConfig(server=server))
|
|
215
215
|
for server in config.mcp_servers
|
|
216
216
|
]
|
|
217
217
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""Adapt Harbor's task-declared MCP servers to the harness's HTTP transport."""
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
|
+
from collections.abc import AsyncIterator
|
|
5
|
+
from contextlib import asynccontextmanager
|
|
4
6
|
from typing import Any, cast
|
|
5
7
|
|
|
6
8
|
from mcp import Client
|
|
@@ -10,20 +12,30 @@ from mcp.client.streamable_http import streamable_http_client
|
|
|
10
12
|
from mcp.server.mcpserver import Context, MCPServer
|
|
11
13
|
from mcp.server.mcpserver.exceptions import ToolError
|
|
12
14
|
from mcp.types import CallToolResult, Tool
|
|
15
|
+
from pydantic_config import BaseConfig
|
|
13
16
|
|
|
14
|
-
from verifiers.v1.mcp import Toolset
|
|
17
|
+
from verifiers.v1.mcp import Toolset
|
|
18
|
+
from verifiers.v1.mcp.launch import serve_in_runtime
|
|
19
|
+
from verifiers.v1.runtimes import Runtime
|
|
15
20
|
|
|
16
21
|
|
|
17
|
-
class HarborMCPConfig(
|
|
22
|
+
class HarborMCPConfig(BaseConfig):
|
|
18
23
|
server: dict[str, Any]
|
|
19
24
|
"""One declaration already validated by Harbor's task parser."""
|
|
20
25
|
|
|
21
26
|
|
|
22
|
-
class
|
|
27
|
+
class HarborMCPAdapter(Toolset[HarborMCPConfig]):
|
|
23
28
|
@property
|
|
24
29
|
def server_name(self) -> str:
|
|
25
30
|
return self.config.server["name"]
|
|
26
31
|
|
|
32
|
+
@asynccontextmanager
|
|
33
|
+
async def serve(self, runtime: Runtime, **kwargs) -> AsyncIterator[str]:
|
|
34
|
+
# Harbor commands and task-local URLs belong to the task environment.
|
|
35
|
+
port = await serve_in_runtime(self, runtime, exposed=False)
|
|
36
|
+
host = "localhost" if runtime.network_restricted else "127.0.0.1"
|
|
37
|
+
yield f"http://{host}:{port}/mcp"
|
|
38
|
+
|
|
27
39
|
async def setup(self) -> None:
|
|
28
40
|
spec = self.config.server
|
|
29
41
|
match spec["transport"]:
|
|
@@ -88,4 +100,4 @@ class HarborMCPToolset(Toolset[HarborMCPConfig]):
|
|
|
88
100
|
|
|
89
101
|
|
|
90
102
|
if __name__ == "__main__":
|
|
91
|
-
|
|
103
|
+
HarborMCPAdapter.run()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: verifiers
|
|
3
|
-
Version: 0.4.2.
|
|
3
|
+
Version: 0.4.2.dev56
|
|
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
|
|
@@ -120,7 +120,7 @@ verifiers/v1/harnesses/utils/install.py,sha256=EESYSh_e9L4gj6N4GvAbQY2kb4ckven7t
|
|
|
120
120
|
verifiers/v1/harnesses/utils/launch.py,sha256=2KuLnNruUqH6vcW2Ru661P86ffRzaqslNs-kDMn7B6U,5670
|
|
121
121
|
verifiers/v1/harnesses/utils/mcp.py,sha256=EtDraHEqgsOB6xKvcF2z9C6HlQyKoST0ZDvmy47NWgM,7450
|
|
122
122
|
verifiers/v1/harnesses/utils/replay.py,sha256=RJMzD-3K0oz_Q0zhjSH4nhwxn95R8e9Q_CCN5sZp9RA,1720
|
|
123
|
-
verifiers/v1/interception/__init__.py,sha256=
|
|
123
|
+
verifiers/v1/interception/__init__.py,sha256=jQ9ZbUr4Nx9JFhdcx0rNcR_jkMFcdzBrTpeSFK84YF0,4020
|
|
124
124
|
verifiers/v1/interception/base.py,sha256=KlXpWgcpAs_vzJxXRTVArZ9ilSV_vNfsX6vlZ35Y7kc,2249
|
|
125
125
|
verifiers/v1/interception/pool.py,sha256=Ao3iFTOcPZDfTfPH_sApVzA23u-FIaX6-FPIKOWo3c8,6701
|
|
126
126
|
verifiers/v1/interception/server.py,sha256=IUG55-27qahz1mrZiFyvJZnBCK444St7ULURMEIhBIQ,53236
|
|
@@ -135,9 +135,9 @@ verifiers/v1/judges/reference.txt,sha256=Ej35kGXiT2uJ0LcHIeez49rCS_9uHmCQKoVdn93
|
|
|
135
135
|
verifiers/v1/judges/rubric.py,sha256=yRaOnc6S6cqrLuySkMsgxsBFCRUA2bBjYSa5qOT-inQ,16158
|
|
136
136
|
verifiers/v1/judges/rubric.txt,sha256=3KA2ZeYYdcDweJhUGopxu9EFgARhu2aWft5S5cj8Bc8,323
|
|
137
137
|
verifiers/v1/mcp/__init__.py,sha256=zJw_R6n-rDqB80_Zs1VGCrYVCZGi8nS7qGaSUKFsB50,479
|
|
138
|
-
verifiers/v1/mcp/launch.py,sha256=
|
|
138
|
+
verifiers/v1/mcp/launch.py,sha256=tI4MGpqWVJxALD9RxajBPcQrIhQvxA5r1slU8nwCjNw,29151
|
|
139
139
|
verifiers/v1/mcp/server.py,sha256=9hH7rJm8yPYVitcKYMZmSt6_JQyysKAr3e6Xav6IsIk,14154
|
|
140
|
-
verifiers/v1/mcp/toolset.py,sha256=
|
|
140
|
+
verifiers/v1/mcp/toolset.py,sha256=52h0tyCk_Eiu54JZ5hlQMfOlu5Dou7PHKmFr09pYFJg,3129
|
|
141
141
|
verifiers/v1/runtimes/__init__.py,sha256=JrBktZBcRLSnnZh_Er9IuGOVBGYUybJSPHi1q_b-UrI,3386
|
|
142
142
|
verifiers/v1/runtimes/base.py,sha256=Xl5jxNGnNhuWnrgh3h-nDOeMA9UX9MysYLmSuJPZQL4,17215
|
|
143
143
|
verifiers/v1/runtimes/compose.py,sha256=Q_0auxhXaGhIOrlisFXI8QRYV9DmewVuXG4ZZtfnrKA,15974
|
|
@@ -145,7 +145,7 @@ verifiers/v1/runtimes/deployment.py,sha256=De6N15Vfe7JKn5VOqFwG22SU_lh0f09bJ57hq
|
|
|
145
145
|
verifiers/v1/runtimes/egress.py,sha256=4zsNS3Z2A2HyoCcbgaLizA30uJabYrbgYAYUfvyzeBk,23703
|
|
146
146
|
verifiers/v1/runtimes/limiters.py,sha256=RWR4HdYoa72yeWF_lM7YRLflm10euE3_gPfNG0BuaOc,2742
|
|
147
147
|
verifiers/v1/runtimes/native_compose.py,sha256=8WBqWqyYWtohcrE_iq8SuuxsDFgK4Ncos8DxQS7FL_A,42335
|
|
148
|
-
verifiers/v1/runtimes/private_network.py,sha256=
|
|
148
|
+
verifiers/v1/runtimes/private_network.py,sha256=69ad7-FuGOK9irTO0Iut4JQ23YQMiVzQVYbCVRmF1IM,6717
|
|
149
149
|
verifiers/v1/runtimes/runtime.py,sha256=U_0G8DkeTPoyxQRN6Qmjll6FZ0bDwlijW4cC11wMbw4,10669
|
|
150
150
|
verifiers/v1/runtimes/strategies.py,sha256=WtIrIpKmvjvqpUfwLUwDNJcgRLE8d-2sx7reks2S2PA,8765
|
|
151
151
|
verifiers/v1/runtimes/backends/custom.py,sha256=Iz1Brd4dBTpO1zYVc2KA0u5sxz5ZUROY_Cdme5W33hM,2875
|
|
@@ -154,8 +154,8 @@ verifiers/v1/runtimes/backends/prime.py,sha256=-AAPG0aUvyK8G-7Y6xII5Uwwod537HfL_
|
|
|
154
154
|
verifiers/v1/runtimes/backends/subprocess.py,sha256=naOWJGmcaOlu2ZdRbUwhJicJdxASDRAUhDT0jzDff3w,8591
|
|
155
155
|
verifiers/v1/tasksets/__init__.py,sha256=2ijE3qIlLoUA02g6iysOwWQylyBBQL1GhSpjv8_bp0w,521
|
|
156
156
|
verifiers/v1/tasksets/harbor/__init__.py,sha256=FjW4tM3rgGALMK-8p7ux26G4-d4ZFVmaAmO6Fni6e_g,214
|
|
157
|
-
verifiers/v1/tasksets/harbor/taskset.py,sha256=
|
|
158
|
-
verifiers/v1/tasksets/harbor/toolset.py,sha256=
|
|
157
|
+
verifiers/v1/tasksets/harbor/taskset.py,sha256=ddUoeAPFDMg5injOeSYTVIE0lStUyjV6KauxEFIiTXQ,43670
|
|
158
|
+
verifiers/v1/tasksets/harbor/toolset.py,sha256=l-h1GATE9HLnEjb844CzBAiVLkPmE-XarjBlQ2ec5gM,3969
|
|
159
159
|
verifiers/v1/tasksets/nemo_gym/__init__.py,sha256=654gAvG3Wd_Z_nh6mypeKn4s_IIQ0Ge6vcZvxTHC2_E,306
|
|
160
160
|
verifiers/v1/tasksets/nemo_gym/response.py,sha256=EhrsquEP8g0bjzAThGfE6Ypgy86_nVX235NiFYtVDVM,4463
|
|
161
161
|
verifiers/v1/tasksets/nemo_gym/server.py,sha256=33C-VDZxPtMV2TFxJVIKijmtBLNlVeRs92ctPE3qAsM,2036
|
|
@@ -188,8 +188,8 @@ verifiers/v1/utils/scope.py,sha256=zbs4pj6AVk4jywlAJ3AX0Q0_kzB9dBB02nY-9H4ELdQ,8
|
|
|
188
188
|
verifiers/v1/utils/score.py,sha256=493yJVMw8teCu9JxapxMFPFzI0hNUqdo0Y2nGW4kckk,6200
|
|
189
189
|
verifiers/v1/utils/trace_store.py,sha256=Qo9qvsJAl8PoRUavjQAfUB2VNxmUtYQtU2ejLKPzY9c,3382
|
|
190
190
|
verifiers/v1/utils/version.py,sha256=-obEo_-l9-D8FLef4hYxncOe-uJpxrM1g2Hig_37Sgs,1607
|
|
191
|
-
verifiers-0.4.2.
|
|
192
|
-
verifiers-0.4.2.
|
|
193
|
-
verifiers-0.4.2.
|
|
194
|
-
verifiers-0.4.2.
|
|
195
|
-
verifiers-0.4.2.
|
|
191
|
+
verifiers-0.4.2.dev56.dist-info/METADATA,sha256=QJ-uFafM_SKKgmgMFvYtHHxg1ZhfAxPIRyO9fsF2UTM,5116
|
|
192
|
+
verifiers-0.4.2.dev56.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
193
|
+
verifiers-0.4.2.dev56.dist-info/entry_points.txt,sha256=qdMg7ajiFpDsHf7tuPMRclJXizu1J6LTWawS5YS0B0I,137
|
|
194
|
+
verifiers-0.4.2.dev56.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
|
|
195
|
+
verifiers-0.4.2.dev56.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|