dsh-skill-hub 0.3.5 → 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.5",
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": {
@@ -64,7 +64,8 @@
64
64
  "0.1.0-rc.7",
65
65
  "0.1.1-rc.2",
66
66
  "0.1.2-alpha.2",
67
- "0.1.2-alpha.3"
67
+ "0.1.2-alpha.3",
68
+ "0.1.2-alpha.4"
68
69
  ]
69
70
  },
70
71
  "capability": {
@@ -86,19 +87,19 @@
86
87
  },
87
88
  "peerDependencies": {
88
89
  "@deepseek-ai/cordis": "^4.0.1 || ^4.0.2",
89
- "@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",
90
- "@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",
91
- "@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",
92
- "@deepseek-ai/dsh-client-store": ">=0.1.2-alpha.2 <0.2.0-0 || >=0.1.2-alpha.3 <0.2.0-0",
93
- "@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",
94
- "@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",
95
- "@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",
96
- "@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",
97
- "@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",
98
- "@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",
99
- "@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",
100
- "@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",
101
- "@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",
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",
102
103
  "react": "^18.2.0",
103
104
  "react-dom": "^18.2.0"
104
105
  },
@@ -112,19 +113,19 @@
112
113
  },
113
114
  "devDependencies": {
114
115
  "@deepseek-ai/cordis": "^4.0.2",
115
- "@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.3",
116
- "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.3",
117
- "@deepseek-ai/dsh-client-store": "^0.1.2-alpha.3",
118
- "@deepseek-ai/dsh-client-ui-input-trigger": "^0.1.2-alpha.3",
119
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.3",
120
- "@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.2-alpha.3",
121
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.3",
122
- "@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.3",
123
- "@deepseek-ai/dsh-session": "^0.1.2-alpha.3",
124
- "@deepseek-ai/dsh-session-query": "^0.1.2-alpha.3",
125
- "@deepseek-ai/dsh-settings": "^0.1.2-alpha.3",
126
- "@deepseek-ai/dsh-skill": "^0.1.2-alpha.3",
127
- "@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.3",
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",
128
129
  "@types/js-yaml": "^4.0.9",
129
130
  "@types/node": "^22.20.0",
130
131
  "@types/react": "~18.3.1",
@@ -46,6 +46,7 @@ import type { HubSettingsValue } from '../protocol.ts'
46
46
  import { SkillHubApi } from './api.ts'
47
47
  import { en, zh, type HubKey } from './locales.ts'
48
48
  import { applySettingsNavIcon } from './settings-nav-icon.ts'
49
+ import { setupSkillSlashDots } from './slash-dots.tsx'
49
50
  import { SkillHubSettingsCard, SkillHubSettingsCardController } from './SkillHubSettingsCard.tsx'
50
51
  import { SkillHubPanel } from './panel/SkillHubPanel.tsx'
51
52
 
@@ -66,7 +67,7 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
66
67
  * `settingsScope` is the namespace-scope binder itself; mirror the official
67
68
  * settings-plugins inject list.
68
69
  */
69
- export const inject = ['slots', 'locale', 'connection', 'remote', 'settingsScope']
70
+ export const inject = ['slots', 'locale', 'connection', 'remote', 'settingsScope', 'inputTriggers']
70
71
 
71
72
  /** Type-only surface (export discipline: no value exports beyond the plugin contract). */
72
73
  export type { SkillHubPanelProps } from './panel/SkillHubPanel.tsx'
@@ -86,11 +87,14 @@ export function apply(ctx: ClientContext): void {
86
87
  // settings transport — the configurable-plugins tab only dispatches cards
87
88
  // whose key the Host serves, and the Host serves every registered namespace
88
89
  // since rc.7, so this is what makes the card appear (and stay in sync).
89
- const settingsCard = new SkillHubSettingsCardController(
90
- ctx.settingsScope.bind<HubSettingsValue>({ namespace: NS }),
91
- )
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)
92
94
 
93
- // 斜杠菜单圆点已按需求移除:不再包 `/skill` 源,避免演示性预填 "/" 的干扰
95
+ // Chat `/` 菜单技能圆点:为每个候选行加可调用性圆点(蓝=模型可调,绿=仅用户),颜色与面板图例同步;仅装饰,不自动预填 "/"
96
+ // inject 含 inputTriggers 保证 fiber 就绪后再 wrap,slash-dots 内的 undefined 防御仅用于单元测试 mock
97
+ ctx.effect(() => setupSkillSlashDots(ctx, api, scope), 'dsh-skill-hub: slash dots')
94
98
 
95
99
  // Plugin-management card: Settings → 插件 → 可配置插件列表.
96
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
  // 若菜单未打开则不注入