civaapple-alt/mini-dsh--packages-plugins-counter ↗★ 7
@mini-dsh/plugin-counter
🚀 Educational & minimalist DeepSeek Harness (DSH) architecture implementation powered by Cordis microkernel. 极简版 DeepSeek Harness 架构实现与学习指南。 适合学习前后端插件协作的开发者,演示服务注册、路由与插槽组件。
Install
This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗
README
Read the full README ↗@mini-dsh/plugin-counter
English | 中文
计数器服务全栈演示插件(Full-Stack Counter Plugin)。
插件架构与 Cordis 契约
- Host 后端 (
src/index.ts):- 提供
ctx.counter(CounterService),在 Node 内存中维护count状态; - 依赖注入
ctx.inject(['server', 'counter']),挂载/api/count(GET获取当前值,POST执行自增); - 依赖注入
ctx.inject(['clientModules']),向 Host 注册自己的前端 Bundle 路径。
- 提供
- Client 前端 (
src/client.ts):- 依赖注入
ctx.inject(['slots']); - 向
sidebar.widgets插槽注册计数器小组件,支持实时展示与点击加一。
- 依赖注入
对应 DeepSeek Harness (dsh) 模块
- 对应 dsh 仓库的
packages/interaction/feedback(后端交互状态)+packages/client/ui-message-feedback(前端交互按钮)。 - 异同对比:
- 均展示了后端有状态服务与前端 UI 控件通过 API 协同,且当在 Profile 中禁用时,前后端能力同步干净移除。