dsh-mc-art-panel 0.1.2 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +42 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -26,6 +26,48 @@ dsh plugin --profile web add /path/to/dsh-mc-art/panel # 或 npm 上的包名
26
26
  name: dsh-mc-art-panel
27
27
  ```
28
28
 
29
+ ## 这个包带什么
30
+
31
+ 装一个包,面板、模式、两个 skill 一起到位——不需要再跑仓库里的安装器,也不会往你的
32
+ 用户目录写任何东西:
33
+
34
+ ```
35
+ panel/ 包根
36
+ ├── lib/ 宿主与客户端(由 build.mjs 从 tools/mcart-plugin/ 生成)
37
+ ├── cordis.patch.yml ① 把面板插进组合 ② 把包内预设目录注册成 agent-presets 的一个 root
38
+ └── preset/mc-studio/ 「MC 模组工作室」模式
39
+ ├── agent.cordis.yml 预设的宿主组合(自带 skill-filesystem 行)
40
+ ├── preset.yml 名字与说明
41
+ └── skills/ 随预设走的 skill:mc-mod、mc-art
42
+ ```
43
+
44
+ 两处机制,都照 DSH 出厂预设的做法:
45
+
46
+ - **模式**:`cordis.patch.yml` 给 `agent-presets` 那一行加了一个 root(`trust: system`),
47
+ 路径用 `!!js` 从 `baseUrl` 算 —— 在 profile 组合里 **`baseUrl` 就是 profile 目录**(实测),
48
+ 所以 `node_modules/dsh-mc-art-panel/preset` 正好落在装好的包上。
49
+ - **skill**:预设自己带 `skills/`,用
50
+ `process.getBuiltinModule('node:url').fileURLToPath(new URL('skills/', baseUrl))` 定位
51
+ (预设组合里 `baseUrl` 是**预设自己的目录**)。这正是出厂 `cordis` 预设带它那两份
52
+ composition skill 的方式;web 组合里基础的 `skill-filesystem` 行是 disabled 的,
53
+ **本地 skill 归预设管**。
54
+
55
+ `cert`:`mc-art` 是独立仓库(有自己的历史),这里放的是它的一份**快照**(发布时从克隆复制,
56
+ 约 2.9 MB)。想跟上游最新:跑仓库里的 `install.mjs`,它会把 mc-art clone/更新到
57
+ `~/.dsh/skills/mc-art`;`~/.dsh/skills` 是默认 skill 根,两边不会冲突(同名时预设层优先)。
58
+
59
+ 怎么验(本机真跑过):用 DSH 自己的发现逻辑扫装好的包 ——
60
+
61
+ ```bash
62
+ # 在某个装了这个包的 profile 里
63
+ node -e 'import("/…/@deepseek-ai/dsh-agent-presets/lib/index.js").then(async (m) => {
64
+ const r = await m.discoverPresets([{ path: "/…/profiles/<名>/node_modules/dsh-mc-art-panel/preset", trust: "system" }],
65
+ new URL("file:///…/@deepseek-ai/dsh/"))
66
+ console.log(r.map((p) => p.id + " / " + p.name + " / broken=" + (p.broken ?? "no")).join("\n"))
67
+ })'
68
+ # → mc-studio / MC 模组工作室 / broken=no
69
+ ```
70
+
29
71
  ## 同一份源码,两种送达
30
72
 
31
73
  `lib/` 是**生成物**(`node build.mjs`),来源是仓库里的 `tools/mcart-plugin/{host,client}.js`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mc-art-panel",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "MC 资产面板 + 「MC 模组工作室」模式 + mc-mod skill:3D+物品栏、像素/结构编辑器、@ 提意见、GameTest 判定闭环",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",