hud-python 0.4.10__py3-none-any.whl → 0.4.12__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.
Potentially problematic release.
This version of hud-python might be problematic. Click here for more details.
- hud/__main__.py +8 -0
- hud/agents/base.py +7 -8
- hud/agents/langchain.py +2 -2
- hud/agents/tests/test_openai.py +3 -1
- hud/cli/__init__.py +106 -51
- hud/cli/build.py +121 -71
- hud/cli/debug.py +2 -2
- hud/cli/{mcp_server.py → dev.py} +60 -25
- hud/cli/eval.py +148 -68
- hud/cli/init.py +0 -1
- hud/cli/list_func.py +72 -71
- hud/cli/pull.py +1 -2
- hud/cli/push.py +35 -23
- hud/cli/remove.py +35 -41
- hud/cli/tests/test_analyze.py +2 -1
- hud/cli/tests/test_analyze_metadata.py +42 -49
- hud/cli/tests/test_build.py +28 -52
- hud/cli/tests/test_cursor.py +1 -1
- hud/cli/tests/test_debug.py +1 -1
- hud/cli/tests/test_list_func.py +75 -64
- hud/cli/tests/test_main_module.py +30 -0
- hud/cli/tests/test_mcp_server.py +3 -3
- hud/cli/tests/test_pull.py +30 -61
- hud/cli/tests/test_push.py +70 -89
- hud/cli/tests/test_registry.py +36 -38
- hud/cli/tests/test_utils.py +1 -1
- hud/cli/utils/__init__.py +1 -0
- hud/cli/{docker_utils.py → utils/docker.py} +36 -0
- hud/cli/{env_utils.py → utils/environment.py} +7 -7
- hud/cli/{interactive.py → utils/interactive.py} +91 -19
- hud/cli/{analyze_metadata.py → utils/metadata.py} +12 -8
- hud/cli/{registry.py → utils/registry.py} +28 -30
- hud/cli/{remote_runner.py → utils/remote_runner.py} +1 -1
- hud/cli/utils/runner.py +134 -0
- hud/cli/utils/server.py +250 -0
- hud/clients/base.py +1 -1
- hud/clients/fastmcp.py +7 -5
- hud/clients/mcp_use.py +8 -6
- hud/server/server.py +34 -4
- hud/shared/exceptions.py +11 -0
- hud/shared/tests/test_exceptions.py +22 -0
- hud/telemetry/tests/__init__.py +0 -0
- hud/telemetry/tests/test_replay.py +40 -0
- hud/telemetry/tests/test_trace.py +63 -0
- hud/tools/base.py +20 -3
- hud/tools/computer/hud.py +15 -6
- hud/tools/executors/tests/test_base_executor.py +27 -0
- hud/tools/response.py +15 -4
- hud/tools/tests/test_response.py +60 -0
- hud/tools/tests/test_tools_init.py +49 -0
- hud/utils/design.py +19 -8
- hud/utils/mcp.py +17 -5
- hud/utils/tests/test_mcp.py +112 -0
- hud/utils/tests/test_version.py +1 -1
- hud/version.py +1 -1
- {hud_python-0.4.10.dist-info → hud_python-0.4.12.dist-info}/METADATA +14 -10
- {hud_python-0.4.10.dist-info → hud_python-0.4.12.dist-info}/RECORD +62 -52
- hud/cli/runner.py +0 -160
- /hud/cli/{cursor.py → utils/cursor.py} +0 -0
- /hud/cli/{utils.py → utils/logging.py} +0 -0
- {hud_python-0.4.10.dist-info → hud_python-0.4.12.dist-info}/WHEEL +0 -0
- {hud_python-0.4.10.dist-info → hud_python-0.4.12.dist-info}/entry_points.txt +0 -0
- {hud_python-0.4.10.dist-info → hud_python-0.4.12.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hud-python
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.12
|
|
4
4
|
Summary: SDK for the HUD platform.
|
|
5
5
|
Project-URL: Homepage, https://github.com/hud-evals/hud-python
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/hud-evals/hud-python/issues
|
|
@@ -56,20 +56,28 @@ Provides-Extra: agent
|
|
|
56
56
|
Requires-Dist: anthropic; extra == 'agent'
|
|
57
57
|
Requires-Dist: datasets>=2.14.0; extra == 'agent'
|
|
58
58
|
Requires-Dist: dotenv>=0.9.9; extra == 'agent'
|
|
59
|
-
Requires-Dist:
|
|
59
|
+
Requires-Dist: ipykernel; extra == 'agent'
|
|
60
|
+
Requires-Dist: ipython<9; extra == 'agent'
|
|
61
|
+
Requires-Dist: jupyter-client; extra == 'agent'
|
|
62
|
+
Requires-Dist: jupyter-core; extra == 'agent'
|
|
60
63
|
Requires-Dist: langchain; extra == 'agent'
|
|
61
64
|
Requires-Dist: langchain-anthropic; extra == 'agent'
|
|
62
65
|
Requires-Dist: langchain-openai; extra == 'agent'
|
|
66
|
+
Requires-Dist: mcp-use; extra == 'agent'
|
|
63
67
|
Requires-Dist: numpy>=1.24.0; extra == 'agent'
|
|
64
68
|
Requires-Dist: openai; extra == 'agent'
|
|
65
69
|
Provides-Extra: agents
|
|
66
70
|
Requires-Dist: anthropic; extra == 'agents'
|
|
67
71
|
Requires-Dist: datasets>=2.14.0; extra == 'agents'
|
|
68
72
|
Requires-Dist: dotenv>=0.9.9; extra == 'agents'
|
|
69
|
-
Requires-Dist:
|
|
73
|
+
Requires-Dist: ipykernel; extra == 'agents'
|
|
74
|
+
Requires-Dist: ipython<9; extra == 'agents'
|
|
75
|
+
Requires-Dist: jupyter-client; extra == 'agents'
|
|
76
|
+
Requires-Dist: jupyter-core; extra == 'agents'
|
|
70
77
|
Requires-Dist: langchain; extra == 'agents'
|
|
71
78
|
Requires-Dist: langchain-anthropic; extra == 'agents'
|
|
72
79
|
Requires-Dist: langchain-openai; extra == 'agents'
|
|
80
|
+
Requires-Dist: mcp-use; extra == 'agents'
|
|
73
81
|
Requires-Dist: numpy>=1.24.0; extra == 'agents'
|
|
74
82
|
Requires-Dist: openai; extra == 'agents'
|
|
75
83
|
Provides-Extra: dev
|
|
@@ -77,7 +85,6 @@ Requires-Dist: aiodocker>=0.24.0; extra == 'dev'
|
|
|
77
85
|
Requires-Dist: anthropic; extra == 'dev'
|
|
78
86
|
Requires-Dist: datasets>=2.14.0; extra == 'dev'
|
|
79
87
|
Requires-Dist: dotenv>=0.9.9; extra == 'dev'
|
|
80
|
-
Requires-Dist: hud-mcp-use-python-sdk>=0.1.0; extra == 'dev'
|
|
81
88
|
Requires-Dist: inspect-ai>=0.3.80; extra == 'dev'
|
|
82
89
|
Requires-Dist: ipykernel; extra == 'dev'
|
|
83
90
|
Requires-Dist: ipython<9; extra == 'dev'
|
|
@@ -86,6 +93,7 @@ Requires-Dist: jupyter-core; extra == 'dev'
|
|
|
86
93
|
Requires-Dist: langchain; extra == 'dev'
|
|
87
94
|
Requires-Dist: langchain-anthropic; extra == 'dev'
|
|
88
95
|
Requires-Dist: langchain-openai; extra == 'dev'
|
|
96
|
+
Requires-Dist: mcp-use; extra == 'dev'
|
|
89
97
|
Requires-Dist: numpy>=1.24.0; extra == 'dev'
|
|
90
98
|
Requires-Dist: openai; extra == 'dev'
|
|
91
99
|
Requires-Dist: pillow>=11.1.0; extra == 'dev'
|
|
@@ -233,7 +241,7 @@ Any hud MCP environment and evaluation works with our RL pipeline. Even our remo
|
|
|
233
241
|
|
|
234
242
|
This is Claude Computer Use running on our proprietary financial analyst benchmark [SheetBench-50](https://huggingface.co/datasets/hud-evals/SheetBench-50):
|
|
235
243
|
|
|
236
|
-

|
|
237
245
|
|
|
238
246
|
> [See this trace on _app.hud.so_](https://app.hud.so/trace/9e212e9e-3627-4f1f-9eb5-c6d03c59070a)
|
|
239
247
|
|
|
@@ -385,7 +393,7 @@ result = await ClaudeAgent().run({ # See all agents: https://docs.hud.so/refere
|
|
|
385
393
|
|
|
386
394
|
All leaderboards are publicly available on [app.hud.so/leaderboards](https://app.hud.so/leaderboards) (see [docs](https://docs.hud.so/evaluate-agents/leaderboards))
|
|
387
395
|
|
|
388
|
-

|
|
389
397
|
|
|
390
398
|
We highly suggest running 3-5 evaluations per dataset for the most consistent results across multiple jobs.
|
|
391
399
|
|
|
@@ -430,10 +438,6 @@ graph LR
|
|
|
430
438
|
Trace --> Dashboard
|
|
431
439
|
AnyMCP -->|"MCP"| API
|
|
432
440
|
|
|
433
|
-
style Dashboard fill:#e0e7ff,stroke:#6366f1,stroke-width:2px
|
|
434
|
-
style SDK fill:#fef3c7,stroke:#f59e0b,stroke-width:2px
|
|
435
|
-
style RemoteEnv fill:#d1fae5,stroke:#10b981,stroke-width:2px
|
|
436
|
-
style AnyMCP fill:#fce7f3,stroke:#ec4899,stroke-width:2px,stroke-dasharray: 5 5
|
|
437
441
|
```
|
|
438
442
|
|
|
439
443
|
## CLI reference
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
hud/__init__.py,sha256=BjAhZtsHbGN371Q8t3o4v4jltedkmDE85xW0yOILU9g,397
|
|
2
|
+
hud/__main__.py,sha256=YR8Dq8OhINOsVfQ55PmRXXg4fEK84Rt_-rMtJ5rvhWo,145
|
|
2
3
|
hud/datasets.py,sha256=8lqC840kcNx01D2CcWZCd1j0eZTpepILmQrvohZIZYU,12056
|
|
3
4
|
hud/settings.py,sha256=WIJDsyrfwBZGcaGT46YUOpW8xjBZl3siXXprd92ASAg,2039
|
|
4
5
|
hud/types.py,sha256=pQWOPYXUZ2hhK0h-AHBc3DCj5tkbRXHqKZnsQQIcSFA,4237
|
|
5
|
-
hud/version.py,sha256=
|
|
6
|
+
hud/version.py,sha256=9ZxDFavFCdgSfY_Jd59VomoRB2HCKh4pQnAZlzaXWJ4,105
|
|
6
7
|
hud/agents/__init__.py,sha256=UoIkljWdbq4bM0LD-mSaw6w826EqdEjOk7r6glNYwYQ,286
|
|
7
|
-
hud/agents/base.py,sha256=
|
|
8
|
+
hud/agents/base.py,sha256=M2g7Cj5InE4EsXpmxqURprC3IHNGvNZFBZ8HPIQxz-A,24574
|
|
8
9
|
hud/agents/claude.py,sha256=snbYFPW-KAkw4n9Rdz7dC2f46RuSHJKC53HPm8SucFM,14273
|
|
9
|
-
hud/agents/langchain.py,sha256=
|
|
10
|
+
hud/agents/langchain.py,sha256=1EgCy8jfjunsWxlPC5XfvfLS6_XZVrIF1ZjtHcrvhYw,9584
|
|
10
11
|
hud/agents/openai.py,sha256=kHG73mohO4uru49qmQiygUFt0eDCGJU06weqIUwTO3Y,14323
|
|
11
12
|
hud/agents/openai_chat_generic.py,sha256=jTJ-KY6HkglPK0iwZH5v3PVnaUjDsWc9IbRo3AbXlyE,5322
|
|
12
13
|
hud/agents/misc/__init__.py,sha256=BYi4Ytp9b_vycpZFXnr5Oyw6ncKLNNGml8Jrb7bWUb4,136
|
|
@@ -15,49 +16,52 @@ hud/agents/tests/__init__.py,sha256=W-O-_4i34d9TTyEHV-O_q1Ai1gLhzwDaaPo02_TWQIY,
|
|
|
15
16
|
hud/agents/tests/test_base.py,sha256=F39ajSqASGUbPyPoWSY9KARFav62qNTK74W11Tr1Tg4,28970
|
|
16
17
|
hud/agents/tests/test_claude.py,sha256=wqEKlzEvx8obz1sSm4NY0j-Zyt1qWNfDOmRqYIuAEd0,13069
|
|
17
18
|
hud/agents/tests/test_client.py,sha256=Sk5bGZw2hL5GsVi2LMp9tsLngl5ZQ18pkpeeQmts0ao,13908
|
|
18
|
-
hud/agents/tests/test_openai.py,sha256=
|
|
19
|
-
hud/cli/__init__.py,sha256=
|
|
19
|
+
hud/agents/tests/test_openai.py,sha256=ZJqctxCbJtKw6TkJCP4D2xAcG8CkxzDXO7dh5IIWN_M,9175
|
|
20
|
+
hud/cli/__init__.py,sha256=SwRcyG1UtyXqdai-kWduvyJvpo2WJmI9AffzmqUprzs,29987
|
|
20
21
|
hud/cli/__main__.py,sha256=fDH7XITyuDITwSDIVwRso06aouADO0CzTHKqp5TOwJE,143
|
|
21
22
|
hud/cli/analyze.py,sha256=G-tjT1xLPLcYhDhZEaI7TAIS0z0OACUksnGFoAWd2ag,14416
|
|
22
|
-
hud/cli/
|
|
23
|
-
hud/cli/build.py,sha256=eQG-nxgTzyLOCQsFyXzP4_SLh_IjZLtE60bmV9X9KH8,16909
|
|
23
|
+
hud/cli/build.py,sha256=c8pg8iUlCT1-E4koEKFX1Nx8oGaB2ln57pHdOCCDAvs,19126
|
|
24
24
|
hud/cli/clone.py,sha256=AwVDIuhr8mHb1oT2Af2HrD25SiTdwATpE6zd93vzLgA,6099
|
|
25
|
-
hud/cli/
|
|
26
|
-
hud/cli/
|
|
27
|
-
hud/cli/
|
|
28
|
-
hud/cli/
|
|
29
|
-
hud/cli/
|
|
30
|
-
hud/cli/
|
|
31
|
-
hud/cli/
|
|
32
|
-
hud/cli/
|
|
33
|
-
hud/cli/mcp_server.py,sha256=cb73hHagmUqn0WmKbCYi26AGGZB9XhdxMoxvFnFhYgM,25501
|
|
34
|
-
hud/cli/pull.py,sha256=qVxJ4yJKUPVGWqrf4gyg6yucDsZGU3WhsNvyxitftqE,11976
|
|
35
|
-
hud/cli/push.py,sha256=vr0S-0pEcoyEuDoiqrNS8rwtRsAIqnmou8XVEE_jcqU,17879
|
|
36
|
-
hud/cli/registry.py,sha256=CNLI-e7EeMxND2MOz6uEIwbEbItURZcoMCZR_5L4Q50,4540
|
|
37
|
-
hud/cli/remote_runner.py,sha256=X01x6DeVkyc9HgxVCGEZJxEhhVPvHpAMoeYR44R8_BQ,9405
|
|
38
|
-
hud/cli/remove.py,sha256=DGYtkgzWQHeoZo3BIDHPRc5PKipkwR2942TOJPFmWPc,6723
|
|
39
|
-
hud/cli/runner.py,sha256=XpZ_4Dc4P94WHW2vJtDyWoqJTNlR5yeyr79VVuGgCkU,4877
|
|
40
|
-
hud/cli/utils.py,sha256=ZgjjKVPAa7dcfJ6SMBrdfZ63d1UnnhYC-zeh7gFBXsI,8841
|
|
25
|
+
hud/cli/debug.py,sha256=FNzg9-_ZzUJA1nJfubmop7_2OT5mqnWsdpZyi4AVSXA,14163
|
|
26
|
+
hud/cli/dev.py,sha256=Tx0Pf54oeHJQytVRx4up3mYE9m_Gxo3esSkhTRTCVX8,27074
|
|
27
|
+
hud/cli/eval.py,sha256=yBHwekweC2orpWRVpPBAFSgWtpKpz8Dsa5drla-iTpI,12425
|
|
28
|
+
hud/cli/init.py,sha256=GH6ls9JZ_pXaiVmsLwfv45rdRXa1tAfAMybvQX9Ooqg,7659
|
|
29
|
+
hud/cli/list_func.py,sha256=0pEC4XD1ReUza0EFfK4dFXAbUAwyVavm6zI9Z3bpPAw,7054
|
|
30
|
+
hud/cli/pull.py,sha256=JHwCwUwRO0Nzbgm9mkjsz6EpxbxgwQVhgNSY64nNZ-s,11969
|
|
31
|
+
hud/cli/push.py,sha256=4KrEHj0_i3xJNCB3eRjANmHFhSW4MFfpnld3nfVYENs,17904
|
|
32
|
+
hud/cli/remove.py,sha256=USAvB6pbMA3jd19xUtLEBiMsklVTEfE2Maw9nYcpSAE,6619
|
|
41
33
|
hud/cli/tests/__init__.py,sha256=ZrGVkmH7DHXGqOvjOSNGZeMYaFIRB2K8c6hwr8FPJ-8,68
|
|
42
|
-
hud/cli/tests/test_analyze.py,sha256=
|
|
43
|
-
hud/cli/tests/test_analyze_metadata.py,sha256=
|
|
44
|
-
hud/cli/tests/test_build.py,sha256=
|
|
34
|
+
hud/cli/tests/test_analyze.py,sha256=SwxvRlnw-VaEwKN2nd1FJAxfhieujPjh7PdQh_LYJ5E,11050
|
|
35
|
+
hud/cli/tests/test_analyze_metadata.py,sha256=s-N-ETJECloiNQhdnZrfvxDI4pWBI8hl8edQNSRaw14,9982
|
|
36
|
+
hud/cli/tests/test_build.py,sha256=9B_-jkCDMsNNn087SWbPEJVsbD_D1u5Mv1gBIySPuhU,14409
|
|
45
37
|
hud/cli/tests/test_cli_init.py,sha256=_H0bAn5_skJ91Zj8P5P_wtZoPWvrN7jMhPZvmnnf0n8,11289
|
|
46
38
|
hud/cli/tests/test_cli_main.py,sha256=0wMho9p9NcGjp0jLiUtCQh_FYdbMaCJtSY3sBbSgPwA,697
|
|
47
39
|
hud/cli/tests/test_clone.py,sha256=oC2mf-41QQVc7ODJkjrWbVPNMB2fDW3nZ6jY6w93gvQ,4458
|
|
48
|
-
hud/cli/tests/test_cursor.py,sha256=
|
|
49
|
-
hud/cli/tests/test_debug.py,sha256=
|
|
50
|
-
hud/cli/tests/test_list_func.py,sha256=
|
|
51
|
-
hud/cli/tests/
|
|
52
|
-
hud/cli/tests/
|
|
53
|
-
hud/cli/tests/
|
|
54
|
-
hud/cli/tests/
|
|
55
|
-
hud/cli/tests/
|
|
40
|
+
hud/cli/tests/test_cursor.py,sha256=ZfxAFKJesJ3UV1JBoASSRlv6BXbpvVEk_pjxUg1jnf4,9821
|
|
41
|
+
hud/cli/tests/test_debug.py,sha256=bQ76d_0HJfthHBSECmGNv499ZE57CIOKsanMlNfNHGk,18036
|
|
42
|
+
hud/cli/tests/test_list_func.py,sha256=pkG4TtJJBMi9Xk8KBNFBlGcam7kwz01IRsjfQBL2PxM,10700
|
|
43
|
+
hud/cli/tests/test_main_module.py,sha256=6RhwCcdRSN2uQV6-adti40ZcLd3u-mPR1ai6wL64c6Y,1105
|
|
44
|
+
hud/cli/tests/test_mcp_server.py,sha256=FM8F_hSgvljDRzu4RDHzd_vcdRIs2kMzoKty28Qb_f8,4357
|
|
45
|
+
hud/cli/tests/test_pull.py,sha256=7wHxdf_rN3LDmo554-S63WT6eoYUquwDWpjgoy_f1eQ,12923
|
|
46
|
+
hud/cli/tests/test_push.py,sha256=8LpKY4lASRYPd8xM8c_SlTbE11IQ8kCfzfC8UBqhzN4,12709
|
|
47
|
+
hud/cli/tests/test_registry.py,sha256=mTfgr6fkY5ygRnSgbVU7988QRQKdpEKUpWmQicGnHGs,9461
|
|
48
|
+
hud/cli/tests/test_utils.py,sha256=_oa2lTvgqJxXe0Mtovxb8x-Sug-f6oJJKvG67r5pFtA,13474
|
|
49
|
+
hud/cli/utils/__init__.py,sha256=L6s0oNzY2LugGp9faodCPnjzM-ZUorUH05-HmYOq5hY,35
|
|
50
|
+
hud/cli/utils/cursor.py,sha256=fy850p0rVp5k_1wwOCI7rK1SggbselJrywFInSQ2gio,3009
|
|
51
|
+
hud/cli/utils/docker.py,sha256=VTUcoPqxh3uXOgvL6NSqYiSDhyCPRp3jTfFbnIDwumg,3774
|
|
52
|
+
hud/cli/utils/environment.py,sha256=-Z8UkXlRpdGsBkjw-x1EJ2IwcSCrlWaaf25ZoPDMrtw,4225
|
|
53
|
+
hud/cli/utils/interactive.py,sha256=QiKL14rRdzuU_wBgCYEoA3JVMO6eJUezAZxX0GjZKRU,16526
|
|
54
|
+
hud/cli/utils/logging.py,sha256=ZgjjKVPAa7dcfJ6SMBrdfZ63d1UnnhYC-zeh7gFBXsI,8841
|
|
55
|
+
hud/cli/utils/metadata.py,sha256=VBvNNqHS5-sH97H3PhVmdOcyzZ2NGH47fVUUtHBoGLQ,7808
|
|
56
|
+
hud/cli/utils/registry.py,sha256=N49cDHOWDp85EawIhQFQItt-yvFZpfLm74m8l4-LQy4,4349
|
|
57
|
+
hud/cli/utils/remote_runner.py,sha256=50Fqp7LG9dwiDyNM-LspNiKrSHmEo00C_Iuu5jg9mXU,9407
|
|
58
|
+
hud/cli/utils/runner.py,sha256=qZI1lFNZIFn6d919awUkMtjQ36TfhAvyqGRzQmkal8c,4269
|
|
59
|
+
hud/cli/utils/server.py,sha256=uSx2DjG5vX-PFoD8zNH-gBHbkTNSHveFSVdAfmp09Tc,7341
|
|
56
60
|
hud/clients/README.md,sha256=XNE3mch95ozDgVqfwCGcrhlHY9CwT1GKfNANNboowto,3826
|
|
57
61
|
hud/clients/__init__.py,sha256=bcPIa7dwH5ENsjh7CzjsJ84fm7Ma93NBc2lGfSjGAKM,328
|
|
58
|
-
hud/clients/base.py,sha256=
|
|
59
|
-
hud/clients/fastmcp.py,sha256
|
|
60
|
-
hud/clients/mcp_use.py,sha256=
|
|
62
|
+
hud/clients/base.py,sha256=ob8G7_Gi-aENnc0yxHpZmzuqBD-swn_jVWkY2Iw7F4k,13995
|
|
63
|
+
hud/clients/fastmcp.py,sha256=w7psl3JRIGxyqznxHYyhsptY6d1obPfz6y7jpJimC7E,9502
|
|
64
|
+
hud/clients/mcp_use.py,sha256=7yDzv_w0mmDbOWMIN0_AGuzeDiBWwq27tcoVkZJXhk4,12174
|
|
61
65
|
hud/clients/tests/__init__.py,sha256=sKOtJFFa4mDIXh1U6O8ZUHjigE8CiRMQ2PzJTIBZuVE,33
|
|
62
66
|
hud/clients/tests/test_client_integration.py,sha256=kohU6jfCNfwSnAushHeB1_CmDlRfQc7VBL0GEdJYSeI,4198
|
|
63
67
|
hud/clients/tests/test_fastmcp.py,sha256=4q3TzDjuieTZa89taiNJIrzbUncNkYOG4MaubypA21k,13030
|
|
@@ -78,31 +82,34 @@ hud/otel/tests/test_processors.py,sha256=np0R4ssd9j6LJSJykJ5bNjl0POwNYNhgb7BqOZH
|
|
|
78
82
|
hud/server/__init__.py,sha256=8LUwgsXO8xiViWP7uImDwcOsWLu01r5F4r8U8qH3rSY,91
|
|
79
83
|
hud/server/context.py,sha256=6bCdSzv1FGyItu9472HbbYef279H7QuMGJDR8EtYg5Y,3210
|
|
80
84
|
hud/server/low_level.py,sha256=XYs2pOJ9kN4OcJ6ahDmXM5mWkzq5wJLpKFInUYrWEok,4701
|
|
81
|
-
hud/server/server.py,sha256=
|
|
85
|
+
hud/server/server.py,sha256=q6JdnsnzX4WwBLTQCCuH0pjbYaRtbuQ9xtYuHiHpa6U,7999
|
|
82
86
|
hud/server/helper/__init__.py,sha256=ZxO8VP3RZEBBp-q65VixuhzQgqEPSVzW0hEY9J9QqDA,116
|
|
83
87
|
hud/server/tests/__init__.py,sha256=eEYYkxX5Hz9woXVOBJ2H2_CQoEih0vH6nRt3sH2Z8v8,49
|
|
84
88
|
hud/shared/__init__.py,sha256=IPxPCqtPLguryN-nBq78Sakypw2bRiE2iHv3SXG8YRk,139
|
|
85
|
-
hud/shared/exceptions.py,sha256=
|
|
89
|
+
hud/shared/exceptions.py,sha256=tLmXxBaW4S04gnfc1vrjTqXwIECVlhFZqO5u0kjk_7c,5902
|
|
86
90
|
hud/shared/requests.py,sha256=og2jEbBHCebrg4kiBShunWKMaxQSaO2V7SHU5HPslHg,8848
|
|
87
91
|
hud/shared/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
88
|
-
hud/shared/tests/test_exceptions.py,sha256=
|
|
92
|
+
hud/shared/tests/test_exceptions.py,sha256=JvraqsLUIWx4xoYn4UGytE11hPlc5ikj2SoMrFc_fIE,6075
|
|
89
93
|
hud/shared/tests/test_requests.py,sha256=nKFcSN1sjrOouVU2xik9lE5Wxapy3EWsO8iIXrM_Sts,9114
|
|
90
94
|
hud/telemetry/__init__.py,sha256=pPqkq4XekqJEkzwoCwGHGAv1NcytZ55yIB1aLxBpo6U,663
|
|
91
95
|
hud/telemetry/instrument.py,sha256=m3u6YK02PTk39Jr4L3se7l-cYyKx0maCaqf5Z5JqWNA,14096
|
|
92
96
|
hud/telemetry/job.py,sha256=DSZU_yVpag4VOGkCC5egcjVYuZ02nuzMqFZCgJqcQvM,9998
|
|
93
97
|
hud/telemetry/replay.py,sha256=YW17s314s5Wy6Rl8MXHqg1FU8EF9_XcHBMJI0rrkyS4,2306
|
|
94
98
|
hud/telemetry/trace.py,sha256=gem9pcioNI71hLs18vNidv-7KAZBJAn35stjVvOu_Ic,2208
|
|
99
|
+
hud/telemetry/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
100
|
+
hud/telemetry/tests/test_replay.py,sha256=eREc6qgSJDRT1pOPdyhiEoEJ9H2yT1ospaU1RvTKlvg,1328
|
|
101
|
+
hud/telemetry/tests/test_trace.py,sha256=uKPjVqJ7kSWhiLXxMVQjQ3PcuKM-ryNs38LNaJanByg,2477
|
|
95
102
|
hud/tools/__init__.py,sha256=dT-s4zs2B5GsOZ_K2tZZLKuSIp4u3RIvNYMJ_eUpkrE,960
|
|
96
|
-
hud/tools/base.py,sha256=
|
|
103
|
+
hud/tools/base.py,sha256=4qm5LS3SAkrq_lyfToWYCN9tNvTHohKJNH2siHkE364,15824
|
|
97
104
|
hud/tools/bash.py,sha256=LJViMGb3lTGBm_gequVVTM7ySh1Xh9bOOIZXU29Lmrw,5209
|
|
98
105
|
hud/tools/edit.py,sha256=N0AYFXp07-vAJy2li7lvHOL6hfgJOU4LL3iLSZrbRWU,12745
|
|
99
106
|
hud/tools/playwright.py,sha256=lF7NxyEu8YbB7tpmCoTf8p9HxIrejahC67x3Xs0Jjb4,15007
|
|
100
|
-
hud/tools/response.py,sha256=
|
|
107
|
+
hud/tools/response.py,sha256=t6Oc8NM4u951A1XMCBaIkFyu3VNEQ8dcWURyTygfZmA,2228
|
|
101
108
|
hud/tools/types.py,sha256=g-CWnUUDSxxIfUy54S1bpY1nfTzdYO1R_nPKYReABjQ,2734
|
|
102
109
|
hud/tools/utils.py,sha256=bfVyYMcBOJvr1QdptCjVb6jaHVGIL5WUxmY59kzMekQ,1447
|
|
103
110
|
hud/tools/computer/__init__.py,sha256=3tQBXPtGX0WPCwFXzEs3-duwg0rPEgj_0-K7aHskeQE,367
|
|
104
111
|
hud/tools/computer/anthropic.py,sha256=oJfNMnjNFAn9mW1xY1nbWnTY2IqwFqdDR0mWSf8lu-s,17352
|
|
105
|
-
hud/tools/computer/hud.py,sha256=
|
|
112
|
+
hud/tools/computer/hud.py,sha256=8oA-ofitdUxOfP_3QVdYShMyYLEVS8tdz7KSYcmAmbw,16455
|
|
106
113
|
hud/tools/computer/openai.py,sha256=QEsF45LWOHftDrAoIOnCFZZT1cL--s-ArSov5aluWb8,11189
|
|
107
114
|
hud/tools/computer/settings.py,sha256=b1XJsEQjB9qhN1xHfVENATkzinEebe0ZPyLzMgCGkKY,2763
|
|
108
115
|
hud/tools/executors/__init__.py,sha256=jHxfus9SLhkL6YGtebR5RyKYyVAix3yu5EkUp2Q27Kg,732
|
|
@@ -110,7 +117,7 @@ hud/tools/executors/base.py,sha256=VP2SiIEBSXvklnkasGxVuy-OmDMd9rjuxZh_YuUQH7A,1
|
|
|
110
117
|
hud/tools/executors/pyautogui.py,sha256=11eUQJAgFmHxwd9INAb2L9tgBmEv2Vgn0cwhwvGKlC8,22361
|
|
111
118
|
hud/tools/executors/xdo.py,sha256=vc3ciSojmJ58HoL1VC2MC-F_KFrk4_YQHmoJp4rgv1k,18136
|
|
112
119
|
hud/tools/executors/tests/__init__.py,sha256=opFpGSH6cEqIZgt9izXd3Yt85pC7xkxiYmOZQTHf4AY,32
|
|
113
|
-
hud/tools/executors/tests/test_base_executor.py,sha256=
|
|
120
|
+
hud/tools/executors/tests/test_base_executor.py,sha256=crTXzxsMF7cnUihCpTzpqOYSjXpZWMj-nofcqC4Nu8U,13548
|
|
114
121
|
hud/tools/executors/tests/test_pyautogui_executor.py,sha256=Shv6pnWtlsMXBMlN5DjlttCu6rZ1H447d1QZumduOnU,6640
|
|
115
122
|
hud/tools/tests/__init__.py,sha256=eEYYkxX5Hz9woXVOBJ2H2_CQoEih0vH6nRt3sH2Z8v8,49
|
|
116
123
|
hud/tools/tests/test_base.py,sha256=m6EelJ47F_hMqvRjrr6vEdiW1AtLgz3ZH1V1IUzTxzI,8983
|
|
@@ -121,23 +128,26 @@ hud/tools/tests/test_computer_actions.py,sha256=YtUNFL7anhpXrcvg8EoUY1CqIV-TAAya
|
|
|
121
128
|
hud/tools/tests/test_edit.py,sha256=pHw1MSs-P8mDKrwKUDW77vQfoMNwmbrEBt_MkKr2rE0,9734
|
|
122
129
|
hud/tools/tests/test_init.py,sha256=fl4Tf4IUUFOKhdSRHu9GE4mkaTDiXw-2auxj4s84HuE,698
|
|
123
130
|
hud/tools/tests/test_playwright_tool.py,sha256=0va9IuZ7P5vXZDzan_sn-89ahu3piQMQDaiREzEvXNc,6736
|
|
131
|
+
hud/tools/tests/test_response.py,sha256=pEv3p0k1reSKtjbA8xneu--OuCHydbHHl6YWorV4zOg,2212
|
|
124
132
|
hud/tools/tests/test_tools.py,sha256=paz28V98Am-oR7MBJPDgY-BRV14HQo_0F6X5JIC8aic,4563
|
|
133
|
+
hud/tools/tests/test_tools_init.py,sha256=qbUCNWbswlkbsSJR-CBnRk_h_l1CLasRffIhp8tMG84,1726
|
|
125
134
|
hud/tools/tests/test_utils.py,sha256=oYxEnLpSA5sEeYFGUTj74QRNv0AHP3AjmYYHXgIW0BY,5496
|
|
126
135
|
hud/utils/__init__.py,sha256=ckuIzwqgTxkzASa04XTPsOu_TqsRYUKBWUYfcSi3Xnc,164
|
|
127
136
|
hud/utils/async_utils.py,sha256=5cKrJcnaHV2eJNxeyx0r7fPcdPTDBK7kM9-nLaF51X4,2409
|
|
128
|
-
hud/utils/design.py,sha256=
|
|
129
|
-
hud/utils/mcp.py,sha256=
|
|
137
|
+
hud/utils/design.py,sha256=MueBX8KpENuQlZFPCh2qiCqGrJghm-jilQA-ZQGZ9ZA,9375
|
|
138
|
+
hud/utils/mcp.py,sha256=uFn4qE2IIe-isV0mKQI2rlMDl6l0dHfovYgGa-vOfI8,2455
|
|
130
139
|
hud/utils/progress.py,sha256=suikwFM8sdSfkV10nAOEaInDhG4XKgOSvFePg4jSj1A,5927
|
|
131
140
|
hud/utils/telemetry.py,sha256=hrVIx2rUjSGyy9IVxTZ_3Jii83PiHjyFRd5ls2whimM,1863
|
|
132
141
|
hud/utils/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
133
142
|
hud/utils/tests/test_async_utils.py,sha256=RkdSnYErRV3Jn7dfg6CPlcE1RSUL__2B627oIqAyy1s,5945
|
|
134
143
|
hud/utils/tests/test_init.py,sha256=2QLQSGgyP9wJhOvPCusm_zjJad0qApOZi1BXpxcdHXQ,383
|
|
144
|
+
hud/utils/tests/test_mcp.py,sha256=0pUa16mL-bqbZDXp5NHBnt1gO5o10BOg7zTMHZ1DNPM,4023
|
|
135
145
|
hud/utils/tests/test_progress.py,sha256=QSF7Kpi03Ff_l3mAeqW9qs1nhK50j9vBiSobZq7T4f4,7394
|
|
136
146
|
hud/utils/tests/test_telemetry.py,sha256=5jl7bEx8C8b-FfFUko5pf4UY-mPOR-9HaeL98dGtVHM,2781
|
|
137
|
-
hud/utils/tests/test_version.py,sha256=
|
|
147
|
+
hud/utils/tests/test_version.py,sha256=uZwA5AKQVF3B6Tzw5vdMCGZlCKLkw6ZSQ9nnR6nk8XQ,160
|
|
138
148
|
hud/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
139
|
-
hud_python-0.4.
|
|
140
|
-
hud_python-0.4.
|
|
141
|
-
hud_python-0.4.
|
|
142
|
-
hud_python-0.4.
|
|
143
|
-
hud_python-0.4.
|
|
149
|
+
hud_python-0.4.12.dist-info/METADATA,sha256=SEioaFSGeMPXozmr2ePFpd-daQbRp8rnk-kYiGx1ETs,20176
|
|
150
|
+
hud_python-0.4.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
151
|
+
hud_python-0.4.12.dist-info/entry_points.txt,sha256=jJbodNFg1m0-CDofe5AHvB4zKBq7sSdP97-ohaQ3ae4,63
|
|
152
|
+
hud_python-0.4.12.dist-info/licenses/LICENSE,sha256=yIzBheVUf86FC1bztAcr7RYWWNxyd3B-UJQ3uddg1HA,1078
|
|
153
|
+
hud_python-0.4.12.dist-info/RECORD,,
|
hud/cli/runner.py
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
"""Run Docker images as MCP servers."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import asyncio
|
|
6
|
-
import subprocess
|
|
7
|
-
import sys
|
|
8
|
-
|
|
9
|
-
import click
|
|
10
|
-
from fastmcp import FastMCP
|
|
11
|
-
|
|
12
|
-
from hud.utils.design import HUDDesign
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def run_stdio_server(image: str, docker_args: list[str], verbose: bool) -> None:
|
|
16
|
-
"""Run Docker image as stdio MCP server (direct passthrough)."""
|
|
17
|
-
design = HUDDesign() # Use stderr for stdio mode
|
|
18
|
-
|
|
19
|
-
# Build docker command
|
|
20
|
-
docker_cmd = ["docker", "run", "--rm", "-i", *docker_args, image]
|
|
21
|
-
|
|
22
|
-
if verbose:
|
|
23
|
-
design.info(f"🐳 Running: {' '.join(docker_cmd)}")
|
|
24
|
-
|
|
25
|
-
# Run docker directly with stdio passthrough
|
|
26
|
-
try:
|
|
27
|
-
result = subprocess.run(docker_cmd, stdin=sys.stdin) # noqa: S603
|
|
28
|
-
sys.exit(result.returncode)
|
|
29
|
-
except KeyboardInterrupt:
|
|
30
|
-
design.info("\n👋 Shutting down...")
|
|
31
|
-
sys.exit(0)
|
|
32
|
-
except Exception as e:
|
|
33
|
-
design.error(f"Error: {e}")
|
|
34
|
-
sys.exit(1)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
async def run_http_server(image: str, docker_args: list[str], port: int, verbose: bool) -> None:
|
|
38
|
-
"""Run Docker image as HTTP MCP server (proxy mode)."""
|
|
39
|
-
from .utils import find_free_port
|
|
40
|
-
|
|
41
|
-
design = HUDDesign()
|
|
42
|
-
|
|
43
|
-
# Find available port
|
|
44
|
-
actual_port = find_free_port(port)
|
|
45
|
-
if actual_port is None:
|
|
46
|
-
design.error(f"No available ports found starting from {port}")
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
if actual_port != port:
|
|
50
|
-
design.warning(f"Port {port} in use, using port {actual_port} instead")
|
|
51
|
-
|
|
52
|
-
# Generate container name
|
|
53
|
-
container_name = f"run-{image.replace(':', '-').replace('/', '-')}"
|
|
54
|
-
|
|
55
|
-
# Remove any existing container with the same name
|
|
56
|
-
try:
|
|
57
|
-
subprocess.run( # noqa: ASYNC221, S603
|
|
58
|
-
["docker", "rm", "-f", container_name], # noqa: S607
|
|
59
|
-
stdout=subprocess.DEVNULL,
|
|
60
|
-
stderr=subprocess.DEVNULL,
|
|
61
|
-
check=False, # Don't raise error if container doesn't exist
|
|
62
|
-
)
|
|
63
|
-
except Exception:
|
|
64
|
-
click.echo(f"Failed to remove existing container {container_name}", err=True)
|
|
65
|
-
|
|
66
|
-
# Build docker command for stdio container
|
|
67
|
-
docker_cmd = (
|
|
68
|
-
*[
|
|
69
|
-
"docker",
|
|
70
|
-
"run",
|
|
71
|
-
"--rm",
|
|
72
|
-
"-i",
|
|
73
|
-
"--name",
|
|
74
|
-
container_name,
|
|
75
|
-
],
|
|
76
|
-
docker_args,
|
|
77
|
-
[image],
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
# Create MCP config for stdio transport
|
|
81
|
-
config = {
|
|
82
|
-
"mcpServers": {
|
|
83
|
-
"default": {
|
|
84
|
-
"command": docker_cmd[0],
|
|
85
|
-
"args": docker_cmd[1:] if len(docker_cmd) > 1 else [],
|
|
86
|
-
# transport defaults to stdio
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
# Set up logging suppression
|
|
92
|
-
import logging
|
|
93
|
-
import os
|
|
94
|
-
|
|
95
|
-
os.environ["FASTMCP_DISABLE_BANNER"] = "1"
|
|
96
|
-
|
|
97
|
-
if not verbose:
|
|
98
|
-
logging.getLogger("fastmcp").setLevel(logging.ERROR)
|
|
99
|
-
logging.getLogger("mcp").setLevel(logging.ERROR)
|
|
100
|
-
logging.getLogger("uvicorn").setLevel(logging.ERROR)
|
|
101
|
-
logging.getLogger("uvicorn.access").setLevel(logging.ERROR)
|
|
102
|
-
logging.getLogger("uvicorn.error").setLevel(logging.ERROR)
|
|
103
|
-
|
|
104
|
-
import warnings
|
|
105
|
-
|
|
106
|
-
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
|
107
|
-
|
|
108
|
-
# Create HTTP proxy
|
|
109
|
-
proxy = FastMCP.as_proxy(config, name=f"HUD Run - {image}")
|
|
110
|
-
|
|
111
|
-
# Show header
|
|
112
|
-
design.info("") # Empty line
|
|
113
|
-
design.header("HUD MCP Server", icon="🌐")
|
|
114
|
-
|
|
115
|
-
# Show configuration
|
|
116
|
-
design.section_title("Server Information")
|
|
117
|
-
design.info(f"Port: {actual_port}")
|
|
118
|
-
design.info(f"URL: http://localhost:{actual_port}/mcp")
|
|
119
|
-
design.info(f"Container: {container_name}")
|
|
120
|
-
design.info("")
|
|
121
|
-
design.progress_message("Press Ctrl+C to stop")
|
|
122
|
-
|
|
123
|
-
try:
|
|
124
|
-
await proxy.run_async(
|
|
125
|
-
transport="http",
|
|
126
|
-
host="0.0.0.0", # noqa: S104
|
|
127
|
-
port=actual_port,
|
|
128
|
-
path="/mcp",
|
|
129
|
-
log_level="error" if not verbose else "info",
|
|
130
|
-
show_banner=False,
|
|
131
|
-
)
|
|
132
|
-
except KeyboardInterrupt:
|
|
133
|
-
design.info("\n👋 Shutting down...")
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
def run_mcp_server(
|
|
137
|
-
image: str, docker_args: list[str], transport: str, port: int, verbose: bool
|
|
138
|
-
) -> None:
|
|
139
|
-
"""Run Docker image as MCP server with specified transport."""
|
|
140
|
-
if transport == "stdio":
|
|
141
|
-
run_stdio_server(image, docker_args, verbose)
|
|
142
|
-
elif transport == "http":
|
|
143
|
-
try:
|
|
144
|
-
asyncio.run(run_http_server(image, docker_args, port, verbose))
|
|
145
|
-
except Exception as e:
|
|
146
|
-
# Suppress the graceful shutdown errors
|
|
147
|
-
if not any(
|
|
148
|
-
x in str(e)
|
|
149
|
-
for x in [
|
|
150
|
-
"timeout graceful shutdown exceeded",
|
|
151
|
-
"Cancel 0 running task(s)",
|
|
152
|
-
"Application shutdown complete",
|
|
153
|
-
]
|
|
154
|
-
):
|
|
155
|
-
design = HUDDesign()
|
|
156
|
-
design.error(f"Unexpected error: {e}")
|
|
157
|
-
else:
|
|
158
|
-
design = HUDDesign()
|
|
159
|
-
design.error(f"Unknown transport: {transport}")
|
|
160
|
-
sys.exit(1)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|