メインコンテンツへスキップ
D

dsh-weknora-kb

dcoupe/dsh-weknora-kb

Adds three WeKnora ingest tools, an @ picker for retrieval scope, and a DeepSeek Harness sidebar for browsing folders, uploading documents, and previewing files. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

インストール

dsh plugin --profile web add github:dcoupe/dsh-weknora-kb

README

dsh-weknora-kb

[!IMPORTANT] Unofficial / 非官方。 本插件不是 WeKnora(腾讯)或 DeepSeek Harness 的官方项目,也不代表二者。

  • 检索部分的四个工具(dist/)来自 MIT 许可的 @wxg-prc-cpg/dsh-weknora,仅重命名了产品名,并在此基础上加了写入、@ 菜单与页面。
  • 写入工具的请求契约移植自 MIT 许可的 dsh-weknora-ops。
  • 两份版权与许可声明保存在 THIRD-PARTY-NOTICES.md,再分发请一并保留。

上位项目才是这些能力的原始作者;这里的问题与改进请反馈到本仓库,不要去找上游。

WeKnora 知识库 — a DeepSeek Harness (dsh) plugin that gives the agent access to your knowledge bases and puts them in the sidebar.

  • Four read tools: weknora_list_knowledge_bases / weknora_search / weknora_read_document / weknora_ask (names follow toolPrefix, default weknora).
  • Three write tools: weknora_ingest_document (local file, optional target folder) / weknora_ingest_url / weknora_ingest_text — each waits for the server-side parse and reports it. No delete tool by design.
  • @ menu source in the composer: browse knowledge base → folders → a document or a folder, and write the path into the draft as the retrieval scope.
  • Left-sidebar page 「知识库」: knowledge-base cards with a document/Q&A type badge, each opening a two-pane view — a folder tree derived from the documents, and that folder's list with Add document (uploads into the selected folder) and click-to-preview (text, images, PDF). A 「进入后台 ↗」 link opens the deployment console.
@                          知识库
@帮助中心/                 该库的文件夹与根文档        (Tab 下钻,全角 /)
@帮助中心/产品指南/壁纸.png  单篇文档(选定后写回正常 /)

No address, no credential in this repository

cordis.patch.yml reads the deployment from the environment at load time, so this repository contains neither a URL nor a key:

WEKNORA_BASE_URL=https://your-deployment/api/v1 \
WEKNORA_API_KEY=sk-... \
WEKNORA_TENANT_ID=            # only for platform-scoped keys

With the variables unset the plugin falls back to its own default (http://localhost:8080/api/v1) with no authentication. To pin a deployment in the profile instead, override the row in the target profile's cordis.patch.yml:

- id: weknora-kb
  name: 'dsh-weknora-kb'
  config:
    baseUrl: https://your-deployment/api/v1
    apiKey: sk-...

The key needs retrieve; add chat for weknora_ask, and ingest for the write tools.

Install

git clone <this-repo> weknora-kb
dsh plugin --profile <profile> add ./weknora-kb

Restart dsh afterwards: the Host half of a freshly installed package is only loaded by a new process. Changes to lib/client.js alone need just a page refresh.

Layout

PathRole
index.jsThe Cordis plugin: applies the retrieval half, the write tools and the browser-facing routes from one row's config
dist/The retrieval half (config validation, REST client, tool definitions)
lib/picker.jsHost routes /api/weknora-kb/{list,entries,documents,upload,preview,preview/raw,debug-files,diag}
lib/write.jsThe three ingest tools (multipart contract, parse-status polling)
lib/client.jsBrowser half: the @ source, the sidebar entry and the page (cards, folder tree, upload, preview)
locale/, docs/DETAIL.mdDisplay resources and the operator document
tools/strip-bom.mjs (BOM sweep) and release.mjs (npm build)

docs/DETAIL.md is the full document: tool contracts, path grammar, folder and upload rules, preview routing, configuration fields and the known limitations.

Test

node test/smoke.mjs                    # 12 cases, no network, no credential
WEKNORA_API_KEY=… WEKNORA_BASE_URL=… WEKNORA_KB_ID=… node test/host.mjs    # live deployment
WEKNORA_API_KEY=… WEKNORA_BASE_URL=… WEKNORA_KB_ID=… node test/write.mjs   # live upload + cleanup

The two live suites write a throwaway document and delete it again; they skip themselves when the environment is missing. CI runs the offline suite only.

Discovery

This repository is meant to be listed in the DSH community plugin indexes: add the GitHub topic dsh-plugin and, for the curated directory, open the one-file PR prepared in submission/awesome-dsh-plugin.yml. The complete checklist — including what the indexes verify statically — is in docs/PUBLISHING.md.

License

MIT — see LICENSE. This package contains code derived from two other MIT projects (@wxg-prc-cpg/dsh-weknora for the retrieval half, dsh-weknora-ops for the ingest contract); their notices are reproduced in THIRD-PARTY-NOTICES.md and must stay with any redistribution.

関連プラグイン