dsh-custom-mode 1.13.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 +2 -2
- package/README.md +13 -8
- package/README.zh.md +8 -7
- package/client.js +273 -221
- package/composition.mjs +29 -0
- package/index.mjs +95 -8
- package/locales.mjs +166 -147
- package/package.json +2 -1
- package/postures.mjs +74 -0
- package/preset/postures/chat.en.md +7 -0
- package/preset/postures/chat.zh.md +7 -0
- package/preset/postures/write.en.md +7 -0
- package/preset/postures/write.zh.md +7 -0
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:
|
|
5
|
-
README.zh.md:
|
|
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@
|
|
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@
|
|
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
|
|
404
|
-
24 hours by default)
|
|
405
|
-
hours*. Measured
|
|
406
|
-
|
|
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
|
-
|
|
409
|
-
|
|
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@
|
|
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 发布冷却期影响,可能装到旧版。要这一版请钉 `@
|
|
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@
|
|
303
|
+
dsh plugin --profile web add dsh-custom-mode@2.0.1
|
|
304
304
|
# 然后重启为该 profile 提供服务的 DSH 进程
|
|
305
305
|
```
|
|
306
306
|
|
|
307
|
-
|
|
308
|
-
`dsh plugin add dsh-custom-mode`
|
|
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
|
-
|
|
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
|
播种只补**缺失**的文件,你写过的提示词永远不会被覆盖。
|