@wenaixi/dsh-superpower 7.5.5 → 7.5.7

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
@@ -28,7 +28,7 @@ dsh --profile web --dump-config | grep -A2 "@wenaixi/dsh-superpower"
28
28
  dsh --profile web # skills are available immediately
29
29
  ```
30
30
 
31
- Pin a version by appending `@<version>` (`@wenaixi/dsh-superpower@7.5.5`) or `#v7.5.5`.
31
+ Pin a version by appending `@<version>` (`@wenaixi/dsh-superpower@7.5.7`) or `#v7.5.7`.
32
32
 
33
33
  The old unscoped package name `dsh-superpower` is deprecated (`npm deprecate`); use the scoped one.
34
34
 
@@ -82,7 +82,7 @@ The official registry arbitrates same-layer name collisions by ascending `rank`.
82
82
  Open the `@wenaixi/dsh-superpower` card in the plugin manager; the panel sits at the bottom of its detail page.
83
83
 
84
84
  - One switch per skill. Off means both sides lose it: the model no longer sees it in the available-skill catalog and `skill` tool calls are rejected; you can no longer reach it from slash-command completion or the CLI skill list.
85
- - A single `中文 / English` button sits at the top of the panel, under the intro line, and switches the display language of all 15 skills' names and descriptions (English `description` vs Chinese `description_zh`) at once. The body is always the English original. Both descriptions start with `Superpower Skill:` / `Superpower Skill:`. The choice is per-language (a single `language` preference) and stored in the profile. Until you touch it, descriptions follow the Host UI language (settings language); once you switch it in the panel, the language stays fixed.
85
+ - A single `中文 / English` button sits at the top of the panel, under the intro line, and switches the description language of all 15 skills at once — only the `Superpower Skill:` text users and the model see. The button label and the descriptions follow the preference; the rest of the panel stays in the Host UI language and skill bodies stay the English originals. The body is always the English original. Both descriptions start with `Superpower Skill:` / `Superpower Skill:`. The choice is per-language (a single `language` preference) and stored in the profile. Until you touch it, descriptions follow the Host UI language (settings language); once you switch it in the panel, the language stays fixed.
86
86
  - The panel header also carries enable-all, disable-all, restore-defaults, and a search box. The head line shows this bundle's `provider`, `rank`, `source`, and panel build.
87
87
  - Changes take effect immediately; the running turn is unaffected and the next turn sees the new catalog and language.
88
88
  - State lives in the profile's `cordis.patch.yml` (`disabled` and `language` tables) and travels with the profile.
@@ -190,7 +190,7 @@ Since `v7.0.0` skill names follow upstream naming (no `superpower-` prefix) and
190
190
 
191
191
  `v7.5.0` shipped every skill with an English body (`SKILL.en.md`, upstream original adapted for DSH) beside the Chinese one, added a per-skill `中文 / English` switch, made English descriptions always start with `Superpower Skill: `, routed the same language preference to the model-side catalog and body, and made README.md English by default with a Chinese twin.
192
192
 
193
- `v7.5.5` makes the whole panel follow the language button: the panel's own copy (title, bulk buttons, search box, hints, meta labels) switches with the skill descriptions instead of following the Host UI language.
193
+ `v7.5.7` fixed the panel version label (7.5.6 showed 7.5.4 after the revert) and added a visible note next to the language button: it switches only the skill descriptions, the bodies stay English.: it switches the `Superpower Skill:` text users and the model see, the button label, and nothing else — the rest of the panel stays in the Host UI language, and skill bodies remain the English originals.: the panel's own copy (title, bulk buttons, search box, hints, meta labels) switches with the skill descriptions instead of following the Host UI language.
194
194
 
195
195
  `v7.5.4` republished under a fresh version: the 7.5.3 release hit an npm staged-publish conflict; the code is identical to 7.5.3.
196
196
 
package/README.zh.md CHANGED
@@ -190,7 +190,9 @@ scripts/build-client.mjs # 复制客户端产物后校验内联清单与 sk
190
190
 
191
191
  `v7.5.0` 每个技能新增英文正文(`SKILL.en.md`,取自上游原版并做 DSH 专属化),与中文 `SKILL.md` 并存;面板每行新增「中文 / English」切换,英文描述一律以 `Superpower Skill: ` 开头;同一语言偏好同时决定模型侧目录描述与加载正文;README.md 改为默认英文并新增中文版 README.zh.md。
192
192
 
193
- `v7.5.5` 面板自身文案(标题、批量按钮、搜索框、提示语、meta 标签)改为随语言按钮切换,不再跟随宿主界面语言。
193
+ `v7.5.7` 修复面板版本号显示(7.5.6 误显示 7.5.4)并为语言按钮增加可见作用域说明(仅切换描述、正文保持英文)。
194
+
195
+ `v7.5.6` 语言按钮只控制技能描述(`Superpower Skill:` 后面的文本)与按钮自身文案;面板其余 UI 恢复跟随宿主界面语言,技能正文恒为英文原版。,不再跟随宿主界面语言。
194
196
 
195
197
  `v7.5.4` 改版重发(7.5.3 发布遇 npm staged-publish 冲突,代码内容与 7.5.3 相同)。
196
198
 
package/lib/client.js CHANGED
@@ -34,7 +34,7 @@ window.__ModuleLoader__.load({
34
34
  var SKILL_SOURCE = 'bundled';
35
35
  /* 面板所在的包版本。写死而非从宿主取:浏览器侧读不到 package.json,
36
36
  而版本号正是排查「装的是哪一版、界面是不是这一版」时唯一能直接看到的东西。 */
37
- var PACKAGE_VERSION = '7.5.5';
37
+ var PACKAGE_VERSION = '7.5.7';
38
38
  var NS = 'dsh-superpower';
39
39
  var DISABLED_FIELD = 'disabled';
40
40
  /* v7.3.0 及之前的双侧禁言表。面板写入成功后会把它们 unset,
@@ -83,7 +83,8 @@ window.__ModuleLoader__.load({
83
83
  rank: '优先级',
84
84
  source: '来源',
85
85
  build: '面板版本',
86
- langTitle: '切换描述显示语言:中文 / English',
86
+ langTitle: '切换技能描述语言(中文 / English)。只影响用户与模型看到的技能描述,技能正文始终为英文原版。',
87
+ langNote: '仅切换技能描述(用户与模型可见),技能正文保持英文原版。',
87
88
  };
88
89
 
89
90
  var en = {
@@ -104,7 +105,8 @@ window.__ModuleLoader__.load({
104
105
  rank: 'Priority',
105
106
  build: 'Panel build',
106
107
  source: 'Source',
107
- langTitle: 'Switch description language: Chinese / English',
108
+ langTitle: 'Switch the skill description language (Chinese / English). Affects only the descriptions users and the model see; skill bodies stay the English originals.',
109
+ langNote: 'Switches only the skill descriptions (what users and the model see); skill bodies stay the English originals.',
108
110
  };
109
111
 
110
112
  /* 官方样式注入契约:style[data-plugin-css="<包名>/<文件名>"],宿主据此在
@@ -138,6 +140,7 @@ window.__ModuleLoader__.load({
138
140
  '.spSwLangBtn{margin:0;padding:2px 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-xs);background:transparent;color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xxs-12);cursor:pointer}',
139
141
  '.spSwLangBtn:hover{border-color:var(--dsw-alias-border-l1);color:var(--dsw-alias-label-primary)}',
140
142
  '.spSwLangBtn:disabled{opacity:.5;cursor:default}',
143
+ '.spSwLangNote{margin:0;font:var(--dsw-font-xxs-12);color:var(--dsw-alias-label-tertiary)}',
141
144
  '.spSwSwitchLabel{white-space:nowrap;font:var(--dsw-font-xxs-12);color:var(--dsw-alias-label-secondary)}',
142
145
  '.spSwEmpty{margin:0;padding:24px 0;font:var(--dsw-font-xs-13);color:var(--dsw-alias-label-tertiary);text-align:center}',
143
146
  /* 窄屏:开关区落到文字下方 */
@@ -226,13 +229,10 @@ window.__ModuleLoader__.load({
226
229
  * props.actions 是本面板独占的写操作面。
227
230
  */
228
231
  function SkillSwitchPanel(props) {
232
+ var t = props.t;
229
233
  var form = props.actions.form;
230
234
  var state = props.useSwitches(function (value) { return value; });
231
235
  var hostActive = props.useLocaleActive(function (v) { return v && v.preference === 'en' ? 'en' : 'zh'; });
232
- var language = readLanguage(state.value);
233
- var effective = language === undefined ? hostActive : language;
234
- /* 面板 UI 文案按生效语言选词典(宿主界面语言对技能面板不再生效,与语言按钮一致)。 */
235
- var uiText = function (key) { return (effective === 'zh' ? zh : en)[key]; };
236
236
 
237
237
  var keywordState = React.useState('');
238
238
  var keyword = keywordState[0];
@@ -246,8 +246,8 @@ window.__ModuleLoader__.load({
246
246
 
247
247
  if (state.status !== 'ready') {
248
248
  return h('div', { className: 'spSw' },
249
- h('h4', { className: 'spSwTitle' }, uiText('title')),
250
- h('p', { className: 'spSwIntro' }, uiText('hostUnavailable')));
249
+ h('h4', { className: 'spSwTitle' }, t('title')),
250
+ h('p', { className: 'spSwIntro' }, t('hostUnavailable')));
251
251
  }
252
252
 
253
253
  var value = state.value || {};
@@ -284,76 +284,77 @@ window.__ModuleLoader__.load({
284
284
  h('p', { className: 'spSwDesc' }, skillText(skill)),
285
285
  failure ? h('p', { className: 'spSwErr', role: 'alert' }, failure) : null),
286
286
  h('div', { className: 'spSwSwitch' },
287
- h('span', { className: 'spSwSwitchLabel' }, uiText('invocable')),
287
+ h('span', { className: 'spSwSwitchLabel' }, t('invocable')),
288
288
  h(P.Switch, {
289
289
  checked: on,
290
290
  disabled: busy,
291
- label: uiText('invocable') + ' ' + skill.name,
292
- title: uiText('invocableHint'),
291
+ label: t('invocable') + ' ' + skill.name,
292
+ title: t('invocableHint'),
293
293
  onChange: function (next) {
294
- submit(form, uiText, [skill.name], next ? 'enable' : 'disable', setPending, setFailures);
294
+ submit(form, t, [skill.name], next ? 'enable' : 'disable', setPending, setFailures);
295
295
  },
296
296
  })));
297
297
  });
298
298
 
299
299
  return h('div', { className: 'spSw' },
300
- h('h4', { className: 'spSwTitle' }, uiText('title')),
301
- h('p', { className: 'spSwIntro' }, uiText('intro')),
300
+ h('h4', { className: 'spSwTitle' }, t('title')),
301
+ h('p', { className: 'spSwIntro' }, t('intro')),
302
302
  h('div', { className: 'spSwLangBar' },
303
303
  h('button', {
304
304
  className: 'spSwLangBtn',
305
305
  type: 'button',
306
306
  disabled: !writable,
307
- title: uiText('langTitle'),
307
+ title: t('langTitle'),
308
308
  onClick: function () {
309
309
  var effective = language === undefined ? hostActive : language;
310
- submit(form, uiText, ['language'], 'enable', setPending, setFailures,
310
+ submit(form, t, ['language'], 'enable', setPending, setFailures,
311
311
  [{ op: 'set', path: [LANGUAGE_FIELD], value: effective === 'zh' ? 'en' : 'zh' }]);
312
312
  },
313
- }, (language === undefined ? hostActive : language) === 'zh' ? SP_LANG_EN : SP_LANG_ZH)),
313
+ }, (language === undefined ? hostActive : language) === 'zh' ? SP_LANG_EN : SP_LANG_ZH),
314
+ h('span', { className: 'spSwLangNote' }, t('langNote'))),
314
315
  h('ul', { className: 'spSwMeta' },
315
- h('li', { className: 'spSwMetaItem' }, uiText('provider'), h('code', null, PROVIDER_NAME)),
316
- h('li', { className: 'spSwMetaItem' }, uiText('rank'), h('code', null, String(PROVIDER_RANK))),
317
- h('li', { className: 'spSwMetaItem' }, uiText('source'), h('code', null, SKILL_SOURCE)),
318
- h('li', { className: 'spSwMetaItem' }, uiText('build'), h('code', null, PACKAGE_VERSION))),
316
+ h('li', { className: 'spSwMetaItem' }, t('provider'), h('code', null, PROVIDER_NAME)),
317
+ h('li', { className: 'spSwMetaItem' }, t('rank'), h('code', null, String(PROVIDER_RANK))),
318
+ h('li', { className: 'spSwMetaItem' }, t('source'), h('code', null, SKILL_SOURCE)),
319
+ h('li', { className: 'spSwMetaItem' }, t('build'), h('code', null, PACKAGE_VERSION))),
319
320
  h('div', { className: 'spSwBar' },
320
321
  h(P.Button, {
321
322
  variant: 'outline',
322
323
  size: 'sm',
323
324
  disabled: !writable,
324
- title: uiText('resetHint'),
325
+ title: t('resetHint'),
325
326
  onClick: function () {
326
- submit(form, uiText, allNames, 'enable', setPending, setFailures);
327
+ submit(form, t, allNames, 'enable', setPending, setFailures);
327
328
  },
328
- }, uiText('enableAll')),
329
+ }, t('enableAll')),
329
330
  h(P.Button, {
330
331
  variant: 'outline',
331
332
  size: 'sm',
332
333
  disabled: !writable,
333
- title: uiText('disableAllHint'),
334
+ title: t('disableAllHint'),
334
335
  onClick: function () {
335
- submit(form, uiText, allNames, 'disable', setPending, setFailures);
336
+ submit(form, t, allNames, 'disable', setPending, setFailures);
336
337
  },
337
- }, uiText('disableAll')),
338
+ }, t('disableAll')),
338
339
  h(P.Button, {
339
340
  variant: 'ghost',
340
341
  size: 'sm',
341
342
  disabled: !writable,
342
- title: uiText('resetHint'),
343
+ title: t('resetHint'),
343
344
  onClick: function () {
344
- submit(form, uiText, allNames, 'enable', setPending, setFailures);
345
+ submit(form, t, allNames, 'enable', setPending, setFailures);
345
346
  },
346
- }, uiText('resetAll')),
347
+ }, t('resetAll')),
347
348
  h(P.Input, {
348
349
  className: 'spSwSearch',
349
350
  type: 'search',
350
351
  value: keyword,
351
- placeholder: uiText('search'),
352
- 'aria-label': uiText('search'),
352
+ placeholder: t('search'),
353
+ 'aria-label': t('search'),
353
354
  onChange: function (event) { setKeyword(event.target.value); },
354
355
  })),
355
356
  shown.length === 0
356
- ? h('p', { className: 'spSwEmpty' }, uiText('empty'))
357
+ ? h('p', { className: 'spSwEmpty' }, t('empty'))
357
358
  : h('ul', { className: 'spSwList' }, rows));
358
359
  }
359
360
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenaixi/dsh-superpower",
3
- "version": "7.5.5",
3
+ "version": "7.5.7",
4
4
  "description": "obra/superpowers 的 DSH 移植版:15 个工程纪律技能(中英双语正文)注入 ctx.skills,含技能开关与语言切换面板",
5
5
  "type": "module",
6
6
  "main": "lib/superpowers.js",