DSH Plugins Marketplace

DSH Plugins

Plugins

/

Tools & Capabilities

/

dsh-apis-plugin

d

dsh-apis-plugin

Manifest valid

Registers any set of HTTP APIs as paired doc-query and request tools for the agent.

UI (client)hasBundlePatch

dsh-apis-plugin

通用接口管理插件(DSH 插件):把任意一套 HTTP 接口注册成 agent 可用的文档查询 + 请求调用双工具。

核心约定:api.cfg 是接口的唯一权威范围——范围外的请求一律拒绝。

版本兼容

需要 DSH >=0.1.7-rc.2(详情页徽章据此显示)。DSH 0.1.5 / 0.1.6 请用旧版 dsh-apis-plugin@0.2.3。

安装

dsh plugin --profile web add dsh-apis-plugin@0.3.1

配置

「API配置」指向一个集合父目录,插件递归扫描其下所有 *.cfg,每个 cfg 是一个集合(集合名取 cfg 的 host 字段):

config/
├── site-a.example.com/
│   ├── api.cfg           # host=site-a.example.com
│   └── api_doc.md        # 该集合的接口文档
└── site-b.example.com/
    ├── api.cfg
    └── api_doc.md

api.cfg(每个集合一份,必需)

# 集合标识(如域名),用于展示与「集合名/路径」消歧
host=site-a.example.com

# 集合用途说明(可选),展示在接口目录与手风琴中
title=xxx

# 该集合的接口服务前缀
baseUrl=http://your-host/api

# 接口白名单:逐行一个,支持 {param} 模板段
apis=
  /users/page
  /users/{id}

改 cfg 后点插件详情页的「扫描」(或重启)生效。

api_doc.md(接口文档,建议提供)

与 api.cfg 放在一起,用 --- 分节,每节描述一个接口,节内用反引号标注路径(如 `/users/page`)。agent 调用 {prefix}_api_doc 时按路径命中对应小节返回。

部署侧 cordis.patch.yml(可选)

- insert:
    - id: dsh-apis-plugin
      name: dsh-apis-plugin
      config:
        domain: "用户中心"        # 领域名:拼进工具描述 prompt
        toolPrefix: api           # 工具名前缀:生成 api_api_doc / api_api_request
        apiDir: ""                # 集合父目录默认值(留空则在 UI 里填)
        endpoints: []             # 额外固定接口(不随扫描回写)
        baseUrl: ""               # 服务前缀兜底(api.cfg 优先)

使用

Web UI(设置 → 接口管理)

操作说明
API配置填集合父目录,失焦或回车自动保存
扫描重扫目录;目录留空点击则清空列表
集合手风琴展示集合名、用途、接口数、baseUrl 与接口列表(只读,增删请在 cfg 中操作)

Agent 工具

工具用途
api_api_doc查接口文档:传 path 返回该接口的参数与响应说明;不传返回全部接口目录
api_api_request调用接口:path 必须在白名单内,GET 用 query,POST 用 body
  • path 默认写接口路径(如 /users/page);跨集合同名接口用「集合名/路径」消歧(如 site-a.example.com/users/page)
  • 安全机制:DELETE 需二次确认(首次只返回确认提示,确认后带 confirm=true 再调);写操作返回结果附带警告块

排查

dsh 控制台日志:

[dsh-apis-plugin] loaded; apiDir=/path/to/config, endpoints=N, collections=a.com,b.com
  • endpoints=0:检查 apiDir 是否正确、其下是否有含 apis 的 *.cfg
  • 列表与 cfg 不一致:点「扫描」或重启

License

MIT

Comments

Loading…

Similar plugins

dsh-workspace-api

Exposes the DSH workspace as an HTTP API: browse, search and read files, and run natural-language agent tasks that answer with cited sources.

Development & InfrastructureManifest valid

★ 0

↓ 61/wk

dsh plugin --profile web add dsh-workspace-api

The public-apis catalog wired into DeepSeek Harness: search 1716 free public APIs by keyword, category, auth, HTTPS or CORS and call any of them.

Tools & CapabilitiesManifest valid

★ 0

dsh plugin --profile web add dsh-public-apis

by cheng-nan01

一个给 DeepSeek Harness 用的插件:让 AI 能真的打开浏览器上网——打开网页、点按钮、填表单、翻页、看页面内容,就像人一样操作浏览器。

Tools & CapabilitiesManifest valid

★ 0

MIT

TypeScript

Aug 14, 2026

dsh plugin --profile web add dsh-tool-playwright

HTTP/API debugging toolset: full-control HTTP requests (method/headers/body/auth), curl command parsing and one-step execution, in-session request history with side-by-side response comparison, pagina

Tools & CapabilitiesManifest valid

★ 0

↓ 140/wk

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

by zjuatri

A DSH browser sidebar plugin with an isolated Chrome profile for every conversation, live interaction, and agent automation.

Tools & CapabilitiesManifest valid

★ 0

JavaScript

Sep 16, 2026

dsh plugin --profile web add dsh-browser-plugin

by zaimokuza-yoshiteru

Use AI agents from the DSH session UI.

Tools & CapabilitiesManifest valid

★ 10

↓ 1.2k/wk

MIT

TypeScript

Oct 3, 2026

dsh plugin --profile web add @zaimokuza/dsh-acp-adapter