SpecFusion/dsh-plugin

54Stars15Forks0Issues1Watchers

Integrate cloud API documentation search for DeepSeek Harness, enabling the model to directly search 65,000+ documents across 20 Chinese open platforms without switching browsers to browse official documentation sites.

Language
TypeScript
License
MIT
Branch
main
ai-agentsalipayapi-documentationchinese-apiclaude-codecursordeepseek-harnessdingtalk

Install

$ dsh plugin --profile web add github:wxkingstar/SpecFusion/dsh-plugin

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

One-line Positioning

SpecFusion is a plugin for DeepSeek Harness (DSH) that connects 65,000+ cloud-based API documents from Chinese open platforms to DSH. When users write code and ask questions like "how to create an approval instance in Feishu," the model can instantly retrieve the corresponding interface path, required parameters, and request examples—without switching to a browser to browse the official documentation site.

Core Capabilities

  • Search API documentation from 20 Chinese open platforms, supporting four keyword types: interface name, API path, error code, and functional concept
  • Retrieve full text of specified documentation, or get structured summaries with summary: true (parameter tables, examples, error codes)
  • List all connected documentation sources and their respective document counts
  • Browse documentation category directories by platform, useful when you're unsure of search terms and want to discover available API domains
  • View recently added or updated documentation to track platform documentation changes

Technical Implementation

  • Language: JavaScript ESM (no build step, lib/ is the published artifact)
  • Key Dependencies: @deepseek-ai/cordis, @deepseek-ai/dsh-tools, @deepseek-ai/schemastery
  • Architecture Pattern: Cordis plugin, injecting skills and tools two ctx services, registering 1 runtime skill (specfusion) + 5 concurrent-safe native tools
  • Entry File: lib/index.js, exporting apply(ctx, config) / name / inject / Config

Use Cases

When writing code in DSH and you need to integrate with APIs from any common domestic open platform (WeCom, Feishu, DingTalk, Taobao, Douyin e-commerce, WeChat Pay, Alipay, JD.com, SHEIN, Dewu, Volcano Engine, Alibaba Cloud Bailian, etc.), the model can instantly retrieve the corresponding interface path, required parameters, error codes, and request examples—saving time spent switching to a browser to browse official documentation sites. Error codes or API paths can also be used to reverse-locate specific interface documentation during troubleshooting.

Prerequisites and Compatibility

DependencyMinimum VersionDescription
DeepSeek Harness (DSH)0.1.0-rc.6+Inferred from peerDependencies @deepseek-ai/dsh-skill and @deepseek-ai/dsh-tools
@deepseek-ai/cordis^4.0.1peerDependency, DSH kernel runtime
Node.jsNot declaredNo engines field declared in package.json
PlatformCross-platformNo os/cpu restrictions in package.json
Native modulesNonePure ESM JavaScript, relies on fetch, no node-gyp modules

Installation

dsh plugin --profile web add github:wxkingstar/SpecFusion/dsh-plugin

After installation, restart dsh web to let the profile reload to take effect.

Configuration Options

ConfigTypeDescriptionDefault
baseUrlstringSpecFusion cloud service address, change to your own domain when using self-deployed instancehttps://specfusion.inagora.org/api

baseUrl can be overridden via three methods (by priority): the baseUrl field in specfusion-dsh row in cordis.patch.yml → SPECFUSION_BASE_URL environment variable → built-in default.

FAQ

Q: Is it ready to use immediately after installation?

A: After installation, restart dsh web to let the profile reload—no additional configuration needed. By default, it uses the public cloud service at https://specfusion.inagora.org/api.

Q: How do I change the address to use a self-deployed instance?

A: Two methods: set the environment variable export SPECFUSION_BASE_URL="http://your-host:3456/api", or override the baseUrl field in the specfusion-dsh row in the profile's cordis.patch.yml.

Q: What format do the tools return?

A: All return Markdown plain text (Content-Type is text/markdown), not JSON—can be directly fed to the model for reading or rendering.

Q: Can I search error codes directly?

A: Yes, use error code numbers (e.g., 60011, 40001) as search keywords—the tools will match by document ID and body text.

Q: Does it search all platforms by default?

A: Yes, without passing source it searches all 20 connected platforms. To narrow down, pass the source parameter (e.g., wecom, feishu, taobao).

Q: Do I need to distinguish between WeCom development modes?

A: Yes. WeCom distinguishes between self-built applications (internal), third-party applications (third_party), and service provider applications (service_provider). Use the mode parameter to filter; default is no filtering.

Q: Can it work offline?

A: No. All 5 tools depend on making HTTP calls to the remote service. When offline or when the cloud service is down, they return errors, and the model will guide users to the official documentation site as a fallback.

Q: How do I uninstall?

A: Use dsh plugin --profile web remove @wxkingstar/specfusion-dsh (standard cordis uninstall command). No manual data cleanup needed.

Learning Curve

Beginner — install and restart the profile to use. Regular users don't need to understand Cordis or API details; only self-deployment or fine-grained configuration requires looking at baseUrl and environment variables.

Known Issues and Limitations

  • All APIs strongly depend on the cloud service. When offline or when the server is down, all 5 tools are unavailable. The skill has a built-in fallback that guides users to each platform's official documentation site.
  • Only searches API development documentation from each platform (interface names, parameters, error codes). Does not cover internal user documentation (e.g., "how to set up attendance in WeCom admin console").
  • WeCom scenarios require users to actively distinguish between internal / third_party / service_provider three development modes. Tools do not filter by default.
  • No TODO / FIXME / HACK markers found in source code.