dsh-pdf-mineru 0.2.0 → 0.2.2
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/CHANGELOG.md +48 -0
- package/README.md +89 -300
- package/assets/icon.svg +15 -0
- package/lib/client.js +2308 -2765
- package/lib/client.js.map +1 -1
- package/lib/index.js +6645 -6991
- package/lib/pdfjs-worker.mjs +40 -16
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +92 -73
- package/lib/types/adapters/dsh-document-source.d.ts +0 -16
- package/lib/types/client/DisclosureCard.d.ts +0 -15
- package/lib/types/client/NumericInput.d.ts +0 -23
- package/lib/types/client/SettingsPage.d.ts +0 -10
- package/lib/types/client/StorageOperations.d.ts +0 -10
- package/lib/types/client/helpers.d.ts +0 -27
- package/lib/types/client/icons.d.ts +0 -17
- package/lib/types/client/index.d.ts +0 -9
- package/lib/types/client/locales.d.ts +0 -4
- package/lib/types/client/sections/AdvancedSections.d.ts +0 -11
- package/lib/types/client/sections/DefaultsSection.d.ts +0 -12
- package/lib/types/client/sections/ProviderSection.d.ts +0 -24
- package/lib/types/config/migration-values.d.ts +0 -6
- package/lib/types/config/pure.d.ts +0 -94
- package/lib/types/config.d.ts +0 -34
- package/lib/types/domain/cache-key.d.ts +0 -7
- package/lib/types/domain/errors.d.ts +0 -20
- package/lib/types/domain/ids.d.ts +0 -20
- package/lib/types/domain/job.d.ts +0 -2
- package/lib/types/domain/request.d.ts +0 -90
- package/lib/types/domain/result.d.ts +0 -32
- package/lib/types/domain/schemas.d.ts +0 -33
- package/lib/types/index.d.ts +0 -20
- package/lib/types/loopback-rpc.d.ts +0 -8
- package/lib/types/observability.d.ts +0 -32
- package/lib/types/providers/http-client.d.ts +0 -48
- package/lib/types/providers/official-v4-types.d.ts +0 -55
- package/lib/types/providers/official-v4.d.ts +0 -20
- package/lib/types/providers/provider.d.ts +0 -139
- package/lib/types/providers/registry.d.ts +0 -15
- package/lib/types/providers/retry.d.ts +0 -66
- package/lib/types/providers/safe-zip.d.ts +0 -23
- package/lib/types/providers/self-hosted-legacy-v2.d.ts +0 -62
- package/lib/types/providers/self-hosted-v1.d.ts +0 -141
- package/lib/types/rpc.d.ts +0 -31
- package/lib/types/service/document-index.d.ts +0 -36
- package/lib/types/service/image-policy.d.ts +0 -11
- package/lib/types/service/mineru-service.d.ts +0 -88
- package/lib/types/service/page-renderer.d.ts +0 -64
- package/lib/types/service/pdfjs-backend.d.ts +0 -5
- package/lib/types/service/read-cursor.d.ts +0 -44
- package/lib/types/service/read-delivery.d.ts +0 -28
- package/lib/types/service/request-normalizer.d.ts +0 -13
- package/lib/types/service/result-presenter.d.ts +0 -197
- package/lib/types/service/shared-operations.d.ts +0 -47
- package/lib/types/storage/access-gate.d.ts +0 -40
- package/lib/types/storage/artifact-sink.d.ts +0 -24
- package/lib/types/storage/index.d.ts +0 -9
- package/lib/types/storage/maintenance-service.d.ts +0 -193
- package/lib/types/storage/paths.d.ts +0 -34
- package/lib/types/storage/process-lock.d.ts +0 -43
- package/lib/types/storage/result-repository.d.ts +0 -68
- package/lib/types/tools.d.ts +0 -29
- package/lib/types/utils/crypto.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
4
|
+
|
|
5
|
+
## 0.2.2
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Self-hosted MinerU 4.x (V1) failures now carry the server's error code and message instead of only the HTTP status, for example `engine_dead`, `invalid_api_key`, `quality_tier_unavailable`, `upload_not_found` or `file_not_found`. This covers API requests, byte uploads, result downloads and per-file job errors (`parse_failed`, `engine_dead`, a Router's `upstream_job_lost`). The code is also kept as the failure's `providerCode`; credentials stay redacted and the status-to-error mapping, including retryability, is unchanged.
|
|
10
|
+
- A failed connection test shows the server's diagnostic next to "Service unavailable" or "API key was rejected".
|
|
11
|
+
- Original-page view (`read_pdf` with `view: "page"`) works on Windows with a non-English system locale ([#5](https://github.com/Yurzi/dsh-pdf-mineru/issues/5)). Poppler printed the `CreationDate` time-zone name in the system code page, so `pdfinfo` output was rejected as invalid UTF-8 and every dated PDF failed. Only the `Pages:` line is now read, and renderers run with `TZ=UTC`.
|
|
12
|
+
- The PDF.js page renderer no longer fails on Windows: its resource URLs ended with `\` instead of the `/` PDF.js requires. Such configuration faults are now reported as renderer failures instead of an invalid PDF.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Self-hosted V1 test fixtures and scenarios follow MinerU 4.0.12 responses: Middle JSON 2.0, caption anchors in structured content, versioned virtual-model tiers, latched engine failures, expired uploads and outputs, and Router job loss. No configuration change is needed.
|
|
17
|
+
|
|
18
|
+
## 0.2.1
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- Show a localized title, description and icon for the plugin on the DSH Plugins page and in market indexes (`locale/en.json`, `locale/zh.json`, `assets/icon.svg`).
|
|
23
|
+
- Revision-aware settings saves: the settings page now detects configuration changed by another window or process since it was loaded, refuses to overwrite it (`mineru/conflict`), and asks you to reload.
|
|
24
|
+
- Background jobs record the tool call that started them, so native and `run_code` calls are attributed correctly in DSH.
|
|
25
|
+
- End-to-end tests (`pnpm run test:e2e`, run locally) against an isolated install of the DSH release named by the `engines.dsh` lower bound: the packed plugin is installed with `dsh plugin add` and checked in the composed `web` profile (bundle defaults, production dependencies, tool registration, PDF.js page rendering from the installed package), and the settings page is driven in a real `dsh web` with headless Chromium (owner RPC, saves, revision conflicts, credential storage, connection test, cache maintenance).
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- Require DSH `>=0.2.1-rc.2 <0.3.0-0`. Compatibility is decided by `engines.dsh` alone; DSH runtime peers use the same range. Upgrade in place with **Update** on the Plugins page, or `dsh plugin remove` followed by `dsh plugin add`.
|
|
30
|
+
- A relative `file_path` now resolves against the session's current working directory, so it follows `working_directory` changes. The path is resolved once per call; `async_parse_pdf` pins it at submission. `attachment_id` is unaffected.
|
|
31
|
+
- Background job IDs are issued by DSH (for example `mineru-3f9c…`) instead of a sequential `mineru-N`; treat them as opaque.
|
|
32
|
+
- Settings and storage maintenance RPC now require the DSH owner principal in addition to a loopback Host. Destructive maintenance still needs a preview and explicit confirmation.
|
|
33
|
+
- A credential stored in DSH now takes precedence over an environment variable of the same name; the plugin reads `process.env` directly only on hosts without a credential service.
|
|
34
|
+
- Redesign the settings page into two tabs, "Service & parsing" and "Storage", built from DSH primitives: human-readable Provider names, an inline connection test, durations in seconds/hours, a save bar that appears only with unsaved changes, and preview-then-confirm dialogs for cache clearing and quarantine cleanup.
|
|
35
|
+
- `read_pdf` presentation metadata is now a compact summary (IDs, source, status and counts) instead of a copy of the result, which keeps nested `run_code` call logs small. The tool result itself is unchanged.
|
|
36
|
+
- Restructure the documentation: user configuration and storage operations move to `docs/configuration.md`, contributor workflow and release steps to `CONTRIBUTING.md`.
|
|
37
|
+
|
|
38
|
+
### Removed
|
|
39
|
+
|
|
40
|
+
- The separate garbage-collection preview in storage maintenance. The cache-clear dry run is the single preview, and its confirmation token authorizes the deletion.
|
|
41
|
+
- Generated `lib/` output is no longer committed to git (the npm package still ships the built bundles and PDF.js worker); build locally before a `link:` install. TypeScript declarations (`lib/types`) are no longer published.
|
|
42
|
+
- The public `MinerUService` and `parseReadInput` exports, replaced by `ParseService`, `ReaderService` and `parseReadArguments` for offline smoke scripts.
|
|
43
|
+
- The private `smoke:reader-cache` script, which depended on a fixture that was never distributed.
|
|
44
|
+
- The `verify:gui` script, which injected the client bundle into an already running DSH Web with browser-side fixtures, and the manual packed-artifact smoke (`scripts/smoke-reader-package.mjs`); `pnpm run test:e2e` covers both against a real, isolated DSH.
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
|
|
48
|
+
- A relative `file_path` no longer selects a same-named file in the session's original directory after the working directory changes.
|
|
49
|
+
- CI now runs lint, typecheck (including tests), build and tests on every push and pull request; the publish workflow verifies that the tag matches the package version and builds before testing.
|
|
50
|
+
|
|
3
51
|
## 0.2.0
|
|
4
52
|
|
|
5
53
|
### Added
|
package/README.md
CHANGED
|
@@ -4,387 +4,176 @@
|
|
|
4
4
|
|
|
5
5
|
# dsh-pdf-mineru
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**用 MinerU 解析 PDF,让 DeepSeek Harness 里的 Agent 按证据阅读文档**
|
|
8
8
|
|
|
9
|
-
支持
|
|
9
|
+
支持 MinerU 官方云(v4)、自部署 MinerU 4.x(V1 API)和 3.x(旧版任务 API)。Agent 可以分段读取正文、公式、表格和插图,长文档在后台解析,关键内容可在本地回看原页核对。
|
|
10
10
|
|
|
11
11
|
<p>
|
|
12
12
|
<a href="https://awesome-dsh-plugin.com"><img src="https://awesome-dsh-plugin.com/badge.svg" alt="Awesome DSH Plugin"></a>
|
|
13
13
|
<a href="https://www.npmjs.com/package/dsh-pdf-mineru"><img src="https://img.shields.io/npm/v/dsh-pdf-mineru?style=flat-square&label=npm&color=CB3837" alt="npm version"></a>
|
|
14
|
-
<a href="./package.json"><img src="https://img.shields.io/badge/Node.js-%
|
|
15
|
-
<img src="https://img.shields.io/badge/DSH-%3E%3D0.2.
|
|
16
|
-
<img src="https://img.shields.io/badge/MinerU-Official%20v4%20%7C%20Self--hosted%
|
|
14
|
+
<a href="./package.json"><img src="https://img.shields.io/badge/Node.js-%5E22.19.0%20%7C%7C%20%3E%3D24-339933?style=flat-square&logo=nodedotjs&logoColor=white" alt="Node.js ^22.19.0 || >=24"></a>
|
|
15
|
+
<a href="./package.json"><img src="https://img.shields.io/badge/DSH-%3E%3D0.2.1--rc.2%20%3C0.3.0--0-111827?style=flat-square" alt="DSH >=0.2.1-rc.2 <0.3.0-0"></a>
|
|
16
|
+
<img src="https://img.shields.io/badge/MinerU-Official%20v4%20%7C%20Self--hosted%204.x%20V1%20%7C%203.x%20legacy-2563EB?style=flat-square" alt="MinerU Official v4, Self-hosted 4.x V1, 3.x legacy">
|
|
17
17
|
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat-square" alt="MIT License"></a>
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
|
-
[
|
|
20
|
+
[核心亮点](#核心亮点) · [快速开始](#快速开始) · [模型工具](#模型工具一览) · [原页核对](#原页核对的依赖) · [常见问题](#常见问题) · [文档](#文档)
|
|
21
21
|
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
## 核心亮点
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
- **按证据阅读**:目录、字面检索、稳定块 ID 和物理页码帮助 Agent 定位内容;公式、数值和图表可以回看原页核对,不假设 OCR 无误。
|
|
27
|
+
- **三种 Provider 显式切换**:官方云免部署;自部署服务让文档留在内网。三种协议共用同一套工具参数。
|
|
28
|
+
- **后台解析长文档**:几十到几百页的文档可提交为 DSH 原生后台任务,解析期间不阻塞对话,完成后由 DSH 通知。
|
|
29
|
+
- **内容寻址缓存**:按文件内容和解析配置复用已发布结果,同一份文档不重复上传解析。
|
|
30
|
+
- **Web 设置页**:在 Plugins 页面配置 Provider、测试连接、管理缓存;修改需显式保存,破坏性操作先预览再确认。
|
|
27
31
|
|
|
28
|
-
|
|
29
|
-
- ☁️ **云端 / 本地自由切换**:支持开箱即用的 **MinerU 官方云 API**(无需本地显卡)与 **私有化自建服务**(数据不出内网),统一工具接口无缝切换。
|
|
30
|
-
- ⚡ **无感后台异步解析**:几十页至数百页的长篇论文或研报,Agent 会自动提交为 DSH 原生后台任务(Native Job),解析期间不阻塞聊天,解析完成后自动提醒。
|
|
31
|
-
- 💾 **智能内容寻址缓存**:基于文件指纹与解析配置自动去重,同一份文档无需重复解析,极大节省 Token、官方 API 额度与计算资源,二次调用秒级响应。
|
|
32
|
-
- 🖥️ **深度集成 Web GUI**:提供内置可视化设置面板,支持一键连通性测试、参数预设、缓存统计与磁盘管理,配置即改即用。
|
|
32
|
+
## 快速开始
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
### 环境要求
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
- DeepSeek Harness:版本范围以 [package.json](./package.json) 的 `engines.dsh` 为准(当前为 `>=0.2.1-rc.2 <0.3.0-0`)。
|
|
37
|
+
- Node.js `^22.19.0 || >=24.0.0`。
|
|
38
|
+
- 设置页需要 DSH Web;没有 Web 服务的宿主仍可使用两个模型工具,配置直接写在 profile 中。
|
|
37
39
|
|
|
38
|
-
###
|
|
39
|
-
|
|
40
|
-
> ⚠️ **重要版本声明与环境要求**:
|
|
41
|
-
> - **最低支持的 DSH 版本**:`>= 0.2.0-rc.2`。
|
|
42
|
-
> - **仅支持 RC 版本**:本插件**只会对 DeepSeek Harness 的 RC(Release Candidate)版本及后续正式发布版本进行官方支持**。由于早期 `alpha` 测试版本包含较多实验性且剧烈变动的内部 API,本插件不再对 `alpha` 等非稳定测试版本提供兼容与维护支持。
|
|
43
|
-
> - **运行环境要求**:Node.js `^22.19.0 || >=24.0.0`,包管理器推荐 `pnpm@11+`。
|
|
44
|
-
|
|
45
|
-
插件 `0.1.5` 起以 DSH `v0.2.0-rc.2` 为基线,当前版本为 `0.2.0`。升级前请先升级宿主;`0.2.0` 将配置升级到 schema 3,旧配置读取时内存迁移、用户显式保存时写入新格式。自托管 Provider 身份变化会导致旧缓存重新解析;工具参数不变。Web 设置与维护 RPC 仅在 `connection` 和 `webServer` 同时可用时注册;无 WebServer 的宿主仍可使用两个模型工具,但不提供这些 HTTP RPC。
|
|
46
|
-
|
|
47
|
-
后台任务使用 DSH 的 SessionId 归属与原生 JobRegistry:阶段进度显示为 `preparing`、`waiting-for-parse`、`reading-result`、`summarizing`,不是页数或百分比;缓存命中跳过等待阶段。完成摘要通过原生任务结果交付,通知、空闲唤醒、输出消费与会话归档准入由 DSH 负责。宿主必须为该会话装配任务控制器(如 `tool-jobs`),否则启动会在解析前拒绝。`job_kill` 仍只取消本次等待,不中止其他调用共用的解析生产者。
|
|
48
|
-
|
|
49
|
-
### 1. 安装插件
|
|
50
|
-
|
|
51
|
-
在 DeepSeek Harness 环境中一键安装:
|
|
40
|
+
### 安装
|
|
52
41
|
|
|
53
42
|
```sh
|
|
54
43
|
dsh plugin --profile web add dsh-pdf-mineru
|
|
55
44
|
```
|
|
56
45
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
> 本地开发或测试源码时,可使用:`dsh plugin --profile web add link:/absolute/path/to/dsh-pdf-mineru`
|
|
60
|
-
|
|
61
|
-
### 本地原页渲染的安装条件
|
|
62
|
-
|
|
63
|
-
正常安装插件会安装固定版本的 [pdfjs-dist 6.3.289](https://www.npmjs.com/package/pdfjs-dist/v/6.3.289)(Apache-2.0)和 [@napi-rs/canvas 1.0.9](https://www.npmjs.com/package/@napi-rs/canvas/v/1.0.9)(MIT)。在支持的平台且未禁用平台可选依赖时,**无需系统安装 Poppler 即可使用原有原页接口**;字体、CMap、WASM 都从安装包本地加载,无 CDN。
|
|
46
|
+
本地开发时可以安装源码目录。仓库不提交构建产物,安装前先在源码目录执行 `pnpm install && pnpm run build`:
|
|
64
47
|
|
|
65
|
-
|
|
48
|
+
```sh
|
|
49
|
+
dsh plugin --profile web add link:/absolute/path/to/dsh-pdf-mineru
|
|
50
|
+
```
|
|
66
51
|
|
|
67
|
-
|
|
52
|
+
### 升级
|
|
68
53
|
|
|
69
|
-
|
|
54
|
+
- Web:在 **Plugins / 插件** 页面找到 dsh-pdf-mineru,点击 **更新**。
|
|
55
|
+
- CLI:先移除再安装:
|
|
70
56
|
|
|
71
|
-
|
|
57
|
+
```sh
|
|
58
|
+
dsh plugin --profile web remove dsh-pdf-mineru
|
|
59
|
+
dsh plugin --profile web add dsh-pdf-mineru
|
|
60
|
+
```
|
|
72
61
|
|
|
73
|
-
|
|
62
|
+
如果新版本要求更高的 DSH,请先升级宿主。旧版配置会在读取时自动转换,在设置页点击保存后才写回。多个进程共享同一缓存目录时,请先停止全部进程再升级,详见[配置与运维指南](docs/configuration.md#多进程共享-storageroot)。
|
|
74
63
|
|
|
75
|
-
|
|
64
|
+
### 选择 Provider
|
|
76
65
|
|
|
77
|
-
|
|
66
|
+
打开 **Plugins / 插件 → dsh-pdf-mineru**,在「服务与解析」标签选择服务类型。修改先进入草稿,点击 **保存** 才生效;**测试连接** 使用草稿中的地址等设置,但只使用已保存的 API Key。
|
|
78
67
|
|
|
79
68
|
<p align="center">
|
|
80
|
-
<img src="./docs/assets/mineru-settings-preview.webp" width="780" alt="MinerU
|
|
69
|
+
<img src="./docs/assets/mineru-settings-preview.webp" width="780" alt="MinerU 设置页(Plugins → dsh-pdf-mineru)">
|
|
81
70
|
</p>
|
|
82
71
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
#### 方案 A:使用 MinerU 官方云(推荐,免部署)
|
|
86
|
-
1. 前往 [MinerU 官网](https://mineru.net) 注册并获取 API Token。
|
|
87
|
-
2. 在终端配置环境变量(或通过 DSH 凭据服务管理):
|
|
88
|
-
```sh
|
|
89
|
-
export MINERU_API_KEY="your-token-here"
|
|
90
|
-
```
|
|
91
|
-
3. 在设置中选择 **Official v4**,保持 **API Key Env Var** 为 `MINERU_API_KEY`,点击 **Test Active Provider** 即可完成验证。
|
|
92
|
-
|
|
93
|
-
#### 方案 B:使用本地 / 私有化自建服务
|
|
94
|
-
1. 启动 MinerU 服务:4.x 请选择 **Self-Hosted MinerU (V1 API)**(常见地址 `http://localhost:8000`);3.x 请选择 **Self-Hosted MinerU (Legacy v2)**(常见地址 `http://localhost:18000`)。API 代际不等于软件大版本,也不要填入 VLM 推理服务地址。
|
|
95
|
-
2. V1 配置档位 `tier` 和独立的 OCR 模式 `ocrMode: auto/txt/ocr`;legacy-v2 配置 backend 映射及共享解析默认值。两种协议显式选择,不自动降级或映射 backend 为 tier。
|
|
96
|
-
3. 本地 HTTP 需勾选 **Allow Insecure HTTP**。点击 **Test Active Provider** 验证:V1 显示部署声明的档位、产物和来源,真实解析前也检查 ZIP、file_id 与选定档位是否可用。验证不等于解析效果保证。
|
|
97
|
-
4. 配置修改只更新草稿,点击 **Save Configuration** 才保存。切换协议、折叠卡片不清空各 profile 的草稿。
|
|
98
|
-
|
|
99
|
-
### 3. 开始使用
|
|
100
|
-
|
|
101
|
-
配置完成后,无需记忆复杂指令,直接在聊天框中用自然语言对 Agent 下达需求即可!
|
|
102
|
-
|
|
103
|
-
---
|
|
72
|
+
**A. MinerU 官方云(免部署)**
|
|
104
73
|
|
|
105
|
-
|
|
74
|
+
1. 在 [mineru.net](https://mineru.net) 注册并创建 API Token。
|
|
75
|
+
2. 选择「MinerU 云服务」,在 API Key 输入框粘贴 Token,点击 **保存**。密钥由 DSH 凭据服务保管,不写入插件配置。
|
|
76
|
+
3. 点击 **测试连接** 确认可用。
|
|
106
77
|
|
|
107
|
-
|
|
78
|
+
**B. 自部署 MinerU 4.x(V1 API)**
|
|
108
79
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
80
|
+
1. 启动 MinerU 4.x 的 API 服务(常见地址 `http://localhost:8000`)。
|
|
81
|
+
2. 选择「自部署 4.x」,填写服务地址;本机 HTTP 地址需在「连接选项」中开启「允许 HTTP 明文连接」。
|
|
82
|
+
3. 按需选择解析档位(tier)和 OCR 模式(auto / txt / ocr),测试连接后保存。
|
|
112
83
|
|
|
113
|
-
|
|
114
|
-
> **你**:“请在后台解析这本 120 页的技术研报 `/data/annual-report.pdf`,解析完成后告诉我。”
|
|
115
|
-
> **Agent**:提交 `async_parse_pdf` 并返回任务 ID(如 `mineru-1`),全量解析到本地缓存,完成后返回文档结构化摘要(页数、大纲、表格数、图片数等),并提示使用 `read_pdf` 按需读取。
|
|
84
|
+
**C. 自部署 MinerU 3.x(旧版任务 API)**
|
|
116
85
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
86
|
+
1. 启动 MinerU 3.x 服务(常见地址 `http://localhost:18000`)。
|
|
87
|
+
2. 选择「自部署 3.x」,填写服务地址和 Pipeline/VLM 后端名称,本机 HTTP 同样需要显式允许。
|
|
88
|
+
3. 测试连接后保存。
|
|
120
89
|
|
|
121
|
-
|
|
90
|
+
协议由你显式选择,插件不会自动探测或降级到另一种协议。不要把 VLM 推理服务的地址当作 MinerU API 填入。各字段含义、YAML 写法与凭据规则见[配置与运维指南](docs/configuration.md)。
|
|
122
91
|
|
|
123
|
-
|
|
92
|
+
### 开始对话
|
|
124
93
|
|
|
125
|
-
|
|
126
|
-
| --- | --- | --- |
|
|
127
|
-
| `read_pdf` | 同步读取 / 按需切片 | 同步读取 PDF,支持指定页码(`pages`)与内容类型(`focus`)切片提取,返回 Markdown 文本与按自然顺序排列的内联多模态图表 |
|
|
128
|
-
| `async_parse_pdf` | 长篇文档 / 后台解析 | 注册为 DSH 原生后台任务(`mineru-N`),全量解析 PDF 至本地缓存,完成后交付文档结构化摘要与后续阅读指引,不阻塞当前对话 |
|
|
94
|
+
配置完成后直接用自然语言提出需求,Agent 会自行选择工具:
|
|
129
95
|
|
|
130
|
-
|
|
96
|
+
- “读一下 `paper.pdf` 的目录,然后找出第 3 节里所有带编号的公式。”
|
|
97
|
+
- “在后台解析 `/data/annual-report.pdf`,完成后告诉我它有哪些章节和表格。”
|
|
98
|
+
- “第 7 页那张表的数值看起来不对,对照原页核对一下。”
|
|
131
99
|
|
|
132
|
-
|
|
133
|
-
2. 用返回的 `block_id` 精读完整块,或用物理页码与focus选择内容。标题块不代表整节。
|
|
134
|
-
3. `content_status: "partial"` 时,以同一来源选择器(`file_path` 或 `attachment_id`)和原样cursor继续,不重复pages/focus/block_id/query;结束时cursor为null。
|
|
135
|
-
4. 对关键公式、数值和图表,用 `view: "page"` 回看原页;可传source_sha256作为expected_sha256。
|
|
100
|
+
相对路径按当前会话的工作目录解析;也可以直接引用会话里上传的 PDF 附件。
|
|
136
101
|
|
|
137
|
-
|
|
102
|
+
## 模型工具一览
|
|
138
103
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
104
|
+
| 工具 | 用途 |
|
|
105
|
+
| --- | --- |
|
|
106
|
+
| `read_pdf` | 同步读取:目录、字面检索、按块或按页精读,分段续读,以及本地原页核对(`view: "page"`) |
|
|
107
|
+
| `async_parse_pdf` | 把整份文档提交为 DSH 后台任务,完成后返回结构摘要;之后用 `read_pdf` 按需阅读 |
|
|
143
108
|
|
|
144
|
-
|
|
109
|
+
两个工具都接受 `file_path` 或 `attachment_id`(二选一)。参数、响应字段、预算与错误恢复见 [PDF 阅读契约](docs/model-reading.md)。
|
|
145
110
|
|
|
146
|
-
|
|
111
|
+
## 原页核对的依赖
|
|
147
112
|
|
|
148
|
-
|
|
113
|
+
原页核对在本地渲染,不上传文件,也不调用 Provider:
|
|
149
114
|
|
|
150
|
-
|
|
115
|
+
- 优先使用 PATH 中的 Poppler(`pdfinfo`、`pdftoppm`)。
|
|
116
|
+
- 找不到或无法执行 Poppler 时,自动改用随插件安装的 PDF.js 和 `@napi-rs/canvas`。Canvas 使用上游为常见 Linux、macOS、Windows 平台提供的预编译包,无需编译或安装 Poppler。
|
|
117
|
+
- 安装插件时不要使用 `--no-optional`,否则会缺少 Canvas 平台包。两个后端都不可用时会提示安装 Poppler,普通文本阅读不受影响。
|
|
151
118
|
|
|
152
|
-
|
|
119
|
+
渲染器有超时、并发和尺寸限制,但它不是操作系统级沙箱;处理不可信 PDF 时仍需宿主层面的隔离。具体限制见 [ARCHITECTURE.md](ARCHITECTURE.md#原页渲染)。
|
|
153
120
|
|
|
154
|
-
|
|
155
|
-
| --- | --- | --- | --- |
|
|
156
|
-
| `file_path` | `string` | 全部 | 本地文件路径;与 `attachment_id` 必须且只能选一个 |
|
|
157
|
-
| `attachment_id` | `string` | 全部 | 当前会话可见文件附件的完整内容 ID 或唯一摘要前缀(8–64 位十六进制,可带 `sha256:`) |
|
|
158
|
-
| `pages` | `number` / `string` / `number[]` | `read_pdf` | 1-based 页码选择,支持单页(如 `3`)、数组(如 `[1, 2, 5]`)或范围字符串(如 `"1-3, 5"`) |
|
|
159
|
-
| `focus` | `string` / `string[]` | `read_pdf` | `all`(默认)、`text`、`table`、`image`、`toc` 或 `artifacts` |
|
|
160
|
-
| `cursor` | `string` | `read_pdf` | 原样传回上一条部分阅读响应的 token;与 `pages`/`focus`/`block_id`/`query` 互斥,仍须传同一来源选择器(`file_path` 或 `attachment_id`) |
|
|
161
|
-
| `block_id` | `string` | `read_pdf` | 原样使用此前返回的稳定块 ID;与 `query`、`cursor` 互斥 |
|
|
162
|
-
| `query` | `string` | `read_pdf` | 1–256 字符、不区分大小写的字面检索;返回上下文摘要与块 ID,再用 `block_id` 读全文 |
|
|
163
|
-
| `view` | `"content"` / `"page"` | `read_pdf` | 默认解析文本;page 模式只接受一页 `pages`,本地渲染原页,不调用 Provider |
|
|
164
|
-
| `expected_sha256` | `string` | `read_pdf` | 仅 page 模式;可选的源文件 SHA-256,通常来自此前结果的 `source_sha256` |
|
|
165
|
-
| `inline_images` | `boolean` | `read_pdf` | 首次省略默认true;续读省略继承,显式值覆盖,仍受模型能力和图像预算约束 |
|
|
166
|
-
| `poll_timeout_ms` | `number` | `read_pdf` | 最大同步等待超时毫秒数 |
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
## 🏗️ 工作架构与流程
|
|
171
|
-
|
|
172
|
-
```mermaid
|
|
173
|
-
flowchart LR
|
|
174
|
-
Agent[DSH Agent] --> Sync[read_pdf]
|
|
175
|
-
Agent --> Async[async_parse_pdf]
|
|
176
|
-
|
|
177
|
-
Async --> Jobs[DSH JobRegistry]
|
|
178
|
-
Jobs --> Service[MinerUService]
|
|
179
|
-
Sync --> Service
|
|
180
|
-
|
|
181
|
-
Service --> Cache{Result cache}
|
|
182
|
-
Cache -->|hit| Result[Immutable result]
|
|
183
|
-
Cache -->|miss| Shared[SharedOperationRegistry]
|
|
184
|
-
Shared --> Providers
|
|
185
|
-
Providers --> V1[Self-hosted V1]
|
|
186
|
-
Providers --> V2[Self-hosted legacy v2]
|
|
187
|
-
V1 --> Staging[Validated staging]
|
|
188
|
-
Providers --> V4[Official v4]
|
|
189
|
-
V2 --> Staging
|
|
190
|
-
V4 --> Staging
|
|
191
|
-
Staging --> Publish[Atomic publish]
|
|
192
|
-
Publish --> Result
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
- **统一工具分发**:Agent 发起的同步请求(`read_pdf`)直接返回结果,异步长任务(`async_parse_pdf`)交由 DSH 原生 JobRegistry 调度。
|
|
196
|
-
- **缓存复用**:按文件 SHA-256 与解析语义寻址;命中时无需重新提交上游解析,但仍校验本地源文件及产物。
|
|
197
|
-
- **并发请求合并**:同进程内的并发重复请求由 `SharedOperationRegistry` 合并,避免重复向上游提交。
|
|
198
|
-
- **显式三类 Provider**:`self-hosted-v1` 使用 4.x `/v1/...`,`self-hosted-legacy-v2` 使用 3.x `/tasks`,`official-v4` 使用官方云接口;各自有独立配置、缓存身份和能力校验。
|
|
199
|
-
|
|
200
|
-
## 🔌 Provider 选型对比
|
|
201
|
-
|
|
202
|
-
| 配置类型 | 适用服务 | 可配置解析选项 | 不接受的混用字段 |
|
|
203
|
-
| --- | --- | --- | --- |
|
|
204
|
-
| `self-hosted-v1` | 自部署 MinerU 4.x,V1 API | `tier`(四档或服务端默认)、`ocrMode`(三态) | `modelMap`、请求级模型/语言/公式/表格开关 |
|
|
205
|
-
| `self-hosted-legacy-v2` | 自部署 MinerU 3.x,旧任务 API | `modelMap`;共享 `defaults` 中的模型、解析方式、语言、公式、表格 | `tier`、`ocrMode` |
|
|
206
|
-
| `official-v4` | MinerU 官方云 API | `models`;共享解析默认值(不支持 txt) | `tier`、`ocrMode`、`modelMap` |
|
|
207
|
-
|
|
208
|
-
两类自托管支持显式 HTTP opt-in、可选凭据引用和 `configuredVersion`;官方云保持 HTTPS 与凭据要求。新安装提供三份独立 profile,默认仍选 legacy-v2,不自动更改既有部署目标。
|
|
209
|
-
|
|
210
|
-
---
|
|
211
|
-
|
|
212
|
-
## 🛠️ 设置与配置参考
|
|
213
|
-
|
|
214
|
-
推荐直接在 **DSH Web GUI (Plugins / 插件 → dsh-pdf-mineru)** 中进行可视化调整。若需要直接编辑配置文件(`cordis.patch.yml`),可参考以下常用配置:
|
|
121
|
+
## 常见问题
|
|
215
122
|
|
|
216
123
|
<details>
|
|
217
|
-
<summary><strong
|
|
218
|
-
|
|
219
|
-
### 1. 官方云 (Official v4) 推荐配置
|
|
220
|
-
```yaml
|
|
221
|
-
schemaVersion: 3
|
|
222
|
-
activeProvider: mp_official
|
|
223
|
-
providers:
|
|
224
|
-
- id: mp_official
|
|
225
|
-
type: official-v4
|
|
226
|
-
baseURL: https://mineru.net/api/v4
|
|
227
|
-
apiKeyEnv: MINERU_API_KEY
|
|
228
|
-
models: [pipeline, vlm]
|
|
229
|
-
defaults:
|
|
230
|
-
model: vlm
|
|
231
|
-
ocr: false
|
|
232
|
-
formula: true
|
|
233
|
-
table: true
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
### 2. 本地私有化 (Self-hosted legacy v2) 推荐配置
|
|
237
|
-
```yaml
|
|
238
|
-
schemaVersion: 3
|
|
239
|
-
activeProvider: mp_self_hosted
|
|
240
|
-
providers:
|
|
241
|
-
- id: mp_self_hosted
|
|
242
|
-
type: self-hosted-legacy-v2
|
|
243
|
-
baseURL: http://localhost:18000
|
|
244
|
-
allowInsecureHttp: true
|
|
245
|
-
modelMap: # legacy-v2 的 backend 名称
|
|
246
|
-
pipeline: pipeline
|
|
247
|
-
vlm: vlm-engine
|
|
248
|
-
defaults:
|
|
249
|
-
model: pipeline
|
|
250
|
-
ocr: false
|
|
251
|
-
formula: true
|
|
252
|
-
table: true
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
### 3. MinerU 4.x 自托管(V1 API)配置
|
|
256
|
-
|
|
257
|
-
```yaml
|
|
258
|
-
schemaVersion: 3
|
|
259
|
-
activeProvider: mp_self_hosted_v1
|
|
260
|
-
providers:
|
|
261
|
-
- id: mp_self_hosted_v1
|
|
262
|
-
type: self-hosted-v1
|
|
263
|
-
baseURL: http://localhost:8000
|
|
264
|
-
allowInsecureHttp: true
|
|
265
|
-
apiKeyEnv: MINERU_API_KEY
|
|
266
|
-
tier: standard # 可省略,让服务端选择;不是具体模型名
|
|
267
|
-
ocrMode: auto # auto / txt / ocr;按 V1 profile 独立保存
|
|
268
|
-
configuredVersion: '4.0.10' # 原地升级服务或模型后更新缓存版本
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
V1 不暴露上游已移除的请求级语言/公式/表格参数。隐藏这些共享默认值不会把它们清空,但它们不影响 V1 请求或缓存;内部占位值不表示服务端关闭相关能力。OCR 的 txt 与 auto 保持不同语义,txt 不保证完全不运行视觉模型。档位切换和 OCR 模式变化会隔离缓存;standard/advanced 可以使用同一模型、不同计算量。
|
|
272
|
-
|
|
273
|
-
**配置版本与自动迁移:**当前插件配置为 schemaVersion: 3,独立于 MinerU 软件/API 版本及缓存、游标版本。读取旧配置时只在内存中按 **1 → 2 → 3** 转换;未声明版本的 Provider-based 配置按版本 2 处理。启动、配置读取均不自动改写磁盘;用户点击保存后,才通过宿主事务持久化版本 3 的完整迁移结果,后续普通保存仍沿用原生 Settings。
|
|
274
|
-
|
|
275
|
-
- 1 → 2 移除旧批量/产物默认字段;2 → 3 将 self-hosted-v2 转为 self-hosted-legacy-v2,保留有效 ID、活动选择、地址、凭据引用、backend 映射及其他有效设置,移除 legacy 不支持的 tier。
|
|
276
|
-
- 旧版本缺失或不支持的字段值使用对应默认值修复;重复/无效 ID 采用不冲突的默认 ID。迁移记录只含版本、字段路径和 Provider ID,不记录原始值或密钥。不会因迁移自动开启未经明确授权的 HTTP;缺少授权的 HTTP 默认端点改用 HTTPS,无效凭据引用不会被传给 Provider。
|
|
277
|
-
- 最新版本编辑继续严格校验;未知未来版本和未知结构字段拒绝,防止误降级或吞掉配置。宿主组合基础层中残留的两个已废弃字段仅在内存清除;不恢复旧 flat config。
|
|
278
|
-
- 首次显式保存迁移配置时,完整快照同时保存修复后的非表单字段,避免更新版本号后残留坏值;运行中的 storageRoot/limits 仍不允许改变。保存失败不会提前更新运行时配置。
|
|
279
|
-
|
|
280
|
-
**接口选择与缓存:**迁移不根据 URL/backend/tier 猜测接口。此前依赖 V1 自动识别的部署需主动选择 self-hosted-v1。原自托管缓存不会被新 Provider 身份复用,配置迁移也不改写解析产物;连接失败不会降级到另一个协议。
|
|
281
|
-
|
|
282
|
-
**V1 功能边界:**使用本地路径或会话附件,经上传去重、任务轮询及 ZIP 下载后发布到插件自身缓存。已处理 partial/canceled 状态、逐文件错误和素材实际路径;不把服务器资源 ID 当作重启后可恢复的持久化记录。工具仍是单文件;不暴露 URL/inline 来源、callback/Webhook、服务端 DELETE 取消、HTML/DOCX 产物选择或 Doclib。job_kill 只取消本次等待,不中止共享上游任务。read_pdf.pages 是已解析内容的物理页投影,不是完整上游 page_range 语法;原页 view 仅支持 PDF。当前输入白名单仍限于 PDF、常见图片及 doc/docx/ppt/pptx/xls/xlsx;HTML/MHTML、OpenDocument、RTF、EPUB、OFD、CSV/TSV 等上游新增格式尚未开放,HTML 已验证在上传前明确拒绝。不能将四档×所有文件类型视作均已覆盖或验证。
|
|
283
|
-
|
|
284
|
-
### 4. 存储与限制自定义(可选)
|
|
285
|
-
```yaml
|
|
286
|
-
storage:
|
|
287
|
-
storageRoot: /absolute/path/to/dsh/cache/pdf-mineru # 默认在 $DSH_HOME/cache/pdf-mineru
|
|
288
|
-
cacheEnabled: true
|
|
289
|
-
output:
|
|
290
|
-
maxInlineChars: 12000 # 单次响应预算;正文每块另限 8000 UTF-16 单元
|
|
291
|
-
maxInlineImages: 6 # 单次 read_pdf 响应最多内联图片数(0–100)
|
|
292
|
-
limits:
|
|
293
|
-
maxFileBytes: 209715200 # 200 MB
|
|
294
|
-
```
|
|
124
|
+
<summary><strong>API Key 应该放在哪里?</strong></summary>
|
|
295
125
|
|
|
126
|
+
推荐在设置页输入,密钥由 DSH 凭据服务保管。也可以导出与「凭据引用名」同名的环境变量(默认 `MINERU_API_KEY`),但 DSH 中保存的值优先于环境变量。详见[凭据](docs/configuration.md#凭据)。
|
|
296
127
|
</details>
|
|
297
128
|
|
|
298
|
-
### 多进程共享存储与升级
|
|
299
|
-
|
|
300
|
-
多个进程可以共享同一 `storageRoot`,前提是同一主机、同一 PID 可见命名空间及支持 hard link 的一致本地文件系统。不支持 NFS、跨主机或互不可见 PID 的容器共享这一锁协议。
|
|
301
|
-
|
|
302
|
-
升级时请先停止所有使用该目录的 MinerU 进程,再统一更新并重启。新协议的 `.process.lock` 是持久版本隔离标记,实际互斥与使用记录位于 `.lock/`;它不是应当在退出时删除的“残留锁”。遇到旧锁或损坏记录,请先确认所有相关进程已停止,再按错误提示人工恢复,切勿在活跃进程运行时删除协调文件。
|
|
303
|
-
|
|
304
|
-
`storageRoot` 与 `limits.*` 在启动时固定。运行中的配置保存会拒绝这些值的变更;应修改宿主配置并重启插件,不能依赖一次被拒绝的保存自动生效。
|
|
305
|
-
|
|
306
|
-
---
|
|
307
|
-
|
|
308
|
-
## ❓ 常见问题 (FAQ)
|
|
309
|
-
|
|
310
129
|
<details>
|
|
311
|
-
<summary><strong
|
|
130
|
+
<summary><strong>扫描件识别效果不好怎么办?</strong></summary>
|
|
312
131
|
|
|
313
|
-
|
|
314
|
-
2. 在个人中心创建并复制您的 API Key。
|
|
315
|
-
3. 导出为环境变量 `export MINERU_API_KEY="xxx"`,或在 DSH Settings 中统一管理。
|
|
132
|
+
在设置页把解析方式改为 `ocr`(4.x V1 对应各 profile 的 OCR 模式)。模型工具不接受 `ocr`、`model` 等解析参数,不能让 Agent 通过工具参数切换。修改解析配置会产生新的缓存身份,下次读取会重新解析。
|
|
316
133
|
</details>
|
|
317
134
|
|
|
318
135
|
<details>
|
|
319
|
-
<summary><strong>
|
|
136
|
+
<summary><strong>Pipeline 和 VLM 有什么区别?</strong></summary>
|
|
320
137
|
|
|
321
|
-
|
|
138
|
+
两者是官方云和 3.x 旧版服务的解析模型。Pipeline 速度快、资源占用低,适合多数常规版面;VLM 使用视觉多模态模型,复杂图文混排和特殊公式效果通常更好。4.x V1 不选择模型,改用解析档位。
|
|
322
139
|
</details>
|
|
323
140
|
|
|
324
141
|
<details>
|
|
325
|
-
<summary><strong
|
|
142
|
+
<summary><strong>解析结果存在哪里?怎么清理?</strong></summary>
|
|
326
143
|
|
|
327
|
-
-
|
|
328
|
-
- **VLM 模式**:引入端到端视觉多模态大模型,对极其复杂的图文混排、手写公式、艺术字体及特殊图表有更出色的理解力。
|
|
144
|
+
默认在 `$DSH_HOME/cache/pdf-mineru/`。在设置页「存储」标签中可以查看统计、校验完整性和清除缓存;清除前会先显示预览,确认后才删除。有读取或解析正在进行时,清理会被拒绝。详见[存储与维护](docs/configuration.md#存储缓存与维护)。
|
|
329
145
|
</details>
|
|
330
146
|
|
|
331
147
|
<details>
|
|
332
|
-
<summary><strong
|
|
148
|
+
<summary><strong>后台任务可以取消吗?</strong></summary>
|
|
333
149
|
|
|
334
|
-
|
|
335
|
-
您可以在 **Plugins / 插件 → dsh-pdf-mineru** 的运维区域中:
|
|
336
|
-
- 点击 **Verify Cache** 检查缓存完整性;
|
|
337
|
-
- 点击 **Clear Cache** 预览,再显式确认清除。破坏性维护在存在活跃读取或解析时拒绝执行,不会为了清理而取消它们。
|
|
150
|
+
可以,用 DSH 的通用任务工具(如 `job_kill`)。取消只结束这一次等待;如果别的调用也在等待同一份文档的解析,那次解析会继续完成。
|
|
338
151
|
</details>
|
|
339
152
|
|
|
340
153
|
<details>
|
|
341
|
-
<summary><strong
|
|
154
|
+
<summary><strong>保存时提示配置已被修改?</strong></summary>
|
|
342
155
|
|
|
343
|
-
|
|
156
|
+
说明从打开设置页到保存期间,配置被其他窗口或进程改过。请按提示重新加载后再修改,插件不会覆盖别人的修改。
|
|
344
157
|
</details>
|
|
345
158
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
## 🧑💻 开发者指南
|
|
349
|
-
|
|
350
|
-
如果您希望对插件进行二次开发或贡献代码:
|
|
351
|
-
|
|
352
|
-
```sh
|
|
353
|
-
# 1. 安装依赖
|
|
354
|
-
pnpm install
|
|
355
|
-
|
|
356
|
-
# 2. 类型检查与测试
|
|
357
|
-
pnpm run typecheck
|
|
358
|
-
pnpm test
|
|
359
|
-
|
|
360
|
-
# 3. 构建产物
|
|
361
|
-
pnpm run build
|
|
362
|
-
|
|
363
|
-
# 4. 在运行中的 DSH Web 中验证前端设置组件
|
|
364
|
-
pnpm run verify:gui
|
|
365
|
-
# 若无关插件阻止 Web shell 启动,可显式限定浏览器 fixture 的排除列表(不修改宿主配置):
|
|
366
|
-
# DSH_GUI_EXCLUDE_PLUGINS=<unrelated-plugin-id> pnpm run verify:gui
|
|
367
|
-
|
|
368
|
-
# 5. (可选)本地原页验证,无上传;第二条用空PATH验证PDF.js自动回退
|
|
369
|
-
pnpm run smoke:reader-local -- /path/to/sample.pdf 1 --backend=auto
|
|
370
|
-
pnpm run smoke:reader-local -- /path/to/sample.pdf 1 .vitest-cache/pdfjs --backend=pdfjs
|
|
371
|
-
|
|
372
|
-
# 6. (显式选择)使用真实 Token 运行在线解析,会上传文档
|
|
373
|
-
MINERU_API_KEY=<token> pnpm run smoke:official-v4 -- /path/to/sample.pdf
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
GUI 验证在现有 Web 地址中注入当前构建,使用浏览器内的配置/凭据/插件清单 fixture,并隔离该测试浏览器的 HMR graph;不修改真实配置、凭据或缓存,也不代表已更新宿主安装的插件。
|
|
159
|
+
<details>
|
|
160
|
+
<summary><strong>通过局域网地址打开 Web 时,设置页读不到配置?</strong></summary>
|
|
377
161
|
|
|
378
|
-
|
|
162
|
+
设置与维护接口只接受回环地址访问(`localhost`、`127.x.x.x`、`[::1]`)。请在运行 DSH 的机器上通过回环地址打开 Web。模型工具不受此限制。
|
|
163
|
+
</details>
|
|
379
164
|
|
|
380
|
-
|
|
165
|
+
## 文档
|
|
381
166
|
|
|
382
|
-
|
|
167
|
+
- [配置与运维指南](docs/configuration.md):设置页、Provider 参考、凭据、迁移、缓存维护、多进程共享。
|
|
168
|
+
- [PDF 阅读契约](docs/model-reading.md):两个工具的参数、响应字段、预算和错误恢复。
|
|
169
|
+
- [ARCHITECTURE.md](ARCHITECTURE.md):模块边界与实现约束(面向贡献者)。
|
|
170
|
+
- [CONTRIBUTING.md](CONTRIBUTING.md):开发、测试与发布流程。
|
|
171
|
+
- [CHANGELOG.md](CHANGELOG.md):版本变更。
|
|
383
172
|
|
|
384
|
-
##
|
|
173
|
+
## 许可证与致谢
|
|
385
174
|
|
|
386
175
|
- 本项目基于 [MIT License](./LICENSE) 开源。
|
|
387
|
-
- 感谢 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
176
|
+
- 感谢 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 提供的插件体系。
|
|
388
177
|
- 感谢 [OpenDataLab MinerU](https://github.com/opendatalab/MinerU) 提供的文档解析能力。
|
|
389
178
|
- 感谢 [Huanlin/dsh-plugin-mineru](https://github.com/HuanLinOTO/dsh-plugin-mineru) 带来的早期设计灵感。
|
|
390
179
|
- 本插件已被 [Awesome DeepSeek Harness Plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) 社区精选列表收录([收录详情页](https://awesome-dsh-plugin.com/p/Yurzi/dsh-pdf-mineru))。
|
package/assets/icon.svg
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M11 5.5H21.4L27.5 11.6V27.5C27.5 28.6 26.6 29.5 25.5 29.5H11C9.9 29.5 9 28.6 9 27.5V7.5C9 6.4 9.9 5.5 11 5.5Z" fill="url(#page)" />
|
|
3
|
+
<path d="M21.4 5.5V10.1C21.4 10.9 22.1 11.6 22.9 11.6H27.5L21.4 5.5Z" fill="#BFDBFF" />
|
|
4
|
+
<rect x="12.2" y="14.2" width="9.6" height="1.9" rx="0.95" fill="#FFFFFF" />
|
|
5
|
+
<rect x="12.2" y="18.4" width="6.8" height="1.9" rx="0.95" fill="#FFFFFF" fill-opacity="0.85" />
|
|
6
|
+
<rect x="12.2" y="22.6" width="4.6" height="1.9" rx="0.95" fill="#FFFFFF" fill-opacity="0.7" />
|
|
7
|
+
<circle cx="23.6" cy="23.4" r="4.1" fill="#FFFFFF" stroke="#F2AF63" stroke-width="2.2" />
|
|
8
|
+
<path d="M26.6 26.4L29.6 29.4" stroke="#F2AF63" stroke-width="2.4" stroke-linecap="round" />
|
|
9
|
+
<defs>
|
|
10
|
+
<linearGradient id="page" x1="25" y1="5.5" x2="10" y2="29.5" gradientUnits="userSpaceOnUse">
|
|
11
|
+
<stop stop-color="#7CB7FF" />
|
|
12
|
+
<stop offset="1" stop-color="#145AF3" />
|
|
13
|
+
</linearGradient>
|
|
14
|
+
</defs>
|
|
15
|
+
</svg>
|