made-bridge 0.3.3 → 0.3.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "made-bridge",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "码得(made)独立语音编程设备的电脑侧桥接器:工作台 API、设备接口、任务调度与插件运行时。一条命令启动,配合 ESP32 固件使用,源码在 github.com/jobop/made。",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -259,12 +259,14 @@ export function readSprite(packageDir) {
259
259
  const raw = readManifestFile(spriteDir);
260
260
  if (!raw) return null;
261
261
  const manifest = validateManifest(raw);
262
- // 引用完整性:目录里的 PNG 必须全部被 manifest 层引用、GIF 必须被某个
263
- // GIF 动作引用,帮开发者抓住文件名拼写错误。
264
- const gifReferenced = new Set();
262
+ // 引用完整性只做提示不做拒绝(2026-10-20 用户拍板):目录里未被 manifest
263
+ // 引用的 PNG/GIF 属于换绑/改形象后忘记删的旧素材,拒整包会让助手形象
264
+ // 整体加载不到(雪球实锤),代价远大于死重。清理责任放在 made-kit skill
265
+ // 层软性强调。manifest 引用不存在的文件(拼写错)仍是硬错误(下方 stat)。
266
+ const gifReferencedHint = new Set();
265
267
  if (manifest.actions) {
266
268
  for (const action of Object.values(manifest.actions)) {
267
- if (action && typeof action.gif === 'string') gifReferenced.add(action.gif);
269
+ if (action && typeof action.gif === 'string') gifReferencedHint.add(action.gif);
268
270
  }
269
271
  }
270
272
  for (const name of fs.readdirSync(spriteDir)) {
@@ -272,9 +274,11 @@ export function readSprite(packageDir) {
272
274
  if (lower.endsWith('.png')) {
273
275
  const referenced = manifest.layers.some((layer) =>
274
276
  (layer.frames !== undefined ? layer.frames : [layer.file]).includes(name));
275
- if (!referenced) throw new SpriteError(`sprite/${name} 未被 manifest 引用`);
276
- } else if (lower.endsWith('.gif')) {
277
- if (!gifReferenced.has(name)) throw new SpriteError(`sprite/${name} 未被任何 GIF 动作引用`);
277
+ if (!referenced) {
278
+ console.error(`[plugins] sprite 提示:${path.basename(spriteDir)}/${name} 未被 manifest 引用,不会被下发(建议删除旧素材省空间)`);
279
+ }
280
+ } else if (lower.endsWith('.gif') && !gifReferencedHint.has(name)) {
281
+ console.error(`[plugins] sprite 提示:${path.basename(spriteDir)}/${name} 未被任何 GIF 动作引用,不会被下发(建议删除旧素材省空间)`);
278
282
  }
279
283
  }
280
284
  let total = 0;