@gavinc-cn/dsh-plugins 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,84 +1,39 @@
1
- # @gavinc-cn/dsh-plugins
1
+ # @gavinc-cn/dsh-plugins(聚合元包)
2
2
 
3
- 把多个 DSH(DeepSeek Harness)自研插件收成**一个可安装单位**的 bundle 包:装上它,
4
- Plugins 面板里多出一张卡片;卡片里的每个**组件**(组合行)= 一个**独立开关**。
3
+ > **0.2.0 起本包不再是 bundle。** 它只是一个「装一个拿到全部」的 npm 入口:
4
+ > `dependencies` 指向拆分后的两个 bundle 包,自身不含 `dsh.bundle`、不含任何 `cordis.patch.yml`。
5
5
 
6
- - **一个包 = 面板一张卡片**:包名出现在 profile 的 `dsh.profile.bundles` 里,本包的
7
- `cordis.patch.yml` 就会被当作一个配置层叠加进组合树。
8
- - **组件 = 行 = 开关**:本包每条 `- insert:` 声明一个组件;行状态(`disabled`)由各 profile
9
- 的 `cordis.patch.yml` 覆盖行持有,面板里拨开关就是往那里写回。
10
- - **整包开关**:包名在不在 `dsh.profile.bundles`。
6
+ | 版本 | 语义 |
7
+ |---|---|
8
+ | `0.1.0` / `0.1.1` | 单包全量 bundle:`cordis.patch.yml` 里 13 条 `- insert:`,面板一张卡片 |
9
+ | `0.2.0` 起 | 聚合元包:13 个组件拆成两个 bundle(UI 5 个 / 运行时 8 个),本包只把它们一起装上 |
11
10
 
12
- ## 安装
13
-
14
- ```bash
15
- # 装进某个 profile(pnpm 会把依赖里的 11 个组件包一并装上)
16
- dsh plugin --profile web add @gavinc-cn/dsh-plugins
17
- ```
18
-
19
- - CLI 这条路径会在 pnpm 成功后**自动**把新 bundle 追加进 `dsh.profile.bundles`(即装完就启用)。
20
- - 走 **Plugins 面板**的安装入口则**不会**自动选择 bundle,装完要自己把整包开关打开。
21
- - 改了 `dsh.profile.bundles` 要**重启宿主**才生效(启动时读);profile patch 层是 live 热重载,
22
- 行级开关不需要重启。
23
-
24
- ## 组件(11 个)
11
+ ## 拆分后的两个 bundle
25
12
 
26
- | 行 id | 包 | 做什么 |
27
- |---|---|---|
28
- | `kanban-board` | `@gavinc-cn/kanban-board` | Web GUI 任务看板(待开发/开发中/阻塞/待审核/已完成),拖进「开发中」自动建会话 |
29
- | `dsh-dim-text` | `@gavinc-cn/dsh-dim-text` | 把 Web GUI 文字梯度整体调暗一档 |
30
- | `dsh-session-unread-persist` | `@gavinc-cn/dsh-session-unread-persist` | 会话列表「已完成未查看」绿点持久化 |
31
- | `dsh-turn-labels` | `@gavinc-cn/dsh-turn-labels` | 右侧轮次刻度轨换成常驻文字(每轮一行显示该轮提问) |
32
- | `dsh-sidebar-width-persist` | `@gavinc-cn/dsh-sidebar-width-persist` | 左侧边栏拖动宽度持久化 |
33
- | `dsh-patch-ask-expand` | `@gavinc-cn/dsh-patch-ask-expand` | 展开 Web GUI 里「提问 / 回答」那一行 |
34
- | `dsh-superpowers-priming` | `@gavinc-cn/dsh-superpowers-priming` | 给「重开的会话」补一份 superpowers 开场说明(按会话历史判重,不重复注入) |
35
- | `dsh-memory` | `@gavinc-cn/dsh-memory` | 跨会话记忆:首轮注入两级记忆索引 |
36
- | `dsh-autocommit` | `@gavinc-cn/dsh-autocommit` | 回合收尾时若本会话还有未提交改动,挡下并提示模型先提交 |
37
- | `dsh-git-guard` | `@gavinc-cn/dsh-git-guard` | git 操作归属守卫(按提交前缀/分支命名判定,拦下越权 git 写操作) |
38
- | `dsh-file-guard` | `@gavinc-cn/dsh-file-guard` | 回合收尾比对「本会话写下的文件」与磁盘漂移,只报告不自动改回 |
13
+ | 包 | 组件数 | 判据 | 面板卡片 |
14
+ |---|---|---|---|
15
+ | [@gavinc-cn/dsh-plugins-ui](../dsh-plugins-ui/README.md) | 5 | 组件包声明了 `dsh.client.platform: "web"`(只作用于 Web GUI) | 「自研插件 · UI」 |
16
+ | [@gavinc-cn/dsh-plugins-runtime](../dsh-plugins-runtime/README.md) | 8 | 宿主(node)侧运行,没有 `dsh.client` | 「自研插件 · 运行时」 |
39
17
 
40
- 行 id 的约定是**包名去掉 scope**(`@gavinc-cn/dsh-memory` → `dsh-memory`):profile 覆盖行按它命中,
41
- 面板开关按它写回。要改组件集合,改本包的 `cordis.patch.yml` 即可(**改完 patch 层当场热重载**)。
18
+ 两个包合起来 = `0.1.x` 的全部 13 个组件,行 id 与默认开关状态都保持不变。
42
19
 
43
- ## 机器相关配置不要写进这里
20
+ ## 安装
44
21
 
45
- 本包只下发「有哪些组件 + 默认行为」。只有某台机器才成立的值(本地检出路径、状态目录、日志路径)
46
- 请写在 profile 覆盖层:
22
+ ```bash
23
+ # 想一次拿到全部 13 个组件的依赖(但仍要分别选 bundle)
24
+ pnpm add @gavinc-cn/dsh-plugins
47
25
 
48
- ```yaml
49
- # ~/.dsh/profiles/<profile>/cordis.patch.yml
50
- - id: dsh-superpowers-priming
51
- config:
52
- skillPath: /path/to/superpowers/skills/using-superpowers/SKILL.md
26
+ # 真正把它挂进某个 profile:分别装两个 bundle(dsh plugin 会把包名追加进 dsh.profile.bundles)
27
+ dsh plugin --profile web add @gavinc-cn/dsh-plugins-ui
28
+ dsh plugin --profile web add @gavinc-cn/dsh-plugins-runtime
53
29
  ```
54
30
 
55
- | 组件 | 可覆盖项 | 默认值 |
56
- |---|---|---|
57
- | `dsh-superpowers-priming` | `skillPath`(或 env `SUPERPOWERS_SKILL_PATH`) | `~/superpowers/skills/using-superpowers/SKILL.md`(文件不存在只记日志、不注入) |
58
- | `dsh-file-guard` | `stateRoot`(或 env `FILE_GUARD_ROOT`) | `~/.orca/file-guard` |
59
- | `dsh-patch-ask-expand` | `bundlePath` | `~/.dsh/profiles/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js` |
60
- | 各组件 | `logPath` / `enabled` / `dryRun` | 日志在 `~/.kimi-code/hooks/logs/`,默认启用 |
61
-
62
- ## 开发工作流(重要)
63
-
64
- 若你像本仓库的开发方式一样,**把组件源码放在各 profile 共享的目录**
65
- (`~/.dsh/profiles/node_modules/@gavinc-cn/`)并在 profile 里用相对 `link:` 声明本包,那么
66
- 「改共享目录里的源码立即生效、不需要重装」。
67
-
68
- 在这种工作流下**不要**再对那个 profile 跑 `pnpm install` / `dsh plugin install`:本包在
69
- `dependencies` 里声明了 11 个 registry 组件包,pnpm 会把它们下载成 profile 自己的副本
70
- (`<profile>/node_modules/@gavinc-cn/*`),按 Node 的解析顺序**盖住**共享目录里那份,
71
- 你改的源码就不再生效。要验证「干净安装」请在另一个 profile 或另一台机器上做。
72
-
73
- ## 已知限制
31
+ **不要**把本包名写进 `dsh.profile.bundles`:它声明不了 `dsh.bundle`,加载时会被判为
32
+ `declares no dsh.bundle` 并跳过该层(面板里也会显示成一条 `not-bundle` 异常卡片)。
33
+ 用 `dsh plugin add @gavinc-cn/dsh-plugins` 装它时,CLI 会按**普通依赖**安装并打一条同样的 warning —— 这是预期行为。
74
34
 
75
- - 桌面端(Electron 宿主)改 `dsh.profile.bundles` 后必须**重启 App**;只有 patch 层是 live 热重载。
76
- - 面板里 node 侧组件的中文标题来自包内 `locale/*.json`,host 启动时缓存行元数据
77
- (`pluginPackages.metaOf`)⇒ 运行中新增/改 `locale` 要重启宿主才看到。
78
- - `dsh-patch-ask-expand` 改的是另一个包(`@deepseek-ai/dsh-client-ui-tool`)的成品 client bundle;
79
- 重装/升级那个包会覆盖补丁,靠本插件在启动时重打。
80
- - 某些组件只在特定平台有意义(Web GUI 类组件在桌面端同样可用,但宿主侧的状态目录、
81
- 日志目录等按上表各自配置)。
35
+ 两个 bundle 的 `dsh.profile.bundles` + `dependencies` 都要写(后者决定面板卡片是否显示),
36
+ 改完重启宿主才生效;行级开关是 live 热重载。
82
37
 
83
38
  ## License
84
39
 
package/package.json CHANGED
@@ -1,49 +1,29 @@
1
1
  {
2
2
  "name": "@gavinc-cn/dsh-plugins",
3
- "version": "0.1.0",
4
- "description": "DSH 插件组合包(bundle):一个包承载多个可独立开关的组件(行),每行对应一个组件包;机器相关配置留在各 profile 覆盖层。",
3
+ "version": "0.2.0",
4
+ "description": "DSH 自研插件的聚合元包:自身不是 bundle(不含任何配置行),只把 @gavinc-cn/dsh-plugins-ui 与 @gavinc-cn/dsh-plugins-runtime 一起装上。",
5
5
  "license": "MIT",
6
- "type": "module",
7
- "main": "./lib/index.js",
8
- "exports": {
9
- ".": {
10
- "default": "./lib/index.js"
11
- },
12
- "./package.json": "./package.json",
13
- "./locale/*.json": "./locale/*.json"
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/gavinc-cn/dsh-plugins.git",
9
+ "directory": "packages/bundles/dsh-plugins"
14
10
  },
15
- "dsh": {
16
- "bundle": {
17
- "patch": "./cordis.patch.yml"
18
- }
19
- },
20
- "files": [
21
- "lib",
22
- "locale",
23
- "cordis.patch.yml"
24
- ],
11
+ "homepage": "https://github.com/gavinc-cn/dsh-plugins/tree/master/packages/bundles/dsh-plugins#readme",
12
+ "bugs": "https://github.com/gavinc-cn/dsh-plugins/issues",
25
13
  "keywords": [
26
14
  "dsh",
27
15
  "deepseek-harness",
28
16
  "cordis",
29
17
  "bundle",
30
- "plugin"
18
+ "plugin",
19
+ "meta"
31
20
  ],
32
21
  "publishConfig": {
33
22
  "registry": "https://registry.npmjs.org",
34
23
  "access": "public"
35
24
  },
36
25
  "dependencies": {
37
- "@gavinc-cn/kanban-board": "^0.1.2",
38
- "@gavinc-cn/dsh-dim-text": "^0.1.1",
39
- "@gavinc-cn/dsh-session-unread-persist": "^0.1.1",
40
- "@gavinc-cn/dsh-turn-labels": "^0.5.2",
41
- "@gavinc-cn/dsh-sidebar-width-persist": "^0.1.0",
42
- "@gavinc-cn/dsh-patch-ask-expand": "^0.1.1",
43
- "@gavinc-cn/dsh-superpowers-priming": "^0.1.0",
44
- "@gavinc-cn/dsh-memory": "^0.1.0",
45
- "@gavinc-cn/dsh-autocommit": "^0.1.1",
46
- "@gavinc-cn/dsh-git-guard": "^0.1.0",
47
- "@gavinc-cn/dsh-file-guard": "^0.1.0"
26
+ "@gavinc-cn/dsh-plugins-ui": "^0.1.0",
27
+ "@gavinc-cn/dsh-plugins-runtime": "^0.1.0"
48
28
  }
49
29
  }
package/cordis.patch.yml DELETED
@@ -1,64 +0,0 @@
1
- # @gavinc-cn/dsh-plugins —— 「一个插件包 = 多个可独立开关的组件」的组合行。
2
- #
3
- # 工作方式:
4
- # * Plugins 面板出现 @gavinc-cn/dsh-plugins 卡片,卡片内每个行 = 一个组件 = 一个开关;
5
- # * 行开关写回 profile patch 的 `- id: <行id>` 覆盖行(行状态留在各 profile,可各自独立开关);
6
- # * 整包开关控制包名在不在 profile 的 dsh.profile.bundles。
7
- #
8
- # 行 id 与包名的约定:id 是组合树里的本地行键(面板开关按它写回、profile 覆盖行按它命中),
9
- # 取包名去掉 scope(@gavinc-cn/dsh-memory → dsh-memory);name 才是模块说明符(= 完整包名)。
10
- #
11
- # 依赖:本包在 package.json 的 dependencies 里声明了下述 11 个组件包 —— 装本包即把它们一并装上,
12
- # 各 profile 因此能按包名解析到每一行。若改成本地开发形态(组件源码放在共享目录、profile 里用
13
- # 相对 `link:` 声明本包),注意**别再**对那个 profile 跑 pnpm install:registry 版会盖住本地那份
14
- # (见 README「开发工作流」一节)。
15
- #
16
- # 机器相关配置(本机检出路径、状态目录、日志路径)**不进本文件**:写在各 profile 的覆盖行里,
17
- # 例如 `- id: dsh-superpowers-priming` + `config: { skillPath: ... }`(见 README 表格)。
18
- #
19
- # 改组件集合 = 改本文件:patch 层是 live 热重载,不需要重装/重启;改完同步到本包被加载的那份副本即可。
20
-
21
- - insert:
22
- - id: kanban-board
23
- disabled: true
24
- name: "@gavinc-cn/kanban-board"
25
-
26
- - insert:
27
- - id: dsh-dim-text
28
- name: "@gavinc-cn/dsh-dim-text"
29
-
30
- - insert:
31
- - id: dsh-session-unread-persist
32
- name: "@gavinc-cn/dsh-session-unread-persist"
33
-
34
- - insert:
35
- - id: dsh-turn-labels
36
- name: "@gavinc-cn/dsh-turn-labels"
37
-
38
- - insert:
39
- - id: dsh-sidebar-width-persist
40
- name: "@gavinc-cn/dsh-sidebar-width-persist"
41
-
42
- - insert:
43
- - id: dsh-patch-ask-expand
44
- name: "@gavinc-cn/dsh-patch-ask-expand"
45
-
46
- - insert:
47
- - id: dsh-superpowers-priming
48
- name: "@gavinc-cn/dsh-superpowers-priming"
49
-
50
- - insert:
51
- - id: dsh-memory
52
- name: "@gavinc-cn/dsh-memory"
53
-
54
- - insert:
55
- - id: dsh-autocommit
56
- name: "@gavinc-cn/dsh-autocommit"
57
-
58
- - insert:
59
- - id: dsh-git-guard
60
- name: "@gavinc-cn/dsh-git-guard"
61
-
62
- - insert:
63
- - id: dsh-file-guard
64
- name: "@gavinc-cn/dsh-file-guard"
package/lib/index.js DELETED
@@ -1,3 +0,0 @@
1
- // 纯配置 bundle:运行时内容全在 cordis.patch.yml,本入口不挂任何东西。
2
- // 与官方 @deepseek-ai/dsh-experimental-schedule-bundle 同形(其 lib 也是 `export {}`)。
3
- export {};
package/locale/en.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "meta": {
3
- "title": "Local plugin container",
4
- "description": "One bundle holding the locally written plugins: each plugin is a separately switchable component row in the Plugins panel, and the whole bundle can be switched off at once."
5
- }
6
- }
package/locale/zh.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "meta": {
3
- "title": "自研插件容器",
4
- "description": "把本机自研插件收成一个 bundle:每个插件在 Plugins 面板里是一行可独立开关的组件,整包也能一键停用。"
5
- }
6
- }