@klarkxy/dsh-dev-index 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,50 +2,28 @@
2
2
 
3
3
  <!-- release-state-note -->
4
4
 
5
- [简体中文](README.zh-CN.md) | [English](README.md)
5
+ [简体中文](README.zh-CN.md)
6
6
 
7
- Runtime: Node `^22.19.0 || >=24.0.0` (26 verified) and DSH `>=0.1.7-rc.2`. The documentation reader is a DSH Web client; the four read-only tools and the Creator-mode guidance run in the host.
7
+ Read the official DeepSeek Harness documentation without leaving DSH, and give Creator mode tools to look up the docs and check plugins before installing them.
8
8
 
9
- Read the official DSH documentation without leaving DSH. The Plugins page embeds the official docs, and Creator mode also gets four native read-only tools: `dsh_docs_search` and `dsh_docs_fetch` to look up documentation, `dsh_plugins_search` and `dsh_plugins_fetch` to check a plugin's npm metadata. Installing and removing plugins stays with the official plugin manager; this plugin never installs anything.
9
+ ## Install
10
10
 
11
- In a running DSH, the same guidance points Creator mode at the read-only inspect tools `cordis_inspect_list` and `cordis_inspect_query`. The environment's own tool and approval policies still apply.
12
-
13
- Readers use the [official documentation site](https://deepseek-harness.github.io/deepseek-harness/) (Chinese at the site root, English under `/en/`). Agents start from its [llms.txt](https://deepseek-harness.github.io/deepseek-harness/llms.txt) index and fetch relevant raw Markdown pages. The site reflects the latest published release. For version-specific docs, source, and type declarations, use `master` in [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) only when it matches the target version; otherwise use the matching `dsh-v*` tag. Do not mix versions.
14
-
15
- The plugin no longer ships or depends on a mirrored index. The [klarkxy Pages site](https://klarkxy.github.io/dsh-plugins/) is now a catalog of klarkxy's DSH plugins; its old index URLs redirect to the official site.
16
-
17
- ## Read in the Plugins page
18
-
19
- In DSH Web, open **Plugins → DSH Docs**. The page shows the official GitHub Pages documentation in a reader panel: it opens the Chinese or English home page in the DSH interface language, offers a **中文 / English** switch, and links to the site in a separate tab. **Documentation home** reloads the home page of the language you are reading. If the embedded page does not load, the panel offers **Open in browser** and **Retry**.
20
-
21
- ## Creator mode guidance
22
-
23
- The host half adds one system-prompt section when the session uses the `cordis` preset (Creator mode). It tells the agent to use `dsh_docs_search` and `dsh_docs_fetch` before choosing APIs, and `dsh_plugins_search` and `dsh_plugins_fetch` before installing or depending on a plugin. Other presets receive no extra prompt. All four read-only tools are registered with the host tool registry and remain subject to its tool policies. The plugin registers no skill.
24
-
25
- - `dsh_docs_search({ query: "plugin", language: "en" })` searches the live official `llms.txt` directory: titles, categories and paths. This is a directory search, not full-text search; an empty result does not establish that a topic is absent from the document bodies, so try broader Chinese or English keywords.
26
- - `dsh_docs_fetch({ id: "en/develop/basic/tool.md" })` reads a document ID returned by search. Results include the source URL, fetch time, content revision and `nextOffset`. Continue with that offset and the same `revision`; if the document changes, restart from offset zero. The default page size is 12,000 characters, at most 16,000.
27
- - `dsh_plugins_search({ query: "memory" })` finds candidate plugins. The default `catalog` source searches the curated klarkxy Chinese/English plugin catalog; `source: "npm"` searches npm's `dsh-plugin` keyword more broadly. Neither source is exhaustive, and a hit is a candidate rather than verified compatibility.
28
- - `dsh_plugins_fetch({ package: "@klarkxy/dsh-current-title", version: "latest" })` reads npm registry metadata for an exact package name: dist-tags, published versions in publication-time order, and the selected version's bundle declaration, DSH/Node engine ranges, dependencies and deprecation. `version` accepts an exact release or a dist-tag; ranges are rejected.
29
-
30
- The plugin-registry tools are read-only metadata lookups: nothing is downloaded, installed or executed, and a declared engines range is not runtime compatibility proof. GitHub-installed plugins have no registry metadata; install those directly with the official plugin manager as `github:owner/repo#commit`, and review their `package.json` yourself.
31
-
32
- ## Boundaries and limits
33
-
34
- Document requests run in the plugin host through its existing HTTP proxy policy, without shell commands or `web_fetch`. Only Markdown entries from the fixed official documentation index can be fetched: redirects and arbitrary URLs are rejected, and TLS verification stays enabled. A request times out after 20 seconds, and one document is capped at 2 MiB.
35
-
36
- A five-minute memory cache holds at most 32 pages / 8 MiB. Pass `refresh: true` to bypass it. Expired data must refresh successfully: failed requests are reported, never silently replaced by an old snapshot. Disabling the plugin cancels its requests and clears the cache. No bundled documentation snapshot, persistent index or separate MCP server is needed.
11
+ ```sh
12
+ dsh plugin --profile web add @klarkxy/dsh-dev-index
13
+ ```
37
14
 
38
- The website tracks the current published documentation, not necessarily the installed DSH version. Use `cordis_inspect_list` and `cordis_inspect_query` to verify runtime contracts, and consult the matching official `dsh-v*` source tag when versions differ. The tools do not fetch historical tags.
15
+ Replace `web` with your profile name and restart the profile.
39
16
 
40
- Official DSH does not read `dsh.plugin.json`. The other bundles in this repository ship that file for local discovery, so this package ships it too. The loader contract is `dsh.bundle.patch` in `package.json`.
17
+ ## Use
41
18
 
42
- ## Install from npm
19
+ - **Plugins → DSH Docs** shows the [official documentation site](https://deepseek-harness.github.io/deepseek-harness/) inside DSH, with a Chinese / English switch.
20
+ - In Creator mode the agent gets four read-only tools: `dsh_docs_search` and `dsh_docs_fetch` to find and read official docs, and `dsh_plugins_search` and `dsh_plugins_fetch` to check a plugin's npm information before installing it. Creator mode is also reminded to verify runtime interfaces with `cordis_inspect_list` and `cordis_inspect_query`.
43
21
 
44
- ```sh
45
- dsh plugin --profile web add @klarkxy/dsh-dev-index
46
- ```
22
+ ## Limits
47
23
 
48
- The published npm package includes the built `lib/` files.
24
+ - The tools only read; they never install anything. Installing stays with the DSH plugin manager.
25
+ - The website follows the latest DSH release, which may differ from the version you run.
26
+ - npm metadata is not proof that a plugin works with your DSH.
49
27
 
50
28
  ## Install from GitHub
51
29
 
@@ -53,23 +31,13 @@ The published npm package includes the built `lib/` files.
53
31
  dsh plugin --profile web add "github:klarkxy/dsh-plugins#path:/plugins/dsh-dev-index"
54
32
  ```
55
33
 
56
- A Git install runs `prepare`, which builds `lib/`. pnpm blocks that script until the profile allowlists it; the DSH CLI prints the exact key to add under `allowBuilds` in `$DSH_HOME/profiles/web/pnpm-workspace.yaml`:
34
+ A GitHub install builds the plugin locally, so pnpm first asks you to allow it. Add this to `$DSH_HOME/profiles/web/pnpm-workspace.yaml`, then run the command again:
57
35
 
58
36
  ```yaml
59
37
  allowBuilds:
60
38
  '@klarkxy/dsh-dev-index': true
61
39
  ```
62
40
 
63
- Run the add command again: that allowance executes this package's build on your machine. Pin a commit when the plugin source must not move.
64
-
65
- Peer ranges on `@deepseek-ai/dsh-system-prompt` and `@deepseek-ai/dsh-agent-preset-registry` are checked against the running `dsh` version. The loader does not enforce `engines.dsh`.
66
-
67
41
  ## License
68
42
 
69
43
  [SATA License 2.1](LICENSE)
70
-
71
- ## Uninstall
72
-
73
- ```bash
74
- dsh plugin --profile web remove @klarkxy/dsh-dev-index
75
- ```
package/README.zh-CN.md CHANGED
@@ -1,51 +1,29 @@
1
- # DSH 文档
1
+ # DSH 文档
2
2
 
3
3
  <!-- release-state-note -->
4
4
 
5
- [简体中文](README.zh-CN.md) | [English](README.md)
5
+ [English](README.md)
6
6
 
7
- **运行环境**:Node `^22.19.0 || >=24.0.0`(已验证 26)、DSH `>=0.1.7-rc.2`。文档阅读器是 DSH Web 客户端;四个只读工具和创造模式指引运行在宿主里。
7
+ 不离开 DSH 就能阅读 DeepSeek Harness 官方文档;创造模式还会获得查文档、在安装前核对插件信息的工具。
8
8
 
9
- 不离开 DSH 就能读到官方文档:插件页内嵌官方文档站,创造模式另外拿到四个原生只读工具——`dsh_docs_search` 和 `dsh_docs_fetch` 检索文档,`dsh_plugins_search` 和 `dsh_plugins_fetch` 查核插件的 npm 元数据。安装和卸载插件始终由官方插件管理器负责,本插件不安装任何东西。
9
+ ## 安装
10
10
 
11
- 在正在运行的 DSH 里,同一段指引要求创造模式使用只读的 `cordis_inspect_list` 和 `cordis_inspect_query` 核对运行时接口。环境自己的工具与审批策略仍然适用。
12
-
13
- 给人读的文档在[官方站点](https://deepseek-harness.github.io/deepseek-harness/)(简体中文在根路径,英文在 `/en/`)。智能体先读官方 [llms.txt](https://deepseek-harness.github.io/deepseek-harness/llms.txt) 索引,再按需读取原始 Markdown 页面。站点对应当前发布的版本。查特定版本的文档、源码和类型声明时,只有目标版本与 `master` 一致才用 [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) 的 `master`,否则使用对应的 `dsh-v*` 标签,不混用版本。
14
-
15
- 插件不再附带或依赖镜像索引。[klarkxy Pages 站点](https://klarkxy.github.io/dsh-plugins/) 现在是 klarkxy 的 DSH 插件目录,旧索引地址会跳转到官方站点。
16
-
17
- ## 在插件页阅读
18
-
19
- 在 DSH Web 打开 **插件 → DSH 文档**,页面会在内嵌的阅读面板里显示官方 GitHub Pages 文档:默认按 DSH 界面语言打开中文或英文首页,可用 **中文 / English** 切换语言,**返回文档首页** 重新载入当前语言首页,工具栏还可以在独立标签页打开该站点。内嵌页面没有显示时,面板会给出“在浏览器中打开”和“重试”。
20
-
21
- ## 创造模式指引
22
-
23
- 宿主插件在会话使用 `cordis` 预设(创造模式)时加入一段系统提示,要求智能体选择 API 前先调用 `dsh_docs_search` 和 `dsh_docs_fetch` 阅读官方文档,安装或依赖某个插件前先调用 `dsh_plugins_search` 和 `dsh_plugins_fetch` 核实元数据。其他预设不注入额外提示。四个只读工具都注册在宿主工具表中,仍受宿主工具策略约束。本插件不注册 Skill。
24
-
25
- - `dsh_docs_search({ query: "插件", language: "zh" })` 在线读取官方 `llms.txt`,搜索标题、分类和路径。这是目录搜索,不是全文搜索;没有命中不代表正文不含相关内容,可以改用更宽泛的中文或英文关键词。
26
- - `dsh_docs_fetch({ id: "develop/basic/tool.md" })` 读取搜索结果中的文档 ID。结果包含来源、获取时间、内容修订值和 `nextOffset`。长文用该偏移量和相同的 `revision` 继续读取;正文更新时需要从头重读。默认每次返回 12,000 字符,上限 16,000。
27
- - `dsh_plugins_search({ query: "记忆" })` 查找候选插件。默认 `catalog` 数据源搜索 klarkxy 维护的中英文插件目录;`source: "npm"` 用 npm 的 `dsh-plugin` 关键词做更宽的发现。两个源都不是全量目录,命中结果只是候选,不代表兼容性已验证。
28
- - `dsh_plugins_fetch({ package: "@klarkxy/dsh-current-title", version: "latest" })` 按确切包名读取 npm 注册表元数据:dist-tags、按发布时间排序的版本列表,以及选定版本的组合包声明、DSH/Node 版本要求、依赖和弃用说明。`version` 可填精确版本或标签,不接受范围。
29
-
30
- 插件注册表工具是只读元数据查询:不下载、不安装、不执行任何代码,声明的 engines 范围也不是运行时兼容性证明。从 GitHub 安装的插件没有注册表元数据,直接用官方插件管理器以 `github:owner/repo#commit` 安装,并自行审阅其 `package.json`。
31
-
32
- ## 边界与限制
33
-
34
- 文档请求由插件宿主执行,沿用 DSH 已有的 HTTP 代理策略,不执行命令,也不调用 `web_fetch`。只读取固定官方索引列出的 Markdown:拒绝任意 URL 和跳转,保留 TLS 证书校验。单次请求超时为 20 秒,单篇文档上限为 2 MiB。
35
-
36
- 内存缓存有效期为五分钟,最多保存 32 页、8 MiB。传入 `refresh: true` 可立即刷新。过期数据必须成功刷新后才能使用;请求失败会报告错误,不会静默返回旧副本。停用插件会取消请求并清空缓存。无需随包分发文档快照、维护持久索引或部署 MCP 服务。
11
+ ```sh
12
+ dsh plugin --profile web add @klarkxy/dsh-dev-index
13
+ ```
37
14
 
38
- 官网对应当前发布的文档,不一定与本机 DSH 版本一致。仍需使用 `cordis_inspect_list` 和 `cordis_inspect_query` 核对运行时接口;版本不一致时查对应官方 `dsh-v*` 源码标签。两个工具不提供历史标签读取。
15
+ 把 `web` 换成你的 profile 名,安装后重启 profile。
39
16
 
40
- 官方 DSH 不读取 `dsh.plugin.json`。本仓库其他 bundle 用这个文件做本地发现,所以这里也保留。加载器认的是 `package.json` 里的 `dsh.bundle.patch`。
17
+ ## 使用
41
18
 
42
- ## 从 npm 安装
19
+ - 「插件 → DSH 文档」会在 DSH 内显示[官方文档站](https://deepseek-harness.github.io/deepseek-harness/),可切换中文 / English。
20
+ - 创造模式下,智能体获得四个只读工具:`dsh_docs_search` 和 `dsh_docs_fetch` 用于查找和阅读官方文档,`dsh_plugins_search` 和 `dsh_plugins_fetch` 用于在安装前查看插件的 npm 信息。创造模式还会被提醒用 `cordis_inspect_list` 和 `cordis_inspect_query` 核对运行时接口。
43
21
 
44
- ```sh
45
- dsh plugin --profile web add @klarkxy/dsh-dev-index
46
- ```
22
+ ## 限制
47
23
 
48
- npm 包包含已构建的 `lib/`。
24
+ - 这些工具只读,不会安装任何东西;安装仍由 DSH 插件管理器负责。
25
+ - 官网对应最新发布的 DSH,可能与你正在使用的版本不同。
26
+ - npm 元数据不能证明插件与你的 DSH 兼容。
49
27
 
50
28
  ## 从 GitHub 安装
51
29
 
@@ -53,23 +31,13 @@ npm 包包含已构建的 `lib/`。
53
31
  dsh plugin --profile web add "github:klarkxy/dsh-plugins#path:/plugins/dsh-dev-index"
54
32
  ```
55
33
 
56
- Git 安装会运行 `prepare` 来构建 `lib/`。pnpm 在允许之前会拦住这个脚本,DSH CLI 会打印出要写进 `$DSH_HOME/profiles/web/pnpm-workspace.yaml` 里 `allowBuilds` 的确切包名:
34
+ 从 GitHub 安装会在本机构建插件,pnpm 会先要求你允许。把下面内容加入 `$DSH_HOME/profiles/web/pnpm-workspace.yaml` 后再执行一次安装命令:
57
35
 
58
36
  ```yaml
59
37
  allowBuilds:
60
38
  '@klarkxy/dsh-dev-index': true
61
39
  ```
62
40
 
63
- 然后再执行一次 add:该许可会在本机执行这个包的构建。需要固定插件来源时请钉住 commit。
64
-
65
- `@deepseek-ai/dsh-system-prompt` 和 `@deepseek-ai/dsh-agent-preset-registry` 的 peer 范围会对照正在运行的 `dsh` 版本检查。加载器不强制 `engines.dsh`。
66
-
67
41
  ## 许可证
68
42
 
69
43
  [SATA License 2.1](LICENSE)
70
-
71
- ## 卸载
72
-
73
- ```bash
74
- dsh plugin --profile web remove @klarkxy/dsh-dev-index
75
- ```
package/dsh.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "@klarkxy/dsh-dev-index",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "main": "lib/index.js",
5
5
  "description": "DSH Docs: read the official DSH documentation in the Plugins page; Creator mode searches and fetches it with native tools.",
6
6
  "engines": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@klarkxy/dsh-dev-index",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "DSH Docs: read the official DSH documentation in the Plugins page; Creator mode searches docs and checks plugin npm metadata with native tools.",
5
5
  "icon": "./icon.svg",
6
6
  "keywords": [
@@ -80,7 +80,7 @@
80
80
  "@deepseek-ai/dsh-tools": ">=0.2.0-rc.2"
81
81
  },
82
82
  "dependencies": {
83
- "@klarkxy/dsh-plugin-kit": "0.3.1"
83
+ "@klarkxy/dsh-plugin-kit": "0.3.3"
84
84
  },
85
85
  "peerDependenciesMeta": {
86
86
  "@deepseek-ai/dsh-agent-preset-registry": {
@@ -107,6 +107,6 @@
107
107
  "registry": "https://registry.npmjs.org/"
108
108
  },
109
109
  "dshRelease": {
110
- "contentHash": "fda890d3919ae02dff3dcb2f4d33894921a5e36885e019a50ed8705e48124202"
110
+ "contentHash": "0fca7006f10b2afc5b92813e7eae8fce1987bb92fe810a96c3e21446ede9f025"
111
111
  }
112
112
  }