dsh-plugin-client
Skill2 starsChanged 3 months agoMITView on GitHub
DeepSeek Harness browser-half plugins — dsh.client, client-modules, slots, settings cards, Conversation Nodes. Use when adding Web UI, slots.register, a settings tab, a chat node, or the user says /dsh-plugin-client, "浏览器插件", "写 UI 插件", "slot", "设置页卡片".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- hackerFish/awesome-dsh-skillstheir own version, first seen Aug 17, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- hackerFish/awesome-dsh-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- development-cdpSkill
- dsh-plugin-authorSkill
- dsh-plugin-composeSkill
- dsh-plugin-conventionsSkill
- dsh-plugin-reviewSkill
- dsh-plugin-runtimeSkill
The file
Files
浏览器半插件
Host 插件与浏览器插件共用 Loader 语义(Fiber、inject、update),只换模块如何到达。本技能拥有 dsh.client、slots、组件纪律。Host 侧实现仍走 dsh-plugin-author。
对照:../deepseek-harness/packages/client/AGENTS.md、packages/client/modules。
展开:references/slots.md。
何时需要浏览器半
| 目标 | 要不要 Client 包 |
| 工具 / 适配器 / 钩子 | 不要。Host 即可 |
| 工具结果的卡片 | 通常只要 Host 上的 presentCall / presentResult;第一方 UI 会映射 card kind |
| 设置页里自己的表单 | 要。且树外插件默认不会出现在内置「插件配置」白名单里 |
| Chat 里一种新节点 | 要。ConversationNodeDefinition + conversation.chat.node |
| 独立面板 / 设置分区 | 要。往已有 slot 注册 |
先问:能否用 render-intent / 会话事件完成?能就不要开 Client 包。
声明
package.json:
{
"exports": {
".": { "default": "./lib/index.js" },
"./client": { "default": "./lib/client.js" }
},
"dsh": {
"client": { "platform": "web", "inject": ["slots"], "immediately": false }
}
}- 必须同时是 Loader 树上的一条 Host 行,
client-modules才扫得到。--patch开发行的name必须是包根目录的绝对路径(或已安装的包名),不要指向src/index.ts,否则require.resolve(<name>/package.json)失败,该包永远不是 client 行。 exports["./client"]必须指向 CJS factory bundle(通常lib/client.js),不是tsc的 ESM 目录。缺文件时启动会聚合成run pnpm run build错误。immediately: true仅给外壳级包。功能插件默认懒加载。dsh.client.inject是信息性包名边(如@deepseek-ai/dsh-client-ui-tool),不是 Cordis 服务名。export const inject = ['slots']才是 apply 的服务依赖。
扫描按包名缓存且不过期:改「是不是 client 包」要重启 dsh。改 bundle 内容走 rebuild 通知,不是改 package.json 字段。
./client 产物合同
Host 把该文件当经典脚本挂到 /plugins/<id>/client.js。浏览器半是惰性 CJS:脚本执行时必须登记 factory,require 时才跑模块体。
window.__ModuleLoader__.load({
id: '<package name>', // 必须等于 Loader 行的 name / boot entries[].id
factory: (require) => {
var module = { exports: {} }; var exports = module.exports;
// CJS body; `require('react')` 走外壳 module table
return module.exports;
},
});react/react/jsx-runtime/ 其它 platform module 必须 external,不要打进包。- 不要发 ESM
import。tsc 的lib/client/index.js只能当类型,不能当 served bundle。 - 本仓库:
packages/ui-acp-worker/scripts/build-client.mjs(esbuild)。
实现纪律
- UI 只通过
ctx.slots.register({ name, children?, store?, inject? }, Component)组合。不要另搞 slot 定义 API。 children的 key 就是该组件允许渲染的子 slot。渲染未声明的、或抢注别人声明的,加载失败。- 组件看不到
ctx。数据只走四份派生 props:owner / renderSlots / store / inject face。 - 业务组件禁止
useSyncExternalStore、禁止手写订阅、禁止 import 另一个插件的组件。 - 跨插件只走 slot 或 ctx 服务。
./client不要导出实现组件。 - 可变的共享视图状态用 register 时声明的 store;会话事实留在 runtime 对象层,不要塞进 store。
- 样式用 CSS Modules + 语义 token,禁止字面颜色和组件库。产品文案中文,代码注释英文。
验证
- 该包出现在 Web 启动图(
window.__DSH_BOOT__//plugins/<id>/client.js能拉到)。 - 目标 slot 上能看到贡献;关掉该 Host 行后贡献消失。
- 桌面与窄视口都看过。有交互就按用户规则走浏览器验证,不要只截一张图。
设置卡片:树外插件不要指望改 harness 的 api-proxy 白名单。给用户文档,让他们用 profile patch 配 Host 插件;或自建设置 slot,不走内置「插件配置」页。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

