@aiwayds/dsh-model-sync 0.3.0 → 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
@@ -52,6 +52,18 @@ The package ships `cordis.patch.yml` (wired as `dsh.bundle.patch`), which mounts
52
52
 
53
53
  This plugin ships standalone — install it explicitly with `dsh plugin add @aiwayds/dsh-model-sync` when you want it.
54
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
+
55
67
  ## Usage
56
68
 
57
69
  Configure the plugin under the `model-sync` namespace in `settings.yaml` — every key is optional:
package/README.zh-CN.md CHANGED
@@ -52,6 +52,18 @@ dsh plugin add @aiwayds/dsh-model-sync
52
52
 
53
53
  本插件独立分发——需要时用 `dsh plugin add @aiwayds/dsh-model-sync` 显式安装即可。
54
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
+
55
67
  ## 用法
56
68
 
57
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.3.0",
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,7 +31,8 @@
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": {