dsh-custom-mode 2.0.0 → 2.0.1

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.i18n.yaml CHANGED
@@ -1,5 +1,5 @@
1
1
  # 双语配对一致性记录:两侧在「上次确认一致」时的 git blob 哈希。
2
2
  # 两份文档权威相同——改完任意一侧,请把另一侧也改掉,然后重新记录:
3
3
  # node tools/verify-translation-pairing.mjs --write
4
- README.md: 43c5793fdcb088e78c63fcdb7732eb308f896ff4
5
- README.zh.md: 25677b1fd67dbaccae80fa9acb7a8a9b87477978
4
+ README.md: fc8e0127ea50312137654b47ac422a9ae826f5f5
5
+ README.zh.md: 29f389066c64b7135438f18b07525189d5b3ca86
package/README.md CHANGED
@@ -56,7 +56,7 @@ One command installs everything — the settings-page plugin, and the preset it
56
56
  activation:
57
57
 
58
58
  ```sh
59
- dsh plugin --profile web add dsh-custom-mode@2.0.0 # pin the version to get this one for sure
59
+ dsh plugin --profile web add dsh-custom-mode@2.0.1 # pin the version to get this one for sure
60
60
  # A bare `add dsh-custom-mode` is subject to pnpm's release cooldown (`minimumReleaseAge`, 1 day by
61
61
  # default): for hours after a release it can silently install an OLDER version — measured: a bare
62
62
  # install 38 minutes after 1.3.0 shipped landed on 1.0.3. Check what you got with `npm ls
@@ -396,17 +396,22 @@ installing again — your data is not touched:
396
396
 
397
397
  ```sh
398
398
  # the pinned form: what you ask for is what you get
399
- dsh plugin --profile web add dsh-custom-mode@2.0.0
399
+ dsh plugin --profile web add dsh-custom-mode@2.0.1
400
400
  # then restart the DSH process that serves the web profile
401
401
  ```
402
402
 
403
- **Do not install by bare name if you want this release.** pnpm applies a release cooldown (`minimumReleaseAge`,
404
- 24 hours by default) and a bare `dsh plugin add dsh-custom-mode` resolves to *the newest version older than 24
405
- hours*. Measured on a clean machine while 1.9.0 was latest: the bare command installed **1.0.1**. Pinning the
406
- version bypasses the cooldown, which is why the command above carries `@`.
403
+ **Do not install by bare name, and do not use `@latest`.** pnpm applies a release cooldown
404
+ (`minimumReleaseAge`, 24 hours by default). A bare `dsh plugin add dsh-custom-mode` resolves to *the newest
405
+ version older than 24 hours*. Measured: while npm `latest` was 1.12.2 and six minutes old, `@latest` installed
406
+ 1.11.6. Pin the exact version.
407
407
 
408
- **How to know what you are running**: the settings page shows the installed version at the bottom (Plugin version).
409
- Compare it with `npm view dsh-custom-mode version`.
408
+ Each exact pin appends a `minimumReleaseAgeExclude` line in the profile's `pnpm-workspace.yaml`. pnpm 11.7.0
409
+ honours only the first line that matches the package name ([pnpm#12463](https://github.com/pnpm/pnpm/issues/12463)).
410
+ Keep one line, `dsh-custom-mode`, not a list of versions. This plugin does not edit that file. If install fails
411
+ with `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`, merge the list to that one line and run the install again:
412
+ `node_modules` may already show the new version while `package.json` still names the old one.
413
+
414
+ **How to know the upgrade worked**: restart dsh, then read the version at the bottom of this settings page.
410
415
 
411
416
  **What an update does not touch**: `$DSH_HOME/.agent-presets/<your assistants>/` — `prompt.md`, `preset.yml` and
412
417
  your row switches are yours. Seeding only fills in *missing* files, so a prompt you wrote is never overwritten.
package/README.zh.md CHANGED
@@ -49,7 +49,7 @@ base mode / plugin switches / multi-assistant / multi-persona。
49
49
  一条命令装完——设置页插件,以及它在首次激活时自动播种的 preset:
50
50
 
51
51
  ```sh
52
- dsh plugin --profile web add dsh-custom-mode@2.0.0 # 钉版本才能确定拿到这一版
52
+ dsh plugin --profile web add dsh-custom-mode@2.0.1 # 钉版本才能确定拿到这一版
53
53
  # 不带版本号会受 pnpm 的发布冷却期影响(`minimumReleaseAge`,默认一天):发布后数小时内按名安装
54
54
  # 可能**静默装到旧版** —— 实测 1.3.0 发布 38 分钟后按名安装装到了 1.0.3。用 profile 里的
55
55
  # `npm ls dsh-custom-mode` 核对实际装到的版本,或像上面那样钉版本。
@@ -68,7 +68,7 @@ dsh `0.1.6-alpha.2` 起有插件管理页:**侧边栏 → 插件 → 添加插
68
68
 
69
69
  | 输入 | 填什么 | 说明 |
70
70
  | --- | --- | --- |
71
- | **包名** | `dsh-custom-mode` | 受 pnpm 发布冷却期影响,可能装到旧版。要这一版请钉 `@2.0.0` |
71
+ | **包名** | `dsh-custom-mode` | 受 pnpm 发布冷却期影响,可能装到旧版。要这一版请钉 `@2.0.1` |
72
72
  | **GitHub 仓库地址** | `https://github.com/BOWLUNA/dsh-custom-mode` | 指向**仓库根**即可 |
73
73
  | **本地插件目录** | `<你 clone 的路径>` | 就是仓库根 —— 仓库根**本身**就是发布包 |
74
74
 
@@ -300,15 +300,16 @@ MIT
300
300
 
301
301
  ```sh
302
302
  # 钉版本的写法:要哪版就是哪版
303
- dsh plugin --profile web add dsh-custom-mode@2.0.0
303
+ dsh plugin --profile web add dsh-custom-mode@2.0.1
304
304
  # 然后重启为该 profile 提供服务的 DSH 进程
305
305
  ```
306
306
 
307
- **想要这一版就别用不带版本号的安装。** pnpm 有发布冷却期(`minimumReleaseAge`,默认 24 小时),
308
- `dsh plugin add dsh-custom-mode` 会解析成**"超过 24 小时的最新版"**。实测:在 1.9.0 已是 latest 的干净机器上,
309
- 不带版本号的命令装到的是 **1.0.1**。钉版本可以绕过冷却期,所以上面的命令带 `@`。
307
+ **不要按裸名安装,也不要用 `@latest`。** pnpm 有发布冷却期(`minimumReleaseAge`,默认 24 小时)。
308
+ `dsh plugin add dsh-custom-mode` 会解析成**超过 24 小时的最新版**。实测:npm 上 `latest` 已是发布 6 分钟的 1.12.2 时,`@latest` 装成了 1.11.6。请钉精确版本。
310
309
 
311
- **怎么知道自己在跑哪一版**:设置页底部显示已安装版本(「插件版本」),与 `npm view dsh-custom-mode version` 对照即可。
310
+ 每次钉精确版本,pnpm 都会在 profile 的 `pnpm-workspace.yaml` 里追加一条 `minimumReleaseAgeExclude`。pnpm 11.7.0 只认第一条命中包名的记录([pnpm#12463](https://github.com/pnpm/pnpm/issues/12463))。这个包只留一条 `dsh-custom-mode`,不要留一串版本号。本插件不改这个文件。若安装报 `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`,把列表收成那一条再装一次:`node_modules` 里可能已经是新版本,而 `package.json` 仍写着旧版本。
311
+
312
+ **怎样算升级成功**:重启 dsh,再看本设置页底部的版本号。
312
313
 
313
314
  **更新不会碰的东西**:`$DSH_HOME/.agent-presets/<你的助手>/` —— `prompt.md`、`preset.yml` 与你逐行拨过的开关都属于你。
314
315
  播种只补**缺失**的文件,你写过的提示词永远不会被覆盖。
package/client.js CHANGED
@@ -208,8 +208,8 @@ try {
208
208
  "status.enabled": "已启用",
209
209
  "status.disabled": "已停用",
210
210
  "status.changed": "已改",
211
- "tag.essential": "基础能力",
212
- "tag.followPlatform": "跟随平台",
211
+ "tag.essential": "核心",
212
+ "tag.followPlatform": "随平台",
213
213
  "btn.save": "保存",
214
214
  "btn.saving": "处理中…",
215
215
  "btn.reload": "重新读取",
@@ -442,7 +442,7 @@ try {
442
442
  "status.disabled": "Disabled",
443
443
  "status.changed": "changed",
444
444
  "tag.essential": "Core",
445
- "tag.followPlatform": "follows platform",
445
+ "tag.followPlatform": "Platform",
446
446
  "btn.save": "Save",
447
447
  "btn.saving": "Working…",
448
448
  "btn.reload": "Reload",
@@ -731,7 +731,9 @@ try {
731
731
  * grids, the status line).
732
732
  */
733
733
  const CSS = [
734
- ".cpfe{--g:8px;display:flex;flex-direction:column;gap:24px;width:100%;max-width:900px;box-sizing:border-box;padding-bottom:16px;font:inherit;color:inherit}",
734
+ ".cpfe{--g:8px;display:flex;flex-direction:column;gap:16px;width:100%;max-width:900px;box-sizing:border-box;padding-bottom:16px;font:inherit;color:inherit}",
735
+ ".cpfe > section{padding-top:16px;border-top:1px solid var(--dsw-alias-border-l1)}",
736
+ ".cpfe > section:first-child{padding-top:0;border-top:0}",
735
737
  // 分节标题:度量抄官方设置面板里的同类文本。
736
738
  // 实测(**0.1.7-rc.2 与 0.2.0-rc.2 各量一次,结论相同**):官方 `_title`(设置行标题)
737
739
  // 与 `groupTitle`(插件页分组标题)都是 14px/22px **w400**;官方唯一的 14px w500 是插件
@@ -745,11 +747,13 @@ try {
745
747
  ".cpfe-hint-line{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary)}",
746
748
  ".cpfe-hint-detail{margin:0;font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary)}",
747
749
  // 描述:多行、自适应高度(没有多行输入组件,所以用 textarea + 同一批语义变量)
748
- ".cpfe-desc{box-sizing:border-box;min-height:56px;max-height:160px;resize:vertical;padding:8px 12px;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:20px;margin-bottom:8px}",
750
+ ".cpfe-desc{box-sizing:border-box;min-height:40px;max-height:120px;resize:vertical;padding:8px 12px;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:20px;margin-bottom:0}",
749
751
  ".cpfe-base-pending{color:var(--dsw-alias-state-warn-primary)}",
750
752
  ".cpfe-note{display:block;margin:8px 0 0;font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary)}",
751
753
  ".cpfe-mono{display:block;margin:0;font-family:var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}",
752
754
  ".cpfe-pills{display:flex;flex-wrap:wrap;gap:6px;align-items:center}",
755
+ ".cpfe-pills > *{flex:0 0 auto;white-space:nowrap}",
756
+ ".cpfe-pills button{white-space:nowrap}",
753
757
  ".cpfe-picker{display:flex;align-items:center;gap:8px;margin:2px 0 4px}",
754
758
  // 壳的菜单浮层靠一个独立的 backing 元素上色(实测在 0.1.7-rc.2 + headless 下那块是透明的,
755
759
  // 文字会"压"在下面的输入框上)。用官方 token 显式补一层底色,真实浏览器与 headless 一致。
@@ -766,7 +770,7 @@ try {
766
770
  ".cpfe-row-head{font-size:14px;line-height:22px;color:var(--dsw-alias-label-primary)}",
767
771
  ".cpfe-row-switch{flex:0 0 auto}",
768
772
  ".cpfe-row-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}",
769
- ".cpfe-row-note{min-height:18px;font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",
773
+ ".cpfe-row-note{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",
770
774
  ".cpfe-row-toggle{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:var(--dsw-radius-sm);background:transparent;color:var(--dsw-alias-label-secondary);cursor:pointer}",
771
775
  ".cpfe-row-toggle:hover{background:var(--dsw-alias-bg-layer-2)}",
772
776
  ".cpfe-row-open{border-color:var(--dsw-alias-border-l2)}",
@@ -785,10 +789,10 @@ try {
785
789
  ".cpfe-line:last-child{border-bottom:0}",
786
790
  ".cpfe-group{display:flex;flex-direction:column;min-width:0}",
787
791
  ".cpfe-kids{display:flex;flex-direction:column;margin-left:0;padding-left:16px}",
792
+ ".cpfe-row-meta{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}",
793
+ ".cpfe-row-badges{display:flex;align-items:center;gap:4px;flex:0 1 auto;min-width:0}",
788
794
  ".cpfe-row{display:flex;gap:12px;align-items:center;box-sizing:border-box;min-height:0;padding:16px 0;border:0;border-radius:0;background:none}",
789
- ".cpfe-row-meta{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}",
790
- ".cpfe-row-badges{display:flex;align-items:center;gap:6px;flex-wrap:wrap;height:18px}",
791
- ".cpfe-editor{box-sizing:border-box;width:100%;min-height:180px;resize:vertical;padding:12px;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:13px;line-height:20px}",
795
+ ".cpfe-editor{box-sizing:border-box;width:100%;min-height:120px;resize:vertical;padding:12px;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:13px;line-height:20px}",
792
796
  ".cpfe-bar{display:flex;align-items:center;gap:var(--g);flex-wrap:wrap;margin-top:8px}",
793
797
  ".cpfe-disclosure{appearance:none;display:inline-flex;align-items:center;gap:6px;margin:8px 0 0;padding:0;border:0;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:14px;line-height:22px;font-weight:400;cursor:pointer}",
794
798
  ".cpfe-filter{box-sizing:border-box;width:100%;height:36px;margin:0 0 8px;padding:0 12px;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px}",
@@ -1023,11 +1027,6 @@ try {
1023
1027
  react.createElement(
1024
1028
  "div",
1025
1029
  { className: "cpfe-row-badges" },
1026
- react.createElement(
1027
- A.Tag,
1028
- { tone: effective ? "success" : "neutral" },
1029
- effective ? t("status.enabled") : t("status.disabled"),
1030
- ),
1031
1030
  row.essential ? react.createElement(A.Tag, { tone: "warning" }, t("tag.essential")) : null,
1032
1031
  row.disabledExpression !== null && row.disabledExpression !== undefined
1033
1032
  ? react.createElement(A.Tag, { tone: "outline" }, t("tag.followPlatform"))
@@ -1035,9 +1034,9 @@ try {
1035
1034
  changed ? react.createElement(A.Tag, { tone: "info" }, t("status.changed")) : null,
1036
1035
  ),
1037
1036
  ),
1038
- // 折叠时只留一行说明(超出截断,悬停给全文)。**没有说明就留空**:裸露的行 id
1039
- // 是开发者信息,已经在「详情」里 —— 之前它作为副标题占了每行一行。
1040
- react.createElement("span", { className: "cpfe-row-note", title: note ?? "" }, note ?? ""),
1037
+ note
1038
+ ? react.createElement("span", { className: "cpfe-row-note", title: note }, note)
1039
+ : null,
1041
1040
  ),
1042
1041
  react.createElement(
1043
1042
  "button",
@@ -1924,6 +1923,7 @@ try {
1924
1923
  ),
1925
1924
  )
1926
1925
  : null,
1926
+ createGroup,
1927
1927
  typeof (assistants.find((item) => item.id === selected) || {}).broken === "string"
1928
1928
  ? react.createElement("p", { className: "cpfe-note" }, t("assistant.brokenHint"))
1929
1929
  : null,
@@ -2178,11 +2178,11 @@ try {
2178
2178
  variant: "outline",
2179
2179
  size: "sm",
2180
2180
  disabled: busy || draft.historyPick === "",
2181
+ title: t("history.hint"),
2181
2182
  onClick: loadVersion,
2182
2183
  },
2183
2184
  t("history.load"),
2184
2185
  ),
2185
- react.createElement("span", { className: "cpfe-history-hint" }, t("history.hint")),
2186
2186
  ),
2187
2187
  ),
2188
2188
  ]
@@ -2322,7 +2322,6 @@ try {
2322
2322
  : null,
2323
2323
  )
2324
2324
  : null,
2325
- createGroup,
2326
2325
  // The confirmation is a portal: rendering it here keeps every piece of this page's
2327
2326
  // state in one component.
2328
2327
  renderable(A.RiskConfirmation) && editorReady
package/locales.mjs CHANGED
@@ -174,8 +174,8 @@ export const zh = {
174
174
  'status.enabled': '已启用',
175
175
  'status.disabled': '已停用',
176
176
  'status.changed': '已改',
177
- 'tag.essential': '基础能力',
178
- 'tag.followPlatform': '跟随平台',
177
+ 'tag.essential': '核心',
178
+ 'tag.followPlatform': '随平台',
179
179
 
180
180
  'btn.save': '保存',
181
181
  'btn.saving': '处理中…',
@@ -430,7 +430,7 @@ export const en = {
430
430
  'status.disabled': 'Disabled',
431
431
  'status.changed': 'changed',
432
432
  'tag.essential': 'Core',
433
- 'tag.followPlatform': 'follows platform',
433
+ 'tag.followPlatform': 'Platform',
434
434
 
435
435
  'btn.save': 'Save',
436
436
  'btn.saving': 'Working…',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-custom-mode",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Custom modes and custom prompts for DeepSeek Harness (dsh): edit a mode's system prompt on the settings page (it takes effect on the next model step), pick its base mode, switch plugin rows one by one, and keep several assistants side by side — coding, chat or roleplay (RP) personas (multi-mode / multi-agent).",
5
5
  "license": "MIT",
6
6
  "type": "module",