DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

gao-gao-zai /

http-request-dsh-plugin

Verified

Native DSH HTTP request plugin with configurable credential whitelist and usage skill

★ 1 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: master@dfbb34fc

HTTP Request DSH Plugin

原生 DeepSeek Harness(DSH)插件,提供 http_request 工具、凭据白名单 Settings,以及对应的使用技能。

本插件是纯 DSH Plugin,不使用 MCP,不启动 MCP Server,也不通过 MCP stdio 通信。

功能

  • 直接使用 undici 发起 HTTP(S) 请求
  • 支持 GET、POST、PUT、PATCH、DELETE、HEAD、OPTIONS
  • 支持请求 headers、query、JSON 或文本 body
  • 支持直连、系统代理和手动 HTTP(S) 代理
  • 支持超时、响应截断、响应头展示和完整响应保存
  • 支持 Windows Credential Manager 凭据引用
  • 支持 DSH Settings 配置 Credential Manager 白名单
  • 注册 http-request-tool skill,自动介绍工具和白名单配置方式
  • 所有工具结果均返回纯文本 JSON 字符串

工具参数

工具名:http_request

{
  "method": "GET",
  "url": "https://api.example.com/status",
  "headers": {},
  "query": {},
  "body": null,
  "proxy": "none",
  "timeoutMs": 30000,
  "showHeaders": false,
  "maxChars": 2048,
  "outputFile": ""
}

此外支持:

  • headersFromCredential
  • queryFromCredential
  • bodyFromCredential
  • maxResponseBytes(兼容字段)

工具的 canonical output 类型固定为 string,并由 Native render 输出一个 text block。成功、HTTP 非 2xx、超时和异常都会返回合法 JSON 文本。

Credential Manager 白名单

默认允许的 target 前缀:

newapi/
openclaw/
upstreamops/

在 DSH Web GUI 中打开:

Settings > Plugins > http-request-mcp

修改 credentialPrefixes 字符串数组即可。设置使用 applies: live,修改后实时生效,并由 DSH Settings Provider 持久化到 Profile 配置文件。

也支持环境变量:

$env:HTTP_REQUEST_MCP_CREDENTIAL_PREFIXES = "newapi/,openclaw/,upstreamops/"

优先级为:DSH Settings > 环境变量 > 内置默认值。

只有 target 以允许的前缀开头时,插件才会访问 Windows Credential Manager。未通过白名单的请求会返回 JSON 错误,不会读取或发送秘密。

安装教程

方式一:DSH CLI 一键安装

DSH 会自动修改目标 Profile、安装依赖并注册 bundle:

dsh plugin --profile web add github:gao-gao-zai/http-request-dsh-plugin

这个命令不要求先克隆仓库。其中 github:gao-gao-zai/http-request-dsh-plugin 是 pnpm 支持的 GitHub shorthand,DSH 会将它交给 pnpm 直接下载并安装。

其中:

  • web 是目标 Profile 名称;如果使用其他 Profile,请替换它
  • github:gao-gao-zai/http-request-dsh-plugin 是本仓库的 GitHub 安装标识
  • 不需要手动执行 git clone
  • 不需要手动编辑 Profile 配置文件

安装完成后刷新 WebUI;如果 DSH 提示需要重启,则重启 DSH 使新 bundle 生效。

方式二:克隆仓库后本地安装

如果希望保留源码、离线查看或自行修改,可以先克隆仓库,再让 DSH 从本地目录安装:

$PLUGIN_DIR = Join-Path (Get-Location) "http-request-dsh-plugin"
git clone https://github.com/gao-gao-zai/http-request-dsh-plugin.git $PLUGIN_DIR
pnpm --dir $PLUGIN_DIR install
pnpm --dir $PLUGIN_DIR run check
dsh plugin --profile web add $PLUGIN_DIR

$PLUGIN_DIR 可以是任意本地目录。DSH 会把这个目录作为本地依赖安装到 web Profile,并自动注册 bundle,不需要手动编辑 Profile 配置文件。

如果之后修改了源码,重新执行:

pnpm --dir $PLUGIN_DIR run check
dsh plugin --profile web add $PLUGIN_DIR

这个方式也适合本地开发和调试;普通安装可直接使用上面的 GitHub CLI 方式。

安装后验证

重启或刷新 DSH 后依次检查:

  1. 工具目录中出现 http_request
  2. Settings > Plugins > http-request-mcp 中出现 credentialPrefixes
  3. Skill 目录中出现 http-request-tool
  4. 调用工具后结果是纯文本 JSON,而不是对象或 MCP 内容块

本插件是纯 DSH Plugin,不需要注册 MCP Server,也不需要启动 MCP 进程。

开发检查

pnpm install
pnpm run check

License

MIT,详见 LICENSE。

—/ 5

No ratings yet

Verified DSH bundle

Commit dfbb34fcd40b

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout