npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-http-tools

v0.1.5

Published

HTTP/API debugging toolset for DeepSeek Harness: http_request, curl_parse, request_history

Readme

dsh-http-tools

DeepSeek Harness(DSH)打造的 HTTP / API 调试工具集。

dsh-http-tools 让你的 DSH agent 拥有一个完整的 REST 客户端:可以发送任意请求(完整控制 method、headers、body 与认证),粘贴一段 curl 命令让 agent 直接解析或改造后重发,还可以在会话内回顾、对比历史请求——全程都在对话里完成。

工具

| 工具 | 说明 | | --- | --- | | http_request | 发送 HTTP 请求(GET/POST/PUT/PATCH/DELETE/HEAD),支持自定义 headers、body 与认证。返回状态码、耗时、大小、响应头、截断后的响应体,以及等价的 curl 命令。 | | curl_parse | 把 curl 命令解析为结构化请求(method、URL、headers、body、auth),可加 execute: true 一步解析并发送。 | | request_history | 查询当前会话内的历史请求,查看某次请求的详情,或并排对比两次响应。 |

安装

dsh plugin --profile web add dsh-http-tools

零配置开箱即用。需要 Node.js >= 22(使用原生 fetch)。

试试

直接对你的 agent 说:

用 http_request 调 https://api.github.com/repos/deepseek-ai/deepseek-harness 看看 star 数
POST https://httpbin.org/post,body 传 {"hello":"world"},看看返回什么
粘贴这个 curl 命令解析一下,然后改个 header 再重发:
curl -X POST https://api.example.com/v1/users -H "Content-Type: application/json" -d '{"name":"ada"}'
用 request_history 对比 #1 和 #3 两次请求的响应差异

配置

所有配置项都可选。在 profile 的 cordis.patch.yml 中设置:

- id: http-tools
  name: dsh-http-tools
  config:
    maxBodyChars: 524288   # 返回给模型的响应体字符上限
    timeoutMs: 10000       # 单请求超时(毫秒)
    blockedHosts: []       # 禁止访问的主机名(例如 ['169.254.169.254'])
    localOnly: false       # true = 只允许访问回环 / 私网地址
    historyLimit: 50       # 会话内请求历史保留条数
    auditHeader: true      # 为每个请求附加 X-DSH-Request 审计头

安全模型

  • 默认允许访问任意 URL;每个请求都会带上 X-DSH-Request 审计头,便于服务端识别 agent 流量。
  • blockedHosts 会在任何网络 I/O 之前拒绝精确主机名及其子域(例如拦截云元数据端点 169.254.169.254)。
  • localOnly: true 将请求限制在回环与私网范围——一键"本地调试模式"。
  • 响应体默认截断在 maxBodyChars(512 KB),请求默认超时 timeoutMs(10 秒),失控调用不会淹没模型上下文。
  • 凭据(Bearer token、Basic 认证串)只作为请求头发送;生成的 curl 命令会把 authorizationcookieproxy-authorizationx-api-key 的值脱敏为 ***,避免密钥泄漏进会话日志与请求历史。

开发

pnpm install
pnpm test      # vitest 单元测试
pnpm run typecheck
pnpm run build # tsdown -> lib/

针对本地 DeepSeek Harness 检出做冒烟测试,用引用构建产物的 patch 覆盖层挂载插件:

pnpm run build

# http-tools.patch.yml —— 引用构建后的入口
# (Windows 上绝对路径必须是 file:// URL,并做百分号编码)
- insert:
  - id: http-tools
    name: /绝对路径/dsh-http-tools/lib/index.js   # POSIX
    # name: file:///C:/Users/.../dsh-http-tools/lib/index.js   # Windows

# 在 deepseek-harness 仓库根目录执行:
pnpm dsh web --patch /绝对路径/http-tools.patch.yml

许可证

MIT