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 架构实现与学习指南。 适合学习前后端插件协作的开发者,演示服务注册、路由与插槽组件。

패키지
@mini-dsh/plugin-counter
호환성
미검증
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 8. 18.

설치

검증된 bundle이 없거나 호환성 검사에 실패했습니다. 먼저 저장소 설명을 읽어 주세요. 전체 README 읽기 ↗

@mini-dsh/plugin-counter

English | 中文

计数器服务全栈演示插件(Full-Stack Counter Plugin)。


插件架构与 Cordis 契约

  1. Host 后端 (src/index.ts):
    • 提供 ctx.counter(CounterService),在 Node 内存中维护 count 状态;
    • 依赖注入 ctx.inject(['server', 'counter']),挂载 /api/count(GET 获取当前值,POST 执行自增);
    • 依赖注入 ctx.inject(['clientModules']),向 Host 注册自己的前端 Bundle 路径。
  2. Client 前端 (src/client.ts):
    • 依赖注入 ctx.inject(['slots']);
    • 向 sidebar.widgets 插槽注册计数器小组件,支持实时展示与点击加一。

对应 DeepSeek Harness (dsh) 模块