dsh-web-search-ddg
aooyoo
Zero-token DuckDuckGo search provider for the DeepSeek Harness (DSH) web seam — local headless browser, no API key, no m…
PROJECT TOPICS
PROJECT README
整理文件夹按钮 · DeepSeek Harness (DSH) Web GUI 动态插件 Folder Tidy Button · a dynamic Cordis plugin for the DeepSeek Harness (DSH) Web GUI
在 DSH Web GUI 对话框输入行「模型选择」的左侧添加一个 34px 圆形按钮(与「提交对话」按钮同尺寸),图标为文件夹 + 右下角小扫帚:
| 分类文件夹 | 扩展名 |
|---|---|
| 图片 | png jpg jpeg gif webp svg ico bmp tif tiff avif heic |
| 文档 | md txt pdf doc docx xls xlsx ppt pptx csv odt rtf epub |
| 压缩包 | zip rar 7z tar gz bz2 xz tgz |
| 音视频 | mp3 wav flac aac m4a ogg mp4 mkv avi mov wmv webm flv |
| 安装包 | exe msi apk dmg deb rpm appx |
| 日志 | log |
安全设计:
README.md、AGENTS.md、CLAUDE.md 与隐藏文件(. 开头)始终保留原位(2) 序号,绝不覆盖workspace-write 会话只能整理工作区内的文件夹;切到 danger-full-access 后可整理任意文件夹workspaces.pickDirectory);浏览器环境自动回退到自绘目录浏览对话框(面包屑导航 + 文件夹列表 + 「整理此文件夹」按钮)aria-label 与悬停提示plugin/
host.js Host 半:注册包内 tidy RPC;用 shell 服务执行 PowerShell 完成分类移动
client.js Client 半:注册 conversation.input.right 按钮与 shell.overlay 浮层(toast + 目录选择)
cordis_define 定义插件:code.host / code.client 分别取本仓库 plugin/host.js 与 plugin/client.js 中 export default function () { … } 的函数体(return { … } 部分)cordis_run 激活,并在运行卡片中批准(单勾 = 仅授权当前版本;双勾 = 自动批准该插件的后续版本)也可以直接对会话中的 agent 说:
用动态 Cordis 插件实现:在输入行模型选择左侧加一个与发送按钮同尺寸的圆形按钮,图标是文件夹+右下角小扫帚;点击整理当前工作文件夹,长按可选择文件夹。参考仓库 dsh-plugin-folder-tidy 的 plugin/host.js 与 plugin/client.js。
将两个函数体按 DSH 文档《editing-cordis-compositions》嵌入自己的 agent preset 插件行。
fs、shell、sandboxPolicy、sessions;内建 harness、btoaslots、timer、workspaces;内建 styles、React、host插件对缺失的服务做 ctx.get 可选检查;conversation.input.right 与 shell.overlay 两个 Slot 由 DSH Web GUI 声明。
sessionId 通过包内 RPC(host.call('tidy', …))发给 Hostsessions.get(sessionId) 取出调用会话,经 sandboxPolicy.resolve({ session }) 解析该会话的真实沙箱策略(这样用户在会话里切换的访问模式才会生效),并把它传给 shell 执行器shell.run 执行:列顶层文件 → 白名单分类 → Move-Item(冲突自动加序号)→ 输出 JSON 统计shell.overlay 的 toast 显示CATEGORY_MAPlistDirectory 契约一致Adds a 34px round button (same size as the Send button) to the left of the model selector in the DSH Web GUI composer tool row, with a folder + little broom icon:
| Category folder | Extensions |
|---|---|
| 图片 (Images) | png jpg jpeg gif webp svg ico bmp tif tiff avif heic |
| 文档 (Documents) | md txt pdf doc docx xls xlsx ppt pptx csv odt rtf epub |
| 压缩包 (Archives) | zip rar 7z tar gz bz2 xz tgz |
| 音视频 (Media) | mp3 wav flac aac m4a ogg mp4 mkv avi mov wmv webm flv |
| 安装包 (Installers) | exe msi apk dmg deb rpm appx |
| 日志 (Logs) | log |
Safety design:
README.md, AGENTS.md, CLAUDE.md and dotfiles are always left in place(2) suffix — nothing is ever overwrittenworkspace-write session can only tidy inside its workspace; switch to danger-full-access to tidy any folderworkspaces.pickDirectory) and falls back to a built-in browse dialog (breadcrumbs + folder list + "Tidy this folder" button) in plain browsersaria-label and a hover tooltipplugin/
host.js Host half: registers the package-private tidy RPC; runs a PowerShell classification/move script via the shell service
client.js Client half: registers the conversation.input.right button and the shell.overlay surface (toast + folder picker)
cordis_define to define the plugin: code.host / code.client are the function bodies (the return { … } part) of export default function () { … } in plugin/host.js and plugin/client.jscordis_run and approve on the run card (single check = this version only; double check = auto-approve future versions of the same plugin)Or simply tell the agent in the session:
Build a dynamic Cordis plugin: a round button the same size as the send button, left of the model selector, icon = folder with a small broom; click tidies the current working folder, long-press picks a folder. See plugin/host.js and plugin/client.js of the dsh-plugin-folder-tidy repo.
Embed both function bodies as a plugin row in your own agent preset, following the DSH "editing-cordis-compositions" guide.
fs, shell, sandboxPolicy, sessions; builtins harness, btoaslots, timer, workspaces; builtins styles, React, hostOptional services are read via ctx.get with absence checks; the conversation.input.right and shell.overlay slots are declared by the DSH Web GUI.
sessionId to the Host through the package-private RPC (host.call('tidy', …))sessions.get(sessionId) and derives its real sandbox policy with sandboxPolicy.resolve({ session }) — so the access mode the user switched to in that session takes effect — and passes that policy to the shell executorshell.run: list top-level files → whitelist classification → Move-Item (collision-safe suffixing) → JSON stats on stdoutshell.overlay toastCATEGORY_MAP if you want recursion, preview, or more categorieslistDirectory contractCLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。