hud-python 0.4.45__py3-none-any.whl → 0.5.13__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.
- hud/__init__.py +27 -7
- hud/agents/__init__.py +70 -5
- hud/agents/base.py +238 -500
- hud/agents/claude.py +236 -247
- hud/agents/gateway.py +42 -0
- hud/agents/gemini.py +264 -0
- hud/agents/gemini_cua.py +324 -0
- hud/agents/grounded_openai.py +98 -100
- hud/agents/misc/integration_test_agent.py +51 -20
- hud/agents/misc/response_agent.py +48 -36
- hud/agents/openai.py +282 -296
- hud/agents/{openai_chat_generic.py → openai_chat.py} +63 -33
- hud/agents/operator.py +199 -0
- hud/agents/resolver.py +70 -0
- hud/agents/tests/conftest.py +133 -0
- hud/agents/tests/test_base.py +300 -622
- hud/agents/tests/test_base_runtime.py +233 -0
- hud/agents/tests/test_claude.py +381 -214
- hud/agents/tests/test_client.py +9 -10
- hud/agents/tests/test_gemini.py +369 -0
- hud/agents/tests/test_grounded_openai_agent.py +65 -50
- hud/agents/tests/test_openai.py +377 -140
- hud/agents/tests/test_operator.py +362 -0
- hud/agents/tests/test_resolver.py +192 -0
- hud/agents/tests/test_run_eval.py +179 -0
- hud/agents/types.py +148 -0
- hud/cli/__init__.py +493 -546
- hud/cli/analyze.py +43 -5
- hud/cli/build.py +699 -113
- hud/cli/debug.py +8 -5
- hud/cli/dev.py +889 -732
- hud/cli/eval.py +793 -667
- hud/cli/flows/dev.py +167 -0
- hud/cli/flows/init.py +191 -0
- hud/cli/flows/tasks.py +153 -56
- hud/cli/flows/templates.py +151 -0
- hud/cli/flows/tests/__init__.py +1 -0
- hud/cli/flows/tests/test_dev.py +126 -0
- hud/cli/init.py +60 -58
- hud/cli/pull.py +1 -1
- hud/cli/push.py +38 -13
- hud/cli/rft.py +311 -0
- hud/cli/rft_status.py +145 -0
- hud/cli/tests/test_analyze.py +5 -5
- hud/cli/tests/test_analyze_metadata.py +3 -2
- hud/cli/tests/test_analyze_module.py +120 -0
- hud/cli/tests/test_build.py +110 -8
- hud/cli/tests/test_build_failure.py +41 -0
- hud/cli/tests/test_build_module.py +50 -0
- hud/cli/tests/test_cli_init.py +6 -1
- hud/cli/tests/test_cli_more_wrappers.py +30 -0
- hud/cli/tests/test_cli_root.py +140 -0
- hud/cli/tests/test_convert.py +361 -0
- hud/cli/tests/test_debug.py +12 -10
- hud/cli/tests/test_dev.py +197 -0
- hud/cli/tests/test_eval.py +251 -0
- hud/cli/tests/test_eval_bedrock.py +51 -0
- hud/cli/tests/test_init.py +124 -0
- hud/cli/tests/test_main_module.py +11 -5
- hud/cli/tests/test_mcp_server.py +12 -100
- hud/cli/tests/test_push.py +1 -1
- hud/cli/tests/test_push_happy.py +74 -0
- hud/cli/tests/test_push_wrapper.py +23 -0
- hud/cli/tests/test_registry.py +1 -1
- hud/cli/tests/test_utils.py +1 -1
- hud/cli/{rl → utils}/celebrate.py +14 -12
- hud/cli/utils/config.py +18 -1
- hud/cli/utils/docker.py +130 -4
- hud/cli/utils/env_check.py +9 -9
- hud/cli/utils/git.py +136 -0
- hud/cli/utils/interactive.py +39 -5
- hud/cli/utils/metadata.py +70 -1
- hud/cli/utils/runner.py +1 -1
- hud/cli/utils/server.py +2 -2
- hud/cli/utils/source_hash.py +3 -3
- hud/cli/utils/tasks.py +4 -1
- hud/cli/utils/tests/__init__.py +0 -0
- hud/cli/utils/tests/test_config.py +58 -0
- hud/cli/utils/tests/test_docker.py +93 -0
- hud/cli/utils/tests/test_docker_hints.py +71 -0
- hud/cli/utils/tests/test_env_check.py +74 -0
- hud/cli/utils/tests/test_environment.py +42 -0
- hud/cli/utils/tests/test_git.py +142 -0
- hud/cli/utils/tests/test_interactive_module.py +60 -0
- hud/cli/utils/tests/test_local_runner.py +50 -0
- hud/cli/utils/tests/test_logging_utils.py +23 -0
- hud/cli/utils/tests/test_metadata.py +49 -0
- hud/cli/utils/tests/test_package_runner.py +35 -0
- hud/cli/utils/tests/test_registry_utils.py +49 -0
- hud/cli/utils/tests/test_remote_runner.py +25 -0
- hud/cli/utils/tests/test_runner_modules.py +52 -0
- hud/cli/utils/tests/test_source_hash.py +36 -0
- hud/cli/utils/tests/test_tasks.py +80 -0
- hud/cli/utils/version_check.py +258 -0
- hud/cli/{rl → utils}/viewer.py +2 -2
- hud/clients/README.md +12 -11
- hud/clients/__init__.py +4 -3
- hud/clients/base.py +166 -26
- hud/clients/environment.py +51 -0
- hud/clients/fastmcp.py +13 -6
- hud/clients/mcp_use.py +45 -15
- hud/clients/tests/test_analyze_scenarios.py +206 -0
- hud/clients/tests/test_protocol.py +9 -3
- hud/datasets/__init__.py +23 -20
- hud/datasets/loader.py +326 -0
- hud/datasets/runner.py +198 -105
- hud/datasets/tests/__init__.py +0 -0
- hud/datasets/tests/test_loader.py +221 -0
- hud/datasets/tests/test_utils.py +315 -0
- hud/datasets/utils.py +270 -90
- hud/environment/__init__.py +52 -0
- hud/environment/connection.py +258 -0
- hud/environment/connectors/__init__.py +33 -0
- hud/environment/connectors/base.py +68 -0
- hud/environment/connectors/local.py +177 -0
- hud/environment/connectors/mcp_config.py +137 -0
- hud/environment/connectors/openai.py +101 -0
- hud/environment/connectors/remote.py +172 -0
- hud/environment/environment.py +835 -0
- hud/environment/integrations/__init__.py +45 -0
- hud/environment/integrations/adk.py +67 -0
- hud/environment/integrations/anthropic.py +196 -0
- hud/environment/integrations/gemini.py +92 -0
- hud/environment/integrations/langchain.py +82 -0
- hud/environment/integrations/llamaindex.py +68 -0
- hud/environment/integrations/openai.py +238 -0
- hud/environment/mock.py +306 -0
- hud/environment/router.py +263 -0
- hud/environment/scenarios.py +620 -0
- hud/environment/tests/__init__.py +1 -0
- hud/environment/tests/test_connection.py +317 -0
- hud/environment/tests/test_connectors.py +205 -0
- hud/environment/tests/test_environment.py +593 -0
- hud/environment/tests/test_integrations.py +257 -0
- hud/environment/tests/test_local_connectors.py +242 -0
- hud/environment/tests/test_scenarios.py +1086 -0
- hud/environment/tests/test_tools.py +208 -0
- hud/environment/types.py +23 -0
- hud/environment/utils/__init__.py +35 -0
- hud/environment/utils/formats.py +215 -0
- hud/environment/utils/schema.py +171 -0
- hud/environment/utils/tool_wrappers.py +113 -0
- hud/eval/__init__.py +67 -0
- hud/eval/context.py +727 -0
- hud/eval/display.py +299 -0
- hud/eval/instrument.py +187 -0
- hud/eval/manager.py +533 -0
- hud/eval/parallel.py +268 -0
- hud/eval/task.py +372 -0
- hud/eval/tests/__init__.py +1 -0
- hud/eval/tests/test_context.py +178 -0
- hud/eval/tests/test_eval.py +210 -0
- hud/eval/tests/test_manager.py +152 -0
- hud/eval/tests/test_parallel.py +168 -0
- hud/eval/tests/test_task.py +291 -0
- hud/eval/types.py +65 -0
- hud/eval/utils.py +194 -0
- hud/patches/__init__.py +19 -0
- hud/patches/mcp_patches.py +308 -0
- hud/patches/warnings.py +54 -0
- hud/samples/browser.py +4 -4
- hud/server/__init__.py +2 -1
- hud/server/low_level.py +2 -1
- hud/server/router.py +164 -0
- hud/server/server.py +567 -80
- hud/server/tests/test_mcp_server_integration.py +11 -11
- hud/server/tests/test_mcp_server_more.py +1 -1
- hud/server/tests/test_server_extra.py +2 -0
- hud/settings.py +45 -3
- hud/shared/exceptions.py +36 -10
- hud/shared/hints.py +26 -1
- hud/shared/requests.py +15 -3
- hud/shared/tests/test_exceptions.py +40 -31
- hud/shared/tests/test_hints.py +167 -0
- hud/telemetry/__init__.py +20 -19
- hud/telemetry/exporter.py +201 -0
- hud/telemetry/instrument.py +165 -253
- hud/telemetry/tests/test_eval_telemetry.py +356 -0
- hud/telemetry/tests/test_exporter.py +258 -0
- hud/telemetry/tests/test_instrument.py +401 -0
- hud/tools/__init__.py +18 -2
- hud/tools/agent.py +223 -0
- hud/tools/apply_patch.py +639 -0
- hud/tools/base.py +54 -4
- hud/tools/bash.py +2 -2
- hud/tools/computer/__init__.py +36 -3
- hud/tools/computer/anthropic.py +2 -2
- hud/tools/computer/gemini.py +385 -0
- hud/tools/computer/hud.py +23 -6
- hud/tools/computer/openai.py +20 -21
- hud/tools/computer/qwen.py +434 -0
- hud/tools/computer/settings.py +37 -0
- hud/tools/edit.py +3 -7
- hud/tools/executors/base.py +4 -2
- hud/tools/executors/pyautogui.py +1 -1
- hud/tools/grounding/grounded_tool.py +13 -18
- hud/tools/grounding/grounder.py +10 -31
- hud/tools/grounding/tests/test_grounded_tool.py +26 -44
- hud/tools/jupyter.py +330 -0
- hud/tools/playwright.py +18 -3
- hud/tools/shell.py +308 -0
- hud/tools/tests/test_agent_tool.py +355 -0
- hud/tools/tests/test_apply_patch.py +718 -0
- hud/tools/tests/test_computer.py +4 -9
- hud/tools/tests/test_computer_actions.py +24 -2
- hud/tools/tests/test_jupyter_tool.py +181 -0
- hud/tools/tests/test_shell.py +596 -0
- hud/tools/tests/test_submit.py +85 -0
- hud/tools/tests/test_types.py +193 -0
- hud/tools/types.py +21 -1
- hud/types.py +194 -56
- hud/utils/__init__.py +2 -0
- hud/utils/env.py +67 -0
- hud/utils/hud_console.py +89 -18
- hud/utils/mcp.py +15 -58
- hud/utils/strict_schema.py +162 -0
- hud/utils/tests/test_init.py +1 -2
- hud/utils/tests/test_mcp.py +1 -28
- hud/utils/tests/test_pretty_errors.py +186 -0
- hud/utils/tests/test_tool_shorthand.py +154 -0
- hud/utils/tests/test_version.py +1 -1
- hud/utils/types.py +20 -0
- hud/version.py +1 -1
- hud_python-0.5.13.dist-info/METADATA +264 -0
- hud_python-0.5.13.dist-info/RECORD +305 -0
- {hud_python-0.4.45.dist-info → hud_python-0.5.13.dist-info}/WHEEL +1 -1
- hud/agents/langchain.py +0 -261
- hud/agents/lite_llm.py +0 -72
- hud/cli/rl/__init__.py +0 -180
- hud/cli/rl/config.py +0 -101
- hud/cli/rl/display.py +0 -133
- hud/cli/rl/gpu.py +0 -63
- hud/cli/rl/gpu_utils.py +0 -321
- hud/cli/rl/local_runner.py +0 -595
- hud/cli/rl/presets.py +0 -96
- hud/cli/rl/remote_runner.py +0 -463
- hud/cli/rl/rl_api.py +0 -150
- hud/cli/rl/vllm.py +0 -177
- hud/cli/rl/wait_utils.py +0 -89
- hud/datasets/parallel.py +0 -687
- hud/misc/__init__.py +0 -1
- hud/misc/claude_plays_pokemon.py +0 -292
- hud/otel/__init__.py +0 -35
- hud/otel/collector.py +0 -142
- hud/otel/config.py +0 -181
- hud/otel/context.py +0 -570
- hud/otel/exporters.py +0 -369
- hud/otel/instrumentation.py +0 -135
- hud/otel/processors.py +0 -121
- hud/otel/tests/__init__.py +0 -1
- hud/otel/tests/test_processors.py +0 -197
- hud/rl/README.md +0 -30
- hud/rl/__init__.py +0 -1
- hud/rl/actor.py +0 -176
- hud/rl/buffer.py +0 -405
- hud/rl/chat_template.jinja +0 -101
- hud/rl/config.py +0 -192
- hud/rl/distributed.py +0 -132
- hud/rl/learner.py +0 -637
- hud/rl/tests/__init__.py +0 -1
- hud/rl/tests/test_learner.py +0 -186
- hud/rl/train.py +0 -382
- hud/rl/types.py +0 -101
- hud/rl/utils/start_vllm_server.sh +0 -30
- hud/rl/utils.py +0 -524
- hud/rl/vllm_adapter.py +0 -143
- hud/telemetry/job.py +0 -352
- hud/telemetry/replay.py +0 -74
- hud/telemetry/tests/test_replay.py +0 -40
- hud/telemetry/tests/test_trace.py +0 -63
- hud/telemetry/trace.py +0 -158
- hud/utils/agent_factories.py +0 -86
- hud/utils/async_utils.py +0 -65
- hud/utils/group_eval.py +0 -223
- hud/utils/progress.py +0 -149
- hud/utils/tasks.py +0 -127
- hud/utils/tests/test_async_utils.py +0 -173
- hud/utils/tests/test_progress.py +0 -261
- hud_python-0.4.45.dist-info/METADATA +0 -552
- hud_python-0.4.45.dist-info/RECORD +0 -228
- {hud_python-0.4.45.dist-info → hud_python-0.5.13.dist-info}/entry_points.txt +0 -0
- {hud_python-0.4.45.dist-info → hud_python-0.5.13.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
hud/__init__.py,sha256=113WI29AL_LrmAOuT8x4hdPpV7BcAEzB2wUxC2YAiR8,1168
|
|
2
|
+
hud/__main__.py,sha256=YR8Dq8OhINOsVfQ55PmRXXg4fEK84Rt_-rMtJ5rvhWo,145
|
|
3
|
+
hud/settings.py,sha256=TTNKNObTEYO9f48qwxISKaCanxSl898aFyxzk5J3RnI,5202
|
|
4
|
+
hud/types.py,sha256=Y6OzDUooNVtm2tbpSS2KCwh2IHrlUjfjC1GZqicVyzI,15840
|
|
5
|
+
hud/version.py,sha256=r8ZcL7bWpVtL1NUs8mgBVMJuPK8fGN57pA9iudyhXI0,105
|
|
6
|
+
hud/agents/__init__.py,sha256=WgCQG-4MAvnL1UhneoFdV-Pr4wEz_137-0atGb2JFDU,2333
|
|
7
|
+
hud/agents/base.py,sha256=FS4nKtID9UsIFXwNvZ-3dbtcC2jJJepHckdW1GDLYCM,22421
|
|
8
|
+
hud/agents/claude.py,sha256=y0QA3hIp9pnCduEk2DKm9dwZjb4DvRnP8Ph2sXXLxX8,16771
|
|
9
|
+
hud/agents/gateway.py,sha256=L6Js4npec_y1TdIa9Ns1CJIMRRoLiRVp6IuCPgXKnTY,1220
|
|
10
|
+
hud/agents/gemini.py,sha256=MB2xuLgEUnAgomA0f5DycQ1o-9tUHxORyF57sfLwNlE,10503
|
|
11
|
+
hud/agents/gemini_cua.py,sha256=50wbpj8TOzcfDRx1Q-_KplI3mRzxlrtzEXryxYP_8kY,13601
|
|
12
|
+
hud/agents/grounded_openai.py,sha256=QKAaNzIso5120xmlHmUKYidu_HlWGri81QU9kWk8NL8,10807
|
|
13
|
+
hud/agents/openai.py,sha256=y0VfF4JhHeBJX8r-ffXoP61XBk1XZcd4RYt1dFlRqDk,14114
|
|
14
|
+
hud/agents/openai_chat.py,sha256=n35iWSlLLw28JSa570fYt2LlMDlH8E8yI3OvRwS1ECk,13647
|
|
15
|
+
hud/agents/operator.py,sha256=u4y93SD3h6zJTv0CCMl3_Dtcs93G7bF4A_dx8O71rQ0,8397
|
|
16
|
+
hud/agents/resolver.py,sha256=Kfk--UwZRU8yOGsKjyCekzLo1kaUXRnphl9e28bkvUM,2011
|
|
17
|
+
hud/agents/types.py,sha256=MMaBeQrVu9HP_yEQlN1hpzTMWHSctWHIgM-3z6ViJTU,4448
|
|
18
|
+
hud/agents/misc/__init__.py,sha256=LbVpHl2bDtheGPixbRRKsEjujwzmrXs7sCS8u1sYfAk,219
|
|
19
|
+
hud/agents/misc/integration_test_agent.py,sha256=MELaYuZiBr-p-0tllHPcE4I0K6QvGozyPREerbCS6Uk,2988
|
|
20
|
+
hud/agents/misc/response_agent.py,sha256=MeBw1HGUCQ-UdyJ3lFF61O4ZczQ8MIgDmDQyYkNG7PY,3874
|
|
21
|
+
hud/agents/tests/__init__.py,sha256=W-O-_4i34d9TTyEHV-O_q1Ai1gLhzwDaaPo02_TWQIY,34
|
|
22
|
+
hud/agents/tests/conftest.py,sha256=_IBUhWR5MfuHteCd7OnV94zAdzXvyoWreHDLbawSL20,4009
|
|
23
|
+
hud/agents/tests/test_base.py,sha256=FM4L6q_g83ntkIJpsc0DQ_AmhnslChu-9vq-acunFfs,14141
|
|
24
|
+
hud/agents/tests/test_base_runtime.py,sha256=YR8a2Rb3WaCvkZaZj6uFY9PEYx49FkymvNvYmq74VjA,7353
|
|
25
|
+
hud/agents/tests/test_claude.py,sha256=myb62C0jeNUqm2MEDfGXVQYR2Cmh7cixMiJKwxtkDHM,19102
|
|
26
|
+
hud/agents/tests/test_client.py,sha256=N3h8zqI5naWswIRnRWi0xPt0r1PccuDVg2pX5P27Tvo,13146
|
|
27
|
+
hud/agents/tests/test_gemini.py,sha256=rwzur-XZjTknvFdXWt3pa1ymQ-DNckVzLK_LJRCaF1g,13346
|
|
28
|
+
hud/agents/tests/test_grounded_openai_agent.py,sha256=WesSlXpFa0f12N2iMuPgYZHbrhi3jf1fMlOrGydErMw,5830
|
|
29
|
+
hud/agents/tests/test_openai.py,sha256=WPU_sKZ67cM-eJg_AzKyZl0SnD1nViH_mPBAQGU_pqo,16509
|
|
30
|
+
hud/agents/tests/test_operator.py,sha256=57uNeIyc-pjkHQKjk4sGPwtE_GZHX-Q1sAmN5PjtfWk,13334
|
|
31
|
+
hud/agents/tests/test_resolver.py,sha256=ZDTgXuSBfetMF4ShIhtF6CSA0VlLQ82GAJAzPVOkbI0,7154
|
|
32
|
+
hud/agents/tests/test_run_eval.py,sha256=8UpAUM7MF-fi_--lGVl-FZdDcl8Mj_Siey1FcUh7Jus,5874
|
|
33
|
+
hud/cli/__init__.py,sha256=No_YyIj7SWu_qj98of41K7XUqhv54ntcfJXADQy1CzA,44876
|
|
34
|
+
hud/cli/__main__.py,sha256=fDH7XITyuDITwSDIVwRso06aouADO0CzTHKqp5TOwJE,143
|
|
35
|
+
hud/cli/analyze.py,sha256=x_BYxuqI8E415N91awR8J30SUtal6rjvtkBHsC4b99Q,16378
|
|
36
|
+
hud/cli/build.py,sha256=WSwHbLBToCUACyI8DpG-9b0Vj_NFVtH_k7zPRkBmBfg,42279
|
|
37
|
+
hud/cli/clone.py,sha256=AwVDIuhr8mHb1oT2Af2HrD25SiTdwATpE6zd93vzLgA,6099
|
|
38
|
+
hud/cli/debug.py,sha256=khtEQqmTd1kg3yIl5SHBva6mIu-b0G0zBuaVWnYM9EM,14370
|
|
39
|
+
hud/cli/dev.py,sha256=7x1ysXHJVO-Oe4Sqqcoii7wQpfKb7Qyj-ICaB9T5JQg,33835
|
|
40
|
+
hud/cli/eval.py,sha256=aUb8YdcR1NDEqGGykraL5EBj15LSxagtt9kC592ukSg,32587
|
|
41
|
+
hud/cli/get.py,sha256=sksKrdzBGZa7ZuSoQkc0haj-CvOGVSSikoVXeaUd3N4,6274
|
|
42
|
+
hud/cli/init.py,sha256=F3Cg5UjzG1wOfjyBgHmW4ivou012qisycnz6EY51wgE,10010
|
|
43
|
+
hud/cli/list_func.py,sha256=EVi2Vc3Lb3glBNJxFx4MPnZknZ4xmuJz1OFg_dc8a_E,7177
|
|
44
|
+
hud/cli/pull.py,sha256=WQgdvoYLSRJKvTn1XiHrPHikL-XffC91ByDYK0YjMS8,12443
|
|
45
|
+
hud/cli/push.py,sha256=d8OjxfplBTjv0VyhPNWoP6q0siScsNA06sK5DWhCW6o,19773
|
|
46
|
+
hud/cli/remove.py,sha256=8vGQyXDqgtjz85_vtusoIG8zurH4RHz6z8UMevQRYM4,6861
|
|
47
|
+
hud/cli/rft.py,sha256=TKbJQBcfDtiLqem0QO06HWKVmNlsX81--0Jzf963lik,11632
|
|
48
|
+
hud/cli/rft_status.py,sha256=byVt9I4pN3UKtLUVd7OPgHtuV-_K1SKR9b9Cv05WmUo,5644
|
|
49
|
+
hud/cli/flows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
50
|
+
hud/cli/flows/dev.py,sha256=PzBjx_CLpbnaUa9WjtQS-qZjACQBcYuV9uY1hjf6Caw,5658
|
|
51
|
+
hud/cli/flows/init.py,sha256=PugY_C1yKgJKGso3L2WT2mLnORV7MmxL9aQmAILYLK8,6378
|
|
52
|
+
hud/cli/flows/tasks.py,sha256=KBWS6uhiipZvE6a3cX2qx-7jpe8_RBHLSwQhhTXSiFs,18078
|
|
53
|
+
hud/cli/flows/templates.py,sha256=fMRAvx8Ktsko0ImcT0eVWQUyhGzVoGpV1H0Jybv6E0M,4677
|
|
54
|
+
hud/cli/flows/tests/__init__.py,sha256=RQuhNCGRrsh9JwpEqIPe54s5iYDaWLpmTSNFIlxm1CY,27
|
|
55
|
+
hud/cli/flows/tests/test_dev.py,sha256=cE-DbLjKxqSZA-Xadlq52KJaqXUURccsOASIkgDXQoM,4664
|
|
56
|
+
hud/cli/tests/__init__.py,sha256=ZrGVkmH7DHXGqOvjOSNGZeMYaFIRB2K8c6hwr8FPJ-8,68
|
|
57
|
+
hud/cli/tests/test_analyze.py,sha256=0f7AlS18lPbJucIE8hkE1H-ZLl3fS1eUAVgiaKzECYo,11110
|
|
58
|
+
hud/cli/tests/test_analyze_metadata.py,sha256=TP8rVRDFcdkZrdmKFIR9yUxuxiaAkc-6UmjV4vrJaJM,10025
|
|
59
|
+
hud/cli/tests/test_analyze_module.py,sha256=qI9a7eqLRDY2mo01AIzSoHVCQXLtgNVtbiIXHuUH5UU,4136
|
|
60
|
+
hud/cli/tests/test_build.py,sha256=YeepvpwRGGHEcEmvbvlUQJv7_CxBKjxj5GgN0Do4390,17180
|
|
61
|
+
hud/cli/tests/test_build_failure.py,sha256=AmTNZb1re3MrghmGHpoMpo6l-upimOfxk36_Fgh2suI,1347
|
|
62
|
+
hud/cli/tests/test_build_module.py,sha256=yAspaB5frpagWBPd6OnS9eqw6pqgsoyOwrJe3OHMSmI,1440
|
|
63
|
+
hud/cli/tests/test_cli_init.py,sha256=EmobciXWO4DghXNmexru33WMj9VVbxwusQzUvjjXYNU,11455
|
|
64
|
+
hud/cli/tests/test_cli_main.py,sha256=0wMho9p9NcGjp0jLiUtCQh_FYdbMaCJtSY3sBbSgPwA,697
|
|
65
|
+
hud/cli/tests/test_cli_more_wrappers.py,sha256=MdcsGXOwPQOSjDhSm4s7FjiVy1ru8YeRiZxIGVLAgnA,847
|
|
66
|
+
hud/cli/tests/test_cli_root.py,sha256=j3iyL7qk1jpm5sv7qWjIdcy6xNT2-wpdZFseHk7Eg7c,4184
|
|
67
|
+
hud/cli/tests/test_clone.py,sha256=oC2mf-41QQVc7ODJkjrWbVPNMB2fDW3nZ6jY6w93gvQ,4458
|
|
68
|
+
hud/cli/tests/test_convert.py,sha256=s7dP64sJgDDmwZoTUmWtJ0_bVg_hlMv0DQnIQFpNSJs,12394
|
|
69
|
+
hud/cli/tests/test_cursor.py,sha256=ZfxAFKJesJ3UV1JBoASSRlv6BXbpvVEk_pjxUg1jnf4,9821
|
|
70
|
+
hud/cli/tests/test_debug.py,sha256=hmJTUlgnm5-KAEfUWwY8zc3wSg_KvsXwKlLyX3WSmTs,18200
|
|
71
|
+
hud/cli/tests/test_dev.py,sha256=D5Z7g403QdvQPZ_o88pb5hMVDiWPSxoU9088Ohv264U,6113
|
|
72
|
+
hud/cli/tests/test_eval.py,sha256=RhrIAJbyQVrumQTPFA_gv7psILkaxebIauFr4fKmxss,9240
|
|
73
|
+
hud/cli/tests/test_eval_bedrock.py,sha256=UBGakgIV4kzXUj0Jtbr3t05xBss66YPqruKsovUYyoo,1900
|
|
74
|
+
hud/cli/tests/test_init.py,sha256=fKtNldFKw_-IUtm_pCxPyuiBsMpnt-DZLwuT_-BWAuM,4459
|
|
75
|
+
hud/cli/tests/test_list_func.py,sha256=pkG4TtJJBMi9Xk8KBNFBlGcam7kwz01IRsjfQBL2PxM,10700
|
|
76
|
+
hud/cli/tests/test_main_module.py,sha256=PyfuSdqI-4Zt-kd16FMj2XHEHrw7SQ75YLJbQPdcIco,1223
|
|
77
|
+
hud/cli/tests/test_mcp_server.py,sha256=itMQvk4Tk0ANtKGrEqM3Kf2P2fMuua0k3DRlDBxwrCo,954
|
|
78
|
+
hud/cli/tests/test_pull.py,sha256=ToSJrlfn13pYnrWWt3W_S7qFFjwvoZC2UisrZVrxujo,13155
|
|
79
|
+
hud/cli/tests/test_push.py,sha256=30-nmF1hnGtvhraeNF-lgEfSy4x7UG-kSKZw4CXi9Qs,12869
|
|
80
|
+
hud/cli/tests/test_push_happy.py,sha256=xJEKNCBJ0AKNXYEQoA8CtrXSZw-nFc3ZP1Zj1qE0SaA,2498
|
|
81
|
+
hud/cli/tests/test_push_wrapper.py,sha256=yeeJgZP1-xisanVe8j3LvOhKOoGfjrARFbbFnhow5sA,628
|
|
82
|
+
hud/cli/tests/test_registry.py,sha256=PO2Q9ZvBNqY9jyJWH7W9dclD5WKZ67MEiUnTh2J3I0k,9539
|
|
83
|
+
hud/cli/tests/test_utils.py,sha256=F1E5Rpn3pgJpr-D-n-8UrUqsRfmC1DdAdMLdcBzV2IY,13474
|
|
84
|
+
hud/cli/utils/__init__.py,sha256=L6s0oNzY2LugGp9faodCPnjzM-ZUorUH05-HmYOq5hY,35
|
|
85
|
+
hud/cli/utils/celebrate.py,sha256=8ZYR5yY3i9mJC1bftydm_EreXdnYVZtCMFxGXZx4yJ4,6063
|
|
86
|
+
hud/cli/utils/config.py,sha256=KCzjeCKOuCjlThZt-C4R9AavBxrKqDsiZOj7X339cMo,3463
|
|
87
|
+
hud/cli/utils/cursor.py,sha256=fy850p0rVp5k_1wwOCI7rK1SggbselJrywFInSQ2gio,3009
|
|
88
|
+
hud/cli/utils/docker.py,sha256=vrrKyEaqp7Owd1EZnmSRGpEj92mHODuxozdcAwCe-7w,10466
|
|
89
|
+
hud/cli/utils/env_check.py,sha256=qs_earFr9RDjnw6V4Fxeqno5ETOKFb8E1WKee3C3P54,7073
|
|
90
|
+
hud/cli/utils/environment.py,sha256=cxsNwCfwX2PtCHht9xH_Yo5jpcqANf7h0wa3gfiy5tY,4278
|
|
91
|
+
hud/cli/utils/git.py,sha256=luT7RP5J1rfVckcpv7O4_6p9SQKdpar53DCZyX3hGi4,3628
|
|
92
|
+
hud/cli/utils/interactive.py,sha256=ZxoOh4zYKbIlgiE0cITEMZ35X0B358QsHWDCcPbQAPk,18077
|
|
93
|
+
hud/cli/utils/local_runner.py,sha256=jnPFoJu3sCq65LSUapKCkakdlEuz__96oJU_FfOYtEg,6542
|
|
94
|
+
hud/cli/utils/logging.py,sha256=DyOWuzZUg6HeKCqfs6ufb703XS3bW4G2pzaXVAvDqvA,9018
|
|
95
|
+
hud/cli/utils/metadata.py,sha256=pQ7S8bqtU8LZJrcXIgazbfKiV_ZvVwfKxPWJ1o9nRbA,10516
|
|
96
|
+
hud/cli/utils/package_runner.py,sha256=1TE_iahDFjPZ4GydhpD8K-bV8bHSzL4iY3uE42Cv7nQ,10149
|
|
97
|
+
hud/cli/utils/registry.py,sha256=p6IaWmhUbf0Yh6aGa3jIPoSFT2uJPTOVBLS0jpKDUqc,4376
|
|
98
|
+
hud/cli/utils/remote_runner.py,sha256=OOSJ6wU_gS_hJaURDfxZcyekjIIwPQKGN_Pq64tin3E,9505
|
|
99
|
+
hud/cli/utils/runner.py,sha256=16_dXkSZTvT2JQKWbZBCoIz6iiLMhjqgFXvcWr1WS1M,4439
|
|
100
|
+
hud/cli/utils/server.py,sha256=XeyE1Svpk66QJo1byaP8tpSAqj2Dt0ekwXZ35TPkpIE,7445
|
|
101
|
+
hud/cli/utils/source_hash.py,sha256=oEz7sWkda0u_3eUysTVXhU9HiWD90TTi4tqi9ppxcko,3013
|
|
102
|
+
hud/cli/utils/tasks.py,sha256=lX9SeM5XekrTBx2HWKMA0BQ7R3Q8jqGgi4G5vIHsnJM,994
|
|
103
|
+
hud/cli/utils/version_check.py,sha256=TdsPh7mpPw5giWahiQgpLZVvT6Lex2z2tsMOGCvm0Dc,7268
|
|
104
|
+
hud/cli/utils/viewer.py,sha256=At7K7BSzFXsCLkIxPJRh_ZA3mPP1Hq9-E5hJVkFB20Y,4428
|
|
105
|
+
hud/cli/utils/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
106
|
+
hud/cli/utils/tests/test_config.py,sha256=dZugvnjXiFNAvcx0nrIp578zmReMBEdupXfxpqHWGAk,1422
|
|
107
|
+
hud/cli/utils/tests/test_docker.py,sha256=WHYg_la0WfIr47Wu7Fmy8BtQrSyiWUdTYccv_DECBvw,2556
|
|
108
|
+
hud/cli/utils/tests/test_docker_hints.py,sha256=9ot366YqmySJPE-m9V4mGtdDgE2dAnfNTvBK4s3jnSQ,2107
|
|
109
|
+
hud/cli/utils/tests/test_env_check.py,sha256=XnnxeQeIToqNq_HGqsSYbVWXb_mHE8NBITYz7ePMeV8,2485
|
|
110
|
+
hud/cli/utils/tests/test_environment.py,sha256=-yMAo5GUAiZnqYHyYpC06gwirXhW4xoaY3oTUFHUGfE,1367
|
|
111
|
+
hud/cli/utils/tests/test_git.py,sha256=dQZY5oT9jmDY1lI1hUbj23JfLK_8wHfm7SxzisWRNjM,4980
|
|
112
|
+
hud/cli/utils/tests/test_interactive_module.py,sha256=9H70KspCqyM7UvJUpnt0Zr-N7EG6UxgM-7gvO7WGUBY,1954
|
|
113
|
+
hud/cli/utils/tests/test_local_runner.py,sha256=egK6AZpoaJx40fZUJnO_yav4zh48Qh0YDQivrhJSDVo,1651
|
|
114
|
+
hud/cli/utils/tests/test_logging_utils.py,sha256=2805kvGkYlT90zsbqTExHr_XSQpeZbPGEfJi2LW8qSY,702
|
|
115
|
+
hud/cli/utils/tests/test_metadata.py,sha256=sxl5hoWnv562KP2iZ7FRRjK72srh2rb_IbjS4wTjtmg,1637
|
|
116
|
+
hud/cli/utils/tests/test_package_runner.py,sha256=KXFtgU7GCLmXqFBCcA5eXUymq9lnQY8IzC8ne1eiVfQ,1196
|
|
117
|
+
hud/cli/utils/tests/test_registry_utils.py,sha256=u_T3E6KF5UVCanol5VYHmRNyMea6QDBl8YjfY6KakCU,1618
|
|
118
|
+
hud/cli/utils/tests/test_remote_runner.py,sha256=4au0ZFLbQFVNmhXtpjskBsO6g8aJb8B2lNdO50DaaxI,703
|
|
119
|
+
hud/cli/utils/tests/test_runner_modules.py,sha256=PFvluN0VmOfuHORbv3b-FZuM0bPVeReYUIXrxwXuDkQ,1722
|
|
120
|
+
hud/cli/utils/tests/test_source_hash.py,sha256=GGFklT9xrVPMEpPwgiUzr94An66R-nhNn7lvVeF2c2I,1157
|
|
121
|
+
hud/cli/utils/tests/test_tasks.py,sha256=_dNKauPqIXJu5h21NYxw8d03NIhfRhW0pIk---Ry_Z0,2704
|
|
122
|
+
hud/clients/README.md,sha256=HeLFWDz71m_adPMad_BNY2Upwf4bSfMPJjooEIDul3A,3865
|
|
123
|
+
hud/clients/__init__.py,sha256=pRJ5wLQjIuzUEkW0cen4td7_fpFZZuAAJYr0IZYLnOU,413
|
|
124
|
+
hud/clients/base.py,sha256=7L9BsNgWznu-c4lZfQ54TjxwL_u776y48d6cQJAR4Eo,20405
|
|
125
|
+
hud/clients/environment.py,sha256=XWYSQYhkprRghy7CXkGfe6bxWOqPoZy9Fwo71D4fNV4,1486
|
|
126
|
+
hud/clients/fastmcp.py,sha256=NxmrJljln9hKIGqySvEYCyR2Wzg1yLqtLZOD5H0wcXE,9568
|
|
127
|
+
hud/clients/mcp_use.py,sha256=j2ouO7De-o0G6KM0UYzXeSPf6SO8Cg4zD79dZptARt0,15925
|
|
128
|
+
hud/clients/tests/__init__.py,sha256=sKOtJFFa4mDIXh1U6O8ZUHjigE8CiRMQ2PzJTIBZuVE,33
|
|
129
|
+
hud/clients/tests/test_analyze_scenarios.py,sha256=A9wsVP6U-uUGjJ-7qGFODk_qbZhEXNTbF3EGrdujDI8,6640
|
|
130
|
+
hud/clients/tests/test_client_integration.py,sha256=kohU6jfCNfwSnAushHeB1_CmDlRfQc7VBL0GEdJYSeI,4198
|
|
131
|
+
hud/clients/tests/test_fastmcp.py,sha256=4q3TzDjuieTZa89taiNJIrzbUncNkYOG4MaubypA21k,13030
|
|
132
|
+
hud/clients/tests/test_mcp_use_retry.py,sha256=9FxLAz4L5Vv3OTtj4wdhRY23wDYALUpE12TYWl7fbJA,13299
|
|
133
|
+
hud/clients/tests/test_protocol.py,sha256=1JD9Ka-OLiQI6e9xBvoCaWsHXJ_iZQdGliWH5HJsaKc,6826
|
|
134
|
+
hud/clients/utils/__init__.py,sha256=-zZjcKIWGj2tXbVDOW45UgoGghhLJzFQVZ6miKenuA4,595
|
|
135
|
+
hud/clients/utils/mcp_use_retry.py,sha256=knsgOTR3YFXshmPFfPQE6K6C5GpR1ZBJe2J7ozEMikA,6675
|
|
136
|
+
hud/clients/utils/retry.py,sha256=mMs2T_mAlb8AYhSqMR4AmCw7838gqCC4mdG3zjMAYM4,5744
|
|
137
|
+
hud/clients/utils/retry_transport.py,sha256=Rsq25eiKKt_pM1bas78QEZvO0illK97X_3opmaS3A3w,6809
|
|
138
|
+
hud/datasets/__init__.py,sha256=Jt4dSSEeHA2OetLw225dCcGxwNJZNsyIAMtoiikpaGk,915
|
|
139
|
+
hud/datasets/loader.py,sha256=oC3sqwZaxNeH55QA58BSZO6_FXh116BGgllM7lfT5d4,10930
|
|
140
|
+
hud/datasets/runner.py,sha256=HOCD5fQXLmYb5fcSAsuQ4wx5-wX9yGb3IyYY83kCi8A,7597
|
|
141
|
+
hud/datasets/utils.py,sha256=OC9I7zhIyB-ac38FZvBhgYJ5qL4xYDXsYJiKtxUK1gQ,10755
|
|
142
|
+
hud/datasets/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
143
|
+
hud/datasets/tests/test_loader.py,sha256=9DJ9huPXQ78L5Di9XKJJj_GgDiyIOl74FSo0A7ctUlY,8124
|
|
144
|
+
hud/datasets/tests/test_utils.py,sha256=A30hwI7pCUIdehIjt3-cZYUVV3cfxvezTWV2yEzEMdg,11679
|
|
145
|
+
hud/environment/__init__.py,sha256=2owSRDkGVy-LaF7xSen6CI9ga8l-JktJRqGAfCH81Nc,1812
|
|
146
|
+
hud/environment/connection.py,sha256=umh3HvpW9ws-_uBELrqTzCZvVmA9qPa9wBnPB4X3Z1w,9348
|
|
147
|
+
hud/environment/environment.py,sha256=m1qIhc4WayIR0l6JWVpCRR08lswtakCBpWK_rjhvl-w,33544
|
|
148
|
+
hud/environment/mock.py,sha256=m096-kF7SD-hYpqEGXFtXk-_Kp9KLOAL6FCWexi2b-A,10139
|
|
149
|
+
hud/environment/router.py,sha256=-EWQN2ALleY7Q5RltsV48xOH1mRHfoch1vULbsr8_yw,10031
|
|
150
|
+
hud/environment/scenarios.py,sha256=EDngc2BBJbTdYzTjOik2-1WWrG2NF3s4tZ9OG5ZQbc0,26888
|
|
151
|
+
hud/environment/types.py,sha256=hSk9nkXtVJbU8vWwBH8_XCRP50u2vRPKOKbB2XRF6NM,767
|
|
152
|
+
hud/environment/connectors/__init__.py,sha256=nt-RjN9sAQowRgd3HdlM9yAK4LGWvqaXxc7vF9KKlR8,1159
|
|
153
|
+
hud/environment/connectors/base.py,sha256=E6FT_PgwOri7gIUR2VLC9BZ_opWghIgH9d40JftXb44,1854
|
|
154
|
+
hud/environment/connectors/local.py,sha256=_rgAEPVYV3Rk3lR7Ta0LG7NmBnbsCj6ZwcJ0AdG-6r4,5396
|
|
155
|
+
hud/environment/connectors/mcp_config.py,sha256=N-i3AQ7xhIh8DZg4KcVmmhgitJ4GvorxtVjHhF-Kcy8,4511
|
|
156
|
+
hud/environment/connectors/openai.py,sha256=2eh5wLmMyhYaAPwwqiuwtHatEkdwdwrUUzCm89ePQvc,3101
|
|
157
|
+
hud/environment/connectors/remote.py,sha256=vphDUzmfJHxlNRrLuBSrne3U6V5FOYMuXgV-CSAeseQ,5455
|
|
158
|
+
hud/environment/integrations/__init__.py,sha256=B2jYOUkrcBsQ-EqPPW8RwTyjRZr6cbzJNxt0hMFs0g8,1450
|
|
159
|
+
hud/environment/integrations/adk.py,sha256=efA2lsb-YrWayGR1E5tr60_RukMAZsmzNkqDZCsMXps,2035
|
|
160
|
+
hud/environment/integrations/anthropic.py,sha256=ffsS9olYtoWO31XjYxpB_1rS7fT4N25PERE3a_s1tLo,6722
|
|
161
|
+
hud/environment/integrations/gemini.py,sha256=K0Bq0r5H2ytx7IH56k0g_Hs7NAF1J3SBJLKcZPFKgbc,2865
|
|
162
|
+
hud/environment/integrations/langchain.py,sha256=8EUrT3TzHlpUx6PH12MJ7mW_Cu157Dlql5rQ1UzyCac,2657
|
|
163
|
+
hud/environment/integrations/llamaindex.py,sha256=IYDG3iHJ1QLs3tZ3Gtr4PS00-GCucK9fkiiNjHkHhrw,2019
|
|
164
|
+
hud/environment/integrations/openai.py,sha256=EpM6gVCVhpffgBmtexCasecAFt3Qfq2h9fcBCod9pGw,8617
|
|
165
|
+
hud/environment/tests/__init__.py,sha256=3MSG0sxWzyiDmJXVhRA1F6o06r9xQj1fQMG3g_jEoQM,40
|
|
166
|
+
hud/environment/tests/test_connection.py,sha256=L_4neiW22vfTbXWVuqCbzPZv08QOZSeypM8VzS2Q0Bw,10746
|
|
167
|
+
hud/environment/tests/test_connectors.py,sha256=5m-Ztk4sbqxAMNUCmzmaljVIoDfd4tF2zs5t32GqVKk,7103
|
|
168
|
+
hud/environment/tests/test_environment.py,sha256=hBqZBDtHCkchn0dH41kwXtNFyqy4g-PrumlwO0kB-ZA,17335
|
|
169
|
+
hud/environment/tests/test_integrations.py,sha256=W_qhlRKlwmRdCodOPtXJoEAui25djHY0NxB3JCsXr7s,9208
|
|
170
|
+
hud/environment/tests/test_local_connectors.py,sha256=eqXUfxj3mRBuz29QKIE2imVd2i4TZQscFd8kdPbVwmM,8331
|
|
171
|
+
hud/environment/tests/test_scenarios.py,sha256=UwGGKjyciq2nV57330LvQ9noe3xKFJOtDSELTA0TVW4,36598
|
|
172
|
+
hud/environment/tests/test_tools.py,sha256=b9M5peRMlCymSjJ_B_CJ4Ze5XOcGFmC9Kb2Ii6v2hOU,6298
|
|
173
|
+
hud/environment/utils/__init__.py,sha256=GfZPCVI5m5B_LFxuFPWXPq-70yHc4aQX8_kRNoSxtjM,750
|
|
174
|
+
hud/environment/utils/formats.py,sha256=Uu6m2_Yz2zBV7CndBxby9MUqWxBK7RPEQHgCFe5Tw0M,6733
|
|
175
|
+
hud/environment/utils/schema.py,sha256=wTTba_eSs3vwPLfdhzOqHfc1dHyGGvrfbhOklMhBzLk,5472
|
|
176
|
+
hud/environment/utils/tool_wrappers.py,sha256=zeFPgStqgOTk69KX77pAxNz6OclFzjB01c4mS3DfLB8,3101
|
|
177
|
+
hud/eval/__init__.py,sha256=otXv3YUXio2AVdQobi23zMkuEWwgeViQtEi3EGPkhiM,1874
|
|
178
|
+
hud/eval/context.py,sha256=K9i9o01SWRibida3lEcbCp4iGwXl-Byq4-7_qdh5bxw,26990
|
|
179
|
+
hud/eval/display.py,sha256=Ah2dTWK82RNAvjW576gPFjevzfzI-ES9PJWTVZYulp4,10108
|
|
180
|
+
hud/eval/instrument.py,sha256=TM2SJLP-DKD2kGFeg4HsB39sPQIeM7VLuB9RfpscrR4,6436
|
|
181
|
+
hud/eval/manager.py,sha256=hHLc0_pBxtGCKUBgsG1u0QjwzZ_-7HcMRF-zWIWmHL0,18680
|
|
182
|
+
hud/eval/parallel.py,sha256=jT4f4r6vwWNJnhTtfSfTRYNbdWIldkyV7E-Pf81TXkw,8170
|
|
183
|
+
hud/eval/task.py,sha256=rveFfMotkZB3Hoocq8FHhfsBTOIg5d-82pjiQ1eWciY,12967
|
|
184
|
+
hud/eval/types.py,sha256=1I3BtVUwlX7rv6xlkD4ss-nhUHSSSLidrg7s3ho40co,1806
|
|
185
|
+
hud/eval/utils.py,sha256=G44RstVcrwKQC7wWmilQUTpzdi3-p0vlnJd2loWBRAU,6675
|
|
186
|
+
hud/eval/tests/__init__.py,sha256=xjjKxpHN6fPW05LUFDW0syr2jBxvHYfq_ckSwJbcdFI,33
|
|
187
|
+
hud/eval/tests/test_context.py,sha256=0FOL8mxJMKvJZaSah57Gqwkzyh352-P6w3o4OcQzkvE,5901
|
|
188
|
+
hud/eval/tests/test_eval.py,sha256=Gnsv--SIh1alcmLnuVyoa1gfXZYi2Nuq3UZJmyl4XUY,7383
|
|
189
|
+
hud/eval/tests/test_manager.py,sha256=KR38OY_ftT-uOcmmfWPhDlf87NReGLRY6RAtKG0mp8U,6038
|
|
190
|
+
hud/eval/tests/test_parallel.py,sha256=m7h6HV-zXmC8hqw7ubhlBvJ0-JOmcbd07_1ffcOQ8tY,5039
|
|
191
|
+
hud/eval/tests/test_task.py,sha256=5MG2N6jyO0d7T-fmTMLYQz5tyA-nWM-BKFqHhSjZz7A,10374
|
|
192
|
+
hud/native/__init__.py,sha256=TqM0KaiQnDb2Nv1zOgpEMiLVq8JPd4j_aaK4rUZ0IiA,232
|
|
193
|
+
hud/native/comparator.py,sha256=GCHs7iZa0fB425es6vvG91UW4yrbY6-BsWdabYJaNA4,18255
|
|
194
|
+
hud/native/tests/__init__.py,sha256=gBTLMm6w5f6D-02Se2WleYsEEYyFt95JDcFzp3C2L_k,40
|
|
195
|
+
hud/native/tests/test_comparator.py,sha256=pDch3r3xDi2o5YXF_bkoLfIdHcCjse3foAaqyr7PzkQ,18512
|
|
196
|
+
hud/native/tests/test_native_init.py,sha256=Z-2dinbQYEkrbCcfBrBOLGdpXtWWOtkfPzp7ZKri68Y,2839
|
|
197
|
+
hud/patches/__init__.py,sha256=RmXbVvKrKHKRmBJqg6iL6IWnJPcA6Bo5W_QOD5oOL4c,530
|
|
198
|
+
hud/patches/mcp_patches.py,sha256=9-E7y578xkMSnkM9SzIWdQD8nMJln3Tf4D_di8VaV4s,13473
|
|
199
|
+
hud/patches/warnings.py,sha256=3aSo-SfohX2bmgoJJze08-l9WPo8eiBgODeOj7UHLaM,1788
|
|
200
|
+
hud/samples/__init__.py,sha256=wgcN1IOLHhR4C1fFKqyvA7Yl9lJhJFf34zfKs-UMSus,128
|
|
201
|
+
hud/samples/browser.py,sha256=39vRereuXvLO1JJt9vZrj4uNrHWeKHp9Y6AzABlqSUE,984
|
|
202
|
+
hud/server/__init__.py,sha256=ZTxwhR7tMtSE14i1sONTz5UaMXURW1AYoFZMbWGBviU,134
|
|
203
|
+
hud/server/context.py,sha256=6bCdSzv1FGyItu9472HbbYef279H7QuMGJDR8EtYg5Y,3210
|
|
204
|
+
hud/server/low_level.py,sha256=kVv4UHDQFabQltu6EXBB52rqbXJ8fTw8aLrSBGl1Pfs,4732
|
|
205
|
+
hud/server/router.py,sha256=P_EzK5gtVUw6vFwvnnO9zRxazNkPFmsJmp1hkJU7QD0,5477
|
|
206
|
+
hud/server/server.py,sha256=6UMIqOq9gBWHz5_rFTkAJyX2stm54p0c7iN4Q0RU92k,40420
|
|
207
|
+
hud/server/helper/__init__.py,sha256=ZxO8VP3RZEBBp-q65VixuhzQgqEPSVzW0hEY9J9QqDA,116
|
|
208
|
+
hud/server/tests/__init__.py,sha256=eEYYkxX5Hz9woXVOBJ2H2_CQoEih0vH6nRt3sH2Z8v8,49
|
|
209
|
+
hud/server/tests/test_add_tool.py,sha256=9Y59LJpow3BQ31Jg7fowhV7nAeyqude9Tap9tEs_vBE,1863
|
|
210
|
+
hud/server/tests/test_context.py,sha256=y1DoraXi7_Docm8WAyjUvMG8yVkm2E9HvY_a1Orpn_k,3693
|
|
211
|
+
hud/server/tests/test_mcp_server_handlers.py,sha256=MAH7EIXbvPlrAOmtsr9zL-n9a8HIwHktSTSx15GypRA,1410
|
|
212
|
+
hud/server/tests/test_mcp_server_integration.py,sha256=-f31ixlRgkmXiVOJXuS99TyMKfz9vDOgsZdU-BIP_2s,13217
|
|
213
|
+
hud/server/tests/test_mcp_server_more.py,sha256=kkUEA7BNtfl8Xu4SRv2QFxRvy-BAxF7_fIYuz2CPfNY,8274
|
|
214
|
+
hud/server/tests/test_run_wrapper.py,sha256=EdwxMWCIHAp8t-l6VUeMOMhPRLTWjEVfTyysafeUl4E,1805
|
|
215
|
+
hud/server/tests/test_server_extra.py,sha256=blIO0ne4Rq7R40y1-O-P8ANeRHnv2iKFWqSii9kmf-s,5595
|
|
216
|
+
hud/server/tests/test_sigterm_runner.py,sha256=HTM_0DAxA2exGYj7LK4udxMGXHZhY9LDZaKkHhQMu_Y,2610
|
|
217
|
+
hud/shared/__init__.py,sha256=IPxPCqtPLguryN-nBq78Sakypw2bRiE2iHv3SXG8YRk,139
|
|
218
|
+
hud/shared/exceptions.py,sha256=vdhKovkJgaUqr2YVp9JlO4EcZw_EqeaJFjapw0YE9_M,13260
|
|
219
|
+
hud/shared/hints.py,sha256=aH9iIhGvC3Uo56z0H5H68Mh6HMMBMBqQyK8rvjv1Hc0,5717
|
|
220
|
+
hud/shared/requests.py,sha256=FbvMU_dKSWu7OzNBKGAXlq-Q34zL1cULhEdGFa6rJyQ,9993
|
|
221
|
+
hud/shared/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
222
|
+
hud/shared/tests/test_exceptions.py,sha256=p-qQ0qHpDX57kWa9ddbhtd1nEXQOZN6WfoHWFNKD8EE,16376
|
|
223
|
+
hud/shared/tests/test_hints.py,sha256=q6UFcfQmPuqTk1ps9xvDm6mZUUiqk1m2kZeLUWbckhw,4851
|
|
224
|
+
hud/shared/tests/test_requests.py,sha256=nKFcSN1sjrOouVU2xik9lE5Wxapy3EWsO8iIXrM_Sts,9114
|
|
225
|
+
hud/telemetry/__init__.py,sha256=zprur6-dRqrwrPh8rkaoB2c90Uv5sDWCrHIlQxCgHn0,578
|
|
226
|
+
hud/telemetry/exporter.py,sha256=uzBVVh-2YAxWoz0v5hslRbro1xnxptg-h-U9Hr8G-x0,6065
|
|
227
|
+
hud/telemetry/instrument.py,sha256=g-nsP0RyQiwBmLwer_1a_-7RcF8htpqSoZ2oWYCUNz4,9226
|
|
228
|
+
hud/telemetry/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
229
|
+
hud/telemetry/tests/test_eval_telemetry.py,sha256=CYYwH3g_C_ycydgwgcsoKHfwouILy3_YUECanaywguo,11533
|
|
230
|
+
hud/telemetry/tests/test_exporter.py,sha256=-SmoSBrOTYZ6EyKygH9g5-55q03KQlE4uqQ_8B9YBIU,8749
|
|
231
|
+
hud/telemetry/tests/test_instrument.py,sha256=dfCS_AIoML34GVodoKTK90l38HkfH_PnoEr7OV8J1K0,9869
|
|
232
|
+
hud/tools/__init__.py,sha256=8cAx6cje1dawWup8qM7IUDQrN_ew2RkEg1iF92pzkaE,1281
|
|
233
|
+
hud/tools/agent.py,sha256=f3D2zSu1IJcd2T3BLtozI6EROggyhjAVpQyQE1CVx8Y,8070
|
|
234
|
+
hud/tools/apply_patch.py,sha256=Lsk2T2jZGgxnElhz09cH1TwhLokkd-z6pCK2noOOcug,22156
|
|
235
|
+
hud/tools/base.py,sha256=d7HJJyJJn3ltGXc4P5Bl_L5e9v8j51jQPTgnufVlOaw,17988
|
|
236
|
+
hud/tools/bash.py,sha256=1jl7cpB1ApGXn7Hy8zghJ2fXugEol6UeN0aYUSiM2EQ,5189
|
|
237
|
+
hud/tools/edit.py,sha256=NYQL3coPIaG_-TP6DOpsVWFg1xcaMZwM5LtFye9WgNE,12644
|
|
238
|
+
hud/tools/jupyter.py,sha256=JuVAVjLFDMUSpr1fzdGR56QvnxU02CZW_86KvZ2Qs2Q,11574
|
|
239
|
+
hud/tools/playwright.py,sha256=WaDkaY4Hb1rv5SiEui1KIHSRoC35qWK5OeDRi-Uk7Zk,15865
|
|
240
|
+
hud/tools/response.py,sha256=t6Oc8NM4u951A1XMCBaIkFyu3VNEQ8dcWURyTygfZmA,2228
|
|
241
|
+
hud/tools/shell.py,sha256=zs3R5jnL9FugwxPeJBgNCOnmgpglQF3D-cWeDM7761s,10991
|
|
242
|
+
hud/tools/submit.py,sha256=hJG2G3Oex4fz_3CsAUVhOhAA56UvDMhquB29xCT-C3M,1973
|
|
243
|
+
hud/tools/types.py,sha256=zysfGIdqHFtabGRH5TULoDaz6x8Hbn-a7XgPwJJPiHE,3492
|
|
244
|
+
hud/tools/utils.py,sha256=bfVyYMcBOJvr1QdptCjVb6jaHVGIL5WUxmY59kzMekQ,1447
|
|
245
|
+
hud/tools/computer/__init__.py,sha256=NgnZ0KtinTCO-ZnNzPg6A_MZAcKyfTrhAakLe8-vPhE,1310
|
|
246
|
+
hud/tools/computer/anthropic.py,sha256=6xMOX4nqsiGJHgDjBbpBR_wmVf4nc0Bbmf0cLCvylfI,17316
|
|
247
|
+
hud/tools/computer/gemini.py,sha256=vyBTUpFVEJQI5i9Zv4REgMUMtiSRUx5vaDrPGL5-zks,16639
|
|
248
|
+
hud/tools/computer/hud.py,sha256=CC5dYpAZlvaOm99Rh3ZInjmMG5Hpux0YA59lCn3eS-8,16937
|
|
249
|
+
hud/tools/computer/openai.py,sha256=wS9bG4JC65yCvMeKxbZt95YtWUDq2rbmLf7bUBf53Y4,11064
|
|
250
|
+
hud/tools/computer/qwen.py,sha256=UIzvYbCJbGiC706vBWyl9tXeAJQVxzDVH5oOTzWHHo0,18560
|
|
251
|
+
hud/tools/computer/settings.py,sha256=BEB4puJpWO1Ur-0sR1DioMDzoiBJTeTQf9DELKGRxkE,4189
|
|
252
|
+
hud/tools/executors/__init__.py,sha256=jHxfus9SLhkL6YGtebR5RyKYyVAix3yu5EkUp2Q27Kg,732
|
|
253
|
+
hud/tools/executors/base.py,sha256=mF_aiVoVkasoUi8hDyEtXMWbHKd4imKeFFJLJmQsjSY,14636
|
|
254
|
+
hud/tools/executors/pyautogui.py,sha256=Gw3x2yw7x9xJ1uhYLxkOkArPnUQagUN1AZgBZ7YgbWo,22362
|
|
255
|
+
hud/tools/executors/xdo.py,sha256=UF53DbMX-bRGiHd-O7cCJmCrVaYuP83xiJggER7HcDk,18137
|
|
256
|
+
hud/tools/executors/tests/__init__.py,sha256=opFpGSH6cEqIZgt9izXd3Yt85pC7xkxiYmOZQTHf4AY,32
|
|
257
|
+
hud/tools/executors/tests/test_base_executor.py,sha256=ovh99to5jbQfrCKfCUnDbY-q3oDk_cMmHOVSv7Sn02E,13549
|
|
258
|
+
hud/tools/executors/tests/test_pyautogui_executor.py,sha256=Shv6pnWtlsMXBMlN5DjlttCu6rZ1H447d1QZumduOnU,6640
|
|
259
|
+
hud/tools/grounding/__init__.py,sha256=oazR_qTJqkeGtjy_0w1QW58PQ872PkVwtYI-v2KIX3k,311
|
|
260
|
+
hud/tools/grounding/config.py,sha256=Vsd5ASDZFL7kW7toKkgrYN5D-ZV6ovKZyX4nxRrHvRs,1869
|
|
261
|
+
hud/tools/grounding/grounded_tool.py,sha256=_5Ne7soVDM6XoFOdeNZ6VfEmEZI-GYpGbbxaGNB3yIA,12394
|
|
262
|
+
hud/tools/grounding/grounder.py,sha256=VGGkq823qZjQDLYqVXUuKV4Q_O6Ydsqa9GDFlUp1npA,10149
|
|
263
|
+
hud/tools/grounding/tests/__init__.py,sha256=jLw4nmvvvZu2ln2_yEUUKg72IewQ4HaXCUWJuX3ECZY,33
|
|
264
|
+
hud/tools/grounding/tests/test_grounded_tool.py,sha256=_Llro57s06G9vqcsaJk7xAJM2ARJLGebWcykm-Z9lrA,5831
|
|
265
|
+
hud/tools/tests/__init__.py,sha256=eEYYkxX5Hz9woXVOBJ2H2_CQoEih0vH6nRt3sH2Z8v8,49
|
|
266
|
+
hud/tools/tests/test_agent_tool.py,sha256=zXSI5tg0vbhXWrr-PgNqpvpkd3E-ng0vlbFv2Y4fxgA,11765
|
|
267
|
+
hud/tools/tests/test_apply_patch.py,sha256=1ygKu2U27EuGplGJPxaOOMgEJDq-_p1sRzJTFCk-F5k,26707
|
|
268
|
+
hud/tools/tests/test_base.py,sha256=m6EelJ47F_hMqvRjrr6vEdiW1AtLgz3ZH1V1IUzTxzI,8983
|
|
269
|
+
hud/tools/tests/test_bash.py,sha256=-g9a6sYgKKXRXmqYGYQBgpKEF_OlKE_uDDQXYMx6rT0,5113
|
|
270
|
+
hud/tools/tests/test_bash_extended.py,sha256=G1pgl2e7_7ILYYS2FE6pTwI3_IPzmkPjBjGnxMGwGq8,7000
|
|
271
|
+
hud/tools/tests/test_computer.py,sha256=H_5qbVrDM1IJVFOUJu0EvNcns0F9hp_plzzaOhE-gno,16189
|
|
272
|
+
hud/tools/tests/test_computer_actions.py,sha256=XbH-sDY_V0R8B_d-eaOwN_xV-KBek2F-upI6BxKvJig,1589
|
|
273
|
+
hud/tools/tests/test_edit.py,sha256=pHw1MSs-P8mDKrwKUDW77vQfoMNwmbrEBt_MkKr2rE0,9734
|
|
274
|
+
hud/tools/tests/test_init.py,sha256=fl4Tf4IUUFOKhdSRHu9GE4mkaTDiXw-2auxj4s84HuE,698
|
|
275
|
+
hud/tools/tests/test_jupyter_tool.py,sha256=tiJRych-6ZT1aqO3PgHE7jTVyz_tA8TksvWol_otKpI,6979
|
|
276
|
+
hud/tools/tests/test_playwright_tool.py,sha256=TG0uieerc5wXq_JX66BLfXxphbSYGlDPhSbuoeizMu4,6737
|
|
277
|
+
hud/tools/tests/test_response.py,sha256=pEv3p0k1reSKtjbA8xneu--OuCHydbHHl6YWorV4zOg,2212
|
|
278
|
+
hud/tools/tests/test_shell.py,sha256=G4MMZFnfXY1I1oY-2KbW_LmJF7nfeghRecStKdrGxi0,19864
|
|
279
|
+
hud/tools/tests/test_submit.py,sha256=7o4FDu5KJJ7AB0pRUVf37ZN25l5bdVbx7cbcTSr9SNE,2105
|
|
280
|
+
hud/tools/tests/test_tools.py,sha256=paz28V98Am-oR7MBJPDgY-BRV14HQo_0F6X5JIC8aic,4563
|
|
281
|
+
hud/tools/tests/test_tools_init.py,sha256=aOX9IKji-4ThHEiRYULa7YlIajP0lj3eFPjgzlEg9TI,1727
|
|
282
|
+
hud/tools/tests/test_types.py,sha256=cDtOTL9Ei3cxcuYMsBcsSQrvbpbYoA4u3uNgnNdM1Dg,5525
|
|
283
|
+
hud/tools/tests/test_utils.py,sha256=qaujM1uyTMaKqWIeEgxty5GOFyfSUtrYCEHhmIazoy4,5500
|
|
284
|
+
hud/utils/__init__.py,sha256=g7HD1P7fS7Ov1fRzI0cqQDnwI8g6zdQyprDUKkeI2kE,237
|
|
285
|
+
hud/utils/env.py,sha256=8N_qlkDDjLAOs6NzIj31uS7NT3UdhtQiPe_SR-7gQn4,2066
|
|
286
|
+
hud/utils/hud_console.py,sha256=FV2mAMp344_bwupPst4yCNEJfzOX_UFyKU86CNkojJs,24491
|
|
287
|
+
hud/utils/mcp.py,sha256=WlLXNBzQf_u1pKU4Lq71W7KIe3cq6-oRUq5qMqu1NPI,1501
|
|
288
|
+
hud/utils/pretty_errors.py,sha256=WGeL4CTHtlA6KgPuV_JSX5l6H4-xbuTp6Y6tw1bkiFg,2430
|
|
289
|
+
hud/utils/strict_schema.py,sha256=PnUus9gMrcBCpxm0MYqPHXP-F8cIokcnIgyX2MeMoTY,5613
|
|
290
|
+
hud/utils/telemetry.py,sha256=hrVIx2rUjSGyy9IVxTZ_3Jii83PiHjyFRd5ls2whimM,1863
|
|
291
|
+
hud/utils/tool_shorthand.py,sha256=_haLgK3yazLR2Y0jlEHUUQjw9uZCxi9yTipAwdOAJ70,2148
|
|
292
|
+
hud/utils/types.py,sha256=dLJcIqJqH1xfh2MnJwzOCfQtHHQAQp5wkAr5qJc7EAQ,511
|
|
293
|
+
hud/utils/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
294
|
+
hud/utils/tests/test_init.py,sha256=jnMEqrLzqdbhZHdwQap6VjkWfuaSoJqXrnTds7wubRQ,341
|
|
295
|
+
hud/utils/tests/test_mcp.py,sha256=wArBXxZK-pmvkZHa-X2zxJn1QEvy0RdmqNDcFzQnoGk,3038
|
|
296
|
+
hud/utils/tests/test_pretty_errors.py,sha256=6OIxArgjQQTGk8DrUzT_Cy4IN6Ck6hMGYt2xVmyDyFY,6161
|
|
297
|
+
hud/utils/tests/test_telemetry.py,sha256=5jl7bEx8C8b-FfFUko5pf4UY-mPOR-9HaeL98dGtVHM,2781
|
|
298
|
+
hud/utils/tests/test_tool_shorthand.py,sha256=1p3j3D0G93OXHqnUXbvTs3G4A8awrPvwhPpLi6YPeOM,5458
|
|
299
|
+
hud/utils/tests/test_version.py,sha256=9BpwYoOULnc5l5hIG0VUZTeecG7aQVYnlYwgpYekwnw,160
|
|
300
|
+
hud/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
301
|
+
hud_python-0.5.13.dist-info/METADATA,sha256=YtLpi2cJpxgU-_OohSStCXYYARTvjS-jmOqBuklw7vI,11262
|
|
302
|
+
hud_python-0.5.13.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
303
|
+
hud_python-0.5.13.dist-info/entry_points.txt,sha256=jJbodNFg1m0-CDofe5AHvB4zKBq7sSdP97-ohaQ3ae4,63
|
|
304
|
+
hud_python-0.5.13.dist-info/licenses/LICENSE,sha256=yIzBheVUf86FC1bztAcr7RYWWNxyd3B-UJQ3uddg1HA,1078
|
|
305
|
+
hud_python-0.5.13.dist-info/RECORD,,
|
hud/agents/langchain.py
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
"""LangChain MCP Agent implementation."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import logging
|
|
6
|
-
from typing import TYPE_CHECKING, Any, ClassVar
|
|
7
|
-
|
|
8
|
-
import mcp.types as types
|
|
9
|
-
from langchain.agents import AgentExecutor, create_tool_calling_agent
|
|
10
|
-
from langchain.prompts import ChatPromptTemplate, MessagesPlaceholder
|
|
11
|
-
from langchain.schema import AIMessage, BaseMessage, HumanMessage, SystemMessage
|
|
12
|
-
|
|
13
|
-
import hud
|
|
14
|
-
|
|
15
|
-
if TYPE_CHECKING:
|
|
16
|
-
from langchain.schema.language_model import BaseLanguageModel
|
|
17
|
-
from langchain_core.tools import BaseTool
|
|
18
|
-
from mcp_use.adapters.langchain_adapter import LangChainAdapter # type: ignore[attr-defined]
|
|
19
|
-
|
|
20
|
-
try:
|
|
21
|
-
from mcp_use.adapters.langchain_adapter import LangChainAdapter # type: ignore[attr-defined]
|
|
22
|
-
except ImportError:
|
|
23
|
-
LangChainAdapter = None # type: ignore[misc, assignment]
|
|
24
|
-
|
|
25
|
-
from hud.types import AgentResponse, MCPToolCall, MCPToolResult
|
|
26
|
-
|
|
27
|
-
from .base import MCPAgent
|
|
28
|
-
|
|
29
|
-
logger = logging.getLogger(__name__)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class LangChainAgent(MCPAgent):
|
|
33
|
-
"""
|
|
34
|
-
LangChain agent that uses MCP servers for tool execution.
|
|
35
|
-
|
|
36
|
-
This agent wraps any LangChain-compatible LLM and provides
|
|
37
|
-
access to MCP tools through LangChain's tool-calling interface.
|
|
38
|
-
"""
|
|
39
|
-
|
|
40
|
-
metadata: ClassVar[dict[str, Any]] = {
|
|
41
|
-
"display_width": 1920,
|
|
42
|
-
"display_height": 1080,
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
def __init__(
|
|
46
|
-
self,
|
|
47
|
-
llm: BaseLanguageModel,
|
|
48
|
-
**kwargs: Any,
|
|
49
|
-
) -> None:
|
|
50
|
-
"""
|
|
51
|
-
Initialize LangChain MCP agent.
|
|
52
|
-
|
|
53
|
-
Args:
|
|
54
|
-
llm: Any LangChain-compatible language model
|
|
55
|
-
**kwargs: Additional arguments passed to BaseMCPAgent
|
|
56
|
-
"""
|
|
57
|
-
super().__init__(**kwargs)
|
|
58
|
-
|
|
59
|
-
if LangChainAdapter is None:
|
|
60
|
-
raise ImportError(
|
|
61
|
-
"LangChainAdapter is not available. "
|
|
62
|
-
"Please install the optional agent dependencies: pip install 'hud-python[agent]'"
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
self.llm = llm
|
|
66
|
-
self.adapter = LangChainAdapter(disallowed_tools=self.disallowed_tools)
|
|
67
|
-
self._langchain_tools: list[BaseTool] | None = None
|
|
68
|
-
|
|
69
|
-
self.model_name = (
|
|
70
|
-
"langchain-" + self.llm.model_name # type: ignore
|
|
71
|
-
if hasattr(self.llm, "model_name")
|
|
72
|
-
else "unknown"
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
def _get_langchain_tools(self) -> list[BaseTool]:
|
|
76
|
-
"""Get or create LangChain tools from MCP tools."""
|
|
77
|
-
if self._langchain_tools is not None:
|
|
78
|
-
return self._langchain_tools
|
|
79
|
-
|
|
80
|
-
# Create LangChain tools from MCP tools using the adapter
|
|
81
|
-
self._langchain_tools = []
|
|
82
|
-
|
|
83
|
-
# Convert available tools using the adapter; no server grouping
|
|
84
|
-
langchain_tools = self.adapter._convert_tools(self._available_tools, "default") # type: ignore[reportAttributeAccessIssue]
|
|
85
|
-
self._langchain_tools.extend(langchain_tools)
|
|
86
|
-
|
|
87
|
-
logger.info("Created %s LangChain tools from MCP tools", len(self._langchain_tools))
|
|
88
|
-
return self._langchain_tools
|
|
89
|
-
|
|
90
|
-
async def get_system_messages(self) -> list[BaseMessage]:
|
|
91
|
-
"""Get system messages for LangChain."""
|
|
92
|
-
return [SystemMessage(content=self.system_prompt)]
|
|
93
|
-
|
|
94
|
-
async def format_blocks(self, blocks: list[types.ContentBlock]) -> list[BaseMessage]:
|
|
95
|
-
"""Create initial messages for LangChain."""
|
|
96
|
-
messages = []
|
|
97
|
-
for block in blocks:
|
|
98
|
-
if isinstance(block, types.TextContent):
|
|
99
|
-
messages.append(HumanMessage(content=block.text))
|
|
100
|
-
elif isinstance(block, types.ImageContent):
|
|
101
|
-
messages.append(HumanMessage(content=block.data))
|
|
102
|
-
return messages
|
|
103
|
-
|
|
104
|
-
@hud.instrument(
|
|
105
|
-
span_type="agent",
|
|
106
|
-
record_args=False, # Messages can be large
|
|
107
|
-
record_result=True,
|
|
108
|
-
)
|
|
109
|
-
async def get_response(self, messages: list[BaseMessage]) -> AgentResponse:
|
|
110
|
-
"""Get response from LangChain model including any tool calls."""
|
|
111
|
-
# Get LangChain tools (created lazily)
|
|
112
|
-
langchain_tools = self._get_langchain_tools()
|
|
113
|
-
|
|
114
|
-
# Create a prompt template from current messages
|
|
115
|
-
# Extract system message if present
|
|
116
|
-
system_content = "You are a helpful assistant"
|
|
117
|
-
non_system_messages = []
|
|
118
|
-
|
|
119
|
-
for msg in messages:
|
|
120
|
-
if isinstance(msg, SystemMessage):
|
|
121
|
-
system_content = str(msg.content)
|
|
122
|
-
else:
|
|
123
|
-
non_system_messages.append(msg)
|
|
124
|
-
|
|
125
|
-
# Create prompt with placeholders
|
|
126
|
-
prompt = ChatPromptTemplate.from_messages(
|
|
127
|
-
[
|
|
128
|
-
("system", system_content),
|
|
129
|
-
MessagesPlaceholder(variable_name="chat_history"),
|
|
130
|
-
MessagesPlaceholder(variable_name="agent_scratchpad"),
|
|
131
|
-
]
|
|
132
|
-
)
|
|
133
|
-
|
|
134
|
-
# Create agent with tools
|
|
135
|
-
agent = create_tool_calling_agent(
|
|
136
|
-
llm=self.llm,
|
|
137
|
-
tools=langchain_tools,
|
|
138
|
-
prompt=prompt,
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
# Create executor
|
|
142
|
-
executor = AgentExecutor(
|
|
143
|
-
agent=agent,
|
|
144
|
-
tools=langchain_tools,
|
|
145
|
-
verbose=False,
|
|
146
|
-
)
|
|
147
|
-
|
|
148
|
-
# Format the last user message as input
|
|
149
|
-
last_user_msg = None
|
|
150
|
-
for msg in reversed(non_system_messages):
|
|
151
|
-
if isinstance(msg, HumanMessage):
|
|
152
|
-
last_user_msg = msg
|
|
153
|
-
break
|
|
154
|
-
|
|
155
|
-
if not last_user_msg:
|
|
156
|
-
return AgentResponse(content="No user message found", tool_calls=[], done=True)
|
|
157
|
-
|
|
158
|
-
# Extract text from message content
|
|
159
|
-
input_text = ""
|
|
160
|
-
if isinstance(last_user_msg.content, str):
|
|
161
|
-
input_text = last_user_msg.content
|
|
162
|
-
elif isinstance(last_user_msg.content, list):
|
|
163
|
-
# Extract text from multimodal content
|
|
164
|
-
for item in last_user_msg.content:
|
|
165
|
-
if isinstance(item, dict) and item.get("type") == "text":
|
|
166
|
-
input_text = item.get("text", "")
|
|
167
|
-
break
|
|
168
|
-
|
|
169
|
-
# Build chat history (exclude last user message and system)
|
|
170
|
-
chat_history = []
|
|
171
|
-
for _, msg in enumerate(non_system_messages[:-1]):
|
|
172
|
-
if isinstance(msg, HumanMessage | AIMessage):
|
|
173
|
-
chat_history.append(msg)
|
|
174
|
-
|
|
175
|
-
# Execute the agent
|
|
176
|
-
try:
|
|
177
|
-
result = await executor.ainvoke(
|
|
178
|
-
{
|
|
179
|
-
"input": input_text,
|
|
180
|
-
"chat_history": chat_history,
|
|
181
|
-
}
|
|
182
|
-
)
|
|
183
|
-
|
|
184
|
-
# Process the result
|
|
185
|
-
output = result.get("output", "")
|
|
186
|
-
|
|
187
|
-
# Check if tools were called
|
|
188
|
-
if result.get("intermediate_steps"):
|
|
189
|
-
# Tools were called
|
|
190
|
-
tool_calls = []
|
|
191
|
-
for action, _ in result["intermediate_steps"]:
|
|
192
|
-
if hasattr(action, "tool") and hasattr(action, "tool_input"):
|
|
193
|
-
tool_calls.append(
|
|
194
|
-
MCPToolCall(
|
|
195
|
-
name=action.tool,
|
|
196
|
-
arguments=action.tool_input,
|
|
197
|
-
)
|
|
198
|
-
)
|
|
199
|
-
|
|
200
|
-
return AgentResponse(content=output, tool_calls=tool_calls, done=False)
|
|
201
|
-
else:
|
|
202
|
-
# No tools called, just text response
|
|
203
|
-
return AgentResponse(content=output, tool_calls=[], done=True)
|
|
204
|
-
|
|
205
|
-
except Exception as e:
|
|
206
|
-
logger.error("Agent execution failed: %s", e)
|
|
207
|
-
return AgentResponse(content=f"Error: {e!s}", tool_calls=[], done=True)
|
|
208
|
-
|
|
209
|
-
async def format_tool_results(
|
|
210
|
-
self, tool_calls: list[MCPToolCall], tool_results: list[MCPToolResult]
|
|
211
|
-
) -> list[BaseMessage]:
|
|
212
|
-
"""Format tool results into LangChain messages."""
|
|
213
|
-
# Create an AI message with the tool calls and results
|
|
214
|
-
messages = []
|
|
215
|
-
|
|
216
|
-
# First add an AI message indicating tools were called
|
|
217
|
-
tool_names = [tc.name for tc in tool_calls]
|
|
218
|
-
ai_content = f"I'll use the following tools: {', '.join(tool_names)}"
|
|
219
|
-
messages.append(AIMessage(content=ai_content))
|
|
220
|
-
|
|
221
|
-
# Build result text from tool results
|
|
222
|
-
text_parts = []
|
|
223
|
-
latest_screenshot = None
|
|
224
|
-
|
|
225
|
-
for tool_call, result in zip(tool_calls, tool_results, strict=False):
|
|
226
|
-
if result.isError:
|
|
227
|
-
error_text = "Tool execution failed"
|
|
228
|
-
for content in result.content:
|
|
229
|
-
if isinstance(content, types.TextContent):
|
|
230
|
-
error_text = content.text
|
|
231
|
-
break
|
|
232
|
-
text_parts.append(f"Error - {tool_call.name}: {error_text}")
|
|
233
|
-
else:
|
|
234
|
-
# Process success content
|
|
235
|
-
tool_output = []
|
|
236
|
-
for content in result.content:
|
|
237
|
-
if isinstance(content, types.TextContent):
|
|
238
|
-
tool_output.append(content.text)
|
|
239
|
-
elif isinstance(content, types.ImageContent):
|
|
240
|
-
latest_screenshot = content.data
|
|
241
|
-
|
|
242
|
-
if tool_output:
|
|
243
|
-
text_parts.append(f"{tool_call.name}: " + " ".join(tool_output))
|
|
244
|
-
|
|
245
|
-
result_text = "\n".join(text_parts) if text_parts else "No output from tools"
|
|
246
|
-
|
|
247
|
-
# Then add a human message with the tool results
|
|
248
|
-
if latest_screenshot:
|
|
249
|
-
# Include screenshot in multimodal format
|
|
250
|
-
content = [
|
|
251
|
-
{"type": "text", "text": f"Tool results:\n{result_text}"},
|
|
252
|
-
{
|
|
253
|
-
"type": "image_url",
|
|
254
|
-
"image_url": {"url": f"data:image/png;base64,{latest_screenshot}"},
|
|
255
|
-
},
|
|
256
|
-
]
|
|
257
|
-
messages.append(HumanMessage(content=content))
|
|
258
|
-
else:
|
|
259
|
-
messages.append(HumanMessage(content=f"Tool results:\n{result_text}"))
|
|
260
|
-
|
|
261
|
-
return messages
|
hud/agents/lite_llm.py
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"""LiteLLM MCP Agent implementation.
|
|
2
|
-
|
|
3
|
-
Same OpenAI chat-completions shape + MCP tool plumbing,
|
|
4
|
-
but transport is LiteLLM and (optionally) tools are shaped by LiteLLM's MCP transformer.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
from __future__ import annotations
|
|
8
|
-
|
|
9
|
-
import logging
|
|
10
|
-
from typing import Any, ClassVar
|
|
11
|
-
|
|
12
|
-
import litellm
|
|
13
|
-
|
|
14
|
-
from .openai_chat_generic import GenericOpenAIChatAgent
|
|
15
|
-
|
|
16
|
-
logger = logging.getLogger(__name__)
|
|
17
|
-
|
|
18
|
-
# Prefer LiteLLM's built-in MCP -> OpenAI tool transformer (handles Bedrock nuances)
|
|
19
|
-
try:
|
|
20
|
-
from litellm.experimental_mcp_client.tools import (
|
|
21
|
-
transform_mcp_tool_to_openai_tool,
|
|
22
|
-
)
|
|
23
|
-
except Exception: # pragma: no cover - optional dependency
|
|
24
|
-
transform_mcp_tool_to_openai_tool = None # type: ignore
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class LiteAgent(GenericOpenAIChatAgent):
|
|
28
|
-
"""
|
|
29
|
-
Same OpenAI chat-completions shape + MCP tool plumbing,
|
|
30
|
-
but transport is LiteLLM and (optionally) tools are shaped by LiteLLM's MCP transformer.
|
|
31
|
-
"""
|
|
32
|
-
|
|
33
|
-
metadata: ClassVar[dict[str, Any]] = {}
|
|
34
|
-
|
|
35
|
-
def __init__(
|
|
36
|
-
self,
|
|
37
|
-
*,
|
|
38
|
-
model_name: str = "gpt-4o-mini",
|
|
39
|
-
completion_kwargs: dict[str, Any] | None = None,
|
|
40
|
-
**agent_kwargs: Any,
|
|
41
|
-
) -> None:
|
|
42
|
-
# We don't need an OpenAI client; pass None
|
|
43
|
-
super().__init__(
|
|
44
|
-
openai_client=None,
|
|
45
|
-
model_name=model_name,
|
|
46
|
-
completion_kwargs=completion_kwargs,
|
|
47
|
-
**agent_kwargs,
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
def get_tool_schemas(self) -> list[dict]:
|
|
51
|
-
# Prefer LiteLLM's stricter transformer (handles Bedrock & friends)
|
|
52
|
-
if transform_mcp_tool_to_openai_tool is not None:
|
|
53
|
-
return [
|
|
54
|
-
transform_mcp_tool_to_openai_tool(t) # returns ChatCompletionToolParam-like dict
|
|
55
|
-
for t in self.get_available_tools()
|
|
56
|
-
]
|
|
57
|
-
# Fallback to the generic OpenAI sanitizer
|
|
58
|
-
return GenericOpenAIChatAgent.get_tool_schemas(self)
|
|
59
|
-
|
|
60
|
-
async def _invoke_chat_completion(
|
|
61
|
-
self,
|
|
62
|
-
*,
|
|
63
|
-
messages: list[Any],
|
|
64
|
-
tools: list[dict] | None,
|
|
65
|
-
extra: dict[str, Any],
|
|
66
|
-
) -> Any:
|
|
67
|
-
return await litellm.acompletion(
|
|
68
|
-
model=self.model_name,
|
|
69
|
-
messages=messages,
|
|
70
|
-
tools=tools or None, # LiteLLM tolerates None better than []
|
|
71
|
-
**extra,
|
|
72
|
-
)
|