@aiwayds/dsh-model-sync 0.2.3 → 0.3.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.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  A dsh (DeepSeek Harness) Cordis plugin that keeps the model catalog of your `llm-pi-ai` provider routes in step with the pi.dev gateway's model listing — written into dsh `settings.yaml` through the official settings seam (`settings.mutate`), with zero patches to dsh internals.
8
8
 
9
+ **Requires dsh >= 0.1.2-rc.1** — this plugin targets the dsh RC/stable line only (CI and releases resolve the newest of the `latest`/`next` dist-tags at runtime). **The alpha line is no longer supported.**
10
+
9
11
  https://github.com/user-attachments/assets/c3f9c8b1-ea5e-470c-b8a8-60a81fc5c20a
10
12
 
11
13
  *A live recording of a dsh session running `/model-sync` (MP4, 1.5× speed) — drop reasons, per-route sync statuses and the change report in action. More demos in the [Demos issue](https://github.com/fan56/dsh-model-sync/issues/1).*
@@ -50,6 +52,18 @@ The package ships `cordis.patch.yml` (wired as `dsh.bundle.patch`), which mounts
50
52
 
51
53
  This plugin ships standalone — install it explicitly with `dsh plugin add @aiwayds/dsh-model-sync` when you want it.
52
54
 
55
+ ## Uninstall
56
+
57
+ ```bash
58
+ dsh plugin remove @aiwayds/dsh-model-sync
59
+ ```
60
+
61
+ The host auto-cleans: the bundles entry is spliced out of the profile and the plugin's patch layer drops with the package, so the sync rounds and the `/model-sync` command simply stop. Three things intentionally stay on disk:
62
+
63
+ 1. **`~/.dsh/models-store.json` — back this file up before purging it.** It holds the catalog cache *plus* your `modelOverrides`: under the store-first invariant the plugin folds overrides into the written models and unsets the settings key, so for a managed route the store can be the **only** copy of your override values. Deleting the file deletes them.
64
+ 2. **Synced model lists in `~/.dsh/settings.yaml`.** The plugin wrote them into the host-owned `llm-pi-ai` namespace (`providers.<route>.models`) through the official settings seam. They persist after removal and remain valid host config — dsh consumes them exactly as if you had written them by hand. Remove those entries by hand if you don't want them.
65
+ 3. **A stale staging file, rarely.** The store's writes go through a temp-file + rename; if a process died mid-write a `~/.dsh/models-store.json.<pid>.tmp` file can remain. It is safe to delete.
66
+
53
67
  ## Usage
54
68
 
55
69
  Configure the plugin under the `model-sync` namespace in `settings.yaml` — every key is optional:
package/README.zh-CN.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  一个 dsh(DeepSeek Harness)Cordis 插件:把 `llm-pi-ai` 各 provider 路由的模型目录与 pi.dev 网关的模型列表保持同步,并通过官方 settings 接缝(`settings.mutate`)写进 dsh 的 `settings.yaml`——对 dsh 内部零补丁。
8
8
 
9
+ **要求 dsh >= 0.1.2-rc.1** — 本插件只跟随 dsh RC/stable 线(CI 与发版在运行时解析 latest/next 中更新的 dist-tag)。**不再支持 alpha 线。**
10
+
9
11
  https://github.com/user-attachments/assets/c3f9c8b1-ea5e-470c-b8a8-60a81fc5c20a
10
12
 
11
13
  *一段 dsh 会话里运行 `/model-sync` 的实录(MP4,1.5× 速度)——丢弃原因、各路由同步状态与变更报告一览。更多 demo 见 [Demos issue](https://github.com/fan56/dsh-model-sync/issues/1)。*
@@ -50,6 +52,18 @@ dsh plugin add @aiwayds/dsh-model-sync
50
52
 
51
53
  本插件独立分发——需要时用 `dsh plugin add @aiwayds/dsh-model-sync` 显式安装即可。
52
54
 
55
+ ## 卸载
56
+
57
+ ```bash
58
+ dsh plugin remove @aiwayds/dsh-model-sync
59
+ ```
60
+
61
+ 宿主会自动清理:bundles 条目会从 profile 中摘除,插件自带的 patch 层随包一起消失,同步轮次与 `/model-sync` 命令就此停止。有三样东西会刻意留在磁盘上:
62
+
63
+ 1. **`~/.dsh/models-store.json`——清除前请先备份这个文件。** 它保存目录缓存**以及**你的 `modelOverrides`:在 store-first 不变式下,插件把覆盖值折叠进写入的 models 并清掉 settings 里的键,因此对受管路由而言 store 可能是覆盖值的**唯一**副本。删掉文件就等于删掉它们。
64
+ 2. **`~/.dsh/settings.yaml` 里已同步的模型列表。** 插件经官方 settings 接缝把它们写进了宿主持有的 `llm-pi-ai` 命名空间(`providers.<route>.models`)。卸载后它们会保留,并且仍是合法的宿主配置——dsh 会照常消费,就像你手写的一样。不想要就手动删除对应条目。
65
+ 3. **极少数情况下的残留暂存文件。** store 的写入走临时文件 + rename;若进程在写入中途死掉,可能留下 `~/.dsh/models-store.json.<pid>.tmp`。直接删除是安全的。
66
+
53
67
  ## 用法
54
68
 
55
69
  在 `settings.yaml` 的 `model-sync` 命名空间下配置本插件——每个键都是可选的:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiwayds/dsh-model-sync",
3
- "version": "0.2.3",
3
+ "version": "0.3.1",
4
4
  "description": "dsh plugin: keep llm-pi-ai provider routes' model lists in step with the pi.dev gateway, written through the official settings seam",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -31,13 +31,14 @@
31
31
  "build": "tsc -p tsconfig.json",
32
32
  "check": "tsc --noEmit -p tsconfig.json",
33
33
  "pretest": "tsc -p tsconfig.json",
34
- "test": "node --test test/live-catalog.test.mjs test/diff.test.mjs test/translate.test.mjs test/writer.test.mjs test/writer-overrides.test.mjs test/remote-catalog.test.mjs test/serviceability.test.mjs test/command.test.mjs test/real-cordis.test.mjs"
34
+ "test": "node --test test/live-catalog.test.mjs test/diff.test.mjs test/translate.test.mjs test/writer.test.mjs test/writer-overrides.test.mjs test/remote-catalog.test.mjs test/serviceability.test.mjs test/command.test.mjs test/real-cordis.test.mjs",
35
+ "smoke": "node scripts/smoke-boot.mjs"
35
36
  },
36
37
  "dependencies": {},
37
38
  "peerDependencies": {
38
39
  "@deepseek-ai/cordis": "^4.0.2",
39
- "@deepseek-ai/dsh-commands": ">=0.1.2-alpha.4",
40
- "@deepseek-ai/dsh-settings": ">=0.1.2-alpha.4",
40
+ "@deepseek-ai/dsh-commands": ">=0.1.2-rc.1",
41
+ "@deepseek-ai/dsh-settings": ">=0.1.2-rc.1",
41
42
  "@deepseek-ai/schemastery": "^3.18.2"
42
43
  },
43
44
  "peerDependenciesMeta": {
@@ -57,8 +58,16 @@
57
58
  "devDependencies": {
58
59
  "@types/node": "^24.0.0",
59
60
  "@deepseek-ai/cordis": "4.0.2",
60
- "@deepseek-ai/dsh-commands": "0.1.2-alpha.4",
61
- "@deepseek-ai/dsh-settings": "0.1.2-alpha.4",
61
+ "@deepseek-ai/dsh-agent": "0.1.2-rc.1",
62
+ "@deepseek-ai/dsh-attachment": "0.1.2-rc.1",
63
+ "@deepseek-ai/dsh-brand": "0.1.2-rc.1",
64
+ "@deepseek-ai/dsh-commands": "0.1.2-rc.1",
65
+ "@deepseek-ai/dsh-invariants": "0.1.2-rc.1",
66
+ "@deepseek-ai/dsh-llm": "0.1.2-rc.1",
67
+ "@deepseek-ai/dsh-scope": "0.1.2-rc.1",
68
+ "@deepseek-ai/dsh-session": "0.1.2-rc.1",
69
+ "@deepseek-ai/dsh-settings": "0.1.2-rc.1",
70
+ "@deepseek-ai/dsh-typert-protocol": "0.1.2-rc.1",
62
71
  "@deepseek-ai/schemastery": "3.18.2",
63
72
  "typescript": "^5.9.0"
64
73
  },
@@ -70,5 +79,11 @@
70
79
  "author": "fliu56",
71
80
  "publishConfig": {
72
81
  "access": "public"
82
+ },
83
+ "pnpm": {
84
+ "overrides": {
85
+ "@deepseek-ai/dsh-system-prompt": "0.1.2-rc.1",
86
+ "@deepseek-ai/dsh-session-projection": "0.1.2-rc.1"
87
+ }
73
88
  }
74
89
  }