
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-workspace-api
Advanced tools
DSH 插件:把 workspace 内容与 DSH agent 任务能力暴露为 HTTP API(/workspace-api/*),其他程序可查询目录、搜索文件、提交自然语言任务给 agent 处理。
Turn your enterprise documents into a conversational chatbot. Put contracts, handbooks, policies and specs into a folder; employees or applications ask questions in plain language, and an AI agent reads your documents and answers with cited sources. 把企业文档变成可以对话的聊天机器人:把合同、手册、制度、规范等文档放进一个文件夹,员工或应用系统就能用自然语言提问,AI 代理会查阅文档、给出带出处的回答。
An out-of-the-box enterprise knowledge Q&A robot. No index building, no vector database, no coding — 一个开箱即用的企业知识问答机器人。不需要建索引、不需要向量库、不需要写代码——
Use cases: internal knowledge base Q&A, contract clause lookup, policy Q&A, system operation guides, onboarding assistance. 适用于:内部知识库问答、合同条款查询、制度答疑、系统操作说明、入职培训辅助等场景。
Just ask in the DSH Web UI, e.g. / 在 DSH Web 界面直接提问即可,例如:
"According to the enterprise documents, what is the annual leave policy?" / 「根据企业文档,员工的年假政策是什么?」
Any enterprise system, office software or web chat box can integrate. To the consumer it is just a "one question, one answer" conversation endpoint: 企业系统、办公软件、网页聊天框都可以接入。对使用方来说,就是一个「问一句、答一句」的对话接口:
# ask a question (wait for the answer) / 问一个问题(等待回答)
curl -X POST -H "Content-Type: application/json" \
-d '{"prompt":"根据企业文档,酒店住宿报销上限是多少?"}' \
"http://127.0.0.1:3080/workspace-api/task?wait=1"
Sample response / 返回示例:
{
"ok": true,
"task": {
"status": "done",
"result": "酒店报销上限:标准间每晚上限 HK$1200(出处:报销政策.md 第 3 行)",
"exitCode": 0
}
}
With 3 sample documents, answers returned within 10 seconds / 放 3 份示例文档,10 秒内返回:
| Question / 提问 | Answer / 回答 |
|---|---|
| 员工的年假政策是什么? | 入职满一年 12 天,之后每年 +1,上限 20 天(出处:员工手册.txt) |
| 酒店住宿报销上限? | 标准间每晚上限 HK$1200(出处:报销政策.md 第 3 行) |
| 密码多久更换一次? | 每 90 天更换,至少 12 位(出处:IT安全规范.txt 第 2 行) |
dsh plugin --profile web add dsh-workspace-api
Restart dsh web to activate / 重启 dsh web 后即生效。
Defaults to the current DSH workspace; a dedicated folder is recommended / 默认使用 DSH 当前工作区;推荐专门指定一个文档目录:
WORKSPACE_API_ROOT=/srv/company-docs dsh web
Put contracts, handbooks etc. into this folder (txt / md / PDF / Word / Excel supported); employees can then ask the bot. 把合同、手册等文档放到这个目录(支持 txt / md / PDF / Word / Excel),员工就能向机器人提问了。 Scanned PDFs must be OCR'd to text first / 扫描版 PDF 需先转成文字(OCR),AI 才能检索。
TOKEN=your-secret-token dsh web
Callers must send the token / 调用方需带令牌:
curl -H "Authorization: Bearer your-secret-token" \
"http://127.0.0.1:3080/workspace-api/task?wait=1" \
-d '{"prompt":"..."}'
Served on the DSH GUI's own port (default 127.0.0.1:3080), prefix /workspace-api.
服务运行在 DSH 同端口(默认 127.0.0.1:3080),前缀 /workspace-api。
Every response uses {"ok": true, "data": ...} / {"ok": false, "error": ...}; CORS enabled.
所有响应统一为 {"ok": true, "data": ...} / {"ok": false, "error": ...};已开启 CORS。
| Endpoint / 端点 | Purpose / 用途 |
|---|---|
GET / · /healthz | service status, current query folder / 服务状态、当前查询目录 |
GET /workspaces | queryable folder list / 可查询的目录列表 |
GET /list?path=&depth= | list directory / 列出目录内容 |
GET /tree?path=.&depth=3 | directory tree / 目录树 |
GET /search?q= | filename search / 按文件名搜索 |
GET /read?path=&format=text | read file content / 读取文件内容 |
GET /raw?path= | download raw file / 下载原始文件 |
POST /task | ask a natural-language question, agent handles it / 提交自然语言问题,AI 代理处理 |
GET /task/<id> | check task result / 查询任务结果 |
# async: returns a task id immediately / 异步提交:立即返回任务号
curl -X POST -H "Content-Type: application/json" \
-d '{"prompt":"在 projects/Ams 里找导入 contract fee 的方法","timeoutMs":600000}' \
"http://127.0.0.1:3080/workspace-api/task"
# → {"ok":true,"taskId":"...","status":"queued"}
# poll / 轮询结果
curl "http://127.0.0.1:3080/workspace-api/task/<taskId>"
# or synchronous (?wait=1) / 或同步等待
curl -X POST -H "Content-Type: application/json" \
-d '{"prompt":"1+1=?","timeoutMs":120000}' \
"http://127.0.0.1:3080/workspace-api/task?wait=1"
Request body / 请求体字段:
| field / 字段 | required / 必填 | notes / 说明 |
|---|---|---|
prompt | yes / ✅ | the natural-language question / 自然语言问题/任务 |
workspace | — | target folder (registered workspace or WORKSPACE_API_ROOT) / 指定查询目录(须为已注册工作区或 WORKSPACE_API_ROOT) |
timeoutMs | — | 30s–30min, default 300s / 超时(30s–30min,默认 300s) |
Simple Q&A: ~3–5s. Code/document search: usually 1–3 min. Tasks run in a FIFO queue (single worker). 简单问答约 3–5 秒;代码检索/文档问答通常 1–3 分钟。任务按队列顺序执行(单并发)。
| env var / 环境变量 | default / 默认 | description / 说明 |
|---|---|---|
WORKSPACE_API_ROOT | current workspace / 当前工作区 | document root the bot queries / 机器人查询的文档根目录 |
TOKEN | none / 无 | bearer auth, recommended when exposed / 访问令牌(Bearer 或 ?token=),建议对外必配 |
TASK_TIMEOUT_MS | 300000 | per-task timeout / 单任务超时 |
TASK_MAX_QUEUE | 20 | queue cap / 队列上限 |
MAX_READ_BYTES | 65536 | text read cap / 文本读取上限 |
DSH_BIN | dsh | path to the dsh CLI / dsh 命令路径 |
TOKEN when exposing beyond localhost / 默认仅监听 127.0.0.1;对外开放请务必配置 TOKENWORKSPACE_API_ROOT or registered workspaces; ../../etc-style traversal is rejected / 所有路径经真实路径校验,只能访问 WORKSPACE_API_ROOT 或已注册工作区,../../etc 之类一律拒绝employee / app --natural-language question--> /workspace-api/task
| FIFO queue (single worker)
v
dsh --profile headless "question" (fresh agent, cwd = docs folder)
| on-the-spot search + reading
v
{"status":"done","result":"answer with cited sources"}
node --check lib/index.js # syntax check / 语法检查
dsh plugin --profile web add link:$PWD # local debug install / 本地调试安装
npm login && npm publish # publish to npm / 发布到 npm
After pushing to GitHub, add topics / 推送到 GitHub 后请添加 topic:dsh-plugin、deepseek-harness(社区市场会自动收录)。
MIT
FAQs
DSH 插件:把 workspace 内容与 DSH agent 任务能力暴露为 HTTP API(/workspace-api/*),其他程序可查询目录、搜索文件、提交自然语言任务给 agent 处理。
The npm package dsh-workspace-api receives a total of 206 weekly downloads. As such, dsh-workspace-api popularity was classified as not popular.
We found that dsh-workspace-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.