文档扩展
上传和 read_document 随完整安装提供。anydoc 的 DOCX/PDF 转换与 office 的 DOCX 导出定义和配置入口也随包交付;启用需安装依赖后重新安装 preset:
powershell
npm install --prefix $ProfileDir --legacy-peer-deps --ignore-scripts --no-audit --no-fund 'https://github.com/a86582751/dsh-plugin-anydoc/releases/download/v0.1.0-nexttavern.1/dsh-plugin-anydoc-0.1.0-nexttavern.1.tgz' '@huiliyi37/dsh-office@0.2.2'
node "$PackageRoot/tools/install.mjs" --home $env:DSH_HOME --harness $HarnessRoot --documents
node "$PackageRoot/tools/install.mjs" --home $env:DSH_HOME --harness $HarnessRoot --documents --apply --stopped --backup "$PWD/nexttavern-documents-backup-1"省略 --documents 再安装可关闭这两个挂载,不删除文档。显式启用但缺依赖会报错。扫描版 PDF 走 OCR,能否读出内容取决于文件本身;能读哪些格式,也取决于系统里可用的组件。office 的 docx_read 有长度上限,完整读卡使用 read_document 分页或 anydoc。长文本转角色卡读的是工作区 TXT,不依赖这一节的扩展。

