@tinyforge/dsh-plugin-manager-wj 1.3.2 → 1.3.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/README.md CHANGED
@@ -49,20 +49,23 @@ npm install @tinyforge/dsh-plugin-manager-wj
49
49
  ## Release
50
50
 
51
51
  ```sh
52
- npm test # node --test: 11 checks (views, inject contract, patch shape)
52
+ npm test # node --test: 13 checks (views, inject contract, module id, patch shape)
53
53
  npm publish --access public # writes to registry.npmjs.org
54
54
  ```
55
55
 
56
- The package name is scoped, so publishing a new version needs maintainer access to the `@tinyforge` npm scope. Tag the published commit (`git tag v1.3.2 && git push --tags`) so the GitHub history matches the registry.
56
+ The package name is scoped, so publishing a new version needs maintainer access to the `@tinyforge` npm scope. Tag the published commit (`git tag v1.3.3 && git push --tags`) so the GitHub history matches the registry.
57
57
 
58
58
  ## Development
59
59
 
60
60
  The package is an ES module. `index.js` is the Host entry point and `client.js` contains the browser UI. Localized package metadata is in `locale/`; the UI's full dictionaries are registered in `client.js`.
61
61
 
62
- - `node --test` runs the bundle behavior checks in `tests/client.test.js`: the four views render and switch, the visited views stay mounted, search and enable/disable act on the active view, a secret configuration object stays out of the editor, opening a session loads the skill catalog without a refresh, a renamed skills namespace is discovered, and a transient catalog failure recovers from the inline retry.
62
+ `client.js` registers with `__ModuleLoader__.load({ id: '@tinyforge/dsh-plugin-manager-wj', … })`. That id must be the bare package name, scope included: the client module loader keys each Loader row by package name, and a bundle that registers any other id is reported as loaded without registering its row, which leaves the plugin without a fiber and the settings tab missing entirely. Renaming the package means updating that id in the same commit.
63
+
64
+ - `node --test` runs the bundle behavior checks in `tests/client.test.js`: the four views render and switch, the visited views stay mounted, search and enable/disable act on the active view, a secret configuration object stays out of the editor, opening a session loads the skill catalog without a refresh, a renamed skills namespace is discovered, a transient catalog failure recovers from the inline retry, and the tab still registers on a Host that mounts no optional services.
63
65
  - `node --check client.js` checks the browser bundle syntax.
64
66
  - `tests/patch.test.js` parses `cordis.patch.yml` and asserts no plain scalar starts with a reserved YAML indicator — the scoped package name must stay quoted, or the Host rejects the bundle patch.
65
67
  - `tests/inject.test.js` pins the plugin's `inject` list to the core services only, so a regressed hard-injection of an optional remote fails the suite instead of silently emptying the settings page on some Hosts.
68
+ - `tests/module-id.test.js` asserts the registered module id equals `package.json`'s `name`, so a rename cannot silently detach the browser bundle from its Loader row.
66
69
  - `tests/harness.html` mounts the real `client.js` against fixtures in a browser and asserts the same behavior without Node; open it directly from disk and read the JSON report.
67
70
  - `tests/parse-check.html` is a minimal browser smoke page: it confirms `client.js` parses and registers `settings.plugins.tab`.
68
71
 
package/README.zh.md CHANGED
@@ -49,20 +49,23 @@ npm install @tinyforge/dsh-plugin-manager-wj
49
49
  ## 发布
50
50
 
51
51
  ```sh
52
- npm test # node --test:11 项检查(视图、inject 契约、patch 结构)
52
+ npm test # node --test:13 项检查(视图、inject 契约、模块 id、patch 结构)
53
53
  npm publish --access public # 发布到 registry.npmjs.org
54
54
  ```
55
55
 
56
- 包名带 scope,发布新版本需要 `@tinyforge` npm scope 的维护者权限。发布后给对应提交打 tag(`git tag v1.3.2 && git push --tags`),让 GitHub 历史与 registry 版本对应。
56
+ 包名带 scope,发布新版本需要 `@tinyforge` npm scope 的维护者权限。发布后给对应提交打 tag(`git tag v1.3.3 && git push --tags`),让 GitHub 历史与 registry 版本对应。
57
57
 
58
58
  ## 开发
59
59
 
60
60
  本包使用 ES module。`index.js` 是 Host 入口,`client.js` 是浏览器界面。本地化包元数据位于 `locale/`,界面完整词典在 `client.js` 中注册。
61
61
 
62
- - `node --test` 运行 `tests/client.test.js` 的行为检查:四个视图渲染并可切换、访问过的视图保持挂载、搜索与启停作用于当前视图、密钥配置对象不会进入编辑器、打开会话后无需刷新即加载 Skill 目录、改名后的 skills 命名空间能被发现,以及瞬时目录失败可就地重试恢复。
62
+ `client.js` 以 `__ModuleLoader__.load({ id: '@tinyforge/dsh-plugin-manager-wj', … })` 注册。这个 id 必须是完整包名(含 scope):客户端模块加载器按包名给每个 Loader 行建索引,注册成别的 id 会被判定为"加载了却没有注册自身所在的行",插件因此拿不到 fiber,设置里的标签页完全不出现。改包名时必须在同一次提交里一起改这个 id。
63
+
64
+ - `node --test` 运行 `tests/client.test.js` 的行为检查:四个视图渲染并可切换、访问过的视图保持挂载、搜索与启停作用于当前视图、密钥配置对象不会进入编辑器、打开会话后无需刷新即加载 Skill 目录、改名后的 skills 命名空间能被发现、瞬时目录失败可就地重试恢复,以及 Host 不挂载任何可选服务时标签页仍然注册。
63
65
  - `node --check client.js` 检查浏览器 bundle 语法。
64
66
  - `tests/patch.test.js` 解析 `cordis.patch.yml`,确保没有裸标量以 YAML 保留字符开头 —— 带 scope 的包名必须保持加引号,否则 Host 会拒绝该 bundle patch。
65
67
  - `tests/inject.test.js` 把插件的 `inject` 固定为仅核心服务,这样一旦有人重新硬注入可选 remote,测试就会失败,而不是在某些 Host 上悄悄把设置页清空。
68
+ - `tests/module-id.test.js` 断言注册的模块 id 等于 `package.json` 的 `name`,避免改名后浏览器 bundle 悄悄脱离自己的 Loader 行。
66
69
  - `tests/harness.html` 在浏览器中用测试夹具挂载真实 `client.js`,不依赖 Node 也能断言同一批行为;直接从磁盘打开并读取 JSON 报告。
67
70
  - `tests/parse-check.html` 是最小的浏览器冒烟页:确认 `client.js` 能解析并注册 `settings.plugins.tab`。
68
71
 
package/client.js CHANGED
@@ -1,6 +1,10 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  window.__ModuleLoader__.load({
3
- id: 'dsh-plugin-manager-wj',
3
+ // The module id must be the bare package name: dsh-client-modules attaches a package's
4
+ // browser half to its Loader row by that name and rejects a bundle that registers any other
5
+ // id ("loaded without registering ... via __ModuleLoader__.load"), which leaves the plugin
6
+ // with no fiber and therefore no slot registration.
7
+ id: '@tinyforge/dsh-plugin-manager-wj',
4
8
  factory(require) {
5
9
  const React = require('react')
6
10
  const h = React.createElement
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinyforge/dsh-plugin-manager-wj",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Switchable plugin, configuration, skill and MCP views with health diagnostics, configuration provenance, and tool/MCP inventory for DeepSeek Harness.",
5
5
  "type": "module",
6
6
  "main": "index.js",