Skip to content

Releases

dsh-md-convert v0.5.6

Choose a tag to compare

@yakoylp yakoylp released this 30 Aug 08:10

v0.5.6 fixes a cleanup safety issue found during the real install/call test.

  • Fix: sweepStale() no longer deletes every tmpdir entry sharing the
    "dsh-md-convert-" prefix — only plugin-owned leftovers (old mkdtemp
    format dsh-md-convert-<6 alnum>, or - dirs with a dead pid) are
    swept; user-created dirs with the same prefix are preserved
  • New cleanup regression test; suite now 10/10 passing

Install: dsh plugin add github:yakoylp/dsh-md-convert

dsh-md-convert v0.5.5

Choose a tag to compare

@yakoylp yakoylp released this 30 Aug 08:02

v0.5.5 fixes the tool result being blocked by the DSH runtime value check.

  • Fix: chain in the output schema was declared as an array while
    convert.js returns a string — every successful conversion was rejected
    with "value.chain" must be an array and the result never reached the
    conversation. Schema now declares chain: { type: "string" }, matching
    convert.js / cli.js / README examples
  • Render callback prints the chain string directly (no .length/.join)
  • Regression test validates execute() return values against the declared
    output schema (verified the old schema fails it with the exact runtime
    error)
  • Test suite: 9/9 passing

Install: dsh plugin add github:yakoylp/dsh-md-convert

v0.5.4

Choose a tag to compare

@yakoylp yakoylp released this 30 Aug 07:35

关键修复

  • 路径解析彻底修复:md_convert 相对路径现基于会话工作区(exec.agent.session.header.cwd)而非进程 cwd,Windows 盘符绝对路径原样保留——修复所有调用报 E_FILE_NOT_FOUND、路径被拼到 DSH 依赖目录的问题。
  • OCR 异步化:pip 安装 / 模型下载 / OCR 三处分钟级同步调用改为异步(新增
    unAsync),插件运行于 DSH 宿主时不再冻结整个 web 服务。
  • 缺模型明确报错:扫描件首次转换且模型未缓存时返回 E_OCR_DEPS + 指引执行 dsh-md-convert deps,不再报晦涩的 paddle 错误。
  • 进程信号钩子不再泄漏到宿主、临时目录并发安全(按 pid 清理)、措辞修正(PP-StructureV3 → 路由 OCR)、入参校验、Python 除零保护。

完整清单见 CHANGELOG.md。
pm test 8/8 通过。

dsh-md-convert v0.5.3

Choose a tag to compare

@yakoylp yakoylp released this 29 Aug 13:32

v0.5.3 completes the boot fix: v0.5.2 activated but the tool registration
still threw because it did not match the DSH tools service contract.

  • Fix: register the md_convert tool as a DSH ToolDefinition —
    single definition object with name, compiled JSON Schema parameters
    (required array at object root), mandatory output { schema, render },
    and execute() (the runtime never calls run())
  • Drop exec.cwd (ToolRunContext has no such field; relative paths now
    resolve from process.cwd())
  • Regression test now enforces the same checks as the real runtime:
    definition shape, supported JSON Schema keyword subset, required-array
    placement — so a malformed registration fails tests, not the next boot
  • Test suite: 6/6 passing

Install: dsh plugin add github:yakoylp/dsh-md-convert

dsh-md-convert v0.5.2

Choose a tag to compare

@yakoylp yakoylp released this 29 Aug 13:28

v0.5.2 fixes the remaining plugin boot failure: after v0.5.1, dsh web still
aborted with cannot get property "config" without inject.

  • Fix: plugin config is read from the apply(ctx, config) second argument
    (with {} fallback) instead of ctx.config, matching the official DSH
    plugin pattern
  • Add cordis activation regression test (test/cordis-entry.test.mjs) that
    boots the entry through real cordis and asserts the md_convert tool
    registers; verified it reproduces the loader error against the old code
  • Test suite: 6/6 passing (4 original + 2 new cordis-entry tests)

Install: dsh plugin add github:yakoylp/dsh-md-convert

dsh-md-convert v0.5.1

Choose a tag to compare

@yakoylp yakoylp released this 29 Aug 13:09

v0.5.1 fixes a plugin boot failure when installed into DSH.

  • Fix: the plugin no longer injects the non-existent workspace service.
    Previously the entry stayed pending (waiting for service: workspace) forever
    and dsh web aborted with 1 entry did not activate
  • inject now declares tools, which ctx.tools.register() actually requires;
    the workspace lookup is read via ctx.get with process.cwd() fallback
  • Test suite: 4/4 passing (incl. real conversion smoke of 7 sample files)

Install: dsh plugin add github:yakoylp/dsh-md-convert

dsh-md-convert v0.5.0

Choose a tag to compare

@yakoylp yakoylp released this 29 Aug 07:54

OCR pipeline replaced with a modular routing engine — CPU-first, lightweight models, cost/performance oriented.

  • New routing pipeline: PP-DocLayout-L layout analysis (threshold 0.3) routes each region:
    • text -> RapidOCR (PP-OCRv6 ONNX, fastest)
    • tables -> SLANet structure + RT-DETR cell localization + OCR fill
    • single-column boxes (text frames) -> recursive inner layout analysis
    • formulas -> FormulaNet-Plus-S (on by default)
    • stamps -> comments
  • Heading levels come from the layout model (regex heuristics removed)
  • Overlap dedup: containment keeps the larger region, near-overlap keeps higher score
  • Removed old monolithic PP-StructureV3 pipeline and its flags (--ocr-fast / --no-table / --ocr-formula / --ocr-seal / --ocr-chart)
  • New deps: rapidocr + onnxruntime; new model set (PP-DocLayout-L, SLANeXt_wired/SLANet_plus, RT-DETR-L x2, PP-FormulaNet_plus-S)
  • Measured: single-page scanned letter ~24s; 23-page scanned application ~3.3 min
  • Offline after one dsh-md-convert deps run; auto-install of pip deps on first use
  • Install: dsh plugin add github:yakoylp/dsh-md-convert

dsh-md-convert v0.4.0

Choose a tag to compare

@yakoylp yakoylp released this 28 Aug 06:00

Add --ocr-fast mode (PP-OCRv5 mobile models).

  • --ocr-fast / ocr.fast config: uses PP-OCRv5_mobile_det/rec instead of server models
  • Measured on a single A4 scanned page: 61.7s (server) -> 35.0s (mobile), ~40% faster
  • Accuracy comparable on typical scans (per-character differences possible)
  • Pre-download models: dsh-md-convert deps --ocr-fast (offline afterwards)
  • Install: dsh plugin add github:yakoylp/dsh-md-convert

dsh-md-convert v0.3.0

Choose a tag to compare

@yakoylp yakoylp released this 28 Aug 05:22

Configurable OCR pipeline.

  • Document orientation classification / unwarping / textline orientation now ON by default (auto-corrects tilted/rotated scans; lightweight models)
  • Formula / seal / chart recognition OFF by default; enable per run with --ocr-formula / --ocr-seal / --ocr-chart, or via plugin config ocr.formula/seal/chart
  • dsh-md-convert deps --ocr-formula|--ocr-seal|--ocr-chart pre-downloads the feature models (offline afterwards, as before)
  • Verified offline: default scan conversion ~51 s; seal recognition works offline once its model is cached
  • Install: dsh plugin add github:yakoylp/dsh-md-convert

dsh-md-convert v0.2.1

Choose a tag to compare

@yakoylp yakoylp released this 28 Aug 04:07

OCR fix: fully offline capability + ~20x speedup.

  • PP-StructureV3 runtime now sets PADDLE_PDX_DISABLE_MODEL_SOURCE_CHECK=true: with models cached (pre-downloaded via dsh-md-convert deps), OCR makes zero network calls — works without internet
  • Default-trimmed pipeline (formula/seal/chart recognition off, table kept) + render max-side cap 1600px: scanned A3 page conversion dropped from 20+ min (timeout) to ~53 s
  • dsh-md-convert check/deps now verify and pre-download OCR models to ~/.paddlex/official_models/ (one network run at install time; offline afterwards)
  • Regenerated scanned reference output (clean table + text OCR)
  • Install: dsh plugin add github:yakoylp/dsh-md-convert