dsh-ima: Integrating Tencent ima Knowledge Base into DeepSeek Harness

Introduction

When chatting with an agent in DeepSeek Harness (DSH), a common scenario is: materials are already stored in the Tencent ima knowledge base, but the model by default “cannot see” these libraries and requires repeated manual copy-pasting. The DSH community extends capabilities via the “everything is a plugin” approach; ikevss/dsh-ima belongs to the “network tools” category plugin, released by maintainer ikevss, aiming to integrate ima’s browsing, preview, and retrieval into the Harness sidebar and agent toolchain.

The following sections introduce the plugin’s positioning, capability boundaries, installation and binding methods, as well as typical usage on the agent side.

What is This

dsh-ima integrates Tencent ima knowledge base into DeepSeek Harness: the sidebar can browse knowledge bases and files, and the agent can automatically retrieve and read materials within the libraries.

The current package version is 1.7.2 (MIT License). The plugin is maintained in the GitHub repository ikevss/dsh-ima; the community directory page can be found at skillhub.cn/plugins/ikevss/dsh-ima (no official affiliation with DeepSeek/Hunyuan, only a community collection site).

Core Features

After installing the plugin, a “Knowledge Base ima” entry will appear in the sidebar:

  • Left directory tree, right file list browsing; supports filtering by All/Shared/Personal categories, multi-level folders, and breadcrumbs.
  • Grouping consistent with ima: “Personal Knowledge Base/Shared Knowledge Base” are collapsible, and the “+” button at the top right allows creating new knowledge bases in ima.
  • Web pages and WeChat articles can open originals in a new window; document types support one-click “Quote to Conversation” to hand over the current file to the agent for reading.

Preview

PDF, Word, Excel, PPT, images, audio/video, Markdown, XMind, etc. can be previewed within the panel (using the built-in open-file-viewer for pure frontend rendering). Word documents render by page; top right allows downloading the original file or quoting to conversation. When ima file titles lack extensions, the plugin will append the extension from the actual URL before passing to the preview engine.

Note Formatting

The ima notes API returns server-flattened plain text, losing paragraph boundaries. The plugin tries to restore paragraphs based on punctuation, numbering, “speaker + timestamp” anchors, etc.; meeting minutes can be restored to a list of one-sentence-per-entry speeches with an “Original Text” button for comparison.

Agent and Context

The plugin registers 5 agent tools and injects a knowledge base list at the beginning of each conversation (not repeated within 10 minutes), letting the model know “there are materials to check here” and actively search.

Tool Purpose
ima_search_files Search files by content (commonly used when you don’t remember filenames but want to find “which materials mention X”)
ima_list_knowledge_bases List all knowledge bases
ima_search_knowledge_bases Search knowledge bases by keyword (name/description)
ima_list_kb_files List files and folders within a specific library
ima_read_file Read file content (text returned directly, binary files return download links)

Example injected context (README excerpt):

[ima Knowledge Base] The user has connected ima knowledge bases; these libraries can be searched directly:
· My Notes (Personal)
· Project Documents (Shared)
...
· To find "which material mentions X" → ima_search_files
· To browse what's in a library → ima_list_kb_files
· To read full text → ima_read_file

Account Binding

Supports one-click binding: automatically opens browser to log into ima, remaining steps are automated; manual filling is available as fallback if Chrome/Edge is unavailable (the authorization page’s “Copy” button contains the API Key, not displayed separately on the page).

Environment and Version Adaptation

Item Requirement
DeepSeek Harness 0.2.0-rc.1 (development and test version; other 0.2.x minor versions are theoretically compatible but not individually verified)
Node.js ≥ 18 (recommended ≥ 22)
Browser Chrome or Edge (only required for one-click binding)
Operating System Windows / macOS / Linux
ima Account Can log into ima.qq.com

The DSH plugin interface is still evolving in the 0.2.x phase; if issues occur after upgrading DSH, you can report them to the repository Issues with the DSH version number.

Installation and Activation

Prerequisites: DeepSeek Harness installed (using ~/.dsh as home directory below), Node.js ≥ 18. For desktop, replace web with desktop.

Do not use the github:ikevss/dsh-ima shorthand for installation: npm may resolve it as an SSH address and report Permission denied (publickey) if no SSH key is configured. Use the git+https:// or prebuilt tarball from the README.

Install from prebuilt package (fastest, no git, no local build):

dsh plugin --profile web add https://github.com/ikevss/dsh-ima/releases/latest/download/dsh-ima.tgz

Install from source:

dsh plugin --profile web add git+https://github.com/ikevss/dsh-ima.git

Restart DSH after installation (for web, you can also just restart the service and refresh the page). The prebuilt package includes compiled lib/client.js, with no postinstall/prepare scripts during installation.

Desktop example:

dsh plugin --profile desktop add https://github.com/ikevss/dsh-ima/releases/latest/download/dsh-ima.tgz

The desktop profile is exclusively managed by the desktop client; dsh --profile desktop refusing to start from the command line is normal.

Bind ima

  1. Open the sidebar “Knowledge Base ima” → click “One-click Bind ima Account”.
  2. Browser opens ima authorization page, complete login.
  3. Binding completes automatically, panel displays knowledge base list.

Typical Usage

Manual Browsing: In the sidebar, enter a library by Personal/Shared grouping, click to preview files; when agent involvement is needed, click “Quote to Conversation”.

Conversation Retrieval: Directly ask “Does my material mention X?” or “What related documents are in a certain library”—the model has already seen the library list in the context and can call tools like ima_search_files, ima_list_kb_files, ima_read_file, etc., without you needing to provide file names first.

Architectural Key Points (for troubleshooting): The host half (Node) provides agent tools, context injection, and /api/ima/* routes; the browser half handles sidebar and preview. Since ima OpenAPI doesn’t return CORS headers, the browser cannot connect directly and must proxy through the host half to https://ima.qq.com.

Permissions and Known Boundaries

Before installation, it’s recommended to review the source code against the “What it Accesses” section in the README (e.g., grep -rn "https://" lib/index.js lib/ima-client.js). Summary as follows:

  • External connections are mainly to https://ima.qq.com; preview/download uses Tencent Cloud COS signed links returned by the API.
  • Local read/write is concentrated in ~/.dsh/storages/dsh-ima/ (credentials and binding use browser profile); can read ima official skill path ~/.config/ima/{client_id,api_key} as fallback but will not write to that directory.
  • One-click binding temporarily launches local Chrome/Edge (127.0.0.1 debug port), closes after use.
  • No installation scripts, no telemetry reporting.
Boundary Description
Subscription Knowledge Base ima product policy does not open reading (error code 220030), hidden by default
File Update Time ima OpenAPI currently does not return time fields; UI has reserved columns, no plugin changes needed after opening
Runtime Permissions Plugin runs with current DSH process permissions; before installation, read source code and MIT license to confirm acceptance of its network and local file access scope

Conclusion

If you already have documents, notes, web pages, and transcriptions accumulated in ima and want agents in DSH to automatically retrieve and read full text, dsh-ima integrates sidebar browsing, panel preview, and 5 ima tools into the same Harness workflow, reducing copy-pasting.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye