@noedgeai-org/doc2x-mcp 0.1.3-dev.4.1 → 0.1.3-dev.6.1

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.
@@ -3,7 +3,6 @@ function parseDoc2xApiKey(raw) {
3
3
  const v = String(raw).trim();
4
4
  if (!v)
5
5
  return '';
6
- // Common misconfig: Alma/Codex passes literal "${DOC2X_API_KEY}" without expansion.
7
6
  if (v.includes('${') && v.includes('}'))
8
7
  return '';
9
8
  const bearerPrefix = /^bearer\s+/i;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noedgeai-org/doc2x-mcp",
3
- "version": "0.1.3-dev.4.1",
3
+ "version": "0.1.3-dev.6.1",
4
4
  "description": "Doc2x MCP server (stdio, MCP SDK).",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -21,7 +21,8 @@ description: 使用 Doc2x MCP 工具完成文档解析与转换:对 PDF/扫描
21
21
  `doc2x_parse_pdf_submit.pdf_path` 必须以 `.pdf` 结尾;图片解析使用 `png/jpg`。
22
22
 
23
23
  3. 不要并发重复提交导出
24
- 同一个 `uid` 对同一种导出配置(`to + formula_mode + formula_level (+ filename + filename_mode + merge_cross_page_forms...)`)不要并行重复 submit。
24
+ 同一个 `uid` 对同一种导出配置(`to + formula_mode + formula_level (+ filename + filename_mode + merge_cross_page_forms...)`)不要并行重复 submit。
25
+ 补充:同一 `uid + to` 的导出结果可能会被后一次覆盖;做“多档对比”(如 `formula_level=0/1/2`)时,必须按 **导出成功 → 立即下载落盘 → 再导出下一档** 的顺序执行。
25
26
 
26
27
  4. 不要泄露密钥
27
28
  永远不要回显/记录 `DOC2X_API_KEY`。排错只用 `doc2x_debug_config` 的 `apiKeyLen/apiKeyPrefix/apiKeySource`。
@@ -38,7 +39,7 @@ description: 使用 Doc2x MCP 工具完成文档解析与转换:对 PDF/扫描
38
39
  - 可选 `model: "v3-2026"`;不传则默认 `v2`。
39
40
  - `doc2x_convert_export_submit` / `doc2x_convert_export_wait`
40
41
  - `formula_mode`:`"normal"` 或 `"dollar"`(关键参数,建议总是显式传入)。
41
- - `formula_level`:`0 | 1 | 2`(可选)
42
+ - `formula_level`:`0 | 1 | 2`(可选,**数字类型**,不要传字符串 `"0"|"1"|"2"`)
42
43
  - `0`:不退化公式(保留原始 Markdown)
43
44
  - `1`:行内公式退化为普通文本(`\(...\)`、`$...$`)
44
45
  - `2`:行内 + 块级公式全部退化为普通文本(`\(...\)`、`$...$`、`\[...\]`、`$$...$$`)
@@ -91,6 +92,7 @@ description: 使用 Doc2x MCP 工具完成文档解析与转换:对 PDF/扫描
91
92
  - 需要做公式退化时显式传 `formula_level`(`0/1/2`);若不需要退化,建议显式传 `0`,避免调用端默认值歧义
92
93
  - `filename`/`filename_mode` 主要用于 `md/tex`:传不带扩展名的 basename,并配合 `filename_mode: "auto"`(避免 `name.md.md` / `name.tex.tex`)
93
94
  - 对同一个 `uid` 做多格式导出时,先确定顺序(例如先 md 再 docx),逐个完成再进行下一个格式
95
+ - 对同一个 `uid` 的同一格式做“多档参数对比”(如 `formula_level`),每一档都要先下载再进行下一档,避免覆盖导致误判
94
96
 
95
97
  **批量下载(并行)**
96
98
 
@@ -138,12 +140,14 @@ description: 使用 Doc2x MCP 工具完成文档解析与转换:对 PDF/扫描
138
140
 
139
141
  如果返回包含截断提示(`[doc2x-mcp] Output truncated ...`),应切换到“工作流 B”导出 md 获取完整内容。
140
142
 
141
- ### 工作流 D:PDF LaTeX / DOCX
143
+ ### 工作流 D:PDF 导出格式(MD / TEX / DOCX
142
144
 
143
- - LaTeX:把 `to` 设为 `"tex"`
144
- - Word:把 `to` 设为 `"docx"`
145
- - 调用链同“工作流 A / B”(先解析 → 再导出 → 再下载),仅替换 `to`(以及必要时调整 `formula_mode/formula_level/filename`)
145
+ - Markdown:`to="md"`(完整 Markdown 导出优先参考“工作流 B”)
146
+ - LaTeX:`to="tex"`
147
+ - Word:`to="docx"`
148
+ - 调用链同“工作流 A / B”(先解析 → 再导出 → 再下载),按目标格式调整 `to`(并按需设置 `formula_mode/formula_level/filename`)
146
149
  - 注意:`doc2x_convert_export_submit.formula_mode` 必填(`"normal"` 或 `"dollar"`);`formula_level` 可选(`0/1/2`)
150
+ - 若需要对比不同 `formula_level`,请按顺序执行并在每次导出成功后立即下载,再进行下一档,避免后一次结果覆盖前一次。
147
151
 
148
152
  ### 工作流 E:图片 → Markdown(版面解析)
149
153