fix(plugin): 品牌标字段改用官方口径 logo/logoDark(PNG/SVG 均可),studio 0.3.13 / writer 0.1.4
CI / contract (push) Has been cancelled

上一版把技能字段 iconSmall/iconLarge 写进了插件清单——插件不认这两个键,卡片图标不会显示。对照官方内置插件(latex/visualize/deep-research)的真实清单,插件品牌标是 interface.logo + interface.logoDark(相对插件根,PNG 或 SVG 都接受;latex 用 512×512 PNG,visualize 用 SVG),而 iconSmall/iconLarge 属于**技能**的 SkillInterface。

本提交:assets/logo.svg(浅色,门店 favicon 同源)+ assets/logo-dark.svg(深色,填色 #e5e5e5,与 @deta/ui Logo 的 currentColor 行为一致),interface.logo/logoDark 指向二者并移除 iconSmall/iconLarge;契约校验 E5 改为校验 logo/logoDark(缺失/越界/文件不存在均报错,hint 里点明 icon* 是技能字段)。已装副本 interface 键序与官方一致。
This commit is contained in:
ringo
2026-09-20 16:32:29 +08:00
parent 774e27cfc8
commit abb5835310
9 changed files with 27 additions and 20 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "studio",
"version": "0.3.12",
"version": "0.3.13",
"description": "DETA Studio 插件:以 AML 为唯一事实源编辑建筑模型,编译为建筑模型并执行规则校验。",
"author": {
"name": "DETA",
@@ -18,6 +18,8 @@
],
"skills": "./skills/",
"interface": {
"logo": "./assets/logo.svg",
"logoDark": "./assets/logo-dark.svg",
"displayName": "DETA Studio",
"shortDescription": "AML 建筑模型读写、编译与校验",
"longDescription": "在编码代理中直接操作建筑模型:读取与编辑 AML 设计源码,经编译器编译为建筑模型,执行语法与规则校验、围护结构统计与空间邻接查询。AML 是建筑语义的唯一事实源,所有几何编辑均落到 AML 文本。",
@@ -34,8 +36,6 @@
"读取当前 AML 设计源码并说明建筑构成。",
"在 AML 中修改指定空间的层高,然后重新编译校验。",
"统计当前模型的围护结构面积与外窗面积。"
],
"iconSmall": "./assets/logo.svg",
"iconLarge": "./assets/logo.svg"
]
}
}
+3
View File
@@ -0,0 +1,3 @@
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill="#e5e5e5" d="M 48 52 L 10 52 L 45 6 L 54.4 39.1 L 56.4 45.6 L 47.2 36 L 42.5 19.2 L 22.1 46 L 44 46 L 59 49.2 Z" />
</svg>

After

Width:  |  Height:  |  Size: 232 B

+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "deta-studio-plugin",
"version": "0.3.12",
"version": "0.3.13",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "deta-studio-plugin",
"version": "0.3.12",
"version": "0.3.13",
"license": "Proprietary"
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "deta-studio-plugin",
"version": "0.3.12",
"version": "0.3.13",
"description": "DETA Studio:AML 建筑模型读写与编译校验(Codex 插件 / dsh 组合包 双壳)",
"type": "module",
"license": "Proprietary",
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "writer",
"version": "0.1.3",
"version": "0.1.4",
"description": "DETA Writer 插件:读取建筑模型与模拟结果,产出报告 / 文档内容。",
"author": {
"name": "DETA",
@@ -17,6 +17,8 @@
],
"skills": "./skills/",
"interface": {
"logo": "./assets/logo.svg",
"logoDark": "./assets/logo-dark.svg",
"displayName": "DETA Writer",
"shortDescription": "建筑性能报告与文档产出",
"longDescription": "在编码代理中为建筑项目产出报告内容:读取 AML 设计源码与编译产物,取围护结构统计、能耗与舒适度分析、模拟结果缓存与规范指标,整理成报告初稿并落盘。报告模板插槽与 docx 导出由门户 Writer 负责,本插件只提供数据与文本。",
@@ -32,8 +34,6 @@
"defaultPrompt": [
"读取当前项目的建筑模型,列出可用于报告的关键指标。",
"把本项目的围护结构与能耗结果整理成报告初稿,缺失数据如实标注。"
],
"iconSmall": "./assets/logo.svg",
"iconLarge": "./assets/logo.svg"
]
}
}
+3
View File
@@ -0,0 +1,3 @@
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill="#e5e5e5" d="M 48 52 L 10 52 L 45 6 L 54.4 39.1 L 56.4 45.6 L 47.2 36 L 42.5 19.2 L 22.1 46 L 44 46 L 59 49.2 Z" />
</svg>

After

Width:  |  Height:  |  Size: 232 B

+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "deta-writer-plugin",
"version": "0.1.3",
"version": "0.1.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "deta-writer-plugin",
"version": "0.1.3",
"version": "0.1.4",
"license": "Proprietary"
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "deta-writer-plugin",
"version": "0.1.3",
"version": "0.1.4",
"description": "DETA Writer:建筑性能报告与文档产出(Codex 插件 / dsh 组合包 双壳)",
"type": "module",
"license": "Proprietary",
+7 -6
View File
@@ -71,8 +71,9 @@ const RULES = {
},
E5: {
level: 'error',
what: '插件图标的路径不存在(interface.iconSmall / iconLarge 指向缺失文件或越出插件根)',
hint: '图标必须是插件根下的相对路径(如 ./assets/logo.svg),且文件真实存在——品牌标用 deta.city 的 logo.svg',
what: '插件品牌标(interface.logo / logoDark)缺失、路径越出插件根或文件不存在',
hint: '插件清单用 logo / logoDark 指向插件根内相对路径(如 ./assets/logo.svg,深色主题给 logoDark);'
+ '注意 iconSmall/iconLarge 是**技能**的字段,插件里写了不生效',
},
};
@@ -150,7 +151,7 @@ for (const rel of ['.agents/plugins/marketplace.json', '.agents/plugins/api_mark
}
}
// E5:插件图标引用必须落在插件根内且真实存在(品牌标 = deta.city logo)
// E5:插件品牌标(logo / logoDark)必须落在插件根内且真实存在
for (const pluginDir of ['plugins/studio', 'plugins/writer']) {
const manifest = join(ROOT, pluginDir, '.codex-plugin', 'plugin.json');
if (!existsSync(manifest)) continue;
@@ -160,13 +161,13 @@ for (const pluginDir of ['plugins/studio', 'plugins/writer']) {
} catch {
continue; // 清单不合法由 validate_plugin.py 报
}
for (const key of ['iconSmall', 'iconLarge']) {
for (const key of ['logo', 'logoDark']) {
const val = String(itf[key] ?? '');
if (!val) {
add('E5', manifest, 1, `interface.${key} 未设置(品牌标应指向 ./assets/logo.svg)`);
add('E5', manifest, 1, `interface.${key} 未设置(品牌标应指向 ./assets/logo.svg / ./assets/logo-dark.svg)`);
continue;
}
if (/^https?:/i.test(val)) continue; // *Url 形态才是远端地址
if (/^https?:/i.test(val)) continue; // 远端地址形态
if (val.includes('..') || !val.startsWith('./')) {
add('E5', manifest, 1, `${key} 必须是插件根内相对路径(收到 ${val})`);
continue;