A @-file reference tool for DSH: registers an at_file_read tool that injects workspace-file contents into the session, with traversal protection and a 50KB truncation cap (MIT).
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:SIMON-WORLD/dsh-toolkit#path:/packages/dsh-at-file
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
对应痛点:P106 家族 12 帖 + locdd 论坛「不能@文件真的奇葩」(#146 #195 #202 #234 #261 #337 #360 #368 #464 #550 #659) 目标:输入框输入
@→ 弹出工作区文件树 → 选中后注入文件内容到上下文(Claude Code 同款体验)。
状态
🟢 标准 DSH 插件格式(cordis.patch.yml + defineTool + 编译产物 lib/),16/16 测试通过,可用 \dsh plugin add\ 安装(尚未发布 npm,先 git 源安装)
测试
node --test tests/at-file.test.mjs # 4 个用例:读取/穿越防护/截断/注册
设计
输入框 @ 触发
↓
composer 插件监听输入事件
↓
弹出文件搜索面板(fuzzy match 工作区文件)
↓
选中文件 → 读取内容 → 注入为会话上下文附件
实现要点(基于社区经验)
- 参考现有实现 dsh-at-file(社区版) 与 dsh-web-ui 的 composer 扩展点
- 注入方式:将文件内容作为 user message 的附件块(与拖拽附件同通道)
- 大文件处理:>50KB 提示截断/摘要(配合 dsh-tokenless 思路)
- 目录浏览:先做当前工作区根,后续支持任意路径
目录结构(计划)
dsh-at-file/
├── package.json # dsh.bundle manifest
├── src/
│ ├── index.ts # 插件入口(注册 composer 扩展)
│ ├── file-picker.ts # @ 触发 + fuzzy 搜索
│ └── inject.ts # 内容注入
├── README.md
└── tests/
验证标准
-
@输入后弹出文件面板,模糊搜索命中 - 选中文件后内容出现在会话上下文中(模型可读)
- 50KB 大文件有截断提示
- 重启 dsh 后仍可用
贡献
欢迎 PR!第一个可用版落地后,将提交 awesome-dsh-plugin 收录。
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 34028
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
superdesigndev/treg★ 5298
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1136
Tencent CloudBase backend for DeepSeek Harness — scaffold and deploy full-stack apps from chat, render query results as table cards with paging, sorting and CSV export, preview a deployment on its domain, and call the CloudBase MCP toolset (`mcp__cloudbase__*`) with device-code login.
gitroomhq/postiz-agent#dsh-postiz★ 517
Connects DeepSeek Harness to Postiz over MCP: list connected social media channels, fetch per-platform posting rules, and schedule, draft, or publish posts to X, LinkedIn, Instagram, Facebook, Threads, TikTok, YouTube, Reddit, Bluesky, Mastodon, Discord, Slack, Telegram and more; adds a postiz workflow skill.
EthanYoQ/Invoice-Downloader#dsh-invoice-downloader★ 507
Local IMAP invoice download, OCR, archive, and Excel reimbursement summaries for DeepSeek Harness.
anysearch-team/anysearch-dsh★ 461
AnySearch-powered real-time web and vertical search provider for DeepSeek Harness.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.