dsh-skill-hub 0.3.4 → 0.3.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-skill-hub",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "In-GUI skill hub for DeepSeek Harness (dsh): browse the full local skill catalog from the official ctx.skills registry (every root + third-party providers), toggle skills on/off, inspect bodies, surface frontmatter diagnostics, and scaffold new skills — plus a codex-style skill market (built-in catalog, upstream update checks, one-click update-all) with tracked source sync. The full manager beyond the read-only dsh-skill-manager browser.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -63,7 +63,9 @@
63
63
  "dshVersions": [
64
64
  "0.1.0-rc.7",
65
65
  "0.1.1-rc.2",
66
- "0.1.2-alpha.2"
66
+ "0.1.2-alpha.2",
67
+ "0.1.2-alpha.3",
68
+ "0.1.2-alpha.4"
67
69
  ]
68
70
  },
69
71
  "capability": {
@@ -85,19 +87,19 @@
85
87
  },
86
88
  "peerDependencies": {
87
89
  "@deepseek-ai/cordis": "^4.0.1 || ^4.0.2",
88
- "@deepseek-ai/dsh-client-connection": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0",
89
- "@deepseek-ai/dsh-client-locale": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0",
90
- "@deepseek-ai/dsh-client-runtime": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0",
91
- "@deepseek-ai/dsh-client-store": ">=0.1.2-alpha.2 <0.2.0-0",
92
- "@deepseek-ai/dsh-client-ui-input-trigger": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0",
93
- "@deepseek-ai/dsh-client-ui-settings": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0",
94
- "@deepseek-ai/dsh-client-ui-slots": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0",
95
- "@deepseek-ai/dsh-host-webserver": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0",
96
- "@deepseek-ai/dsh-session": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0",
97
- "@deepseek-ai/dsh-session-query": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0",
98
- "@deepseek-ai/dsh-settings": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0",
99
- "@deepseek-ai/dsh-skill": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0",
100
- "@deepseek-ai/dsh-system-prompt": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0",
90
+ "@deepseek-ai/dsh-client-connection": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0 || >=0.1.2-alpha.3 <0.2.0-0 || >=0.1.2-alpha.4 <0.2.0-0",
91
+ "@deepseek-ai/dsh-client-locale": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0 || >=0.1.2-alpha.3 <0.2.0-0 || >=0.1.2-alpha.4 <0.2.0-0",
92
+ "@deepseek-ai/dsh-client-runtime": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.3 <0.2.0-0 || >=0.1.2-alpha.4 <0.2.0-0",
93
+ "@deepseek-ai/dsh-client-store": ">=0.1.2-alpha.2 <0.2.0-0 || >=0.1.2-alpha.3 <0.2.0-0 || >=0.1.2-alpha.4 <0.2.0-0",
94
+ "@deepseek-ai/dsh-client-ui-input-trigger": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0 || >=0.1.2-alpha.3 <0.2.0-0 || >=0.1.2-alpha.4 <0.2.0-0",
95
+ "@deepseek-ai/dsh-client-ui-settings": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0 || >=0.1.2-alpha.3 <0.2.0-0 || >=0.1.2-alpha.4 <0.2.0-0",
96
+ "@deepseek-ai/dsh-client-ui-slots": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0 || >=0.1.2-alpha.3 <0.2.0-0 || >=0.1.2-alpha.4 <0.2.0-0",
97
+ "@deepseek-ai/dsh-host-webserver": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0 || >=0.1.2-alpha.3 <0.2.0-0 || >=0.1.2-alpha.4 <0.2.0-0",
98
+ "@deepseek-ai/dsh-session": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0 || >=0.1.2-alpha.3 <0.2.0-0 || >=0.1.2-alpha.4 <0.2.0-0",
99
+ "@deepseek-ai/dsh-session-query": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0 || >=0.1.2-alpha.3 <0.2.0-0 || >=0.1.2-alpha.4 <0.2.0-0",
100
+ "@deepseek-ai/dsh-settings": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0 || >=0.1.2-alpha.3 <0.2.0-0 || >=0.1.2-alpha.4 <0.2.0-0",
101
+ "@deepseek-ai/dsh-skill": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0 || >=0.1.2-alpha.3 <0.2.0-0 || >=0.1.2-alpha.4 <0.2.0-0",
102
+ "@deepseek-ai/dsh-system-prompt": ">=0.1.0-rc.7 <0.2.0-0 || >=0.1.1-rc.2 <0.2.0-0 || >=0.1.2-alpha.2 <0.2.0-0 || >=0.1.2-alpha.3 <0.2.0-0 || >=0.1.2-alpha.4 <0.2.0-0",
101
103
  "react": "^18.2.0",
102
104
  "react-dom": "^18.2.0"
103
105
  },
@@ -111,19 +113,19 @@
111
113
  },
112
114
  "devDependencies": {
113
115
  "@deepseek-ai/cordis": "^4.0.2",
114
- "@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.2",
115
- "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.2",
116
- "@deepseek-ai/dsh-client-store": "^0.1.2-alpha.2",
117
- "@deepseek-ai/dsh-client-ui-input-trigger": "^0.1.2-alpha.2",
118
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.2",
119
- "@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.2-alpha.2",
120
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.2",
121
- "@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.2",
122
- "@deepseek-ai/dsh-session": "^0.1.2-alpha.2",
123
- "@deepseek-ai/dsh-session-query": "^0.1.2-alpha.2",
124
- "@deepseek-ai/dsh-settings": "^0.1.2-alpha.2",
125
- "@deepseek-ai/dsh-skill": "^0.1.2-alpha.2",
126
- "@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.2",
116
+ "@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.4",
117
+ "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.4",
118
+ "@deepseek-ai/dsh-client-store": "^0.1.2-alpha.4",
119
+ "@deepseek-ai/dsh-client-ui-input-trigger": "^0.1.2-alpha.4",
120
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.4",
121
+ "@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.2-alpha.4",
122
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.4",
123
+ "@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.4",
124
+ "@deepseek-ai/dsh-session": "^0.1.2-alpha.4",
125
+ "@deepseek-ai/dsh-session-query": "^0.1.2-alpha.4",
126
+ "@deepseek-ai/dsh-settings": "^0.1.2-alpha.4",
127
+ "@deepseek-ai/dsh-skill": "^0.1.2-alpha.4",
128
+ "@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.4",
127
129
  "@types/js-yaml": "^4.0.9",
128
130
  "@types/node": "^22.20.0",
129
131
  "@types/react": "~18.3.1",
@@ -87,18 +87,14 @@ export function apply(ctx: ClientContext): void {
87
87
  // settings transport — the configurable-plugins tab only dispatches cards
88
88
  // whose key the Host serves, and the Host serves every registered namespace
89
89
  // since rc.7, so this is what makes the card appear (and stay in sync).
90
- const settingsCard = new SkillHubSettingsCardController(
91
- ctx.settingsScope.bind<HubSettingsValue>({ namespace: NS }),
92
- )
90
+ // Single scope instance reused for both the card and slash-dots to avoid
91
+ // duplicate subscriptions (review #3).
92
+ const scope = ctx.settingsScope.bind<HubSettingsValue>({ namespace: NS })
93
+ const settingsCard = new SkillHubSettingsCardController(scope)
93
94
 
94
- // Chat `/` menu skill dots: wrap the core skill source so every candidate
95
- // row carries the invocation dot, colored from the same settings the panel
96
- // legend uses (dotModelColor / dotUserColor). Own scope = independent reader;
97
- // fails silent, never takes the GUI down.
98
- ctx.effect(
99
- () => setupSkillSlashDots(ctx, api, ctx.settingsScope.bind<HubSettingsValue>({ namespace: NS })),
100
- 'dsh-skill-hub: slash dots',
101
- )
95
+ // Chat `/` 菜单技能圆点:为每个候选行加可调用性圆点(蓝=模型可调,绿=仅用户),颜色与面板图例同步;仅装饰,不自动预填 "/"
96
+ // inject 含 inputTriggers 保证 fiber 就绪后再 wrap,slash-dots 内的 undefined 防御仅用于单元测试 mock
97
+ ctx.effect(() => setupSkillSlashDots(ctx, api, scope), 'dsh-skill-hub: slash dots')
102
98
 
103
99
  // Plugin-management card: Settings → 插件 → 可配置插件列表.
104
100
  // rc.7's slot contract declares this keyed slot with options `key`
@@ -224,8 +224,8 @@
224
224
  flat — indent + a hairline guide only, no nested card surfaces. */
225
225
  .projectNest { display: flex; flex-direction: column; margin: 2px 0 0 14px; border-left: 1px solid rgba(128,128,128,.14); }
226
226
 
227
- /* Drag handle + reorder states */
228
- .dragHandle { cursor: grab; opacity: .32; font-size: 11px; letter-spacing: 1px; padding: 0 4px; user-select: none; flex: none; display: inline-flex; align-items: center; justify-content: center; height: 20px; align-self: center; }
227
+ /* Drag handle + reorder states — 窄版:尽量收窄占位,仍保留抓取感 */
228
+ .dragHandle { cursor: grab; opacity: .28; font-size: 10px; letter-spacing: 0; padding: 0 1px; width: 8px; overflow: hidden; user-select: none; flex: none; display: inline-flex; align-items: center; justify-content: center; height: 16px; align-self: center; }
229
229
  .dragHandle:active { cursor: grabbing; }
230
230
  .dragging { opacity: .45; }
231
231
  .dragOver { outline: 2px dashed var(--hub-model, #2f81f7); outline-offset: -2px; background: rgba(47,129,247,.07); }
@@ -127,8 +127,9 @@ function dotIcon(color: string): InputTriggerCandidate['icon'] {
127
127
  function injectDotsViaDOM(modelByName: Map<string, boolean>, modelColor: string, userColor: string): void {
128
128
  if (typeof document === 'undefined' || typeof requestAnimationFrame === 'undefined') return
129
129
  const run = (): void => {
130
- // 仅处理斜杠菜单:通过 MenuView 的哈希类 `_3e4SsG_menu` 定位,避免误伤
131
- // 面板内市场扫描/分组等其它 `[role="option"]` 列表
130
+ // 仅处理斜杠菜单:优先用哈希类 `_3e4SsG_menu` 严格隔离面板内其它 listbox,
131
+ // 哈希为 dsh 构建产物(review #4 已知脆弱点),已提供 `[role="listbox"]` 回退;
132
+ // 后续 dsh 若暴露 `data-*` 锚点应迁移至此
132
133
  const menu = document.querySelector('[class*="_3e4SsG_menu"]') as HTMLElement | null
133
134
  const listbox = menu?.querySelector('[role="listbox"]') ?? document.querySelector('[role="listbox"]')
134
135
  // 若菜单未打开则不注入