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 +1 -1
- package/src/agent-sprites.mjs +11 -7
package/package.json
CHANGED
package/src/agent-sprites.mjs
CHANGED
|
@@ -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
|
-
//
|
|
263
|
-
// GIF
|
|
264
|
-
|
|
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')
|
|
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)
|
|
276
|
-
|
|
277
|
-
|
|
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;
|