dsh-global-todo 0.12.2 → 0.12.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [0.12.3] — 2026-10-21
2
+
3
+ A desktop report explained, and the packaging contract behind it guarded.
4
+
5
+ - **`docs/FAQ.md` §15** answers `Plugin metadata … ENOENT … \locale`: the Host resolves
6
+ `<pkg>/locale/en.json` through the `exports` wildcard (which Node resolves **without** checking
7
+ the file), then scans that directory. A hand-copied `plugins-local` folder that kept `lib/`,
8
+ `package.json` and the patch but dropped `locale/` therefore reports this — while the plugin
9
+ itself still loads. The entry gives both fixes (install from npm, or copy `locale/` and
10
+ `docs/icon.svg` into the local folder) and says the metadata is read once at startup.
11
+ - **`test/manifest.test.mjs` now asserts the contract**: the `./locale/*.json` export exists and
12
+ `locale` is in `files`. Drop either and the plugins page silently loses its title, description
13
+ and icon — the exact failure that shipped as a user-visible error.
14
+
1
15
  ## [0.12.2] — 2026-10-21
2
16
 
3
17
  The description reached the last two places it was still thin.
package/docs/FAQ.md CHANGED
@@ -157,3 +157,34 @@ rm -r "$DSH_HOME/global-todo"
157
157
  失败一定带原因,也记在详情的「最近派发」里;不会静默什么都不做。
158
158
 
159
159
 
160
+ ## 15. 桌面端报 `Plugin metadata … ENOENT … \locale` 是什么?
161
+
162
+ **插件本身已经加载了,这是「显示文字」取不到**,不影响面板和工具。宿主读插件页标题/描述的顺序是:
163
+ 先解析 `<包>/locale/en.json`(走 `exports` 里的 `./locale/*.json`),解析成功后**扫这个目录**,
164
+ 把 `zh.json`/`en.json` 逐个读进来。目录不存在,扫描就抛 ENOENT,于是元信息报错。
165
+
166
+ 也就是说:**你那份本地插件目录缺 `locale/` 文件夹**。常见于把仓库文件夹手动复制到
167
+ `%USERPROFILE%\.dsh\plugins-local\` 时只拷了 `lib`、`package.json`、`cordis.patch.yml`。
168
+
169
+ 修法二选一:
170
+
171
+ 1. **推荐**:别用本地目录,直接装 npm 包(包里有 `locale/en.json`、`locale/zh.json`):
172
+
173
+ ```powershell
174
+ dsh plugin add dsh-global-todo
175
+ ```
176
+
177
+ 2. 保留本地目录,把缺的补齐(`$src` 换成仓库或 npm 包里那份):
178
+
179
+ ```powershell
180
+ $dst = "$env:USERPROFILE\.dsh\plugins-local\全局待办插件"
181
+ $src = "C:\path\to\dsh-global-todo"
182
+ New-Item -ItemType Directory -Force "$dst\locale" | Out-Null
183
+ Copy-Item "$src\locale\*.json" "$dst\locale\" -Force
184
+ Copy-Item "$src\docs\icon.svg" "$dst\docs\" -Force # 图标同理会报错
185
+ ```
186
+
187
+ 然后重启宿主(插件元信息在启动时读一次)。
188
+
189
+ 为什么会这么脆:`exports` 的 `./locale/*.json` 是**通配映射**,Node 解析它时不检查文件是否存在,
190
+ 所以宿主以为文件在、去扫目录,才发现没有。完整安装不会触发;只有手工拷半份才会。
package/lib/index.js CHANGED
@@ -36,7 +36,7 @@ import { createStore, resolveStorePath } from './store.js'
36
36
  import { createTools } from './tools.js'
37
37
 
38
38
  /** Must equal `package.json`'s version; `npm run check` enforces that. */
39
- export const VERSION = '0.12.2'
39
+ export const VERSION = '0.12.3'
40
40
 
41
41
  /** Plugin id. Also the Loader row id in `cordis.patch.yml`. */
42
42
  export const name = 'dsh-global-todo'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-global-todo",
3
- "version": "0.12.2",
3
+ "version": "0.12.3",
4
4
  "icon": "./docs/icon.svg",
5
5
  "description": "Cross-session todo list for DeepSeek Harness: one JSON file a person and an agent both write to, with step plans that ship as a numbered hand-off, session read-back, and a human confirmation before an agent's \"done\" counts.",
6
6
  "type": "module",