dsh-pdf-mineru 0.2.2 → 0.2.3

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 CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
4
4
 
5
+ ## 0.2.3
6
+
7
+ ### Changed
8
+
9
+ - Require DSH `>=0.2.2-rc.1 <0.3.0-0` and Node.js `>=24.9.0`; align DSH peers, exact development SDK pins, Cordis vendor packages and CI runtimes with the new baseline.
10
+ - Migrate native/PTC composition and installed-host tests to explicit host executors and the batch tool-execution contract; the plugin still only registers its tools and does not choose the host executor.
11
+ - Clarify that a background parse summary is delivered first either in a completion notification or through `job_output`; an already delivered inline summary need not be returned again. Parsed evidence remains available through `read_pdf`.
12
+
13
+ ### Fixed
14
+
15
+ - Read the host’s effective configuration rather than raw expression input, preserving host evaluation and rejected-candidate isolation. Explicit saves no longer re-validate raw expressions as runtime values, while preserving the existing historical migration path.
16
+
5
17
  ## 0.2.2
6
18
 
7
19
  ### Fixed
package/README.md CHANGED
@@ -11,8 +11,8 @@
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&amp;label=npm&amp;color=CB3837" alt="npm version"></a>
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&amp;logo=nodedotjs&amp;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>
14
+ <a href="./package.json"><img src="https://img.shields.io/badge/Node.js-%3E%3D24.9.0-339933?style=flat-square&amp;logo=nodedotjs&amp;logoColor=white" alt="Node.js >=24.9.0"></a>
15
+ <a href="./package.json"><img src="https://img.shields.io/badge/DSH-%3E%3D0.2.2--rc.1%20%3C0.3.0--0-111827?style=flat-square" alt="DSH >=0.2.2-rc.1 <0.3.0-0"></a>
16
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>
@@ -33,8 +33,8 @@
33
33
 
34
34
  ### 环境要求
35
35
 
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`。
36
+ - DeepSeek Harness:版本范围以 [package.json](./package.json) 的 `engines.dsh` 为准(当前为 `>=0.2.2-rc.1 <0.3.0-0`)。
37
+ - Node.js `>=24.9.0`。
38
38
  - 设置页需要 DSH Web;没有 Web 服务的宿主仍可使用两个模型工具,配置直接写在 profile 中。
39
39
 
40
40
  ### 安装
package/lib/index.js CHANGED
@@ -10418,7 +10418,7 @@ function parseAsyncArguments(args) {
10418
10418
  function asyncParsePdfTool(ctx, deps, invocations) {
10419
10419
  return defineTool({
10420
10420
  name: "async_parse_pdf",
10421
- description: "Submit PDF document parsing as a native background job. Fully parses the PDF to local cache and returns a structured summary (pages, outline, tables, images) upon completion. Use read_pdf to read specific content or pages on demand.",
10421
+ description: "Submit PDF document parsing as a native background job and immediately return job_id. Fully parses the PDF to local cache; a structured summary (pages, outline, tables, images) is first delivered in a completion notice or by job_output. Collect with job_output only if the notice omits the result or asks you to collect it; a fully inlined summary may not be returned again. Use read_pdf for content and page evidence. A job_output wait released by user next-step input may return running without cancelling the parse.",
10422
10422
  parameters: asyncParseParameters,
10423
10423
  output: {
10424
10424
  schema: asyncParseOutputSchema,
@@ -10718,12 +10718,18 @@ function configSnapshot(value) {
10718
10718
  if (typeof value === "object" && value !== null) return Object.fromEntries(Object.entries(value).map(([key, child]) => [key, configSnapshot(child)]));
10719
10719
  return value;
10720
10720
  }
10721
- /**
10722
- * Read the fiber's current Config as well as its volatile values: hosts without
10723
- * HMR may reload the fiber while a settings write is in flight. Migration is in memory only.
10724
- */
10725
- function readRuntimeConfig(ctx, entryConfig) {
10726
- return parseConfigWithMigration(configSnapshot(ctx.fiber?.config ?? entryConfig)).config;
10721
+ /** Read only the host-published config, unwrapping its current volatile values. Migration is in memory only. */
10722
+ function readRuntimeConfig(ctx) {
10723
+ return parseConfigWithMigration(configSnapshot(ctx.fiber.effectiveConfig)).config;
10724
+ }
10725
+ /** Inspect historical document markers only: raw values may contain expressions or a rejected candidate. */
10726
+ function isHistoricalConfig(value) {
10727
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
10728
+ const input = value;
10729
+ if (input.schemaVersion === void 0 || input.schemaVersion === 1 || input.schemaVersion === 2) return true;
10730
+ if (input.schemaVersion !== 3) return false;
10731
+ const has = (section, key) => typeof section === "object" && section !== null && Object.hasOwn(section, key);
10732
+ return has(input.defaults, "artifacts") || has(input.limits, "maxFilesPerRequest");
10727
10733
  }
10728
10734
  function liveConfig(config) {
10729
10735
  const { storage, limits: _limits, ...live } = config;
@@ -10762,12 +10768,12 @@ function createSettingsPersistence(ctx, settings, read, fixed) {
10762
10768
  const namespace = entry.options.id;
10763
10769
  const original = entry.options.config;
10764
10770
  try {
10765
- if (original !== void 0 && parseConfigWithMigration(original).migrated) {
10771
+ if (isHistoricalConfig(original)) {
10766
10772
  const editor = ctx.get("configEditor");
10767
10773
  if (editor === void 0) throw new Error("Saving a migrated configuration requires the host ConfigEditor");
10768
- await editor.edit(entry, (current) => {
10774
+ await editor.edit(entry, () => {
10769
10775
  if (expectedRevision !== void 0 && revision(namespace) !== expectedRevision) throw settingsConflict();
10770
- validate(parseConfigWithMigration(current).config);
10776
+ validate(read());
10771
10777
  return { ...next };
10772
10778
  });
10773
10779
  } else await settings.replace(namespace, liveConfig(next), expectedRevision);
@@ -10788,8 +10794,8 @@ function isInactiveContextError(error) {
10788
10794
  return error.code === "INACTIVE_EFFECT" || error.message === "cannot create effect on inactive context";
10789
10795
  }
10790
10796
  /** Build the plugin graph; disposal stops tools first, then shared producers. */
10791
- async function apply(ctx, entryConfig = {}) {
10792
- const runtimeConfig = () => readRuntimeConfig(ctx, entryConfig);
10797
+ async function apply(ctx, _entryConfig = {}) {
10798
+ const runtimeConfig = () => readRuntimeConfig(ctx);
10793
10799
  const initialConfig = runtimeConfig();
10794
10800
  let toolDisposer;
10795
10801
  let operations;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-pdf-mineru",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Read PDFs in DeepSeek Harness with MinerU (official cloud or self-hosted): bounded evidence reading, background parsing jobs, and local page verification.",
5
5
  "keywords": [
6
6
  "dsh-plugin",
@@ -17,8 +17,8 @@
17
17
  "icon": "assets/icon.svg",
18
18
  "type": "module",
19
19
  "engines": {
20
- "node": "^22.19.0 || >=24.0.0",
21
- "dsh": ">=0.2.1-rc.2 <0.3.0-0"
20
+ "node": ">=24.9.0",
21
+ "dsh": ">=0.2.2-rc.1 <0.3.0-0"
22
22
  },
23
23
  "publishConfig": {
24
24
  "access": "public"
@@ -70,19 +70,19 @@
70
70
  "yauzl": "^3.4.0"
71
71
  },
72
72
  "peerDependencies": {
73
- "@deepseek-ai/cordis": "~4.0.5",
74
- "@deepseek-ai/cosmokit": "~1.8.6",
75
- "@deepseek-ai/dsh-api-remotes": ">=0.2.1-rc.2 <0.3.0-0",
76
- "@deepseek-ai/dsh-client-connection": ">=0.2.1-rc.2 <0.3.0-0",
77
- "@deepseek-ai/dsh-client-locale": ">=0.2.1-rc.2 <0.3.0-0",
78
- "@deepseek-ai/dsh-client-ui-plugin-manager": ">=0.2.1-rc.2 <0.3.0-0",
79
- "@deepseek-ai/dsh-client-ui-primitives": ">=0.2.1-rc.2 <0.3.0-0",
80
- "@deepseek-ai/dsh-config-editor": ">=0.2.1-rc.2 <0.3.0-0",
81
- "@deepseek-ai/dsh-jobs": ">=0.2.1-rc.2 <0.3.0-0",
82
- "@deepseek-ai/dsh-settings": ">=0.2.1-rc.2 <0.3.0-0",
83
- "@deepseek-ai/dsh-tools": ">=0.2.1-rc.2 <0.3.0-0",
84
- "@deepseek-ai/dsh-working-directory": ">=0.2.1-rc.2 <0.3.0-0",
85
- "@deepseek-ai/schemastery": "~3.18.5"
73
+ "@deepseek-ai/cordis": "~4.1.0",
74
+ "@deepseek-ai/cosmokit": "~1.9.0",
75
+ "@deepseek-ai/dsh-api-remotes": ">=0.2.2-rc.1 <0.3.0-0",
76
+ "@deepseek-ai/dsh-client-connection": ">=0.2.2-rc.1 <0.3.0-0",
77
+ "@deepseek-ai/dsh-client-locale": ">=0.2.2-rc.1 <0.3.0-0",
78
+ "@deepseek-ai/dsh-client-ui-plugin-manager": ">=0.2.2-rc.1 <0.3.0-0",
79
+ "@deepseek-ai/dsh-client-ui-primitives": ">=0.2.2-rc.1 <0.3.0-0",
80
+ "@deepseek-ai/dsh-config-editor": ">=0.2.2-rc.1 <0.3.0-0",
81
+ "@deepseek-ai/dsh-jobs": ">=0.2.2-rc.1 <0.3.0-0",
82
+ "@deepseek-ai/dsh-settings": ">=0.2.2-rc.1 <0.3.0-0",
83
+ "@deepseek-ai/dsh-tools": ">=0.2.2-rc.1 <0.3.0-0",
84
+ "@deepseek-ai/dsh-working-directory": ">=0.2.2-rc.1 <0.3.0-0",
85
+ "@deepseek-ai/schemastery": "~3.19.0"
86
86
  },
87
87
  "peerDependenciesMeta": {
88
88
  "@deepseek-ai/cordis": {
@@ -105,56 +105,61 @@
105
105
  }
106
106
  },
107
107
  "devDependencies": {
108
- "@deepseek-ai/cordis": "~4.0.5",
109
- "@deepseek-ai/cordis-plugin-group": "~1.0.5",
110
- "@deepseek-ai/cordis-plugin-include": "~1.0.10",
111
- "@deepseek-ai/cordis-plugin-loader": "~1.0.6",
112
- "@deepseek-ai/cordis-plugin-timer": "~1.1.7",
113
- "@deepseek-ai/cosmokit": "~1.8.6",
114
- "@deepseek-ai/dsh-agent": "0.2.1-rc.2",
115
- "@deepseek-ai/dsh-api-remotes": "0.2.1-rc.2",
116
- "@deepseek-ai/dsh-app-boot": "0.2.1-rc.2",
117
- "@deepseek-ai/dsh-attachment": "0.2.1-rc.2",
118
- "@deepseek-ai/dsh-brand": "0.2.1-rc.2",
119
- "@deepseek-ai/dsh-client-connection": "0.2.1-rc.2",
120
- "@deepseek-ai/dsh-client-locale": "0.2.1-rc.2",
121
- "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.1-rc.2",
122
- "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.2",
123
- "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.2",
124
- "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.2",
125
- "@deepseek-ai/dsh-cmdline": "0.2.1-rc.2",
126
- "@deepseek-ai/dsh-config-editor": "0.2.1-rc.2",
127
- "@deepseek-ai/dsh-credentials": "0.2.1-rc.2",
128
- "@deepseek-ai/dsh-fs": "0.2.1-rc.2",
129
- "@deepseek-ai/dsh-hmr": "0.2.1-rc.2",
130
- "@deepseek-ai/dsh-home-paths": "0.2.1-rc.2",
131
- "@deepseek-ai/dsh-host-webserver": "0.2.1-rc.2",
132
- "@deepseek-ai/dsh-jobs": "0.2.1-rc.2",
133
- "@deepseek-ai/dsh-jobs-local": "0.2.1-rc.2",
134
- "@deepseek-ai/dsh-launch-environment": "0.2.1-rc.2",
135
- "@deepseek-ai/dsh-llm": "0.2.1-rc.2",
136
- "@deepseek-ai/dsh-ptc-runtime": "0.2.1-rc.2",
137
- "@deepseek-ai/dsh-sandbox": "0.2.1-rc.2",
138
- "@deepseek-ai/dsh-sandbox-policy": "0.2.1-rc.2",
139
- "@deepseek-ai/dsh-scope": "0.2.1-rc.2",
140
- "@deepseek-ai/dsh-session": "0.2.1-rc.2",
141
- "@deepseek-ai/dsh-session-persistence": "0.2.1-rc.2",
142
- "@deepseek-ai/dsh-session-projection": "0.2.1-rc.2",
143
- "@deepseek-ai/dsh-settings": "0.2.1-rc.2",
144
- "@deepseek-ai/dsh-storage": "0.2.1-rc.2",
145
- "@deepseek-ai/dsh-storage-domain": "0.2.1-rc.2",
146
- "@deepseek-ai/dsh-system-prompt": "0.2.1-rc.2",
147
- "@deepseek-ai/dsh-timeout": "0.2.1-rc.2",
148
- "@deepseek-ai/dsh-tools": "0.2.1-rc.2",
149
- "@deepseek-ai/dsh-typert-protocol": "0.2.1-rc.2",
150
- "@deepseek-ai/dsh-user-approval": "0.2.1-rc.2",
151
- "@deepseek-ai/dsh-util-values": "0.2.1-rc.2",
152
- "@deepseek-ai/dsh-working-directory": "0.2.1-rc.2",
153
- "@deepseek-ai/dsh-workspace": "0.2.1-rc.2",
154
- "@deepseek-ai/schemastery": "~3.18.5",
108
+ "@deepseek-ai/cordis": "4.1.0",
109
+ "@deepseek-ai/cordis-plugin-group": "1.1.0",
110
+ "@deepseek-ai/cordis-plugin-include": "1.1.0",
111
+ "@deepseek-ai/cordis-plugin-loader": "1.1.0",
112
+ "@deepseek-ai/cordis-plugin-timer": "1.2.0",
113
+ "@deepseek-ai/cosmokit": "1.9.0",
114
+ "@deepseek-ai/dsh-agent": "0.2.2-rc.1",
115
+ "@deepseek-ai/dsh-api-remotes": "0.2.2-rc.1",
116
+ "@deepseek-ai/dsh-app-boot": "0.2.2-rc.1",
117
+ "@deepseek-ai/dsh-attachment": "0.2.2-rc.1",
118
+ "@deepseek-ai/dsh-brand": "0.2.2-rc.1",
119
+ "@deepseek-ai/dsh-client-connection": "0.2.2-rc.1",
120
+ "@deepseek-ai/dsh-client-locale": "0.2.2-rc.1",
121
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-rc.1",
122
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.1",
123
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.1",
124
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.1",
125
+ "@deepseek-ai/dsh-cmdline": "0.2.2-rc.1",
126
+ "@deepseek-ai/dsh-config-editor": "0.2.2-rc.1",
127
+ "@deepseek-ai/dsh-credentials": "0.2.2-rc.1",
128
+ "@deepseek-ai/dsh-fs": "0.2.2-rc.1",
129
+ "@deepseek-ai/dsh-hmr": "0.2.2-rc.1",
130
+ "@deepseek-ai/dsh-home-paths": "0.2.2-rc.1",
131
+ "@deepseek-ai/dsh-host-webserver": "0.2.2-rc.1",
132
+ "@deepseek-ai/dsh-jobs": "0.2.2-rc.1",
133
+ "@deepseek-ai/dsh-jobs-local": "0.2.2-rc.1",
134
+ "@deepseek-ai/dsh-launch-environment": "0.2.2-rc.1",
135
+ "@deepseek-ai/dsh-llm": "0.2.2-rc.1",
136
+ "@deepseek-ai/dsh-output-retention": "0.2.2-rc.1",
137
+ "@deepseek-ai/dsh-ptc-runtime": "0.2.2-rc.1",
138
+ "@deepseek-ai/dsh-sandbox": "0.2.2-rc.1",
139
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.2-rc.1",
140
+ "@deepseek-ai/dsh-scope": "0.2.2-rc.1",
141
+ "@deepseek-ai/dsh-session": "0.2.2-rc.1",
142
+ "@deepseek-ai/dsh-session-persistence": "0.2.2-rc.1",
143
+ "@deepseek-ai/dsh-session-projection": "0.2.2-rc.1",
144
+ "@deepseek-ai/dsh-settings": "0.2.2-rc.1",
145
+ "@deepseek-ai/dsh-storage": "0.2.2-rc.1",
146
+ "@deepseek-ai/dsh-storage-domain": "0.2.2-rc.1",
147
+ "@deepseek-ai/dsh-system-prompt": "0.2.2-rc.1",
148
+ "@deepseek-ai/dsh-timeout": "0.2.2-rc.1",
149
+ "@deepseek-ai/dsh-tool-executor-native": "0.2.2-rc.1",
150
+ "@deepseek-ai/dsh-tool-executor-ptc": "0.2.2-rc.1",
151
+ "@deepseek-ai/dsh-tool-jobs": "0.2.2-rc.1",
152
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.1",
153
+ "@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.1",
154
+ "@deepseek-ai/dsh-user-approval": "0.2.2-rc.1",
155
+ "@deepseek-ai/dsh-util-values": "0.2.2-rc.1",
156
+ "@deepseek-ai/dsh-working-directory": "0.2.2-rc.1",
157
+ "@deepseek-ai/dsh-workspace": "0.2.2-rc.1",
158
+ "@deepseek-ai/schemastery": "3.19.0",
155
159
  "@types/js-yaml": "^4.0.9",
156
- "@types/node": "^22.0.0",
160
+ "@types/node": "^24.9.0",
157
161
  "@types/react": "~18.3.1",
162
+ "@types/semver": "^7.7.0",
158
163
  "@types/yauzl": "^3.4.0",
159
164
  "@types/yazl": "^3.3.1",
160
165
  "js-yaml": "^4.3.2",
@@ -162,6 +167,7 @@
162
167
  "oxlint": "^1.88.0",
163
168
  "playwright-core": "^1.62.1",
164
169
  "react": "^18.2.0",
170
+ "semver": "^7.7.3",
165
171
  "tsdown": "^0.22.2",
166
172
  "typescript": "^5.9.0",
167
173
  "vitest": "^3.2.0",