dsh-calibguard 0.2.4 → 0.2.5

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.
Files changed (3) hide show
  1. package/README.en.md +24 -13
  2. package/README.md +24 -13
  3. package/package.json +1 -1
package/README.en.md CHANGED
@@ -93,21 +93,34 @@ DSH desktop → Settings → **Add plugin**, paste any one of the following (res
93
93
  |---|---|---|
94
94
  | **GitHub repository URL** (recommended) | `https://github.com/maomitgd2006/DSH_CG` | Fetches the source and registers the bundle in the current profile |
95
95
  | **Local directory path** | `<path to this package>` (e.g. `/opt/dsh-calibguard`) | For a local clone / extracted copy |
96
- | Package name | `dsh-calibguard` | ✅ **Published on npm** (latest v0.2.1); just enter the package name |
96
+ | **Package name** | `dsh-calibguard` | ✅ **Published on npm**; just enter the package name (installs npm `latest`) |
97
97
 
98
98
  > Equivalent CLI (verified: after install DSH automatically appends the package to the profile's
99
99
  > `dsh.profile.bundles`):
100
100
  >
101
101
  > ```powershell
102
- > dsh plugin --profile <profile> add https://github.com/maomitgd2006/DSH_CG
103
- > dsh plugin --profile <profile> add file:<absolute path to this package>
102
+ > dsh plugin --profile <profile> add dsh-calibguard # npm package (recommended)
103
+ > dsh plugin --profile <profile> add https://github.com/maomitgd2006/DSH_CG # GitHub source
104
+ > dsh plugin --profile <profile> add file:<absolute path to this package> # local directory
104
105
  > ```
105
106
  >
106
- > Published on npm: <https://www.npmjs.com/package/dsh-calibguard> (`npm i dsh-calibguard` also works).
107
+ > npm package page: <https://www.npmjs.com/package/dsh-calibguard>
107
108
 
108
109
  **Whichever way you install it**, the first run prepares the engine automatically (next section) — no manual setup needed.
109
110
 
110
- ### Option A — source mode (a `file://` loader row, no install)
111
+ ### Option A — install via the CLI (npm package; for non-desktop / scripted setups)
112
+
113
+ ```powershell
114
+ dsh plugin --profile <profile> add dsh-calibguard
115
+ ```
116
+
117
+ Then insert the loader row in the profile's `cordis.patch.yml` with `name: dsh-calibguard`
118
+ (this package ships its own `cordis.patch.yml`, which is applied automatically as a bundle).
119
+
120
+ > The `desktop` profile is managed exclusively by the Electron app — CLI refuses it. Desktop users
121
+ > should use "Option 0", or the `file://` row in "Option B".
122
+
123
+ ### Option B — source mode (a `file://` loader row, for local development / offline use)
111
124
 
112
125
  Append to the profile's `cordis.patch.yml` (replace the path with yours):
113
126
 
@@ -127,14 +140,11 @@ The `insert` path is rewritten to a `file://` URL by DSH. On desktop the profile
127
140
  Optional: `node scripts/link-dsh.mjs` junctions DSH's own `@deepseek-ai/*` packages into this package so
128
141
  the optional `defineTool` / Config schema support is active (everything still works without it).
129
142
 
130
- ### Option B — install into a profile
131
-
132
- ```powershell
133
- dsh plugin --profile <profile> add file:<absolute path to this package>
134
- ```
143
+ ### Option C — release archive (offline / no npm)
135
144
 
136
- Then insert the loader row as above, using the package name `dsh-calibguard` as `name`.
137
- (The `desktop` profile is managed exclusively by the Electron app — desktop users must use Option A.)
145
+ Download `dsh-calibguard-<version>.zip` (~100 KB, no `test/`) from
146
+ [Releases](https://github.com/maomitgd2006/DSH_CG/releases/latest), extract it to a fixed directory,
147
+ then point the `name` in "Option B" at `<extracted dir>/lib/index.js`.
138
148
 
139
149
  ### Verify
140
150
 
@@ -245,7 +255,8 @@ DSH_CG/
245
255
  ├── bridge/ Python bridge: persistent child process, line-delimited JSON protocol
246
256
  ├── cordis.patch.yml Bundle patch (inserts the loader row)
247
257
  ├── scripts/ link-dsh (dev-time junction), bridge-selftest (engine self-check)
248
- ├── test/ node --test (87 cases; auto-skip when the engine env is missing)
258
+ ├── test/ node --test (95 cases; auto-skip when the engine env is missing)
259
+ ├── .github/workflows/ publish.yml: npm trusted publishing (OIDC, optional)
249
260
  └── docs/ configuration, performance, troubleshooting, plugin contract, design notes
250
261
  ```
251
262
 
package/README.md CHANGED
@@ -85,20 +85,33 @@ DSH 桌面版 → 设置 → **添加插件**,输入框里填以下任意一
85
85
  |---|---|---|
86
86
  | **GitHub 仓库地址**(推荐) | `https://github.com/maomitgd2006/DSH_CG` | 自动拉取源码并登记到当前 profile 的 bundle |
87
87
  | **本地目录路径** | `<你的插件目录>`(例:`D:\code\dsh-calibguard`) | 已 clone / 解压到本地时用 |
88
- | 包名 | `dsh-calibguard` | ✅ **已发布到 npm**(最新 v0.2.1);直接输包名即可 |
88
+ | **包名** | `dsh-calibguard` | ✅ **已发布到 npm**,直接输包名即可(自动装 npm 上的 latest) |
89
89
 
90
90
  > 等价命令行(已实测:安装后 DSH 会自动把包加进 profile 的 `dsh.profile.bundles`):
91
91
  >
92
92
  > ```powershell
93
- > dsh plugin --profile <profile> add https://github.com/maomitgd2006/DSH_CG
94
- > dsh plugin --profile <profile> add file:<本包绝对路径>
93
+ > dsh plugin --profile <profile> add dsh-calibguard # npm 包(推荐)
94
+ > dsh plugin --profile <profile> add https://github.com/maomitgd2006/DSH_CG # GitHub 源码
95
+ > dsh plugin --profile <profile> add file:<本包绝对路径> # 本地目录
95
96
  > ```
96
97
  >
97
- > 包名已发布:<https://www.npmjs.com/package/dsh-calibguard>(`npm i dsh-calibguard` 亦可)。
98
+ > npm 包页:<https://www.npmjs.com/package/dsh-calibguard>
98
99
 
99
100
  **无论用哪种方式**,装好后首次运行都不需要手动装引擎——插件会自动准备(见下一节)。
100
101
 
101
- ### 方式 A:源码方式(`file://` 行,无需安装)
102
+ ### 方式 A:命令行安装(npm 包,适合非桌面版 / 脚本化)
103
+
104
+ ```powershell
105
+ dsh plugin --profile <profile> add dsh-calibguard
106
+ ```
107
+
108
+ 之后同样在 profile 的 `cordis.patch.yml` 里插一行,`name` 直接写包名 `dsh-calibguard`
109
+ (本包自带的 `cordis.patch.yml` 会自动把插件行叠加进配置树)。
110
+
111
+ > `desktop` profile 被 Electron 独占,CLI 拒绝管理它 —— 桌面版请用「方式 0」,
112
+ > 或「方式 B」的 `file://` 行。
113
+
114
+ ### 方式 B:源码方式(`file://` 行,适合本地开发 / 离线)
102
115
 
103
116
  在 profile 的 `cordis.patch.yml` 末尾追加(路径改成你的实际位置):
104
117
 
@@ -118,14 +131,11 @@ DSH 桌面版 → 设置 → **添加插件**,输入框里填以下任意一
118
131
  可选:`node scripts/link-dsh.mjs` 把 DSH 自带的 `@deepseek-ai/*` 以目录联接挂到本包,让
119
132
  `defineTool` / Config 结构校验这两个可选能力生效(不做也能跑)。
120
133
 
121
- ### 方式 B:安装进 profile
122
-
123
- ```powershell
124
- dsh plugin --profile <profile> add file:<本包绝对路径>
125
- ```
134
+ ### 方式 C:发行包(离线 / 不想用 npm)
126
135
 
127
- 之后同样在 patch 里插一行,`name` 可以直接写包名 `dsh-calibguard`。
128
- (`desktop` profile 被 Electron 独占,CLI 拒绝管理,桌面版只能走方式 A。)
136
+ 从 [Releases](https://github.com/maomitgd2006/DSH_CG/releases/latest) 下载
137
+ `dsh-calibguard-<版本>.zip`(约 100 KB,不含 `test/`),解压到一个固定目录,然后按「方式 B」
138
+ 把 `name` 指向解压目录下的 `lib/index.js` 即可。
129
139
 
130
140
  ### 验证
131
141
 
@@ -234,7 +244,8 @@ DSH_CG/
234
244
  ├── bridge/ Python 桥接:常驻子进程,行式 JSON 协议,复用引擎
235
245
  ├── cordis.patch.yml 组合包 patch(把插件行插进 profile 配置树)
236
246
  ├── scripts/ link-dsh(开发期挂包)、bridge-selftest(引擎自检)
237
- ├── test/ node --test(87 个用例;缺引擎环境时自动 skip)
247
+ ├── test/ node --test(95 个用例;缺引擎环境时自动 skip)
248
+ ├── .github/workflows/ publish.yml:npm 可信发布(OIDC,可选)
238
249
  └── docs/ 配置全表、性能、排错、插件契约、实现决策
239
250
  ```
240
251
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-calibguard",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },