taxueseek/dsh-files 预览 preview

taxueseek/dsh-files

DeepSeek 双面插件:会话隔离的文件上传,彩色编辑器卡片 + read_document 工具(文本/PDF/DOCX/XLSX),支持内容嗅探和 LRU 缓存

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH) that adds a read_document tool to the DSH toolset. DSH’s native built-in file reading tool rejects binary document formats like PDF, DOCX, and XLSX, so this plugin was created to fill that gap by extracting structured text from these unsupported file types. It integrates seamlessly with DSH’s native file system, session sandbox, and output card system, so it works just like any other built-in DSH tool after installation. It also includes extra features like encoding fallback, paged reading, and sheet-level access for XLSX workbooks that are not available in the base DSH toolset.

The plugin detects file formats directly from file bytes, rather than relying only on file extensions, which means it can catch misnamed or disguised files and reject malicious archives that are pretending to be common documents. It supports auto-detection for multiple common text encodings, including GB18030/GBK, UTF-16 with and without BOM, so it can read most text-based documents correctly even if they use non-standard encoding. If a PDF is a scanned document with no embedded text layer, it returns an explicit error message instead of returning an empty string that confuses the model. It also automatically rejects any file that does not match the expected binary header for the claimed format, adding an extra layer of safety for the DSH environment.

To install the plugin, you need to run a simple curl command piped to shell, or use the native DSH plugin add command with the repository URL, then restart your DSH web server to activate it. The plugin requires DSH version 0.1.3-alpha.1 or newer, and users can customize multiple configuration options including maximum file size, read line limit, output character cap, and per-call timeout. It uses three popular open source parsing dependencies: pdfjs-dist, mammoth, and read-excel-file, and is released under the permissive MIT open source license. It is important to note that the npm package named dsh-files is unrelated, so you must only install it via the official DSH plugin method from this GitHub repository.

这是专为 DeepSeek Harness (DSH) 开发的原生插件,提供 read_document 工具,填补了 DSH 原生读取工具无法处理 PDF、DOCX、XLSX 等二进制文档的空白。它可以从这类二进制文件中提取结构化文本,同时还增加了编码回退、分页读取、XLSX 工作表级访问等增强功能,能够完美适配 DSH 原生文件系统和沙箱权限机制,输出结果也遵循 DSH 原生卡片规范。

插件会自动检测文件真实格式,仅在无法从字节判断格式时才依赖文件扩展名,能直接识别多种常见文本编码,包括GB18030/GBK、带BOM和不带BOM的UTF-16等,对伪装成文档的恶意压缩文件会直接拒绝处理,不含文本层的扫描版PDF也会返回明确提示而非空结果。

插件要求 DSH 版本不低于 0.1.3-alpha.1,支持通过官方脚本或DSH原生命令行一键安装,安装完成后重启DSH Web服务即可使用,所有解析依赖都是开源可靠的,代码遵循MIT许可证,用户还可以自定义单文件大小上限、单次读取行数、输出字符限额等多项配置。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 40 stars - an early-stage project星标 40,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add git+https://github.com/taxueseek/dsh-files.git

把 taxueseek/dsh-files 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

English | 简体中文

dsh-files: let the AI read your documents, and make the attachment store browsable both ways.

dsh-files

In one line

Let the AI actually read the documents you upload — and let your files come back out.

The two annoyances it removes

You have probably hit both:

  • You hand the AI a contract PDF or a spreadsheet, and it says "I can't read this file." The file is fine — the built-in read tool only accepts plain text and refuses binary content outright.
  • You want the AI to look at that attachment you uploaded days ago, but the attachment store is write-only: you cannot browse it, and you cannot pull the file back onto your machine.

dsh-files fills exactly those two holes. Read: the AI gets the text out of PDF / Word / Excel. Fetch back: you and the AI both see what is in the store, and you can pull a file back out.

What changed in this release

  • SDK aligned with the host at 0.2.0-rc.2: fixes "the plugin button is missing and native upload is dead in the desktop App" — the plugin used to be built against the old SDK, colliding with the host's newer bundled components in the client module graph
  • Errors now speak plainly: a failure used to hand you a cold error code; now it tells you what to change next. Reach the server over your LAN and the attachment routes answer 403 — the response prints the exact trustedHosts line to add, ready to copy
  • LAN / domain deployments are documented now: that section used to be blank, leaving you to guess
  • The division of work with the host is written down: what the host already does (upload, images, document preview) versus what remains unique to this plugin — so the wheel is not reinvented

Here is a file's four-stage session lifecycle, one official gap filled per stage:

  • Ingest: the folder button next to the native paperclip (plus a same-named entry in the official "+" command menu) — the browser flattens the directory (Office lock files, .DS_Store, .env and other system/hidden files are filtered), and every file enters the official native attachment pipeline
  • Read: the read_document tool — structured text extraction for binary documents (PDF / DOC / DOCX / XLSX) plus enhanced text reading (encoding fallback, paging, sheet-level access)
  • Manage: the attachment_list / export_attachment tools — make the attachment store visible to the model (name/size/sha) and copy a file into the workspace for read/edit/bash to work on
  • Fetch back: the attachment dock (one official pill below the composer card) plus download/export routes and an @ attachment source — the store becomes visible to users and files can be pulled into the browser (the right path for remote/LAN deployments); the @ menu inserts the official handle line, identical to what the model saw at upload

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-knit 下一个 Next dsh-IDE →