commit 67e7a17d96043c0ee2fee01fb7f51a09ce113ca5 Author: suyx Date: Mon Jul 27 16:54:58 2026 +0800 chore: establish frozen P0-A baseline diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ac6791b --- /dev/null +++ b/.gitignore @@ -0,0 +1,50 @@ +# JavaScript dependencies and package-manager caches +node_modules/ +.pnpm-store/ + +# Build and compiler output +dist/ +build/ +.build/ +.vite/ +*.tsbuildinfo + +# Test and verification output +coverage/ +artifacts/ +playwright-report/ +test-results/ +.playwright/ + +# .NET and Visual Studio output +bin/ +obj/ +.vs/ +*.user +*.suo + +# Dada runtime data (must remain outside source control) +LocalDataRoot/ +.dada-local/ +*.sqlite +*.sqlite-shm +*.sqlite-wal +*.db +*.log +logs/ +staging/ + +# Credentials and machine-local configuration +.env +.env.* +!.env.example +*.local +secrets/ +credentials/ + +# Editor and operating-system metadata +.idea/ +.vscode/ +.DS_Store +Thumbs.db +Desktop.ini diff --git a/Dada-LowFi-Preview/DVPM8.png b/Dada-LowFi-Preview/DVPM8.png new file mode 100644 index 0000000..50bf0d3 Binary files /dev/null and b/Dada-LowFi-Preview/DVPM8.png differ diff --git a/Dada-LowFi-Preview/WbDYT.png b/Dada-LowFi-Preview/WbDYT.png new file mode 100644 index 0000000..cce83ea Binary files /dev/null and b/Dada-LowFi-Preview/WbDYT.png differ diff --git a/Dada-LowFi-Preview/Z0pf8.png b/Dada-LowFi-Preview/Z0pf8.png new file mode 100644 index 0000000..c8bdbc5 Binary files /dev/null and b/Dada-LowFi-Preview/Z0pf8.png differ diff --git a/Dada-LowFi-Preview/Z8p3I.png b/Dada-LowFi-Preview/Z8p3I.png new file mode 100644 index 0000000..9db5ba2 Binary files /dev/null and b/Dada-LowFi-Preview/Z8p3I.png differ diff --git a/Dada-LowFi-Preview/awt96.png b/Dada-LowFi-Preview/awt96.png new file mode 100644 index 0000000..25f49f5 Binary files /dev/null and b/Dada-LowFi-Preview/awt96.png differ diff --git a/Dada-LowFi-Preview/bHQnJ.png b/Dada-LowFi-Preview/bHQnJ.png new file mode 100644 index 0000000..5a59b5d Binary files /dev/null and b/Dada-LowFi-Preview/bHQnJ.png differ diff --git a/Dada-LowFi-Preview/d99Lo.png b/Dada-LowFi-Preview/d99Lo.png new file mode 100644 index 0000000..40b86a1 Binary files /dev/null and b/Dada-LowFi-Preview/d99Lo.png differ diff --git a/Dada-LowFi-Preview/e4e2Kz.png b/Dada-LowFi-Preview/e4e2Kz.png new file mode 100644 index 0000000..769b147 Binary files /dev/null and b/Dada-LowFi-Preview/e4e2Kz.png differ diff --git a/Dada-P0A-LowFi.pen b/Dada-P0A-LowFi.pen new file mode 100644 index 0000000..1707059 --- /dev/null +++ b/Dada-P0A-LowFi.pen @@ -0,0 +1,30088 @@ +{ + "version": "2.14", + "children": [ + { + "type": "frame", + "id": "Z8p3I", + "x": 1120, + "y": 0, + "name": "00 Canvas Index", + "clip": true, + "width": 1440, + "height": 420, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "children": [ + { + "type": "rectangle", + "id": "uQxMC", + "name": "Safety Yellow Rule", + "fill": "$brand-yellow", + "width": "fill_container", + "height": 16 + }, + { + "type": "frame", + "id": "A43vLM", + "name": "Cover Header", + "width": "fill_container", + "height": 184, + "fill": "$ink", + "padding": [ + 28, + 40 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "D30EX", + "name": "Cover Title Group", + "width": 760, + "layout": "vertical", + "gap": 8, + "children": [ + { + "type": "text", + "id": "mX4bj", + "name": "Dada Wordmark", + "fill": "$brand-yellow", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 72, + "fontWeight": "800" + }, + { + "type": "text", + "id": "P1FB1", + "name": "Cover Title", + "fill": "$paper", + "content": "P0-A 可见低保真画布", + "fontFamily": "$font-ui", + "fontSize": 30, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Nslvg", + "name": "Cover Subtitle", + "fill": "$gray-300", + "content": "Windows 单机版 · 依据 UIDesign.md 1.0 · 1920×1080 桌面逻辑", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "h95BF", + "name": "Cover Meta", + "width": 350, + "stroke": "$brand-yellow", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 20, + "children": [ + { + "type": "text", + "id": "PpkbU", + "name": "Meta Label", + "fill": "$brand-yellow", + "content": "LOW-FI / INTERACTION MAP", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Bmjhh", + "name": "Meta Body", + "fill": "$paper", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "荧光黄 · 黑 · 白 · 冷灰\n方角模块 · 高密度工具界面\n不使用大量数字编号", + "lineHeight": 1.6, + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "HxYYD", + "name": "Screen Groups", + "width": "fill_container", + "height": 220, + "fill": "$gray-050", + "gap": 16, + "padding": [ + 28, + 40 + ], + "children": [ + { + "type": "frame", + "id": "TSnIE", + "name": "普通用户 Group", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 10, + "padding": 18, + "children": [ + { + "type": "text", + "id": "i8WprR", + "name": "普通用户 Title", + "fill": "$ink", + "content": "普通用户", + "fontFamily": "$font-ui", + "fontSize": 18, + "fontWeight": "700" + }, + { + "type": "rectangle", + "id": "v28MTR", + "name": "普通用户 Accent", + "fill": "$brand-yellow", + "width": 52, + "height": 6 + }, + { + "type": "text", + "id": "tEqqo", + "name": "普通用户 Items", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "认证 / 创作 / 项目 / 当前任务", + "lineHeight": 1.6, + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Xi8Ab", + "name": "编辑工作 Group", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 10, + "padding": 18, + "children": [ + { + "type": "text", + "id": "LhdeI", + "name": "编辑工作 Title", + "fill": "$ink", + "content": "编辑工作", + "fontFamily": "$font-ui", + "fontSize": 18, + "fontWeight": "700" + }, + { + "type": "rectangle", + "id": "G4eIx", + "name": "编辑工作 Accent", + "fill": "$brand-yellow", + "width": 52, + "height": 6 + }, + { + "type": "text", + "id": "JFus2", + "name": "编辑工作 Items", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "三栏编辑器 / 导出 / 点数 / 设置", + "lineHeight": 1.6, + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "e8hrsM", + "name": "运营后台 Group", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 10, + "padding": 18, + "children": [ + { + "type": "text", + "id": "Qc6zi", + "name": "运营后台 Title", + "fill": "$ink", + "content": "运营后台", + "fontFamily": "$font-ui", + "fontSize": 18, + "fontWeight": "700" + }, + { + "type": "rectangle", + "id": "h3FK2w", + "name": "运营后台 Accent", + "fill": "$brand-yellow", + "width": 52, + "height": 6 + }, + { + "type": "text", + "id": "u8cOU", + "name": "运营后台 Items", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "用户 / 模型 / 素材 / 生成记录 / 审计", + "lineHeight": 1.6, + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "P7LKD", + "name": "辅助系统 Group", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 10, + "padding": 18, + "children": [ + { + "type": "text", + "id": "HnHZE", + "name": "辅助系统 Title", + "fill": "$ink", + "content": "辅助系统", + "fontFamily": "$font-ui", + "fontSize": 18, + "fontWeight": "700" + }, + { + "type": "rectangle", + "id": "v1EFt", + "name": "辅助系统 Accent", + "fill": "$brand-yellow", + "width": 52, + "height": 6 + }, + { + "type": "text", + "id": "wtSyF", + "name": "辅助系统 Items", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "浏览器阻断 / 托盘 / 启动与诊断", + "lineHeight": 1.6, + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "normal" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "Z0pf8", + "x": 1120, + "y": 580, + "name": "01A 普通用户登录", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "E6zgaH", + "name": "Login Art Band", + "clip": true, + "width": "fill_container", + "height": 230, + "fill": "$gray-050", + "layout": "none", + "children": [ + { + "type": "rectangle", + "id": "M0OYIO", + "x": 0, + "y": 0, + "name": "Art Yellow Block", + "fill": "$brand-yellow", + "width": 470, + "height": 230 + }, + { + "type": "text", + "id": "E8pS72", + "x": 54, + "y": 38, + "name": "Art DADA", + "fill": "$ink", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 112, + "fontWeight": "900" + }, + { + "type": "rectangle", + "id": "uVirY", + "x": 520, + "y": 42, + "name": "Art Black Bar", + "fill": "$ink", + "width": 820, + "height": 26 + }, + { + "type": "rectangle", + "id": "mW6De", + "x": 720, + "y": 90, + "name": "Art Silver Block", + "fill": "#B9B9B3", + "width": 470, + "height": 90 + }, + { + "type": "rectangle", + "id": "my3Yo", + "x": 1070, + "y": 104, + "name": "Art Yellow Slice", + "fill": "#F2F400", + "width": 380, + "height": 48 + }, + { + "type": "line", + "id": "CG7mT", + "x": 470, + "y": 190, + "name": "Art Guide Horizontal", + "width": 960, + "height": 0, + "stroke": "$ink", + "strokeWidth": 1 + }, + { + "type": "line", + "id": "LBCCs", + "x": 1390, + "y": 18, + "name": "Art Guide Vertical", + "width": 0, + "height": 190, + "stroke": "$ink", + "strokeWidth": 1 + }, + { + "type": "text", + "id": "Hze62", + "x": 525, + "y": 82, + "name": "Art Label", + "fill": "$gray-600", + "content": "LOCAL CREATIVE SYSTEM / WINDOWS P0-A", + "fontFamily": "$font-data", + "fontSize": 13, + "fontWeight": "700" + }, + { + "type": "text", + "id": "kv9cl", + "x": 525, + "y": 150, + "name": "Art Caption", + "fill": "$ink", + "content": "在本机展开你的创作", + "fontFamily": "$font-ui", + "fontSize": 26, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "L276N", + "name": "Login Body", + "width": "fill_container", + "height": 620, + "fill": "$paper", + "layout": "vertical", + "gap": 20, + "padding": [ + 34, + 40 + ], + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "Z8iPSG", + "name": "Login Form", + "width": 520, + "layout": "vertical", + "gap": 16, + "children": [ + { + "type": "frame", + "id": "m3hfV", + "name": "Auth Tabs", + "width": "fill_container", + "height": 48, + "stroke": "$ink", + "strokeWidth": 1, + "children": [ + { + "type": "frame", + "id": "JUPye", + "name": "Login Active Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$brand-yellow", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "SlGFL", + "name": "Login Tab Label", + "fill": "$ink", + "content": "登录", + "fontFamily": "$font-ui", + "fontSize": 15, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "z5ggEb", + "name": "Register Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "V0mR7T", + "name": "Register Tab Label", + "fill": "$gray-600", + "content": "注册", + "fontFamily": "$font-ui", + "fontSize": 15, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "text", + "id": "PXB44", + "name": "Login Heading", + "fill": "$ink", + "content": "邮箱验证码登录", + "fontFamily": "$font-ui", + "fontSize": 28, + "fontWeight": "800" + }, + { + "type": "frame", + "id": "SIDRV", + "name": "Email Field Group", + "width": "fill_container", + "layout": "vertical", + "gap": 7, + "children": [ + { + "type": "text", + "id": "vkkwC", + "name": "Email Label", + "fill": "$ink", + "content": "邮箱", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + }, + { + "type": "frame", + "id": "XHf4C", + "name": "Email Input", + "width": "fill_container", + "height": 44, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 14 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "h3pDa", + "name": "Email Placeholder", + "fill": "$gray-600", + "content": "name@example.com", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "nvhQM", + "name": "Code Field Group", + "width": "fill_container", + "layout": "vertical", + "gap": 7, + "children": [ + { + "type": "text", + "id": "oX8z6", + "name": "Code Label", + "fill": "$ink", + "content": "验证码", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + }, + { + "type": "frame", + "id": "fQ3IU", + "name": "Code Row", + "width": "fill_container", + "height": 44, + "gap": 10, + "children": [ + { + "type": "frame", + "id": "EKPX8", + "name": "Code Input", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 14 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ZGeu4", + "name": "Code Placeholder", + "fill": "$gray-600", + "content": "6 位验证码", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "fjyyL", + "name": "Get Code Button", + "width": 148, + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ZDOuV", + "name": "Get Code Label", + "fill": "$ink", + "content": "获取验证码", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "700" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "h4ljd", + "name": "Login Primary Button", + "width": "fill_container", + "height": 46, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "NYP6M", + "name": "Login Button Label", + "fill": "$ink", + "content": "登录", + "fontFamily": "$font-ui", + "fontSize": 15, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "gS9Af", + "name": "Admin Login Link Row", + "width": "fill_container", + "justifyContent": "end", + "children": [ + { + "type": "text", + "id": "yOsuJ", + "name": "Admin Login Link", + "fill": "$gray-600", + "content": "管理员登录 →", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "YkMRU", + "name": "Local Data Footer", + "width": "fill_container", + "height": 50, + "fill": "$ink", + "gap": 10, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "Otma7", + "name": "Local Data Icon", + "width": 16, + "height": 16, + "icon": "hard-drive", + "library": "lucide", + "fill": "$brand-yellow" + }, + { + "type": "text", + "id": "kHq4S", + "name": "Local Data Notice", + "fill": "$paper", + "content": "测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "DVPM8", + "x": 2880, + "y": 580, + "name": "01B 注册展开态", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "W2lCj", + "name": "Register Art Band", + "clip": true, + "width": "fill_container", + "height": 160, + "fill": "$gray-050", + "layout": "none", + "children": [ + { + "type": "rectangle", + "id": "c6ilaB", + "x": 0, + "y": 0, + "name": "Register Yellow Block", + "fill": "#F2F400", + "width": 420, + "height": 160 + }, + { + "type": "text", + "id": "Sqg42", + "x": 48, + "y": 20, + "name": "Register DADA", + "fill": "$ink", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 90, + "fontWeight": "900" + }, + { + "type": "text", + "id": "Z3B92", + "x": 510, + "y": 50, + "name": "Register Caption", + "fill": "$ink", + "content": "创建你的本机内测账号", + "fontFamily": "$font-ui", + "fontSize": 28, + "fontWeight": "800" + }, + { + "type": "text", + "id": "HLu3a", + "x": 512, + "y": 93, + "name": "Register Tech Label", + "fill": "$gray-600", + "content": "INVITE VERIFIED / CODE SENT / PROFILE REQUIRED", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "rectangle", + "id": "oDfWt", + "x": 1050, + "y": 36, + "name": "Register Black Rule", + "fill": "$ink", + "width": 430, + "height": 18 + }, + { + "type": "line", + "id": "oeNP0", + "x": 1050, + "y": 112, + "name": "Register Guide", + "width": 430, + "height": 0, + "stroke": "$ink", + "strokeWidth": 1 + } + ] + }, + { + "type": "frame", + "id": "OqPot", + "name": "Register Body", + "width": "fill_container", + "height": 690, + "fill": "$paper", + "layout": "vertical", + "padding": [ + 20, + 40 + ], + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "g01ZP", + "name": "Register Form", + "width": 620, + "layout": "vertical", + "gap": 9, + "children": [ + { + "type": "frame", + "id": "EHZku", + "name": "Register Auth Tabs", + "width": "fill_container", + "height": 42, + "stroke": "$ink", + "strokeWidth": 1, + "children": [ + { + "type": "frame", + "id": "s6wWA", + "name": "Register Login Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "F5wgt", + "name": "Register Login Label", + "fill": "$gray-600", + "content": "登录", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "uonb7", + "name": "Register Active Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$brand-yellow", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "kDvNJ", + "name": "Register Active Label", + "fill": "$ink", + "content": "注册", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "DvKAi", + "name": "Register Title Row", + "width": "fill_container", + "height": 38, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "qw9Ln", + "name": "Register Heading", + "fill": "$ink", + "content": "完善注册资料", + "fontFamily": "$font-ui", + "fontSize": 26, + "fontWeight": "800" + }, + { + "type": "frame", + "id": "buCTo", + "name": "Code Sent Badge", + "fill": "$ink", + "padding": [ + 5, + 10 + ], + "children": [ + { + "type": "text", + "id": "Ykkzn", + "name": "Code Sent Text", + "fill": "$brand-yellow", + "content": "验证码已发送", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "Eh5ua", + "name": "Verified Summary", + "width": "fill_container", + "height": 58, + "gap": 10, + "children": [ + { + "type": "frame", + "id": "eG4y3", + "name": "邀请码 Verified Box", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 3, + "padding": [ + 8, + 12 + ], + "children": [ + { + "type": "text", + "id": "Aj5XL", + "name": "邀请码 Verified Label", + "fill": "$success", + "content": "邀请码 · 已验证", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "hsszm", + "name": "邀请码 Verified Value", + "fill": "$ink", + "content": "DADA-••••-7K2", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "D65i8", + "name": "邮箱 Verified Box", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 3, + "padding": [ + 8, + 12 + ], + "children": [ + { + "type": "text", + "id": "Z6TwEE", + "name": "邮箱 Verified Label", + "fill": "$success", + "content": "邮箱 · 已验证", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "r6abe", + "name": "邮箱 Verified Value", + "fill": "$ink", + "content": "da•••@example.com", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "LfitN", + "name": "验证码 Register Group", + "width": "fill_container", + "layout": "vertical", + "gap": 4, + "children": [ + { + "type": "text", + "id": "GzuTO", + "name": "验证码 Register Label", + "fill": "$ink", + "content": "验证码", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "frame", + "id": "gX8Pf", + "name": "验证码 Register Input", + "width": "fill_container", + "height": 40, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "NNeVg", + "name": "验证码 Register Placeholder", + "fill": "$gray-600", + "content": "输入 6 位验证码", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "R68S7X", + "name": "创作署名 Register Group", + "width": "fill_container", + "layout": "vertical", + "gap": 4, + "children": [ + { + "type": "text", + "id": "O4Q37G", + "name": "创作署名 Register Label", + "fill": "$ink", + "content": "创作署名", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "frame", + "id": "ElOsU", + "name": "创作署名 Register Input", + "width": "fill_container", + "height": 40, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "vUmAE", + "name": "创作署名 Register Placeholder", + "fill": "$gray-600", + "content": "成品中显示的名称", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "DTlZ5", + "name": "社交 ID Register Group", + "width": "fill_container", + "layout": "vertical", + "gap": 4, + "children": [ + { + "type": "text", + "id": "h5eDK", + "name": "社交 ID Register Label", + "fill": "$ink", + "content": "社交 ID", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "frame", + "id": "bpfq0", + "name": "社交 ID Register Input", + "width": "fill_container", + "height": 40, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Nl1RM", + "name": "社交 ID Register Placeholder", + "fill": "$gray-600", + "content": "成品中显示的账号文本", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "CzoSu", + "name": "Beta Notice Row", + "width": "fill_container", + "height": 48, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 8, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "rectangle", + "id": "b6c73L", + "name": "Notice Checkbox", + "fill": "$paper", + "width": 18, + "height": 18, + "stroke": "$ink", + "strokeWidth": 1 + }, + { + "type": "text", + "id": "CfsnV", + "name": "Notice Text", + "fill": "$ink", + "content": "我已阅读并同意《内测使用与隐私告知》", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + }, + { + "type": "text", + "id": "Nw0fd", + "name": "Notice Open Link", + "fill": "$info", + "content": "查看全文 →", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "FezEQ", + "name": "Register Primary Button", + "width": "fill_container", + "height": 44, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "b3GdO5", + "name": "Register Button Label", + "fill": "$ink", + "content": "注册并进入 Dada", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + } + ] + }, + { + "type": "text", + "id": "DQ22A", + "name": "Register Flow Note", + "fill": "$gray-600", + "content": "邀请码和邮箱修改后将收起资料区,并重新执行发码校验。", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "qS7h1", + "name": "Register Local Data Footer", + "width": "fill_container", + "height": 50, + "fill": "$ink", + "gap": 10, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "gIqnD", + "name": "Register Local Data Icon", + "width": 16, + "height": 16, + "icon": "hard-drive", + "library": "lucide", + "fill": "$brand-yellow" + }, + { + "type": "text", + "id": "RFL29", + "name": "Register Local Data Notice", + "fill": "$paper", + "content": "测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "WbDYT", + "x": 4640, + "y": 580, + "name": "02A 空工作台", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "QEo1S", + "name": "Workbench Top Nav", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 32 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "PpTCt", + "name": "Workbench Nav Left", + "gap": 24, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "nkWPK", + "name": "Workbench Logo", + "fill": "$ink", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 24, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "UrRmm", + "name": "创作 Nav Item", + "height": 34, + "fill": "$brand-yellow", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "DFbUN", + "name": "创作 Nav Label", + "fill": "$ink", + "content": "创作", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "AWOPy", + "name": "项目 Nav Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "c1fx4", + "name": "项目 Nav Label", + "fill": "$ink", + "content": "项目", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "Ailf5", + "name": "点数 Nav Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "HXBjR", + "name": "点数 Nav Label", + "fill": "$ink", + "content": "点数", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "j7Alj", + "name": "设置 Nav Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "oSCRu", + "name": "设置 Nav Label", + "fill": "$ink", + "content": "设置", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "p6FVqD", + "name": "Workbench Nav Right", + "gap": 18, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "bQMVG", + "name": "No Task Label", + "fill": "$gray-600", + "content": "当前无生成任务", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "GxWS2", + "name": "Credit Balance", + "fill": "$ink", + "content": "点数 10", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + }, + { + "type": "icon", + "id": "AQwFq", + "name": "Account Icon", + "width": 22, + "height": 22, + "icon": "circle-user-round", + "library": "lucide", + "fill": "$ink" + } + ] + } + ] + }, + { + "type": "frame", + "id": "pBKq9", + "name": "Empty Workbench Art", + "clip": true, + "width": "fill_container", + "height": 238, + "fill": "$gray-050", + "layout": "none", + "children": [ + { + "type": "text", + "id": "rK96K", + "x": 40, + "y": 18, + "name": "Empty Art DADA", + "fill": "$ink", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 122, + "fontWeight": "900" + }, + { + "type": "rectangle", + "id": "lbxZA", + "x": 430, + "y": 30, + "name": "Empty Art Silver", + "fill": "$gray-300", + "width": 510, + "height": 136 + }, + { + "type": "rectangle", + "id": "Cs9Kv", + "x": 760, + "y": 72, + "name": "Empty Art Yellow", + "fill": "$brand-yellow", + "width": 560, + "height": 70 + }, + { + "type": "rectangle", + "id": "MkWb7", + "x": 1180, + "y": 30, + "name": "Empty Art Black", + "fill": "$ink", + "width": 310, + "height": 26 + }, + { + "type": "line", + "id": "b68Im", + "x": 430, + "y": 190, + "name": "Empty Art Guide One", + "width": 1020, + "height": 0, + "stroke": "$ink", + "strokeWidth": 1 + }, + { + "type": "line", + "id": "i0JEq", + "x": 1090, + "y": 20, + "name": "Empty Art Guide Two", + "width": 0, + "height": 190, + "stroke": "$ink", + "strokeWidth": 1 + }, + { + "type": "text", + "id": "UCYZ3", + "x": 42, + "y": 174, + "name": "Empty Art Heading", + "fill": "$ink", + "content": "开始一张新作品", + "fontFamily": "$font-ui", + "fontSize": 24, + "fontWeight": "800" + }, + { + "type": "text", + "id": "I9LJY", + "x": 1180, + "y": 80, + "name": "Empty Art Tech", + "fill": "$gray-600", + "content": "NEW PROJECT\nLOCAL ONLY\nNO CLOUD SYNC", + "lineHeight": 1.6, + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "Psn85", + "name": "Empty Workbench Main", + "width": "fill_container", + "height": 554, + "fill": "$paper", + "gap": 24, + "padding": [ + 26, + 32 + ], + "children": [ + { + "type": "frame", + "id": "MyOZ3", + "name": "Generation Form", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 14, + "children": [ + { + "type": "text", + "id": "x49DhH", + "name": "Generation Form Title", + "fill": "$ink", + "content": "描述你想生成的画面", + "fontFamily": "$font-ui", + "fontSize": 18, + "fontWeight": "800" + }, + { + "type": "frame", + "id": "erOJX", + "name": "Prompt Input", + "width": "fill_container", + "height": 122, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "padding": 14, + "children": [ + { + "type": "text", + "id": "sjRfz", + "name": "Prompt Placeholder", + "fill": "$gray-600", + "content": "输入提示词…", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "B3dRs", + "name": "Generation Config Row", + "width": "fill_container", + "height": 74, + "gap": 12, + "children": [ + { + "type": "frame", + "id": "fqgr0", + "name": "Recommended Model Select", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 5, + "padding": [ + 8, + 12 + ], + "children": [ + { + "type": "text", + "id": "K1yZE", + "name": "Model Select Label", + "fill": "$gray-600", + "content": "模型 · 推荐", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "kCazx", + "name": "Model Select Value", + "fill": "$ink", + "content": "Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "hbJOz", + "name": "Ratio Select", + "width": 420, + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 6, + "padding": [ + 8, + 12 + ], + "children": [ + { + "type": "text", + "id": "vjSfG", + "name": "Ratio Label", + "fill": "$gray-600", + "content": "画面比例", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "frame", + "id": "x3n7d", + "name": "Ratio Options", + "width": "fill_container", + "height": 30, + "gap": 6, + "children": [ + { + "type": "frame", + "id": "m4EqaR", + "name": "3:4 Ratio", + "width": "fill_container", + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "U6yv2", + "name": "3:4 Ratio Label", + "fill": "$ink", + "content": "3:4", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "RwnJz", + "name": "1:1 Ratio", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "crYqE", + "name": "1:1 Ratio Label", + "fill": "$ink", + "content": "1:1", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "X9h9hY", + "name": "4:3 Ratio", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "lIVud", + "name": "4:3 Ratio Label", + "fill": "$ink", + "content": "4:3", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "jGaTi", + "name": "9:16 Ratio", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "V3EfRi", + "name": "9:16 Ratio Label", + "fill": "$ink", + "content": "9:16", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "g3tzF", + "name": "Reference Add Area", + "width": "fill_container", + "height": 72, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 14 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "VoH4H", + "name": "Reference Add Left", + "gap": 10, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "q3HZhv", + "name": "Reference Icon", + "width": 20, + "height": 20, + "icon": "image-plus", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "Lknr1", + "name": "Reference Add Text", + "fill": "$ink", + "content": "添加参考图 · 提交生成时上传", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "text", + "id": "BnUqq", + "name": "Reference Limit", + "fill": "$gray-600", + "content": "JPG / PNG / WebP", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "hdyKC", + "name": "Generation Action Row", + "width": "fill_container", + "height": 54, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "zj8Q5", + "name": "Generation Cost", + "fill": "$ink", + "content": "本次预计 1 点", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + }, + { + "type": "frame", + "id": "JHkTv", + "name": "Generate Button", + "width": 230, + "height": 44, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 8, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "E2Gwgy", + "name": "Generate Icon", + "width": 17, + "height": 17, + "icon": "sparkles", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "KdWvA", + "name": "Generate Label", + "fill": "$ink", + "content": "生成一张图片", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "OC6ql", + "name": "Current Task Empty Panel", + "width": 360, + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 16, + "padding": 20, + "children": [ + { + "type": "text", + "id": "eFG9e", + "name": "Current Task Panel Title", + "fill": "$ink", + "content": "当前任务", + "fontFamily": "$font-ui", + "fontSize": 17, + "fontWeight": "800" + }, + { + "type": "frame", + "id": "r7ZmJI", + "name": "Task Empty State", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 12, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "L3DuQO", + "name": "Task Empty Icon", + "width": 36, + "height": 36, + "icon": "circle-dashed", + "library": "lucide", + "fill": "$gray-600" + }, + { + "type": "text", + "id": "T9RXi", + "name": "Task Empty Title", + "fill": "$ink", + "content": "没有进行中的任务", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "700" + }, + { + "type": "text", + "id": "u3AIv", + "name": "Task Empty Hint", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": 250, + "content": "提交生成后,排队和运行状态会持续显示在这里。", + "lineHeight": 1.6, + "textAlign": "center", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "ikSqM", + "name": "Workbench Local Data Footer", + "width": "fill_container", + "height": 50, + "fill": "$ink", + "gap": 10, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "t8D0A", + "name": "Workbench Local Data Icon", + "width": 16, + "height": 16, + "icon": "hard-drive", + "library": "lucide", + "fill": "$brand-yellow" + }, + { + "type": "text", + "id": "AOJGF", + "name": "Workbench Local Data Notice", + "fill": "$paper", + "content": "测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "d99Lo", + "x": 6400, + "y": 580, + "name": "02B 生成中工作台", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "QNt6O", + "name": "Active Workbench Nav", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 32 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "Q3gGY", + "name": "Active Nav Left", + "gap": 24, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "lrD4a", + "name": "Active Logo", + "fill": "$ink", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 24, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "MQyIU", + "name": "Active 创作 Item", + "height": 34, + "fill": "$brand-yellow", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "CuZvw", + "name": "Active 创作 Label", + "fill": "$ink", + "content": "创作", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "OdTkY", + "name": "Active 项目 Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "t3tlr", + "name": "Active 项目 Label", + "fill": "$ink", + "content": "项目", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "von7n", + "name": "Active 点数 Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "gaqRZ", + "name": "Active 点数 Label", + "fill": "$ink", + "content": "点数", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "PxTOE", + "name": "Active 设置 Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "C7w4D1", + "name": "Active 设置 Label", + "fill": "$ink", + "content": "设置", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "nnmxP", + "name": "Active Nav Right", + "gap": 16, + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "Z9ow7M", + "name": "Running Task Entry", + "height": 34, + "fill": "$ink", + "gap": 8, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "PMHjT", + "name": "Running Task Icon", + "width": 16, + "height": 16, + "icon": "loader-circle", + "library": "lucide", + "fill": "$brand-yellow" + }, + { + "type": "text", + "id": "P6r4d", + "name": "Running Task Label", + "fill": "$paper", + "content": "生成中 · 00:38", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "text", + "id": "kdXjK", + "name": "Active Credit Balance", + "fill": "$ink", + "content": "点数 9 · 冻结 1", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + }, + { + "type": "icon", + "id": "p3ya9B", + "name": "Active Account Icon", + "width": 22, + "height": 22, + "icon": "circle-user-round", + "library": "lucide", + "fill": "$ink" + } + ] + } + ] + }, + { + "type": "frame", + "id": "h0FQV", + "name": "Critical Capacity Strip", + "width": "fill_container", + "height": 38, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 32 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "AHGO1", + "name": "Capacity Strip Left", + "gap": 9, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "lzdIh", + "name": "Capacity Warning Icon", + "width": 17, + "height": 17, + "icon": "triangle-alert", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "I35LIW", + "name": "Capacity Warning Text", + "fill": "$ink", + "content": "本机内容已使用 4.71 GB / 5 GB,请先下载重要成品并准备清理。", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "text", + "id": "eSNMQ", + "name": "Manage Storage Link", + "fill": "$ink", + "content": "管理存储 →", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "koY9x", + "name": "Active Workbench Main", + "width": "fill_container", + "height": 754, + "fill": "$paper", + "gap": 24, + "padding": [ + 28, + 32 + ], + "children": [ + { + "type": "frame", + "id": "PhJ5O", + "name": "Active Workbench Content", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 24, + "children": [ + { + "type": "frame", + "id": "o7g0ZA", + "name": "Compact New Creation", + "width": "fill_container", + "height": 330, + "layout": "vertical", + "gap": 12, + "children": [ + { + "type": "frame", + "id": "E8LvR4", + "name": "New Creation Title Row", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Xzdue", + "name": "New Creation Heading", + "fill": "$ink", + "content": "新建创作", + "fontFamily": "$font-ui", + "fontSize": 24, + "fontWeight": "800" + }, + { + "type": "text", + "id": "k6KUV", + "name": "New Creation Meta", + "fill": "$gray-600", + "content": "首次预选当前推荐模型", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "tf5Ru", + "name": "Compact Prompt Input", + "width": "fill_container", + "height": 96, + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "padding": 14, + "children": [ + { + "type": "text", + "id": "t6qGTD", + "name": "Compact Prompt Text", + "fill": "$ink", + "content": "夜晚城市中一间明亮的小型工作室,窗外有雨…", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "NUZKf", + "name": "Compact Config", + "width": "fill_container", + "height": 66, + "gap": 10, + "children": [ + { + "type": "frame", + "id": "arOPb", + "name": "Compact 模型", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 5, + "padding": [ + 9, + 12 + ], + "children": [ + { + "type": "text", + "id": "ZWpUr", + "name": "Compact 模型 Label", + "fill": "$gray-600", + "content": "模型", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "B7c9mk", + "name": "Compact 模型 Value", + "fill": "$ink", + "content": "Gemini Flash · 推荐", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "YHpU3", + "name": "Compact 比例", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 5, + "padding": [ + 9, + 12 + ], + "children": [ + { + "type": "text", + "id": "FRpOT", + "name": "Compact 比例 Label", + "fill": "$gray-600", + "content": "比例", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "r3zEb", + "name": "Compact 比例 Value", + "fill": "$ink", + "content": "3:4", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "PTsIG", + "name": "Compact 参考图", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 5, + "padding": [ + 9, + 12 + ], + "children": [ + { + "type": "text", + "id": "awI31", + "name": "Compact 参考图 Label", + "fill": "$gray-600", + "content": "参考图", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Bl4KQ", + "name": "Compact 参考图 Value", + "fill": "$ink", + "content": "尚未添加", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "DTI6q", + "name": "Compact Action", + "width": "fill_container", + "height": 46, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "QMloD", + "name": "Compact Cost", + "fill": "$ink", + "content": "预计 1 点", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + }, + { + "type": "frame", + "id": "PkZjC", + "name": "Generate Disabled Existing Task", + "width": 245, + "height": 42, + "fill": "$gray-100", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 8, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "Lc6Oi", + "name": "Generate Disabled Icon", + "width": 16, + "height": 16, + "icon": "clock-3", + "library": "lucide", + "fill": "$gray-600" + }, + { + "type": "text", + "id": "O6Barr", + "name": "Generate Disabled Label", + "fill": "$gray-600", + "content": "先查看当前任务", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "DWDLU", + "name": "Recent Projects Section", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 12, + "children": [ + { + "type": "frame", + "id": "lNZUb", + "name": "Recent Projects Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "xdfzg", + "name": "Recent Projects Heading", + "fill": "$ink", + "content": "最近项目", + "fontFamily": "$font-ui", + "fontSize": 18, + "fontWeight": "800" + }, + { + "type": "text", + "id": "r3jC1k", + "name": "View All Projects", + "fill": "$info", + "content": "查看全部项目 →", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "w2mj5", + "name": "Recent Project Cards", + "width": "fill_container", + "height": "fill_container", + "gap": 12, + "children": [ + { + "type": "frame", + "id": "s2IwlX", + "name": "城市工作室 Card", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 10, + "children": [ + { + "type": "rectangle", + "id": "TVgBz", + "name": "城市工作室 Thumbnail", + "fill": "$gray-300", + "width": "fill_container", + "height": 116, + "stroke": "$gray-300", + "strokeWidth": 1 + }, + { + "type": "text", + "id": "fmMe7", + "name": "城市工作室 Name", + "fill": "$ink", + "content": "城市工作室", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "na8C7", + "name": "城市工作室 Status", + "fill": "$gray-600", + "content": "3 张图片 · 3:4", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "S2rbq", + "name": "夏日海报 Card", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 10, + "children": [ + { + "type": "rectangle", + "id": "Sf8tM", + "name": "夏日海报 Thumbnail", + "fill": "$brand-yellow", + "width": "fill_container", + "height": 116, + "stroke": "$gray-300", + "strokeWidth": 1 + }, + { + "type": "text", + "id": "azygb", + "name": "夏日海报 Name", + "fill": "$ink", + "content": "夏日海报", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "ELvJG", + "name": "夏日海报 Status", + "fill": "$gray-600", + "content": "已保存 · 3:4", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "B88mg", + "name": "字效测试 Card", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 10, + "children": [ + { + "type": "rectangle", + "id": "anjvz", + "name": "字效测试 Thumbnail", + "fill": "$gray-100", + "width": "fill_container", + "height": 116, + "stroke": "$gray-300", + "strokeWidth": 1 + }, + { + "type": "text", + "id": "aaXtK", + "name": "字效测试 Name", + "fill": "$ink", + "content": "字效测试", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "l0epR", + "name": "字效测试 Status", + "fill": "$gray-600", + "content": "生成失败 · 3:4", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "o1x3S", + "name": "Running Task Panel", + "width": 390, + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 18, + "padding": 20, + "children": [ + { + "type": "frame", + "id": "sixCF", + "name": "Running Task Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "n7Qkp", + "name": "Running Panel Title", + "fill": "$ink", + "content": "当前生成任务", + "fontFamily": "$font-ui", + "fontSize": 18, + "fontWeight": "800" + }, + { + "type": "frame", + "id": "nCzIU", + "name": "Running Status Badge", + "fill": "$info", + "padding": [ + 5, + 9 + ], + "children": [ + { + "type": "text", + "id": "TMFac", + "name": "Running Status Text", + "fill": "$paper", + "content": "RUNNING", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "rectangle", + "id": "UhoT1", + "name": "Running Preview Placeholder", + "fill": "$gray-100", + "width": "fill_container", + "height": 300, + "stroke": "$gray-300", + "strokeWidth": 1 + }, + { + "type": "text", + "id": "TJfIS", + "name": "Running Project Name", + "fill": "$ink", + "content": "城市工作室", + "fontFamily": "$font-ui", + "fontSize": 16, + "fontWeight": "800" + }, + { + "type": "frame", + "id": "LifWe", + "name": "Task 模型 Row", + "width": "fill_container", + "height": 30, + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "d1OMND", + "name": "Task 模型 Label", + "fill": "$gray-600", + "content": "模型", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "UZglC", + "name": "Task 模型 Value", + "fill": "$ink", + "content": "Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "GSlHe", + "name": "Task 比例 Row", + "width": "fill_container", + "height": 30, + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "wvJSQ", + "name": "Task 比例 Label", + "fill": "$gray-600", + "content": "比例", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "x8TQg", + "name": "Task 比例 Value", + "fill": "$ink", + "content": "3:4", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "vsZSd", + "name": "Task 已运行 Row", + "width": "fill_container", + "height": 30, + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "gmYPb", + "name": "Task 已运行 Label", + "fill": "$gray-600", + "content": "已运行", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "IJUX6", + "name": "Task 已运行 Value", + "fill": "$ink", + "content": "00:38", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "u0OaeT", + "name": "Task 冻结点数 Row", + "width": "fill_container", + "height": 30, + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "CC2GO", + "name": "Task 冻结点数 Label", + "fill": "$gray-600", + "content": "冻结点数", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "e6QzA", + "name": "Task 冻结点数 Value", + "fill": "$ink", + "content": "1", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "text", + "id": "lEkuV", + "name": "Task Status Hint", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "同一账号同时只保留一个排队或运行任务。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "s3SrX", + "name": "Active Local Data Footer", + "width": "fill_container", + "height": 50, + "fill": "$ink", + "gap": 10, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "OVr6B", + "name": "Active Local Data Icon", + "width": 16, + "height": 16, + "icon": "hard-drive", + "library": "lucide", + "fill": "$brand-yellow" + }, + { + "type": "text", + "id": "viakO", + "name": "Active Local Data Notice", + "fill": "$paper", + "content": "测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "zXyG9", + "x": 6400, + "y": 1640, + "name": "03A 项目列表", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "snBcY", + "name": "Projects Top Nav", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 32 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "syGSO", + "name": "Projects Nav Left", + "gap": 24, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "vshmh", + "name": "Projects Logo", + "fill": "$ink", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 24, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "ZYSWi", + "name": "Projects 创作 Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "WGJuE", + "name": "Projects 创作 Label", + "fill": "$ink", + "content": "创作", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "B2UOj7", + "name": "Projects 项目 Item", + "height": 34, + "fill": "$brand-yellow", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "NhxAJ", + "name": "Projects 项目 Label", + "fill": "$ink", + "content": "项目", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "IebmB", + "name": "Projects 点数 Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "yldnQ", + "name": "Projects 点数 Label", + "fill": "$ink", + "content": "点数", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "cSOre", + "name": "Projects 设置 Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "wJsSO", + "name": "Projects 设置 Label", + "fill": "$ink", + "content": "设置", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "jh0Du", + "name": "Projects Nav Right", + "gap": 18, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "BVVz4", + "name": "Projects Task Entry", + "fill": "$gray-600", + "content": "当前无生成任务", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "C48QBz", + "name": "Projects Credit", + "fill": "$ink", + "content": "点数 9", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + }, + { + "type": "icon", + "id": "GpLBD", + "name": "Projects Account", + "width": 22, + "height": 22, + "icon": "circle-user-round", + "library": "lucide", + "fill": "$ink" + } + ] + } + ] + }, + { + "type": "frame", + "id": "oWfOK", + "name": "Projects Main", + "width": "fill_container", + "height": 792, + "fill": "$paper", + "layout": "vertical", + "gap": 18, + "padding": [ + 28, + 32 + ], + "children": [ + { + "type": "frame", + "id": "PKQz5", + "name": "Projects Header", + "width": "fill_container", + "height": 46, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "QjQZU", + "name": "Projects Header Left", + "gap": 14, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "LoNyC", + "name": "Projects Heading", + "fill": "$ink", + "content": "项目", + "fontFamily": "$font-ui", + "fontSize": 28, + "fontWeight": "900" + }, + { + "type": "text", + "id": "WCu2a", + "name": "Projects Count", + "fill": "$gray-600", + "content": "6 / 20 ACTIVE", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "mBnR1", + "name": "New Creation From Projects", + "height": 40, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 8, + "padding": [ + 0, + 16 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "AbxDp", + "name": "New Creation Icon", + "width": 16, + "height": 16, + "icon": "plus", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "Q4KEIh", + "name": "New Creation Label", + "fill": "$ink", + "content": "新建创作", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "OEn5p", + "name": "Project Controls", + "width": "fill_container", + "height": 48, + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "vLs6w", + "name": "Project Tabs", + "height": 40, + "stroke": "$ink", + "strokeWidth": 1, + "children": [ + { + "type": "frame", + "id": "b3ultm", + "name": "项目 Project Tab", + "width": 110, + "height": "fill_container", + "fill": "$brand-yellow", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Hno6q", + "name": "项目 Project Tab Label", + "fill": "$ink", + "content": "项目", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "qiUU1", + "name": "回收站 Project Tab", + "width": 110, + "height": "fill_container", + "fill": "$paper", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "D4RsVe", + "name": "回收站 Project Tab Label", + "fill": "$ink", + "content": "回收站", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "hLHIB", + "name": "Project Filters", + "gap": 8, + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "zHtZG", + "name": "搜索项目 Filter", + "width": 210, + "height": 36, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 8, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "XQ9LX", + "name": "搜索项目 Filter Icon", + "width": 15, + "height": 15, + "icon": "search", + "library": "lucide", + "fill": "$gray-600" + }, + { + "type": "text", + "id": "MI3dS", + "name": "搜索项目 Filter Label", + "fill": "$gray-600", + "content": "搜索项目", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "ZpDCB", + "name": "全部状态 Filter", + "width": 130, + "height": 36, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 8, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "U59ZO", + "name": "全部状态 Filter Icon", + "width": 15, + "height": 15, + "icon": "list-filter", + "library": "lucide", + "fill": "$gray-600" + }, + { + "type": "text", + "id": "a4Je4", + "name": "全部状态 Filter Label", + "fill": "$gray-600", + "content": "全部状态", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "SMLZh", + "name": "最近更新 Filter", + "width": 130, + "height": 36, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 8, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "p8ZIS", + "name": "最近更新 Filter Icon", + "width": 15, + "height": 15, + "icon": "arrow-down-up", + "library": "lucide", + "fill": "$gray-600" + }, + { + "type": "text", + "id": "ZkpXT", + "name": "最近更新 Filter Label", + "fill": "$gray-600", + "content": "最近更新", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "C7CLe", + "name": "Failed Empty Cleanup Strip", + "width": "fill_container", + "height": 46, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 14 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "RPbzm", + "name": "Cleanup Strip Left", + "gap": 9, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "sn1GU", + "name": "Cleanup Strip Icon", + "width": 17, + "height": 17, + "icon": "circle-alert", + "library": "lucide", + "fill": "$gray-600" + }, + { + "type": "text", + "id": "tyYjy", + "name": "Cleanup Strip Text", + "fill": "$ink", + "content": "有 2 个没有成功图片的失败草稿可批量移入回收站", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "600" + } + ] + }, + { + "type": "text", + "id": "soYfC", + "name": "Cleanup Strip Action", + "fill": "$info", + "content": "选择失败草稿 →", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "dqcVm", + "name": "Project Card Grid", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 14, + "children": [ + { + "type": "frame", + "id": "z1zQV", + "name": "Project Grid Row 1", + "width": "fill_container", + "height": "fill_container", + "gap": 14, + "padding": [ + 0, + 1, + 0, + 0 + ], + "children": [ + { + "type": "frame", + "id": "pJmVB", + "name": "城市工作室 Project Card", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 9, + "padding": 10, + "children": [ + { + "type": "rectangle", + "id": "L2NOVE", + "name": "城市工作室 Project Preview", + "fill": "$gray-300", + "width": "fill_container", + "height": 145, + "stroke": "$gray-300", + "strokeWidth": 1 + }, + { + "type": "frame", + "id": "o32Gp", + "name": "城市工作室 Card Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "KJgn8", + "name": "城市工作室 Project Name", + "fill": "$ink", + "content": "城市工作室", + "fontFamily": "$font-ui", + "fontSize": 15, + "fontWeight": "800" + }, + { + "type": "icon", + "id": "bCWdE", + "name": "城市工作室 More", + "width": 18, + "height": 18, + "icon": "ellipsis", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "text", + "id": "CvotF", + "name": "城市工作室 Project Meta", + "fill": "$gray-600", + "content": "3 张成功图 · 3:4 · 今天 15:28", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "pWFMn", + "name": "城市工作室 Project State", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 4, + 8 + ], + "children": [ + { + "type": "text", + "id": "O0rHJK", + "name": "城市工作室 Project State Label", + "fill": "$ink", + "content": "active", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "r18334", + "name": "夏日音乐节 Project Card", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 9, + "padding": 10, + "children": [ + { + "type": "rectangle", + "id": "kZlwN", + "name": "夏日音乐节 Project Preview", + "fill": "$brand-yellow", + "width": "fill_container", + "height": 145, + "stroke": "$gray-300", + "strokeWidth": 1 + }, + { + "type": "frame", + "id": "Z1zDPe", + "name": "夏日音乐节 Card Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "rZhXx", + "name": "夏日音乐节 Project Name", + "fill": "$ink", + "content": "夏日音乐节", + "fontFamily": "$font-ui", + "fontSize": 15, + "fontWeight": "800" + }, + { + "type": "icon", + "id": "nvL2S", + "name": "夏日音乐节 More", + "width": 18, + "height": 18, + "icon": "ellipsis", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "text", + "id": "rAs99", + "name": "夏日音乐节 Project Meta", + "fill": "$gray-600", + "content": "6 张成功图 · 3:4 · 今天 15:28", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "elDDJ", + "name": "夏日音乐节 Project State", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 4, + 8 + ], + "children": [ + { + "type": "text", + "id": "k6kym", + "name": "夏日音乐节 Project State Label", + "fill": "$ink", + "content": "active", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "xe9Fr", + "name": "透明字效 Project Card", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 9, + "padding": 10, + "children": [ + { + "type": "rectangle", + "id": "J4ZYc", + "name": "透明字效 Project Preview", + "fill": "$gray-100", + "width": "fill_container", + "height": 145, + "stroke": "$gray-300", + "strokeWidth": 1 + }, + { + "type": "frame", + "id": "d8mhPG", + "name": "透明字效 Card Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "GGG9O", + "name": "透明字效 Project Name", + "fill": "$ink", + "content": "透明字效", + "fontFamily": "$font-ui", + "fontSize": 15, + "fontWeight": "800" + }, + { + "type": "icon", + "id": "lRd3a", + "name": "透明字效 More", + "width": 18, + "height": 18, + "icon": "ellipsis", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "text", + "id": "AoZRN", + "name": "透明字效 Project Meta", + "fill": "$gray-600", + "content": "1 张成功图 · 3:4 · 今天 15:28", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "wvLTs", + "name": "透明字效 Project State", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 4, + 8 + ], + "children": [ + { + "type": "text", + "id": "kSXWd", + "name": "透明字效 Project State Label", + "fill": "$ink", + "content": "active", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "hvtwE", + "name": "Project Grid Row 2", + "width": "fill_container", + "height": "fill_container", + "gap": 14, + "padding": [ + 0, + 1, + 0, + 0 + ], + "children": [ + { + "type": "frame", + "id": "woKOh", + "name": "雨夜街道 Project Card", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 9, + "padding": 10, + "children": [ + { + "type": "rectangle", + "id": "RHZiR", + "name": "雨夜街道 Project Preview", + "fill": "$ink", + "width": "fill_container", + "height": 145, + "stroke": "$gray-300", + "strokeWidth": 1 + }, + { + "type": "frame", + "id": "gmnk4", + "name": "雨夜街道 Card Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ByJoq", + "name": "雨夜街道 Project Name", + "fill": "$ink", + "content": "雨夜街道", + "fontFamily": "$font-ui", + "fontSize": 15, + "fontWeight": "800" + }, + { + "type": "icon", + "id": "RORxM", + "name": "雨夜街道 More", + "width": 18, + "height": 18, + "icon": "ellipsis", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "text", + "id": "L5i5t", + "name": "雨夜街道 Project Meta", + "fill": "$gray-600", + "content": "10 张成功图 · 3:4 · 今天 15:28", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "kz8oK", + "name": "雨夜街道 Project State", + "fill": "$gray-100", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 4, + 8 + ], + "children": [ + { + "type": "text", + "id": "ErGrI", + "name": "雨夜街道 Project State Label", + "fill": "$ink", + "content": "历史已满", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "bBTET", + "name": "海边色卡 Project Card", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 9, + "padding": 10, + "children": [ + { + "type": "rectangle", + "id": "d7VpD", + "name": "海边色卡 Project Preview", + "fill": "$gray-100", + "width": "fill_container", + "height": 145, + "stroke": "$gray-300", + "strokeWidth": 1 + }, + { + "type": "frame", + "id": "u8KS7D", + "name": "海边色卡 Card Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "tRb6w", + "name": "海边色卡 Project Name", + "fill": "$ink", + "content": "海边色卡", + "fontFamily": "$font-ui", + "fontSize": 15, + "fontWeight": "800" + }, + { + "type": "icon", + "id": "tzo1K", + "name": "海边色卡 More", + "width": 18, + "height": 18, + "icon": "ellipsis", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "text", + "id": "C2msT", + "name": "海边色卡 Project Meta", + "fill": "$gray-600", + "content": "生成失败 · 3:4 · 今天 15:28", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "Kl2T1", + "name": "海边色卡 Project State", + "fill": "$gray-100", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 4, + 8 + ], + "children": [ + { + "type": "text", + "id": "FJp1h", + "name": "海边色卡 Project State Label", + "fill": "$ink", + "content": "failed_empty", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "myutR", + "name": "动态贴纸测试 Project Card", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 9, + "padding": 10, + "children": [ + { + "type": "rectangle", + "id": "A6BiO3", + "name": "动态贴纸测试 Project Preview", + "fill": "$gray-050", + "width": "fill_container", + "height": 145, + "stroke": "$gray-300", + "strokeWidth": 1 + }, + { + "type": "frame", + "id": "i5kiJm", + "name": "动态贴纸测试 Card Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "B5ibk5", + "name": "动态贴纸测试 Project Name", + "fill": "$ink", + "content": "动态贴纸测试", + "fontFamily": "$font-ui", + "fontSize": 15, + "fontWeight": "800" + }, + { + "type": "icon", + "id": "NawAv", + "name": "动态贴纸测试 More", + "width": 18, + "height": 18, + "icon": "ellipsis", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "text", + "id": "iLN6v", + "name": "动态贴纸测试 Project Meta", + "fill": "$gray-600", + "content": "生成失败 · 3:4 · 今天 15:28", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "M0wTq7", + "name": "动态贴纸测试 Project State", + "fill": "$gray-100", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 4, + 8 + ], + "children": [ + { + "type": "text", + "id": "ULpb0", + "name": "动态贴纸测试 Project State Label", + "fill": "$ink", + "content": "failed_empty", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "crLju", + "name": "Projects Local Data Footer", + "width": "fill_container", + "height": 50, + "fill": "$ink", + "gap": 10, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "mNCVC", + "name": "Projects Local Data Icon", + "width": 16, + "height": 16, + "icon": "hard-drive", + "library": "lucide", + "fill": "$brand-yellow" + }, + { + "type": "text", + "id": "feP2F", + "name": "Projects Local Data Notice", + "fill": "$paper", + "content": "测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "v2Qbu", + "x": 8160, + "y": 1640, + "name": "03B 项目详情", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "H3FY6", + "name": "Project Detail Nav", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 32 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "CYqUO", + "name": "Project Detail Nav Left", + "gap": 20, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "myI2R", + "name": "Project Detail Logo", + "fill": "$ink", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 24, + "fontWeight": "900" + }, + { + "type": "icon", + "id": "bcQe8", + "name": "Project Detail Back Icon", + "width": 18, + "height": 18, + "icon": "arrow-left", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "fv55p", + "name": "Project Detail Back", + "fill": "$ink", + "content": "返回项目", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "FRxyE", + "name": "Project Detail Nav Right", + "gap": 18, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "i2uaY6", + "name": "Project Detail Credit", + "fill": "$ink", + "content": "点数 9", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + }, + { + "type": "icon", + "id": "DFY19", + "name": "Project Detail Account", + "width": 22, + "height": 22, + "icon": "circle-user-round", + "library": "lucide", + "fill": "$ink" + } + ] + } + ] + }, + { + "type": "frame", + "id": "Kjjx4", + "name": "Project Detail Main", + "width": "fill_container", + "height": 792, + "fill": "$paper", + "layout": "vertical", + "gap": 18, + "padding": [ + 24, + 32 + ], + "children": [ + { + "type": "frame", + "id": "VFB1l", + "name": "Project Detail Header", + "width": "fill_container", + "height": 54, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "ScMXo", + "name": "Project Title Group", + "gap": 12, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "obbHe", + "name": "Project Detail Title", + "fill": "$ink", + "content": "城市工作室", + "fontFamily": "$font-ui", + "fontSize": 28, + "fontWeight": "900" + }, + { + "type": "icon", + "id": "tKuSS", + "name": "Rename Project Icon", + "width": 16, + "height": 16, + "icon": "pencil", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "D47wJ", + "name": "Project Header Meta", + "gap": 10, + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "n7Hf9A", + "name": "Project Active Badge", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 5, + 9 + ], + "children": [ + { + "type": "text", + "id": "uQinp", + "name": "Project Active Text", + "fill": "$ink", + "content": "ACTIVE", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "text", + "id": "J4YLXJ", + "name": "Project Ratio Text", + "fill": "$gray-600", + "content": "3:4 · 3 / 10 张成功图", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "icon", + "id": "GG7zG", + "name": "Project More Icon", + "width": 20, + "height": 20, + "icon": "ellipsis", + "library": "lucide", + "fill": "$ink" + } + ] + } + ] + }, + { + "type": "frame", + "id": "oU25t", + "name": "Project Detail Content", + "width": "fill_container", + "height": 470, + "gap": 20, + "children": [ + { + "type": "frame", + "id": "qheof", + "name": "Current Background Area", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 12, + "children": [ + { + "type": "frame", + "id": "UOpqD", + "name": "Background Area Header", + "width": "fill_container", + "height": 28, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "S2FCr", + "name": "Background Area Title", + "fill": "$ink", + "content": "当前底图", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "jUM6D", + "name": "Background Source", + "fill": "$gray-600", + "content": "生成图 · 今天 15:28", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "rectangle", + "id": "ampwm", + "name": "Current Background Preview", + "fill": "$gray-300", + "width": "fill_container", + "height": "fill_container", + "stroke": "$gray-300", + "strokeWidth": 1 + } + ] + }, + { + "type": "frame", + "id": "QATXA", + "name": "Project Action Panel", + "width": 390, + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 14, + "children": [ + { + "type": "text", + "id": "o0jcRD", + "name": "Project Action Heading", + "fill": "$ink", + "content": "继续处理", + "fontFamily": "$font-ui", + "fontSize": 18, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "NA1A4", + "name": "Continue Generation Button", + "width": "fill_container", + "height": 44, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 8, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "xAE5E", + "name": "Continue Generation Icon", + "width": 17, + "height": 17, + "icon": "sparkles", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "F2p8df", + "name": "Continue Generation Label", + "fill": "$ink", + "content": "继续生成", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "SbT6X", + "name": "Open Editor Button", + "width": "fill_container", + "height": 44, + "fill": "$ink", + "gap": 8, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "mRkcq", + "name": "Open Editor Icon", + "width": 17, + "height": 17, + "icon": "panels-top-left", + "library": "lucide", + "fill": "$brand-yellow" + }, + { + "type": "text", + "id": "zlYSU", + "name": "Open Editor Label", + "fill": "$paper", + "content": "进入编辑器", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "Ezc9G", + "name": "Download Original Button", + "width": "fill_container", + "height": 40, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 8, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "c0CLRs", + "name": "Download Original Icon", + "width": 16, + "height": 16, + "icon": "download", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "I8FTBe", + "name": "Download Original Label", + "fill": "$ink", + "content": "下载原始图", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "rectangle", + "id": "qDgeN", + "name": "Project Action Divider", + "fill": "$gray-300", + "width": "fill_container", + "height": 1 + }, + { + "type": "text", + "id": "YZYLa", + "name": "Generation Conditions Title", + "fill": "$ink", + "content": "继续生成前置条件", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "frame", + "id": "pma7k", + "name": "Condition 历史 3 / 10", + "width": "fill_container", + "height": 22, + "gap": 8, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "b6JAza", + "name": "Condition 历史 3 / 10 Icon", + "width": 15, + "height": 15, + "icon": "circle-check", + "library": "lucide", + "fill": "$success" + }, + { + "type": "text", + "id": "qBzVM", + "name": "Condition 历史 3 / 10 Text", + "fill": "$gray-600", + "content": "历史 3 / 10", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "DpYkK", + "name": "Condition 当前有可用模型", + "width": "fill_container", + "height": 22, + "gap": 8, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "MMkQe", + "name": "Condition 当前有可用模型 Icon", + "width": 15, + "height": 15, + "icon": "circle-check", + "library": "lucide", + "fill": "$success" + }, + { + "type": "text", + "id": "zHNve", + "name": "Condition 当前有可用模型 Text", + "fill": "$gray-600", + "content": "当前有可用模型", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "eRsbD", + "name": "Condition 点数与单任务约束通过", + "width": "fill_container", + "height": 22, + "gap": 8, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "cBr30", + "name": "Condition 点数与单任务约束通过 Icon", + "width": 15, + "height": 15, + "icon": "circle-check", + "library": "lucide", + "fill": "$success" + }, + { + "type": "text", + "id": "DfA4S", + "name": "Condition 点数与单任务约束通过 Text", + "fill": "$gray-600", + "content": "点数与单任务约束通过", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "ZjUAS", + "name": "Condition 本机存储可写", + "width": "fill_container", + "height": 22, + "gap": 8, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "gzJF3", + "name": "Condition 本机存储可写 Icon", + "width": 15, + "height": 15, + "icon": "circle-check", + "library": "lucide", + "fill": "$success" + }, + { + "type": "text", + "id": "w77Pp", + "name": "Condition 本机存储可写 Text", + "fill": "$gray-600", + "content": "本机存储可写", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "r1V1LB", + "name": "Latest Exports Box", + "width": "fill_container", + "height": 60, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 4, + "padding": [ + 6, + 9 + ], + "children": [ + { + "type": "text", + "id": "k1TJB", + "name": "Latest Exports Title", + "fill": "$ink", + "content": "最新成品", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + }, + { + "type": "text", + "id": "d4wTW", + "name": "Latest Exports Value", + "fill": "$gray-600", + "content": "JPG · 今天 15:42 PNG · 尚未导出", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "SkrQR", + "name": "Project History Section", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 10, + "children": [ + { + "type": "frame", + "id": "t8MoM", + "name": "Project History Header", + "width": "fill_container", + "height": 28, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "V1iuSV", + "name": "Project History Title", + "fill": "$ink", + "content": "生成历史", + "fontFamily": "$font-ui", + "fontSize": 17, + "fontWeight": "900" + }, + { + "type": "text", + "id": "pyl6t", + "name": "Project History Limit", + "fill": "$gray-600", + "content": "当前底图不能直接删除 · 最多 10 张", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "L9WWb", + "name": "Project History Thumbnails", + "width": "fill_container", + "height": "fill_container", + "gap": 10, + "children": [ + { + "type": "frame", + "id": "ONtKx", + "name": "History Thumbnail 1", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 5, + "padding": 7, + "children": [ + { + "type": "rectangle", + "id": "I4z8YD", + "name": "History Image 1", + "fill": "$gray-100", + "width": "fill_container", + "height": "fill_container" + }, + { + "type": "text", + "id": "s6EDC1", + "name": "History Meta 1", + "fill": "$gray-600", + "content": "今天 14:21", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "F9kNU9", + "name": "History Thumbnail 2", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 5, + "padding": 7, + "children": [ + { + "type": "rectangle", + "id": "rzTgW", + "name": "History Image 2", + "fill": "$gray-100", + "width": "fill_container", + "height": "fill_container" + }, + { + "type": "text", + "id": "YFzU2", + "name": "History Meta 2", + "fill": "$gray-600", + "content": "今天 14:22", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "uxT4z", + "name": "History Thumbnail 3", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$brand-yellow", + "strokeWidth": 3, + "layout": "vertical", + "gap": 5, + "padding": 7, + "children": [ + { + "type": "rectangle", + "id": "YOGa0", + "name": "History Image 3", + "fill": "$gray-300", + "width": "fill_container", + "height": "fill_container" + }, + { + "type": "text", + "id": "i7w9z", + "name": "History Meta 3", + "fill": "$gray-600", + "content": "当前底图", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "f04y7q", + "name": "History Thumbnail 4", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 5, + "padding": 7, + "children": [ + { + "type": "rectangle", + "id": "UPgGO", + "name": "History Image 4", + "fill": "$gray-100", + "width": "fill_container", + "height": "fill_container" + }, + { + "type": "text", + "id": "PPDmc", + "name": "History Meta 4", + "fill": "$gray-600", + "content": "今天 14:24", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "d5dBf", + "name": "History Thumbnail 5", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 5, + "padding": 7, + "children": [ + { + "type": "rectangle", + "id": "jdwWU", + "name": "History Image 5", + "fill": "$gray-100", + "width": "fill_container", + "height": "fill_container" + }, + { + "type": "text", + "id": "GH4lv", + "name": "History Meta 5", + "fill": "$gray-600", + "content": "今天 14:25", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "VaCUb", + "name": "History Thumbnail 6", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 5, + "padding": 7, + "children": [ + { + "type": "rectangle", + "id": "TColf", + "name": "History Image 6", + "fill": "$gray-100", + "width": "fill_container", + "height": "fill_container" + }, + { + "type": "text", + "id": "CG7rd", + "name": "History Meta 6", + "fill": "$gray-600", + "content": "今天 14:26", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "BF4tt", + "name": "History Thumbnail 7", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 5, + "padding": 7, + "children": [ + { + "type": "rectangle", + "id": "RyKJs", + "name": "History Image 7", + "fill": "$gray-100", + "width": "fill_container", + "height": "fill_container" + }, + { + "type": "text", + "id": "sYgSc", + "name": "History Meta 7", + "fill": "$gray-600", + "content": "今天 14:27", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "Gbd3a", + "name": "Project Detail Local Footer", + "width": "fill_container", + "height": 50, + "fill": "$ink", + "gap": 10, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "hztnp", + "name": "Project Detail Local Icon", + "width": 16, + "height": 16, + "icon": "hard-drive", + "library": "lucide", + "fill": "$brand-yellow" + }, + { + "type": "text", + "id": "bpZak", + "name": "Project Detail Local Notice", + "fill": "$paper", + "content": "测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "bHQnJ", + "x": 9920, + "y": 1640, + "name": "04A 三栏编辑器", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "t8fly5", + "name": "Editor Top Toolbar", + "width": "fill_container", + "height": 56, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 20 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "k2yVPw", + "name": "Editor Toolbar Left", + "gap": 14, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "JOOIa", + "name": "Editor Back Icon", + "width": 18, + "height": 18, + "icon": "arrow-left", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "T5ELwR", + "name": "Editor Project Name", + "fill": "$ink", + "content": "城市工作室", + "fontFamily": "$font-ui", + "fontSize": 15, + "fontWeight": "800" + }, + { + "type": "frame", + "id": "NimRw", + "name": "Editor Ratio Badge", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 4, + 8 + ], + "children": [ + { + "type": "text", + "id": "c68LII", + "name": "Editor Ratio Text", + "fill": "$ink", + "content": "3:4", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "rectangle", + "id": "Y923KX", + "name": "Editor Toolbar Divider", + "fill": "$gray-300", + "width": 1, + "height": 24 + }, + { + "type": "frame", + "id": "eMn61", + "name": "撤销 Tool Button", + "width": 34, + "height": 34, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "S7UEzz", + "name": "撤销 Tool Icon", + "width": 17, + "height": 17, + "icon": "undo-2", + "library": "lucide", + "fill": "$ink" + } + ] + }, + { + "type": "frame", + "id": "LQ8cT", + "name": "重做 Tool Button", + "width": 34, + "height": 34, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "Zr8vs", + "name": "重做 Tool Icon", + "width": 17, + "height": 17, + "icon": "redo-2", + "library": "lucide", + "fill": "$ink" + } + ] + } + ] + }, + { + "type": "frame", + "id": "gD4DS", + "name": "Editor Toolbar Right", + "gap": 10, + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "QMOuo", + "name": "Dirty Save Status", + "width": 150, + "height": 34, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 8, + "padding": [ + 0, + 11 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "AxAnV", + "name": "Dirty Save Icon", + "width": 14, + "height": 14, + "icon": "circle", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "Ctbtv", + "name": "Dirty Save Label", + "fill": "$ink", + "content": "有未保存修改", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "zYrqL", + "name": "Editor Preview Button", + "height": 36, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 7, + "padding": [ + 0, + 13 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "suVxP", + "name": "Editor Preview Icon", + "width": 16, + "height": 16, + "icon": "eye", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "OWt10", + "name": "Editor Preview Label", + "fill": "$ink", + "content": "预览", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "q7Q17b", + "name": "Editor Export Button", + "height": 36, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 7, + "padding": [ + 0, + 15 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "eQoUw", + "name": "Editor Export Icon", + "width": 16, + "height": 16, + "icon": "download", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "J0pmD3", + "name": "Editor Export Label", + "fill": "$ink", + "content": "导出", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "800" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "lRJCj", + "name": "Editor Body", + "width": "fill_container", + "height": 812, + "fill": "$gray-100", + "children": [ + { + "type": "frame", + "id": "N3JDd", + "name": "Editor Asset Panel", + "width": 286, + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "right": 1 + }, + "layout": "vertical", + "gap": 12, + "padding": 14, + "children": [ + { + "type": "text", + "id": "ld6Gj", + "name": "Editor Asset Heading", + "fill": "$ink", + "content": "素材与底图", + "fontFamily": "$font-ui", + "fontSize": 17, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "i1aqE1", + "name": "Editor Asset Tabs", + "width": "fill_container", + "height": 74, + "layout": "vertical", + "gap": 5, + "children": [ + { + "type": "frame", + "id": "EqDOl", + "name": "Editor Asset Tab Row 1", + "width": "fill_container", + "height": "fill_container", + "gap": 5, + "children": [ + { + "type": "frame", + "id": "XwK3k", + "name": "底图 Editor Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "iwmC5", + "name": "底图 Editor Tab Label", + "fill": "$ink", + "content": "底图", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "A25Tr8", + "name": "历史 Editor Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "zsO7R", + "name": "历史 Editor Tab Label", + "fill": "$ink", + "content": "历史", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "i4xPj", + "name": "文字模板 Editor Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "cb3xf", + "name": "文字模板 Editor Tab Label", + "fill": "$ink", + "content": "文字模板", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "N3AZ7", + "name": "Editor Asset Tab Row 2", + "width": "fill_container", + "height": "fill_container", + "gap": 5, + "children": [ + { + "type": "frame", + "id": "dGJiF", + "name": "普通贴纸 Editor Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "oimFf", + "name": "普通贴纸 Editor Tab Label", + "fill": "$ink", + "content": "普通贴纸", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "YdDqE", + "name": "色卡 Editor Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "B3Dtk", + "name": "色卡 Editor Tab Label", + "fill": "$ink", + "content": "色卡", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "z3ZQ2L", + "name": "动态贴纸 Editor Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "P7lRaB", + "name": "动态贴纸 Editor Tab Label", + "fill": "$ink", + "content": "动态贴纸", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "pjb4O", + "name": "Sticker Part Filter", + "width": "fill_container", + "height": 38, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 8, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "JLl7U", + "name": "Sticker Filter Icon", + "width": 15, + "height": 15, + "icon": "list-filter", + "library": "lucide", + "fill": "$gray-600" + }, + { + "type": "text", + "id": "PVoFk", + "name": "Sticker Filter Text", + "fill": "$gray-600", + "content": "part 1 · 最近使用", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "y95Cm", + "name": "Sticker Asset Grid", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "C7cbP", + "name": "Sticker Grid Row 1", + "width": "fill_container", + "height": "fill_container", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "zkuab", + "name": "Sticker 1", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-100", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "wNFEm", + "name": "Sticker 1 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "ZkwXx", + "name": "Sticker 2", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "lTc9F", + "name": "Sticker 2 Icon", + "width": 24, + "height": 24, + "icon": "star", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "xR4d0", + "name": "Sticker 3", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "avLWI", + "name": "Sticker 3 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "o4PrmW", + "name": "Sticker Grid Row 2", + "width": "fill_container", + "height": "fill_container", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "J7Pljs", + "name": "Sticker 4", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "bUn2e", + "name": "Sticker 4 Icon", + "width": 24, + "height": 24, + "icon": "star", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "HkDOR", + "name": "Sticker 5", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "RpYVR", + "name": "Sticker 5 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "xsXZH", + "name": "Sticker 6", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-100", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "mp80k", + "name": "Sticker 6 Icon", + "width": 24, + "height": 24, + "icon": "star", + "library": "lucide", + "fill": "$gray-600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "W9yXhH", + "name": "Sticker Grid Row 3", + "width": "fill_container", + "height": "fill_container", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "s43Tr", + "name": "Sticker 7", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "WaZRB", + "name": "Sticker 7 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "npJv6", + "name": "Sticker 8", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-100", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "BI2zF", + "name": "Sticker 8 Icon", + "width": 24, + "height": 24, + "icon": "star", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "RDxGK", + "name": "Sticker 9", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "b7E8u", + "name": "Sticker 9 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "LOyno", + "name": "Sticker Grid Row 4", + "width": "fill_container", + "height": "fill_container", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "MyFyy", + "name": "Sticker 10", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-100", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "Z4uS3Z", + "name": "Sticker 10 Icon", + "width": 24, + "height": 24, + "icon": "star", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "KNNQN", + "name": "Sticker 11", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "P4HW8", + "name": "Sticker 11 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "n0s0SV", + "name": "Sticker 12", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "RmSan", + "name": "Sticker 12 Icon", + "width": 24, + "height": 24, + "icon": "star", + "library": "lucide", + "fill": "$gray-600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "ex7qE", + "name": "Sticker Grid Row 5", + "width": "fill_container", + "height": "fill_container", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "hKvCJ", + "name": "Sticker 13", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "NkmgE", + "name": "Sticker 13 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "yoYmb", + "name": "Sticker 14", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "PvwPP", + "name": "Sticker 14 Icon", + "width": 24, + "height": 24, + "icon": "star", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "ogyPp", + "name": "Sticker 15", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-100", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "OhNAb", + "name": "Sticker 15 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + } + ] + } + ] + }, + { + "type": "text", + "id": "rO4BX", + "name": "No Layers Note", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "此编辑器不提供图层面板、隐藏、锁定或编组。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "hDNup", + "name": "Editor Canvas Workspace", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-100", + "layout": "vertical", + "gap": 14, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "mqPFq", + "name": "Canvas Floating Tools", + "height": 34, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 6, + "padding": [ + 0, + 8 + ], + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "XxAPv", + "name": "选择 Canvas Tool", + "height": 28, + "fill": "$brand-yellow", + "gap": 5, + "padding": [ + 0, + 8 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "mmPh9", + "name": "选择 Canvas Tool Icon", + "width": 14, + "height": 14, + "icon": "mouse-pointer-2", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "o3SlKY", + "name": "选择 Canvas Tool Label", + "fill": "$ink", + "content": "选择", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "aK89p", + "name": "复制 Canvas Tool", + "height": 28, + "fill": "$paper", + "gap": 5, + "padding": [ + 0, + 8 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "Zjk7G", + "name": "复制 Canvas Tool Icon", + "width": 14, + "height": 14, + "icon": "copy", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "U6HOb", + "name": "复制 Canvas Tool Label", + "fill": "$ink", + "content": "复制", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "AajIv", + "name": "置顶 Canvas Tool", + "height": 28, + "fill": "$paper", + "gap": 5, + "padding": [ + 0, + 8 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "R3ZnI", + "name": "置顶 Canvas Tool Icon", + "width": 14, + "height": 14, + "icon": "bring-to-front", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "PFg4E", + "name": "置顶 Canvas Tool Label", + "fill": "$ink", + "content": "置顶", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "OooQh", + "name": "删除 Canvas Tool", + "height": 28, + "fill": "$paper", + "gap": 5, + "padding": [ + 0, + 8 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "XuG1K", + "name": "删除 Canvas Tool Icon", + "width": 14, + "height": 14, + "icon": "trash-2", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "l9nZ3m", + "name": "删除 Canvas Tool Label", + "fill": "$ink", + "content": "删除", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "IhMKS", + "name": "3x4 Editing Canvas", + "clip": true, + "width": 470, + "height": 650, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "none", + "children": [ + { + "type": "rectangle", + "id": "YcwSQ", + "x": 0, + "y": 0, + "name": "Editor Background Image", + "fill": "$gray-300", + "width": 470, + "height": 650 + }, + { + "type": "rectangle", + "id": "ALLzz", + "x": 52, + "y": 68, + "name": "Canvas Yellow Poster Block", + "fill": "$brand-yellow", + "width": 366, + "height": 142 + }, + { + "type": "text", + "id": "MAxTx", + "x": 78, + "y": 92, + "name": "Canvas Headline", + "fill": "$ink", + "content": "雨夜\n工作室", + "lineHeight": 0.95, + "fontFamily": "$font-ui", + "fontSize": 52, + "fontWeight": "900" + }, + { + "type": "rectangle", + "id": "heFaV", + "x": 52, + "y": 252, + "name": "Canvas White Content Block", + "fill": "$paper", + "width": 366, + "height": 290 + }, + { + "type": "text", + "id": "w6a4w", + "x": 78, + "y": 282, + "name": "Canvas Body Copy", + "fill": "$ink", + "content": "LIGHT / SOUND / IMAGE\nLOCAL CREATIVE SESSION", + "lineHeight": 1.7, + "fontFamily": "$font-data", + "fontSize": 13, + "fontWeight": "700" + }, + { + "type": "frame", + "id": "POIrC", + "x": 228, + "y": 386, + "name": "Selected Sticker Bounds", + "width": 126, + "height": 96, + "stroke": "$info", + "strokeWidth": 2, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "m1aVO", + "name": "Selected Sticker Symbol", + "width": 54, + "height": 54, + "icon": "sparkles", + "library": "lucide", + "fill": "$ink" + } + ] + }, + { + "type": "rectangle", + "id": "Kdvdj", + "x": 222, + "y": 380, + "name": "Selection Handle 222-380", + "fill": "$paper", + "width": 12, + "height": 12, + "stroke": "$info", + "strokeWidth": 2 + }, + { + "type": "rectangle", + "id": "jDUMP", + "x": 348, + "y": 380, + "name": "Selection Handle 348-380", + "fill": "$paper", + "width": 12, + "height": 12, + "stroke": "$info", + "strokeWidth": 2 + }, + { + "type": "rectangle", + "id": "T8LGL", + "x": 222, + "y": 476, + "name": "Selection Handle 222-476", + "fill": "$paper", + "width": 12, + "height": 12, + "stroke": "$info", + "strokeWidth": 2 + }, + { + "type": "rectangle", + "id": "kZitT", + "x": 348, + "y": 476, + "name": "Selection Handle 348-476", + "fill": "$paper", + "width": 12, + "height": 12, + "stroke": "$info", + "strokeWidth": 2 + } + ] + }, + { + "type": "text", + "id": "z9F2IV", + "name": "Canvas Hint", + "fill": "$gray-600", + "content": "画布 1080 × 1440 · 选中 1 个对象", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "TqqWU", + "name": "Editor Inspector", + "width": 324, + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "left": 1 + }, + "layout": "vertical", + "gap": 14, + "padding": 16, + "children": [ + { + "type": "text", + "id": "j4PGc", + "name": "Inspector Heading", + "fill": "$ink", + "content": "贴纸属性", + "fontFamily": "$font-ui", + "fontSize": 17, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "s6kRh1", + "name": "Selected Asset Info", + "width": "fill_container", + "height": 60, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": 9, + "alignItems": "center", + "children": [ + { + "type": "rectangle", + "id": "F3GS1", + "name": "Selected Asset Thumb", + "fill": "$gray-100", + "width": 42, + "height": 42, + "stroke": "$gray-300", + "strokeWidth": 1 + }, + { + "type": "frame", + "id": "YfZSA", + "name": "Selected Asset Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "KodYP", + "name": "Selected Asset Name", + "fill": "$ink", + "content": "STICKER-024", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "zAPoX", + "name": "Selected Asset Meta", + "fill": "$gray-600", + "content": "普通贴纸 · part 1", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "kts9E", + "name": "位置 Inspector Group", + "width": "fill_container", + "layout": "vertical", + "gap": 5, + "children": [ + { + "type": "frame", + "id": "I0gyZ4", + "name": "位置 Inspector Label Row", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "Z4q66u", + "name": "位置 Inspector Label", + "fill": "$gray-600", + "content": "位置", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "E4nK1T", + "name": "位置 Inspector Value", + "fill": "$ink", + "content": "X 228 Y 386", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "rectangle", + "id": "MrXN8", + "name": "位置 Inspector Control", + "fill": "$gray-050", + "width": "fill_container", + "height": 32, + "stroke": "$gray-300", + "strokeWidth": 1 + } + ] + }, + { + "type": "frame", + "id": "bL9SR", + "name": "尺寸 Inspector Group", + "width": "fill_container", + "layout": "vertical", + "gap": 5, + "children": [ + { + "type": "frame", + "id": "ySkJ7", + "name": "尺寸 Inspector Label Row", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "zzvzo", + "name": "尺寸 Inspector Label", + "fill": "$gray-600", + "content": "尺寸", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "rrB1j", + "name": "尺寸 Inspector Value", + "fill": "$ink", + "content": "126 × 96", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "rectangle", + "id": "rvoaQ", + "name": "尺寸 Inspector Control", + "fill": "$gray-050", + "width": "fill_container", + "height": 32, + "stroke": "$gray-300", + "strokeWidth": 1 + } + ] + }, + { + "type": "frame", + "id": "Z4bCR", + "name": "旋转 Inspector Group", + "width": "fill_container", + "layout": "vertical", + "gap": 5, + "children": [ + { + "type": "frame", + "id": "lzK1b", + "name": "旋转 Inspector Label Row", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "k2mMxp", + "name": "旋转 Inspector Label", + "fill": "$gray-600", + "content": "旋转", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "pKyh1", + "name": "旋转 Inspector Value", + "fill": "$ink", + "content": "0°", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "rectangle", + "id": "YkP5X", + "name": "旋转 Inspector Control", + "fill": "$gray-050", + "width": "fill_container", + "height": 32, + "stroke": "$gray-300", + "strokeWidth": 1 + } + ] + }, + { + "type": "frame", + "id": "WTjDG", + "name": "透明度 Inspector Group", + "width": "fill_container", + "layout": "vertical", + "gap": 5, + "children": [ + { + "type": "frame", + "id": "XPUvt", + "name": "透明度 Inspector Label Row", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "PlXR3", + "name": "透明度 Inspector Label", + "fill": "$gray-600", + "content": "透明度", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "ktbSx", + "name": "透明度 Inspector Value", + "fill": "$ink", + "content": "100%", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "rectangle", + "id": "HTBLL", + "name": "透明度 Inspector Control", + "fill": "$gray-050", + "width": "fill_container", + "height": 32, + "stroke": "$gray-300", + "strokeWidth": 1 + } + ] + }, + { + "type": "frame", + "id": "xs5KU", + "name": "Transform Actions", + "width": "fill_container", + "height": 42, + "gap": 6, + "children": [ + { + "type": "frame", + "id": "EbjPg", + "name": "水平翻转 Inspector Button", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "FzS9e", + "name": "水平翻转 Inspector Icon", + "width": 16, + "height": 16, + "icon": "flip-horizontal-2", + "library": "lucide", + "fill": "$ink" + } + ] + }, + { + "type": "frame", + "id": "h2hTqM", + "name": "垂直翻转 Inspector Button", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "DeOrF", + "name": "垂直翻转 Inspector Icon", + "width": 16, + "height": 16, + "icon": "flip-vertical-2", + "library": "lucide", + "fill": "$ink" + } + ] + }, + { + "type": "frame", + "id": "qGBQO", + "name": "复制 Inspector Button", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "X1Zvpc", + "name": "复制 Inspector Icon", + "width": 16, + "height": 16, + "icon": "copy", + "library": "lucide", + "fill": "$ink" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "Cn6BP", + "name": "Editor Bottom Status", + "width": "fill_container", + "height": 32, + "fill": "$ink", + "padding": [ + 0, + 18 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Nb1rs", + "name": "Editor Object Count", + "fill": "$paper", + "content": "覆盖元素 6 / 50", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + }, + { + "type": "text", + "id": "y7KHb", + "name": "Editor Local Data Notice", + "fill": "$brand-yellow", + "content": "测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + }, + { + "type": "text", + "id": "Wx1xl", + "name": "Editor Zoom", + "fill": "$paper", + "content": "− 75% +", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "i9upg7", + "x": 11680, + "y": 1640, + "name": "04B 导出弹层", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "r0WX7n", + "name": "Editor Top Toolbar", + "width": "fill_container", + "height": 56, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 20 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "OazRs", + "name": "Editor Toolbar Left", + "gap": 14, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "F7fzo", + "name": "Editor Back Icon", + "width": 18, + "height": 18, + "icon": "arrow-left", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "dqhGV", + "name": "Editor Project Name", + "fill": "$ink", + "content": "城市工作室", + "fontFamily": "$font-ui", + "fontSize": 15, + "fontWeight": "800" + }, + { + "type": "frame", + "id": "v7cb6Y", + "name": "Editor Ratio Badge", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 4, + 8 + ], + "children": [ + { + "type": "text", + "id": "alz9A", + "name": "Editor Ratio Text", + "fill": "$ink", + "content": "3:4", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "rectangle", + "id": "rw7YZ", + "name": "Editor Toolbar Divider", + "fill": "$gray-300", + "width": 1, + "height": 24 + }, + { + "type": "frame", + "id": "y8bsGq", + "name": "撤销 Tool Button", + "width": 34, + "height": 34, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "EK6Wa", + "name": "撤销 Tool Icon", + "width": 17, + "height": 17, + "icon": "undo-2", + "library": "lucide", + "fill": "$ink" + } + ] + }, + { + "type": "frame", + "id": "ydI9r", + "name": "重做 Tool Button", + "width": 34, + "height": 34, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "v2MDGk", + "name": "重做 Tool Icon", + "width": 17, + "height": 17, + "icon": "redo-2", + "library": "lucide", + "fill": "$ink" + } + ] + } + ] + }, + { + "type": "frame", + "id": "Z5JMsX", + "name": "Editor Toolbar Right", + "gap": 10, + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "pl1ai", + "name": "Dirty Save Status", + "width": 150, + "height": 34, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 8, + "padding": [ + 0, + 11 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "j8h0Sf", + "name": "Dirty Save Icon", + "width": 14, + "height": 14, + "icon": "circle", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "g3YBpq", + "name": "Dirty Save Label", + "fill": "$ink", + "content": "有未保存修改", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "R8Gxl8", + "name": "Editor Preview Button", + "height": 36, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 7, + "padding": [ + 0, + 13 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "SYYjL", + "name": "Editor Preview Icon", + "width": 16, + "height": 16, + "icon": "eye", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "FDHjR", + "name": "Editor Preview Label", + "fill": "$ink", + "content": "预览", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "R4GX5", + "name": "Editor Export Button", + "height": 36, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 7, + "padding": [ + 0, + 15 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "s7JxxF", + "name": "Editor Export Icon", + "width": 16, + "height": 16, + "icon": "download", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "zv94m", + "name": "Editor Export Label", + "fill": "$ink", + "content": "导出", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "800" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "BVQxl", + "name": "Editor Body", + "width": "fill_container", + "height": 812, + "fill": "$gray-100", + "children": [ + { + "type": "frame", + "id": "JP67e", + "name": "Editor Asset Panel", + "width": 286, + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "right": 1 + }, + "layout": "vertical", + "gap": 12, + "padding": 14, + "children": [ + { + "type": "text", + "id": "dPSen", + "name": "Editor Asset Heading", + "fill": "$ink", + "content": "素材与底图", + "fontFamily": "$font-ui", + "fontSize": 17, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "tZnUJ", + "name": "Editor Asset Tabs", + "width": "fill_container", + "height": 74, + "layout": "vertical", + "gap": 5, + "children": [ + { + "type": "frame", + "id": "nh9Wc", + "name": "Editor Asset Tab Row 1", + "width": "fill_container", + "height": "fill_container", + "gap": 5, + "children": [ + { + "type": "frame", + "id": "ngSdN", + "name": "底图 Editor Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "o9Ksc", + "name": "底图 Editor Tab Label", + "fill": "$ink", + "content": "底图", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "Bgjtx", + "name": "历史 Editor Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "B9PbCQ", + "name": "历史 Editor Tab Label", + "fill": "$ink", + "content": "历史", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "ADtBs", + "name": "文字模板 Editor Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "LVhX3", + "name": "文字模板 Editor Tab Label", + "fill": "$ink", + "content": "文字模板", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "ow24A", + "name": "Editor Asset Tab Row 2", + "width": "fill_container", + "height": "fill_container", + "gap": 5, + "children": [ + { + "type": "frame", + "id": "SUcah", + "name": "普通贴纸 Editor Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "hw2xk", + "name": "普通贴纸 Editor Tab Label", + "fill": "$ink", + "content": "普通贴纸", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "EPgPM", + "name": "色卡 Editor Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "wfHNW", + "name": "色卡 Editor Tab Label", + "fill": "$ink", + "content": "色卡", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "k5oFm", + "name": "动态贴纸 Editor Tab", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "pum0g", + "name": "动态贴纸 Editor Tab Label", + "fill": "$ink", + "content": "动态贴纸", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "m1P6Id", + "name": "Sticker Part Filter", + "width": "fill_container", + "height": 38, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 8, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "Kvijw", + "name": "Sticker Filter Icon", + "width": 15, + "height": 15, + "icon": "list-filter", + "library": "lucide", + "fill": "$gray-600" + }, + { + "type": "text", + "id": "oRD2p", + "name": "Sticker Filter Text", + "fill": "$gray-600", + "content": "part 1 · 最近使用", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "C2gZB", + "name": "Sticker Asset Grid", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "yZZIM", + "name": "Sticker Grid Row 1", + "width": "fill_container", + "height": "fill_container", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "l1krkJ", + "name": "Sticker 1", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-100", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "jldZo", + "name": "Sticker 1 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "gUxyH", + "name": "Sticker 2", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "Nz6KZ", + "name": "Sticker 2 Icon", + "width": 24, + "height": 24, + "icon": "star", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "iJdUy", + "name": "Sticker 3", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "pPUwX", + "name": "Sticker 3 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "g7UWT", + "name": "Sticker Grid Row 2", + "width": "fill_container", + "height": "fill_container", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "s3Sv29", + "name": "Sticker 4", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "yphiB", + "name": "Sticker 4 Icon", + "width": 24, + "height": 24, + "icon": "star", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "ciJty", + "name": "Sticker 5", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "m7Vz44", + "name": "Sticker 5 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "G93hlS", + "name": "Sticker 6", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-100", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "ZrsS2", + "name": "Sticker 6 Icon", + "width": 24, + "height": 24, + "icon": "star", + "library": "lucide", + "fill": "$gray-600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "EzMFf", + "name": "Sticker Grid Row 3", + "width": "fill_container", + "height": "fill_container", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "YrKIN", + "name": "Sticker 7", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "usbP4", + "name": "Sticker 7 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "s7I0FJ", + "name": "Sticker 8", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-100", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "xaH4B", + "name": "Sticker 8 Icon", + "width": 24, + "height": 24, + "icon": "star", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "fXFfG", + "name": "Sticker 9", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "ypC1l", + "name": "Sticker 9 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "h3IbO4", + "name": "Sticker Grid Row 4", + "width": "fill_container", + "height": "fill_container", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "w1qHl", + "name": "Sticker 10", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-100", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "RGlCO", + "name": "Sticker 10 Icon", + "width": 24, + "height": 24, + "icon": "star", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "pTmRl", + "name": "Sticker 11", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "uwhbW", + "name": "Sticker 11 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "X2PgUk", + "name": "Sticker 12", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "eUw9k", + "name": "Sticker 12 Icon", + "width": 24, + "height": 24, + "icon": "star", + "library": "lucide", + "fill": "$gray-600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "TjWSD", + "name": "Sticker Grid Row 5", + "width": "fill_container", + "height": "fill_container", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "F4ZI3", + "name": "Sticker 13", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "V1BkFj", + "name": "Sticker 13 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "peRRG", + "name": "Sticker 14", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "WgVOl", + "name": "Sticker 14 Icon", + "width": 24, + "height": 24, + "icon": "star", + "library": "lucide", + "fill": "$gray-600" + } + ] + }, + { + "type": "frame", + "id": "bAEFj", + "name": "Sticker 15", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-100", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "VU0SA", + "name": "Sticker 15 Icon", + "width": 24, + "height": 24, + "icon": "sparkle", + "library": "lucide", + "fill": "$gray-600" + } + ] + } + ] + } + ] + }, + { + "type": "text", + "id": "e30Pw", + "name": "No Layers Note", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "此编辑器不提供图层面板、隐藏、锁定或编组。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "foXdk", + "name": "Editor Canvas Workspace", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-100", + "layout": "vertical", + "gap": 14, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "L491qE", + "name": "Canvas Floating Tools", + "height": 34, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 6, + "padding": [ + 0, + 8 + ], + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "dFuZu", + "name": "选择 Canvas Tool", + "height": 28, + "fill": "$brand-yellow", + "gap": 5, + "padding": [ + 0, + 8 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "PZxWD", + "name": "选择 Canvas Tool Icon", + "width": 14, + "height": 14, + "icon": "mouse-pointer-2", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "VLe4e", + "name": "选择 Canvas Tool Label", + "fill": "$ink", + "content": "选择", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "e0ciOQ", + "name": "复制 Canvas Tool", + "height": 28, + "fill": "$paper", + "gap": 5, + "padding": [ + 0, + 8 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "yCxdq", + "name": "复制 Canvas Tool Icon", + "width": 14, + "height": 14, + "icon": "copy", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "uoIUB", + "name": "复制 Canvas Tool Label", + "fill": "$ink", + "content": "复制", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "olxLK", + "name": "置顶 Canvas Tool", + "height": 28, + "fill": "$paper", + "gap": 5, + "padding": [ + 0, + 8 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "T3WvI", + "name": "置顶 Canvas Tool Icon", + "width": 14, + "height": 14, + "icon": "bring-to-front", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "lOyv5", + "name": "置顶 Canvas Tool Label", + "fill": "$ink", + "content": "置顶", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "h8SXq", + "name": "删除 Canvas Tool", + "height": 28, + "fill": "$paper", + "gap": 5, + "padding": [ + 0, + 8 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "y0HruN", + "name": "删除 Canvas Tool Icon", + "width": 14, + "height": 14, + "icon": "trash-2", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "qH1H9", + "name": "删除 Canvas Tool Label", + "fill": "$ink", + "content": "删除", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "D9WwWF", + "name": "3x4 Editing Canvas", + "clip": true, + "width": 470, + "height": 650, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "none", + "children": [ + { + "type": "rectangle", + "id": "CAJWz", + "x": 0, + "y": 0, + "name": "Editor Background Image", + "fill": "$gray-300", + "width": 470, + "height": 650 + }, + { + "type": "rectangle", + "id": "q5na9E", + "x": 52, + "y": 68, + "name": "Canvas Yellow Poster Block", + "fill": "$brand-yellow", + "width": 366, + "height": 142 + }, + { + "type": "text", + "id": "WOGCW", + "x": 78, + "y": 92, + "name": "Canvas Headline", + "fill": "$ink", + "content": "雨夜\n工作室", + "lineHeight": 0.95, + "fontFamily": "$font-ui", + "fontSize": 52, + "fontWeight": "900" + }, + { + "type": "rectangle", + "id": "SkjNQ", + "x": 52, + "y": 252, + "name": "Canvas White Content Block", + "fill": "$paper", + "width": 366, + "height": 290 + }, + { + "type": "text", + "id": "AQq8G", + "x": 78, + "y": 282, + "name": "Canvas Body Copy", + "fill": "$ink", + "content": "LIGHT / SOUND / IMAGE\nLOCAL CREATIVE SESSION", + "lineHeight": 1.7, + "fontFamily": "$font-data", + "fontSize": 13, + "fontWeight": "700" + }, + { + "type": "frame", + "id": "K7CCWT", + "x": 228, + "y": 386, + "name": "Selected Sticker Bounds", + "width": 126, + "height": 96, + "stroke": "$info", + "strokeWidth": 2, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "Z9T606", + "name": "Selected Sticker Symbol", + "width": 54, + "height": 54, + "icon": "sparkles", + "library": "lucide", + "fill": "$ink" + } + ] + }, + { + "type": "rectangle", + "id": "uxGxK", + "x": 222, + "y": 380, + "name": "Selection Handle 222-380", + "fill": "$paper", + "width": 12, + "height": 12, + "stroke": "$info", + "strokeWidth": 2 + }, + { + "type": "rectangle", + "id": "mu64a", + "x": 348, + "y": 380, + "name": "Selection Handle 348-380", + "fill": "$paper", + "width": 12, + "height": 12, + "stroke": "$info", + "strokeWidth": 2 + }, + { + "type": "rectangle", + "id": "OE5wV", + "x": 222, + "y": 476, + "name": "Selection Handle 222-476", + "fill": "$paper", + "width": 12, + "height": 12, + "stroke": "$info", + "strokeWidth": 2 + }, + { + "type": "rectangle", + "id": "J30tn", + "x": 348, + "y": 476, + "name": "Selection Handle 348-476", + "fill": "$paper", + "width": 12, + "height": 12, + "stroke": "$info", + "strokeWidth": 2 + } + ] + }, + { + "type": "text", + "id": "CJjVq", + "name": "Canvas Hint", + "fill": "$gray-600", + "content": "画布 1080 × 1440 · 选中 1 个对象", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Kuebx", + "name": "Editor Inspector", + "width": 324, + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "left": 1 + }, + "layout": "vertical", + "gap": 14, + "padding": 16, + "children": [ + { + "type": "text", + "id": "bNtCj", + "name": "Inspector Heading", + "fill": "$ink", + "content": "贴纸属性", + "fontFamily": "$font-ui", + "fontSize": 17, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "Zh47T", + "name": "Selected Asset Info", + "width": "fill_container", + "height": 60, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": 9, + "alignItems": "center", + "children": [ + { + "type": "rectangle", + "id": "HAqdq", + "name": "Selected Asset Thumb", + "fill": "$gray-100", + "width": 42, + "height": 42, + "stroke": "$gray-300", + "strokeWidth": 1 + }, + { + "type": "frame", + "id": "vO8Bp", + "name": "Selected Asset Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "KNLFV", + "name": "Selected Asset Name", + "fill": "$ink", + "content": "STICKER-024", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "nSLIC", + "name": "Selected Asset Meta", + "fill": "$gray-600", + "content": "普通贴纸 · part 1", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "VbTLE", + "name": "位置 Inspector Group", + "width": "fill_container", + "layout": "vertical", + "gap": 5, + "children": [ + { + "type": "frame", + "id": "dRwDq", + "name": "位置 Inspector Label Row", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "zO8a4", + "name": "位置 Inspector Label", + "fill": "$gray-600", + "content": "位置", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "rHEjZ", + "name": "位置 Inspector Value", + "fill": "$ink", + "content": "X 228 Y 386", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "rectangle", + "id": "WxugC", + "name": "位置 Inspector Control", + "fill": "$gray-050", + "width": "fill_container", + "height": 32, + "stroke": "$gray-300", + "strokeWidth": 1 + } + ] + }, + { + "type": "frame", + "id": "xCgju", + "name": "尺寸 Inspector Group", + "width": "fill_container", + "layout": "vertical", + "gap": 5, + "children": [ + { + "type": "frame", + "id": "V3BtM", + "name": "尺寸 Inspector Label Row", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "WxsGl", + "name": "尺寸 Inspector Label", + "fill": "$gray-600", + "content": "尺寸", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "pNdPV", + "name": "尺寸 Inspector Value", + "fill": "$ink", + "content": "126 × 96", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "rectangle", + "id": "hK5Zs", + "name": "尺寸 Inspector Control", + "fill": "$gray-050", + "width": "fill_container", + "height": 32, + "stroke": "$gray-300", + "strokeWidth": 1 + } + ] + }, + { + "type": "frame", + "id": "RJAid", + "name": "旋转 Inspector Group", + "width": "fill_container", + "layout": "vertical", + "gap": 5, + "children": [ + { + "type": "frame", + "id": "nsSmt", + "name": "旋转 Inspector Label Row", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "T9sEa", + "name": "旋转 Inspector Label", + "fill": "$gray-600", + "content": "旋转", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "pQ084", + "name": "旋转 Inspector Value", + "fill": "$ink", + "content": "0°", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "rectangle", + "id": "c4xm1", + "name": "旋转 Inspector Control", + "fill": "$gray-050", + "width": "fill_container", + "height": 32, + "stroke": "$gray-300", + "strokeWidth": 1 + } + ] + }, + { + "type": "frame", + "id": "mvkJC", + "name": "透明度 Inspector Group", + "width": "fill_container", + "layout": "vertical", + "gap": 5, + "children": [ + { + "type": "frame", + "id": "qim5c", + "name": "透明度 Inspector Label Row", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "CHyCn", + "name": "透明度 Inspector Label", + "fill": "$gray-600", + "content": "透明度", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "jqX66", + "name": "透明度 Inspector Value", + "fill": "$ink", + "content": "100%", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "rectangle", + "id": "FqjlE", + "name": "透明度 Inspector Control", + "fill": "$gray-050", + "width": "fill_container", + "height": 32, + "stroke": "$gray-300", + "strokeWidth": 1 + } + ] + }, + { + "type": "frame", + "id": "IQEdd", + "name": "Transform Actions", + "width": "fill_container", + "height": 42, + "gap": 6, + "children": [ + { + "type": "frame", + "id": "PMZZ4", + "name": "水平翻转 Inspector Button", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "I5qqh", + "name": "水平翻转 Inspector Icon", + "width": 16, + "height": 16, + "icon": "flip-horizontal-2", + "library": "lucide", + "fill": "$ink" + } + ] + }, + { + "type": "frame", + "id": "d88C5", + "name": "垂直翻转 Inspector Button", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "ENAqN", + "name": "垂直翻转 Inspector Icon", + "width": 16, + "height": 16, + "icon": "flip-vertical-2", + "library": "lucide", + "fill": "$ink" + } + ] + }, + { + "type": "frame", + "id": "YyzZ6", + "name": "复制 Inspector Button", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "I3YSz4", + "name": "复制 Inspector Icon", + "width": 16, + "height": 16, + "icon": "copy", + "library": "lucide", + "fill": "$ink" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "iARwu", + "name": "Editor Bottom Status", + "width": "fill_container", + "height": 32, + "fill": "$ink", + "padding": [ + 0, + 18 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "B8CrP", + "name": "Editor Object Count", + "fill": "$paper", + "content": "覆盖元素 6 / 50", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + }, + { + "type": "text", + "id": "BWeVQ", + "name": "Editor Local Data Notice", + "fill": "$brand-yellow", + "content": "测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + }, + { + "type": "text", + "id": "Yt4Z0", + "name": "Editor Zoom", + "fill": "$paper", + "content": "− 75% +", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "lN7RG", + "layoutPosition": "absolute", + "x": 0, + "y": 0, + "name": "Export Modal Backdrop", + "width": 1600, + "height": 900, + "fill": "#11111199" + }, + { + "type": "frame", + "id": "oLqi9", + "layoutPosition": "absolute", + "x": 480, + "y": 118, + "name": "Export Dialog", + "width": 640, + "height": 660, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "gap": 16, + "padding": 24, + "children": [ + { + "type": "frame", + "id": "D0kmS", + "name": "Export Dialog Header", + "width": "fill_container", + "height": 36, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "cR7hl", + "name": "Export Dialog Title", + "fill": "$ink", + "content": "导出成品", + "fontFamily": "$font-ui", + "fontSize": 22, + "fontWeight": "900" + }, + { + "type": "icon", + "id": "R3UCg", + "name": "Export Dialog Close", + "width": 20, + "height": 20, + "icon": "x", + "library": "lucide", + "fill": "$ink" + } + ] + }, + { + "type": "text", + "id": "xKIeG", + "name": "Export Dialog Meta", + "fill": "$gray-600", + "content": "城市工作室 · 1080 × 1440 · 无 Dada 水印", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "bgYH4", + "name": "Export Format Group", + "width": "fill_container", + "layout": "vertical", + "gap": 7, + "children": [ + { + "type": "text", + "id": "f5c8p", + "name": "Export Format Label", + "fill": "$ink", + "content": "文件格式", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "frame", + "id": "oOnXc", + "name": "Export Format Segments", + "width": "fill_container", + "height": 42, + "stroke": "$ink", + "strokeWidth": 1, + "children": [ + { + "type": "frame", + "id": "L31ol", + "name": "JPG Export Segment", + "width": "fill_container", + "height": "fill_container", + "fill": "$brand-yellow", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "VzmYT", + "name": "JPG Export Label", + "fill": "$ink", + "content": "JPG", + "fontFamily": "$font-data", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "PFLFj", + "name": "PNG Export Segment", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "t0zzo", + "name": "PNG Export Label", + "fill": "$ink", + "content": "PNG", + "fontFamily": "$font-data", + "fontSize": 13, + "fontWeight": "700" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "vu0q5", + "name": "JPG Quality Group", + "width": "fill_container", + "layout": "vertical", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "snGNU", + "name": "JPG Quality Header", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "CIG1e", + "name": "JPG Quality Label", + "fill": "$ink", + "content": "JPG 质量", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "CXgfW", + "name": "JPG Quality Value", + "fill": "$ink", + "content": "92", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "jDKCB", + "name": "JPG Quality Slider", + "width": "fill_container", + "height": 28, + "alignItems": "center", + "children": [ + { + "type": "rectangle", + "id": "wmwXD", + "name": "Quality Slider Track", + "fill": "$gray-300", + "width": "fill_container", + "height": 4 + }, + { + "type": "ellipse", + "id": "zwgRN", + "name": "Quality Slider Thumb", + "fill": "$brand-yellow", + "width": 18, + "height": 18, + "stroke": "$ink", + "strokeWidth": 2 + } + ] + } + ] + }, + { + "type": "frame", + "id": "FKqPT", + "name": "Export Summary", + "width": "fill_container", + "height": 74, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 12, + "children": [ + { + "type": "frame", + "id": "SW594", + "name": "Export Summary Row", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "zFaLw", + "name": "Export Summary Size Label", + "fill": "$gray-600", + "content": "输出尺寸", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "UrrLL", + "name": "Export Summary Size Value", + "fill": "$ink", + "content": "1080 × 1440", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "text", + "id": "AfBNx", + "name": "Export Summary Note", + "fill": "$gray-600", + "content": "浏览器下载与后端最新成品保存使用同一次客户端合成。", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "cnPIs", + "name": "Uncommitted Export Warning", + "width": "fill_container", + "height": 108, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 12, + "children": [ + { + "type": "frame", + "id": "tuHub", + "name": "Uncommitted Warning Header", + "gap": 8, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "fmLZq", + "name": "Uncommitted Warning Icon", + "width": 17, + "height": 17, + "icon": "triangle-alert", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "C927to", + "name": "Uncommitted Warning Title", + "fill": "$ink", + "content": "存在未提交的文字或样式修改", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "900" + } + ] + }, + { + "type": "text", + "id": "xgY48", + "name": "Uncommitted Warning Body", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "确认后先提交当前修改,形成一次撤销记录,再导出;取消则不提交也不导出。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "gadtm", + "name": "Backend Save Failure Note", + "width": "fill_container", + "height": 68, + "fill": "$paper", + "stroke": "$danger", + "strokeWidth": 1, + "gap": 10, + "padding": 12, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "x5FaXE", + "name": "Backend Save Failure Icon", + "width": 18, + "height": 18, + "icon": "circle-alert", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "text", + "id": "NauQW", + "name": "Backend Save Failure Text", + "fill": "$danger", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "若后端保存失败,仍保留客户端下载;latest_exports 不更新。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "ueNu1", + "name": "Export Dialog Actions", + "width": "fill_container", + "height": 46, + "gap": 10, + "justifyContent": "end", + "children": [ + { + "type": "frame", + "id": "u5pZCq", + "name": "Cancel Export Button", + "width": 110, + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "WtV3T", + "name": "Cancel Export Label", + "fill": "$ink", + "content": "取消", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "WqLC3", + "name": "Confirm Export Button", + "width": 210, + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 8, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "dRpM2", + "name": "Confirm Export Icon", + "width": 16, + "height": 16, + "icon": "download", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "g33hBp", + "name": "Confirm Export Label", + "fill": "$ink", + "content": "提交修改并导出", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "900" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "YlKzE", + "x": 11680, + "y": 2700, + "name": "05A 点数明细", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "m9KgoD", + "name": "Credits Top Nav", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 32 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "I0MXV", + "name": "Credits Nav Left", + "gap": 24, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "yDxvw", + "name": "Credits Logo", + "fill": "$ink", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 24, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "Zos0h", + "name": "Credits 创作 Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "YeWsA", + "name": "Credits 创作 Label", + "fill": "$ink", + "content": "创作", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "sXekv", + "name": "Credits 项目 Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "qSNZq", + "name": "Credits 项目 Label", + "fill": "$ink", + "content": "项目", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "uLruk", + "name": "Credits 点数 Item", + "height": 34, + "fill": "$brand-yellow", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "K4vv82", + "name": "Credits 点数 Label", + "fill": "$ink", + "content": "点数", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "IfSWn", + "name": "Credits 设置 Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "h6xNAn", + "name": "Credits 设置 Label", + "fill": "$ink", + "content": "设置", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "D7z0yV", + "name": "Credits Nav Right", + "gap": 16, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "gB50N", + "name": "Credits Current Task", + "fill": "$gray-600", + "content": "当前无生成任务", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "icon", + "id": "B4tFi", + "name": "Credits Account Icon", + "width": 22, + "height": 22, + "icon": "circle-user-round", + "library": "lucide", + "fill": "$ink" + } + ] + } + ] + }, + { + "type": "frame", + "id": "Q0axyR", + "name": "Credits Main", + "width": "fill_container", + "height": 792, + "fill": "$paper", + "layout": "vertical", + "gap": 22, + "padding": [ + 30, + 40 + ], + "children": [ + { + "type": "frame", + "id": "QrEwr", + "name": "Credits Header", + "width": "fill_container", + "height": 48, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "emXIX", + "name": "Credits Heading", + "fill": "$ink", + "content": "点数明细", + "fontFamily": "$font-ui", + "fontSize": 28, + "fontWeight": "900" + }, + { + "type": "text", + "id": "rdnDy", + "name": "Credits Header Note", + "fill": "$gray-600", + "content": "点数不提供购买入口", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "b94RJ", + "name": "Credits Metrics", + "width": "fill_container", + "height": 128, + "gap": 12, + "children": [ + { + "type": "frame", + "id": "o3GuRs", + "name": "可用点数 Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 18, + "children": [ + { + "type": "text", + "id": "wrJeC", + "name": "可用点数 Metric Label", + "fill": "$gray-600", + "content": "可用点数", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "FvrOp", + "name": "可用点数 Metric Value", + "fill": "$ink", + "content": "9", + "fontFamily": "$font-data", + "fontSize": 34, + "fontWeight": "700" + }, + { + "type": "text", + "id": "HOHL8", + "name": "可用点数 Metric Note", + "fill": "$gray-600", + "content": "可用于新任务", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "amEdQ", + "name": "冻结点数 Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 18, + "children": [ + { + "type": "text", + "id": "v5eCh", + "name": "冻结点数 Metric Label", + "fill": "$gray-600", + "content": "冻结点数", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "OKPSV", + "name": "冻结点数 Metric Value", + "fill": "$ink", + "content": "0", + "fontFamily": "$font-data", + "fontSize": 34, + "fontWeight": "700" + }, + { + "type": "text", + "id": "fJ2yJ", + "name": "冻结点数 Metric Note", + "fill": "$gray-600", + "content": "仅 queued / running 时占用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "dGDax", + "name": "累计生成 Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 18, + "children": [ + { + "type": "text", + "id": "z6SSNV", + "name": "累计生成 Metric Label", + "fill": "$gray-600", + "content": "累计生成", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "WohWS", + "name": "累计生成 Metric Value", + "fill": "$ink", + "content": "3", + "fontFamily": "$font-data", + "fontSize": 34, + "fontWeight": "700" + }, + { + "type": "text", + "id": "k3rdHW", + "name": "累计生成 Metric Note", + "fill": "$gray-600", + "content": "成功任务", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "ttP54", + "name": "Credit Ledger Controls", + "width": "fill_container", + "height": 42, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "t8XMCF", + "name": "Credit Ledger Heading", + "fill": "$ink", + "content": "流水", + "fontFamily": "$font-ui", + "fontSize": 18, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "T0mOHi", + "name": "Credit Ledger Filters", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "Nf726", + "name": "全部事件 Credit Filter", + "height": 34, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "YHwbo", + "name": "全部事件 Credit Filter Label", + "fill": "$gray-600", + "content": "全部事件", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "rKggT", + "name": "最近 30 天 Credit Filter", + "height": 34, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "D0OFfa", + "name": "最近 30 天 Credit Filter Label", + "fill": "$gray-600", + "content": "最近 30 天", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "QhvKW", + "name": "Credit Ledger Table", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "y3PhH", + "name": "Credit Table Header", + "width": "fill_container", + "height": 44, + "fill": "$ink", + "children": [ + { + "type": "frame", + "id": "RQTVG", + "name": "时间 Header Cell", + "width": 220, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "NItPb", + "name": "时间 Header Text", + "fill": "$paper", + "content": "时间", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "yiyqZ", + "name": "事件 Header Cell", + "width": 300, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "kNmFS", + "name": "事件 Header Text", + "fill": "$paper", + "content": "事件", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "TouXd", + "name": "变动 Header Cell", + "width": 160, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "q2rOZt", + "name": "变动 Header Text", + "fill": "$paper", + "content": "变动", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "Z0jg4S", + "name": "关联 Header Cell", + "width": 400, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "v2j39", + "name": "关联 Header Text", + "fill": "$paper", + "content": "关联", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "cjCdW", + "name": "余额 Header Cell", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "girF1", + "name": "余额 Header Text", + "fill": "$paper", + "content": "余额", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "W1tll", + "name": "Credit Table Row 1", + "width": "fill_container", + "height": 52, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "t1DPh", + "name": "Credit Row 1 Cell 1", + "width": 220, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "mQFTO", + "name": "Credit Row 1 Text 1", + "fill": "$ink", + "content": "今天 15:28", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "e5ddp", + "name": "Credit Row 1 Cell 2", + "width": 300, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ZLFb4", + "name": "Credit Row 1 Text 2", + "fill": "$ink", + "content": "generation_commit", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "GGCNs", + "name": "Credit Row 1 Cell 3", + "width": 160, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "P0GAM", + "name": "Credit Row 1 Text 3", + "fill": "$ink", + "content": "−1", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "CpQvx", + "name": "Credit Row 1 Cell 4", + "width": 400, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "mKnIx", + "name": "Credit Row 1 Text 4", + "fill": "$ink", + "content": "城市工作室 / JOB-38A", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "a985F1", + "name": "Credit Row 1 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Sgu4h", + "name": "Credit Row 1 Text 5", + "fill": "$ink", + "content": "9", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "mNKvJ", + "name": "Credit Table Row 2", + "width": "fill_container", + "height": 52, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "ag8tI", + "name": "Credit Row 2 Cell 1", + "width": 220, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "DpwOE", + "name": "Credit Row 2 Text 1", + "fill": "$ink", + "content": "今天 15:21", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "LRSiq", + "name": "Credit Row 2 Cell 2", + "width": 300, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "f2FAd", + "name": "Credit Row 2 Text 2", + "fill": "$ink", + "content": "generation_release", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "hbQCF", + "name": "Credit Row 2 Cell 3", + "width": 160, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "P8TD7T", + "name": "Credit Row 2 Text 3", + "fill": "$success", + "content": "+1", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "bSOvo", + "name": "Credit Row 2 Cell 4", + "width": 400, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "b0G2wJ", + "name": "Credit Row 2 Text 4", + "fill": "$ink", + "content": "参考图无效 / JOB-377", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "HlQYn", + "name": "Credit Row 2 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "qtlba", + "name": "Credit Row 2 Text 5", + "fill": "$ink", + "content": "10", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "tlVvI", + "name": "Credit Table Row 3", + "width": "fill_container", + "height": 52, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "tOwzN", + "name": "Credit Row 3 Cell 1", + "width": 220, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ItAnb", + "name": "Credit Row 3 Text 1", + "fill": "$ink", + "content": "今天 15:20", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "RfOtO", + "name": "Credit Row 3 Cell 2", + "width": 300, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "n9VwZt", + "name": "Credit Row 3 Text 2", + "fill": "$ink", + "content": "generation_reserve", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "vQHu4", + "name": "Credit Row 3 Cell 3", + "width": 160, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "NByli", + "name": "Credit Row 3 Text 3", + "fill": "$ink", + "content": "−1 冻结", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "iHRiA", + "name": "Credit Row 3 Cell 4", + "width": 400, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Fo8wP", + "name": "Credit Row 3 Text 4", + "fill": "$ink", + "content": "JOB-377", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "q6Z6wi", + "name": "Credit Row 3 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Lse5M", + "name": "Credit Row 3 Text 5", + "fill": "$ink", + "content": "9 + 1 冻结", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "MS3DQ", + "name": "Credit Table Row 4", + "width": "fill_container", + "height": 52, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "CQyju", + "name": "Credit Row 4 Cell 1", + "width": 220, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "CNiNU", + "name": "Credit Row 4 Text 1", + "fill": "$ink", + "content": "昨天 11:03", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "WDq9L", + "name": "Credit Row 4 Cell 2", + "width": 300, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Za5Sg", + "name": "Credit Row 4 Text 2", + "fill": "$ink", + "content": "generation_commit", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "N23R5", + "name": "Credit Row 4 Cell 3", + "width": 160, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "x6ZlEy", + "name": "Credit Row 4 Text 3", + "fill": "$ink", + "content": "−1", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "F8NuXd", + "name": "Credit Row 4 Cell 4", + "width": 400, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Ztj4S", + "name": "Credit Row 4 Text 4", + "fill": "$ink", + "content": "夏日音乐节 / JOB-2F1", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "ynBsn", + "name": "Credit Row 4 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "cXX0H", + "name": "Credit Row 4 Text 5", + "fill": "$ink", + "content": "9", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "wofTR", + "name": "Credit Table Row 5", + "width": "fill_container", + "height": 52, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "t58DG", + "name": "Credit Row 5 Cell 1", + "width": 220, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "uXD5P", + "name": "Credit Row 5 Text 1", + "fill": "$ink", + "content": "7 月 23 日", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "s41agL", + "name": "Credit Row 5 Cell 2", + "width": 300, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "N7eqzi", + "name": "Credit Row 5 Text 2", + "fill": "$ink", + "content": "registration_grant", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "oUHnd", + "name": "Credit Row 5 Cell 3", + "width": 160, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "i696Y", + "name": "Credit Row 5 Text 3", + "fill": "$success", + "content": "+10", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "JTFob", + "name": "Credit Row 5 Cell 4", + "width": 400, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "usSvI", + "name": "Credit Row 5 Text 4", + "fill": "$ink", + "content": "注册赠送", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "UP0Sa", + "name": "Credit Row 5 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "CrBf6", + "name": "Credit Row 5 Text 5", + "fill": "$ink", + "content": "10", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "700" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "ZkMgu", + "name": "Credit State Note", + "width": "fill_container", + "height": 58, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 14 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "FgAPR", + "name": "Credit State Note Icon", + "width": 17, + "height": 17, + "icon": "info", + "library": "lucide", + "fill": "$info" + }, + { + "type": "text", + "id": "ZoHao", + "name": "Credit State Note Text", + "fill": "$gray-600", + "content": "failed / rejected 只显示对应释放;后台上游成本核对状态不会出现在普通用户点数页。", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "WUFgi", + "name": "Credits Local Data Footer", + "width": "fill_container", + "height": 50, + "fill": "$ink", + "gap": 10, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "aYgGe", + "name": "Credits Local Data Icon", + "width": 16, + "height": 16, + "icon": "hard-drive", + "library": "lucide", + "fill": "$brand-yellow" + }, + { + "type": "text", + "id": "U0DOD", + "name": "Credits Local Data Notice", + "fill": "$paper", + "content": "测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "Ws5E0", + "x": 13440, + "y": 2700, + "name": "05B 设置与本机数据", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "NN2Ro", + "name": "Settings Top Nav", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 32 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "fdLKL", + "name": "Settings Nav Left", + "gap": 24, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "r8tol", + "name": "Settings Logo", + "fill": "$ink", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 24, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "AcZNl", + "name": "Settings 创作 Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "QvH3O", + "name": "Settings 创作 Label", + "fill": "$ink", + "content": "创作", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "kjKdl", + "name": "Settings 项目 Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "f7z8T", + "name": "Settings 项目 Label", + "fill": "$ink", + "content": "项目", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "w84W1y", + "name": "Settings 点数 Item", + "height": 34, + "fill": "$paper", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "KOavT", + "name": "Settings 点数 Label", + "fill": "$ink", + "content": "点数", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "mijgA", + "name": "Settings 设置 Item", + "height": 34, + "fill": "$brand-yellow", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "QVumY", + "name": "Settings 设置 Label", + "fill": "$ink", + "content": "设置", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "b7HUqN", + "name": "Settings Nav Right", + "gap": 16, + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "b0UTh", + "name": "Settings Credits", + "fill": "$ink", + "content": "点数 9", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + }, + { + "type": "icon", + "id": "oclFV", + "name": "Settings Account Icon", + "width": 22, + "height": 22, + "icon": "circle-user-round", + "library": "lucide", + "fill": "$ink" + } + ] + } + ] + }, + { + "type": "frame", + "id": "g2E0Dy", + "name": "Settings Main", + "width": "fill_container", + "height": 792, + "fill": "$paper", + "gap": 28, + "padding": [ + 28, + 40 + ], + "children": [ + { + "type": "frame", + "id": "V4l6tA", + "name": "Settings Side Navigation", + "width": 250, + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 4, + "padding": 12, + "children": [ + { + "type": "text", + "id": "d7HfCc", + "name": "Settings Side Title", + "fill": "$ink", + "content": "设置", + "fontFamily": "$font-ui", + "fontSize": 22, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "a3j6RI", + "name": "个人资料 Settings Side Item", + "width": "fill_container", + "height": 42, + "fill": "$brand-yellow", + "gap": 10, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "BpnQJ", + "name": "个人资料 Settings Side Icon", + "width": 17, + "height": 17, + "icon": "user-round", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "fN4oI", + "name": "个人资料 Settings Side Label", + "fill": "$ink", + "content": "个人资料", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "t6XHR", + "name": "本机数据 Settings Side Item", + "width": "fill_container", + "height": 42, + "fill": "$gray-050", + "gap": 10, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "mSnNs", + "name": "本机数据 Settings Side Icon", + "width": 17, + "height": 17, + "icon": "hard-drive", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "i0NMUQ", + "name": "本机数据 Settings Side Label", + "fill": "$ink", + "content": "本机数据", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "h71cnt", + "name": "账号注销 Settings Side Item", + "width": "fill_container", + "height": 42, + "fill": "$gray-050", + "gap": 10, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "IMSpI", + "name": "账号注销 Settings Side Icon", + "width": 17, + "height": 17, + "icon": "user-x", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "U2IvTd", + "name": "账号注销 Settings Side Label", + "fill": "$ink", + "content": "账号注销", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "r0mt9", + "name": "Settings Content", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 18, + "children": [ + { + "type": "frame", + "id": "IakE6", + "name": "Profile Settings Section", + "width": "fill_container", + "height": 260, + "layout": "vertical", + "gap": 14, + "children": [ + { + "type": "text", + "id": "M1CbA", + "name": "Profile Settings Title", + "fill": "$ink", + "content": "个人资料", + "fontFamily": "$font-ui", + "fontSize": 26, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "HgzB5", + "name": "Profile Email Readonly", + "width": "fill_container", + "height": 54, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 3, + "padding": [ + 7, + 12 + ], + "children": [ + { + "type": "text", + "id": "bVo5h", + "name": "Profile Email Label", + "fill": "$gray-600", + "content": "邮箱 · 只读", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "SFIGt", + "name": "Profile Email Value", + "fill": "$ink", + "content": "da•••@example.com", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "XeL7f", + "name": "Profile Editable Fields", + "width": "fill_container", + "height": 64, + "gap": 12, + "children": [ + { + "type": "frame", + "id": "tJS0A", + "name": "创作署名 Settings Field", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 4, + "padding": [ + 7, + 12 + ], + "children": [ + { + "type": "text", + "id": "gJkCS", + "name": "创作署名 Settings Label", + "fill": "$gray-600", + "content": "创作署名", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "jwLYh", + "name": "创作署名 Settings Value", + "fill": "$ink", + "content": "Dada Studio", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "cJ7mk", + "name": "社交 ID Settings Field", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 4, + "padding": [ + 7, + 12 + ], + "children": [ + { + "type": "text", + "id": "si8jl", + "name": "社交 ID Settings Label", + "fill": "$gray-600", + "content": "社交 ID", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "t4wwa", + "name": "社交 ID Settings Value", + "fill": "$ink", + "content": "@dada_local", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "PlZIU", + "name": "Save Profile Button", + "width": 150, + "height": 40, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "LgbU8", + "name": "Save Profile Label", + "fill": "$ink", + "content": "保存资料", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "OgoV7", + "name": "Local Data Settings Section", + "width": "fill_container", + "height": 300, + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 12, + "padding": 18, + "children": [ + { + "type": "frame", + "id": "hlR0T", + "name": "Local Data Section Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "MNsqV", + "name": "Local Data Section Title", + "fill": "$ink", + "content": "本机数据", + "fontFamily": "$font-ui", + "fontSize": 20, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "BhtoF", + "name": "Storage Active Badge", + "fill": "$success", + "padding": [ + 5, + 9 + ], + "children": [ + { + "type": "text", + "id": "Vnncp", + "name": "Storage Active Text", + "fill": "$paper", + "content": "ACTIVE", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "fpw25", + "name": "Fixed Local Data Notice Box", + "width": "fill_container", + "height": 56, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 14 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "sp6GC", + "name": "Fixed Local Data Notice Icon", + "width": 18, + "height": 18, + "icon": "hard-drive", + "library": "lucide", + "fill": "$brand-yellow" + }, + { + "type": "text", + "id": "SFh5u", + "name": "Fixed Local Data Notice Text", + "fill": "$paper", + "content": "测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "YwZBF", + "name": "Storage Meter Header", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "BpU6K", + "name": "Storage Meter Label", + "fill": "$ink", + "content": "本机内容容量", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "GOtbp", + "name": "Storage Meter Value", + "fill": "$ink", + "content": "2.84 GB / 5 GB", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "nuN92", + "name": "Storage Meter", + "width": "fill_container", + "height": 18, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "children": [ + { + "type": "rectangle", + "id": "V7plE", + "name": "Storage Meter Used", + "fill": "$brand-yellow", + "width": 680, + "height": "fill_container" + } + ] + }, + { + "type": "text", + "id": "tRTXu", + "name": "Local Data Risk Copy", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "数据依赖当前 Windows 用户和文件系统权限;机器损坏、重装或删除本机数据目录后不可恢复。请主动下载重要原始图和成品。", + "lineHeight": 1.6, + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "SolVK", + "name": "Local Data Actions", + "width": "fill_container", + "height": 40, + "gap": 10, + "children": [ + { + "type": "frame", + "id": "o8gv0B", + "name": "查看下载建议 Button", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 7, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "MJslM", + "name": "查看下载建议 Icon", + "width": 16, + "height": 16, + "icon": "download", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "plsWC", + "name": "查看下载建议 Label", + "fill": "$ink", + "content": "查看下载建议", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "En6zk", + "name": "打开诊断摘要 Button", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 7, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "yOLit", + "name": "打开诊断摘要 Icon", + "width": 16, + "height": 16, + "icon": "stethoscope", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "v63Mb", + "name": "打开诊断摘要 Label", + "fill": "$ink", + "content": "打开诊断摘要", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "XJXhW", + "name": "Account Deletion Danger Zone", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$danger", + "strokeWidth": 1, + "padding": [ + 14, + 18 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "HRj70", + "name": "Account Deletion Text", + "layout": "vertical", + "gap": 4, + "children": [ + { + "type": "text", + "id": "Kj123", + "name": "Account Deletion Title", + "fill": "$danger", + "content": "注销账号", + "fontFamily": "$font-ui", + "fontSize": 15, + "fontWeight": "900" + }, + { + "type": "text", + "id": "qFLQ1", + "name": "Account Deletion Hint", + "fill": "$gray-600", + "content": "删除资料、项目、图片和未使用点数,无法恢复。", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "YIhaw", + "name": "Open Account Deletion", + "height": 38, + "fill": "$paper", + "stroke": "$danger", + "strokeWidth": 1, + "padding": [ + 0, + 14 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "H4UwV1", + "name": "Open Account Deletion Label", + "fill": "$danger", + "content": "开始注销", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "E5wkA5", + "name": "Settings Local Footer", + "width": "fill_container", + "height": 50, + "fill": "$ink", + "gap": 10, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "jI5nf", + "name": "Settings Local Footer Icon", + "width": 16, + "height": 16, + "icon": "hard-drive", + "library": "lucide", + "fill": "$brand-yellow" + }, + { + "type": "text", + "id": "V5Fa3", + "name": "Settings Local Footer Notice", + "fill": "$paper", + "content": "测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + } + ] + }, + { + "type": "frame", + "id": "e4e2Kz", + "x": 13440, + "y": 3760, + "name": "06A 后台总览", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "children": [ + { + "type": "frame", + "id": "vj2JX", + "name": "Admin Sidebar", + "width": 220, + "height": "fill_container", + "fill": "$ink", + "layout": "vertical", + "gap": 6, + "padding": [ + 20, + 14 + ], + "children": [ + { + "type": "text", + "id": "UGJvR", + "name": "Admin Wordmark", + "fill": "$brand-yellow", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 28, + "fontWeight": "900" + }, + { + "type": "text", + "id": "T624z", + "name": "Admin Domain Label", + "fill": "$gray-300", + "content": "OPERATIONS ADMIN", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "rectangle", + "id": "IOpgo", + "name": "Admin Sidebar Rule", + "fill": "$gray-600", + "width": "fill_container", + "height": 1 + }, + { + "type": "frame", + "id": "ohe5E", + "name": "Admin 总览 Nav", + "width": "fill_container", + "height": 40, + "fill": "$brand-yellow", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "AKFvS", + "name": "Admin 总览 Icon", + "width": 17, + "height": 17, + "icon": "layout-dashboard", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "g2hsqR", + "name": "Admin 总览 Label", + "fill": "$ink", + "content": "总览", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "i12b0n", + "name": "Admin 用户 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "TfPtS", + "name": "Admin 用户 Icon", + "width": 17, + "height": 17, + "icon": "users", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "SGKLd", + "name": "Admin 用户 Label", + "fill": "$paper", + "content": "用户", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "kvenN", + "name": "Admin 邀请码 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "gF90l", + "name": "Admin 邀请码 Icon", + "width": 17, + "height": 17, + "icon": "ticket-check", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "a6Xxpb", + "name": "Admin 邀请码 Label", + "fill": "$paper", + "content": "邀请码", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "DxVJn", + "name": "Admin 模型 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "IK9yb", + "name": "Admin 模型 Icon", + "width": 17, + "height": 17, + "icon": "cpu", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "Rh6eR", + "name": "Admin 模型 Label", + "fill": "$paper", + "content": "模型", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "WZAWy", + "name": "Admin 素材 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "qlKfe", + "name": "Admin 素材 Icon", + "width": 17, + "height": 17, + "icon": "shapes", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "DhjCA", + "name": "Admin 素材 Label", + "fill": "$paper", + "content": "素材", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "yDqxV", + "name": "Admin 内部预览 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "b4h78N", + "name": "Admin 内部预览 Icon", + "width": 17, + "height": 17, + "icon": "flask-conical", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "bVazW", + "name": "Admin 内部预览 Label", + "fill": "$paper", + "content": "内部预览", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "yTPkS", + "name": "Admin 生成记录 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "Ouwyb", + "name": "Admin 生成记录 Icon", + "width": 17, + "height": 17, + "icon": "image", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "x0lPo", + "name": "Admin 生成记录 Label", + "fill": "$paper", + "content": "生成记录", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "B95re", + "name": "Admin 服务与存储 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "O6f5Y", + "name": "Admin 服务与存储 Icon", + "width": 17, + "height": 17, + "icon": "server", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "QZ0Df", + "name": "Admin 服务与存储 Label", + "fill": "$paper", + "content": "服务与存储", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "UtisA", + "name": "Admin 审计 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "RfFjG", + "name": "Admin 审计 Icon", + "width": 17, + "height": 17, + "icon": "shield-check", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "WHXM2", + "name": "Admin 审计 Label", + "fill": "$paper", + "content": "审计", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "n1q7p", + "name": "Admin Session Boundary", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 8, + "justifyContent": "end", + "children": [ + { + "type": "text", + "id": "pAiIs", + "name": "Admin Session Identity", + "fill": "$gray-300", + "content": "su•••@example.com", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "zgPF6", + "name": "Admin Session Hint", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "后台会话不能切换为普通用户", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "gSQTe", + "name": "Admin Overview Shell", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "EhL0E", + "name": "Admin Overview Top Bar", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "h892qw", + "name": "Admin Overview Page Title", + "fill": "$ink", + "content": "总览", + "fontFamily": "$font-ui", + "fontSize": 22, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "ZM2Ef", + "name": "Admin Overall Health", + "gap": 8, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "w6RU4k", + "name": "Admin Overall Health Icon", + "width": 17, + "height": 17, + "icon": "triangle-alert", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "text", + "id": "a4Umbe", + "name": "Admin Overall Health Text", + "fill": "$danger", + "content": "有 2 项需要处理", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "jETqN", + "name": "Admin Critical Storage Strip", + "width": "fill_container", + "height": 38, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "rUrrs", + "name": "Admin Critical Storage Text", + "fill": "$ink", + "content": "LocalDataRoot 已使用 4.71 GB / 5 GB · critical · 最后计量 18:32", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "J5gX7i", + "name": "Admin Critical Storage Action", + "fill": "$ink", + "content": "打开服务与存储 →", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "900" + } + ] + }, + { + "type": "frame", + "id": "TCRbW", + "name": "Admin Overview Main", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "gap": 18, + "padding": 24, + "children": [ + { + "type": "frame", + "id": "K1Gh7", + "name": "Admin Overview Metrics", + "width": "fill_container", + "height": 122, + "gap": 10, + "children": [ + { + "type": "frame", + "id": "iocn7", + "name": "普通用户 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "ebHvm", + "name": "普通用户 Admin Metric Label", + "fill": "$gray-600", + "content": "普通用户", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "b4GKQT", + "name": "普通用户 Admin Metric Value", + "fill": "$ink", + "content": "7 / 10", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "c1Dve2", + "name": "普通用户 Admin Metric Note", + "fill": "$gray-600", + "content": "active 6 · suspended 1", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "tem9C", + "name": "生成任务 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "eOpKU", + "name": "生成任务 Admin Metric Label", + "fill": "$gray-600", + "content": "生成任务", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "t9oWo", + "name": "生成任务 Admin Metric Value", + "fill": "$ink", + "content": "1", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "ANx4r", + "name": "生成任务 Admin Metric Note", + "fill": "$gray-600", + "content": "queued / running", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Q7a7qY", + "name": "成本核对 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "zxfEq", + "name": "成本核对 Admin Metric Label", + "fill": "$gray-600", + "content": "成本核对", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "J0oSW", + "name": "成本核对 Admin Metric Value", + "fill": "$ink", + "content": "2", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "A8dEC", + "name": "成本核对 Admin Metric Note", + "fill": "$gray-600", + "content": "pending_manual_review", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "hQ8n6", + "name": "运行时模型 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "FpkuP", + "name": "运行时模型 Admin Metric Label", + "fill": "$gray-600", + "content": "运行时模型", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "nbeMl", + "name": "运行时模型 Admin Metric Value", + "fill": "$ink", + "content": "2 / 3", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Vc7wZ", + "name": "运行时模型 Admin Metric Note", + "fill": "$gray-600", + "content": "当前推荐 Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "gnkO0", + "name": "Admin Status Grid", + "width": "fill_container", + "height": 250, + "gap": 14, + "children": [ + { + "type": "frame", + "id": "gHjvW", + "name": "Service Status Panel", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "QfarU", + "name": "Service Status Header", + "width": "fill_container", + "height": 42, + "fill": "$ink", + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "sdV56", + "name": "Service Status Title", + "fill": "$paper", + "content": "服务状态", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "Ssz2f", + "name": "Service Status Link", + "fill": "$brand-yellow", + "content": "查看全部 →", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "VjWJQ", + "name": "API Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "T7ql0P", + "name": "API Service Name", + "fill": "$ink", + "content": "API", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "H9ofj", + "name": "API Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "OSmCw", + "name": "Worker Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "fVRnJ", + "name": "Worker Service Name", + "fill": "$ink", + "content": "Worker", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "LZG3m", + "name": "Worker Service State", + "fill": "$danger", + "content": "DEGRADED", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "b2A9j", + "name": "Resend Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "foS4O", + "name": "Resend Service Name", + "fill": "$ink", + "content": "Resend", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "JTQRA", + "name": "Resend Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "a0iQfu", + "name": "高德 Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "kj37f", + "name": "高德 Service Name", + "fill": "$ink", + "content": "高德", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "yNaZN", + "name": "高德 Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "ozbVD", + "name": "AI 网关 Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "lWIKZ", + "name": "AI 网关 Service Name", + "fill": "$ink", + "content": "AI 网关", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "nSSJr", + "name": "AI 网关 Service State", + "fill": "$danger", + "content": "1 个模型不可用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "yyQeJ", + "name": "Admin Alerts Panel", + "width": 500, + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 10, + "padding": 14, + "children": [ + { + "type": "text", + "id": "cvSk6", + "name": "Admin Alerts Title", + "fill": "$ink", + "content": "需要处理", + "fontFamily": "$font-ui", + "fontSize": 16, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "s0MSGH", + "name": "容量已进入 critical Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "bd62L", + "name": "容量已进入 critical Alert Icon", + "width": 18, + "height": 18, + "icon": "hard-drive", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "mA9C8", + "name": "容量已进入 critical Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "MQjJ2", + "name": "容量已进入 critical Alert Title", + "fill": "$ink", + "content": "容量已进入 critical", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "Y7IVa", + "name": "容量已进入 critical Alert Meta", + "fill": "$gray-600", + "content": "等待清理与重新计量", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "vkxx3", + "name": "Worker degraded Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "fF4h6", + "name": "Worker degraded Alert Icon", + "width": 18, + "height": 18, + "icon": "circle-alert", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "E1UAxV", + "name": "Worker degraded Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "P82Be", + "name": "Worker degraded Alert Title", + "fill": "$ink", + "content": "Worker degraded", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "vagNb", + "name": "Worker degraded Alert Meta", + "fill": "$gray-600", + "content": "生成新任务受影响", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "P0oIVT", + "name": "2 项上游成本核对 Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "oKnx8", + "name": "2 项上游成本核对 Alert Icon", + "width": 18, + "height": 18, + "icon": "scale", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "trER0", + "name": "2 项上游成本核对 Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "M3PlG", + "name": "2 项上游成本核对 Alert Title", + "fill": "$ink", + "content": "2 项上游成本核对", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "vWj8Y", + "name": "2 项上游成本核对 Alert Meta", + "fill": "$gray-600", + "content": "最早等待 46 分钟", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "lfhyl", + "name": "Recent Admin Activity", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "N5X80", + "name": "Recent Admin Activity Header", + "width": "fill_container", + "height": 42, + "fill": "$ink", + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "I5LvqY", + "name": "Recent Admin Activity Title", + "fill": "$paper", + "content": "最近后台操作", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "OMjGy", + "name": "Recent Admin Activity Link", + "fill": "$brand-yellow", + "content": "打开审计 →", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "PCUjJ", + "name": "Activity 18:20", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "Akwdo", + "name": "Activity 18:20 18:20", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "RpT2S", + "name": "Activity 18:20 18:20 Text", + "fill": "$ink", + "content": "18:20", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "CgZsQ", + "name": "Activity 18:20 运行时恢复检查", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "u0APP", + "name": "Activity 18:20 运行时恢复检查 Text", + "fill": "$ink", + "content": "运行时恢复检查", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "emBLe", + "name": "Activity 18:20 Gemini Flash", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Gp0W9", + "name": "Activity 18:20 Gemini Flash Text", + "fill": "$ink", + "content": "Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "E1yck", + "name": "Activity 18:20 succeeded", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "p45nNe", + "name": "Activity 18:20 succeeded Text", + "fill": "$ink", + "content": "succeeded", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "DPFDD", + "name": "Activity 17:42", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "f545m", + "name": "Activity 17:42 17:42", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "c53qvt", + "name": "Activity 17:42 17:42 Text", + "fill": "$ink", + "content": "17:42", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "DiSCk", + "name": "Activity 17:42 贴纸清理候选查询", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ZYhTo", + "name": "Activity 17:42 贴纸清理候选查询 Text", + "fill": "$ink", + "content": "贴纸清理候选查询", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "YrFwR", + "name": "Activity 17:42 CLEANUP-19C", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "AClJY", + "name": "Activity 17:42 CLEANUP-19C Text", + "fill": "$ink", + "content": "CLEANUP-19C", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "UnwfM", + "name": "Activity 17:42 succeeded", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "CcEHd", + "name": "Activity 17:42 succeeded Text", + "fill": "$ink", + "content": "succeeded", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "lee3l", + "name": "Activity 16:08", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "lGB7t", + "name": "Activity 16:08 16:08", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "V7o9n", + "name": "Activity 16:08 16:08 Text", + "fill": "$ink", + "content": "16:08", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "l2J45E", + "name": "Activity 16:08 调整点数", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "zWf5T", + "name": "Activity 16:08 调整点数 Text", + "fill": "$ink", + "content": "调整点数", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "W3OzQL", + "name": "Activity 16:08 USER-7A2", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "bRntl", + "name": "Activity 16:08 USER-7A2 Text", + "fill": "$ink", + "content": "USER-7A2", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Apo4S", + "name": "Activity 16:08 +5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "RXqbd", + "name": "Activity 16:08 +5 Text", + "fill": "$ink", + "content": "+5", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "eKc4b", + "name": "Activity 15:30", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "IyUe9", + "name": "Activity 15:30 15:30", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "aMAM0", + "name": "Activity 15:30 15:30 Text", + "fill": "$ink", + "content": "15:30", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "qRInj", + "name": "Activity 15:30 模型配置保存", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "KzKoz", + "name": "Activity 15:30 模型配置保存 Text", + "fill": "$ink", + "content": "模型配置保存", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "pwosT", + "name": "Activity 15:30 CONFIG-12", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "i3EdK", + "name": "Activity 15:30 CONFIG-12 Text", + "fill": "$ink", + "content": "CONFIG-12", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "mbmcA", + "name": "Activity 15:30 version conflict", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "aFmwB", + "name": "Activity 15:30 version conflict Text", + "fill": "$danger", + "content": "version conflict", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "YVfVG", + "x": 15200, + "y": 3760, + "name": "06B 模型配置", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "children": [ + { + "type": "frame", + "id": "mRT4Z", + "name": "Admin Sidebar", + "width": 220, + "height": "fill_container", + "fill": "$ink", + "layout": "vertical", + "gap": 6, + "padding": [ + 20, + 14 + ], + "children": [ + { + "type": "text", + "id": "MoiP7", + "name": "Admin Wordmark", + "fill": "$brand-yellow", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 28, + "fontWeight": "900" + }, + { + "type": "text", + "id": "g9SAZ", + "name": "Admin Domain Label", + "fill": "$gray-300", + "content": "OPERATIONS ADMIN", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "rectangle", + "id": "yUBJw", + "name": "Admin Sidebar Rule", + "fill": "$gray-600", + "width": "fill_container", + "height": 1 + }, + { + "type": "frame", + "id": "Cz1C4", + "name": "Admin 总览 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "nDk7d", + "name": "Admin 总览 Icon", + "width": 17, + "height": 17, + "icon": "layout-dashboard", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "hp8cH", + "name": "Admin 总览 Label", + "fill": "$paper", + "content": "总览", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "ulxCt", + "name": "Admin 用户 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "wlkaG", + "name": "Admin 用户 Icon", + "width": 17, + "height": 17, + "icon": "users", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "aViQJ", + "name": "Admin 用户 Label", + "fill": "$paper", + "content": "用户", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "V1IlnP", + "name": "Admin 邀请码 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "u9MAoa", + "name": "Admin 邀请码 Icon", + "width": 17, + "height": 17, + "icon": "ticket-check", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "HJ4dl", + "name": "Admin 邀请码 Label", + "fill": "$paper", + "content": "邀请码", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "cNH2r", + "name": "Admin 模型 Nav", + "width": "fill_container", + "height": 40, + "fill": "$brand-yellow", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "y5tFuC", + "name": "Admin 模型 Icon", + "width": 17, + "height": 17, + "icon": "cpu", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "VilXw", + "name": "Admin 模型 Label", + "fill": "$ink", + "content": "模型", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "Dmd5a", + "name": "Admin 素材 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "AIGoT", + "name": "Admin 素材 Icon", + "width": 17, + "height": 17, + "icon": "shapes", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "jkApI", + "name": "Admin 素材 Label", + "fill": "$paper", + "content": "素材", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "V1lZai", + "name": "Admin 内部预览 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "M5RacD", + "name": "Admin 内部预览 Icon", + "width": 17, + "height": 17, + "icon": "flask-conical", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "z7Yfnw", + "name": "Admin 内部预览 Label", + "fill": "$paper", + "content": "内部预览", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "nQRgg", + "name": "Admin 生成记录 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "m5CNf", + "name": "Admin 生成记录 Icon", + "width": 17, + "height": 17, + "icon": "image", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "w0BLxK", + "name": "Admin 生成记录 Label", + "fill": "$paper", + "content": "生成记录", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "JMC3D", + "name": "Admin 服务与存储 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "vZwNX", + "name": "Admin 服务与存储 Icon", + "width": 17, + "height": 17, + "icon": "server", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "dK1DF", + "name": "Admin 服务与存储 Label", + "fill": "$paper", + "content": "服务与存储", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "V5cn90", + "name": "Admin 审计 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "a7h8xv", + "name": "Admin 审计 Icon", + "width": 17, + "height": 17, + "icon": "shield-check", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "lSLTY", + "name": "Admin 审计 Label", + "fill": "$paper", + "content": "审计", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "Gi1CH", + "name": "Admin Session Boundary", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 8, + "justifyContent": "end", + "children": [ + { + "type": "text", + "id": "EXETy", + "name": "Admin Session Identity", + "fill": "$gray-300", + "content": "su•••@example.com", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "udz94", + "name": "Admin Session Hint", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "后台会话不能切换为普通用户", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "qSPNO", + "name": "Admin Overview Shell", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "Zvs5c", + "name": "Admin Overview Top Bar", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "kkoYF", + "name": "Admin Overview Page Title", + "fill": "$ink", + "content": "总览", + "fontFamily": "$font-ui", + "fontSize": 22, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "molZA", + "name": "Admin Overall Health", + "gap": 8, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "AUuEd", + "name": "Admin Overall Health Icon", + "width": 17, + "height": 17, + "icon": "triangle-alert", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "text", + "id": "WdVTu", + "name": "Admin Overall Health Text", + "fill": "$danger", + "content": "有 2 项需要处理", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "Z1bc2", + "name": "Admin Critical Storage Strip", + "width": "fill_container", + "height": 38, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "m1az8s", + "name": "Admin Critical Storage Text", + "fill": "$ink", + "content": "LocalDataRoot 已使用 4.71 GB / 5 GB · critical · 最后计量 18:32", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "B0hTtt", + "name": "Admin Critical Storage Action", + "fill": "$ink", + "content": "打开服务与存储 →", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "900" + } + ] + }, + { + "type": "frame", + "id": "i8CsO", + "name": "Admin Overview Main", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "gap": 18, + "padding": 24, + "children": [ + { + "type": "frame", + "id": "dZO3t", + "name": "Admin Overview Metrics", + "width": "fill_container", + "height": 122, + "gap": 10, + "children": [ + { + "type": "frame", + "id": "dCQ5A", + "name": "普通用户 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "Rsi3D", + "name": "普通用户 Admin Metric Label", + "fill": "$gray-600", + "content": "普通用户", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "kyrht", + "name": "普通用户 Admin Metric Value", + "fill": "$ink", + "content": "7 / 10", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "K9xmNQ", + "name": "普通用户 Admin Metric Note", + "fill": "$gray-600", + "content": "active 6 · suspended 1", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "j3tJ9", + "name": "生成任务 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "Z2nw0D", + "name": "生成任务 Admin Metric Label", + "fill": "$gray-600", + "content": "生成任务", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "tfMLm", + "name": "生成任务 Admin Metric Value", + "fill": "$ink", + "content": "1", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "GpRu4", + "name": "生成任务 Admin Metric Note", + "fill": "$gray-600", + "content": "queued / running", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Lh6mh", + "name": "成本核对 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "Z6jFOU", + "name": "成本核对 Admin Metric Label", + "fill": "$gray-600", + "content": "成本核对", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "DnmaW", + "name": "成本核对 Admin Metric Value", + "fill": "$ink", + "content": "2", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Llqjk", + "name": "成本核对 Admin Metric Note", + "fill": "$gray-600", + "content": "pending_manual_review", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "rZQ56", + "name": "运行时模型 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "D7Lu1", + "name": "运行时模型 Admin Metric Label", + "fill": "$gray-600", + "content": "运行时模型", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "PDOq0", + "name": "运行时模型 Admin Metric Value", + "fill": "$ink", + "content": "2 / 3", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Fey7s", + "name": "运行时模型 Admin Metric Note", + "fill": "$gray-600", + "content": "当前推荐 Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "wh5nK", + "name": "Admin Status Grid", + "width": "fill_container", + "height": 250, + "gap": 14, + "children": [ + { + "type": "frame", + "id": "UhWmQ", + "name": "Service Status Panel", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "P336P", + "name": "Service Status Header", + "width": "fill_container", + "height": 42, + "fill": "$ink", + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "wrY42", + "name": "Service Status Title", + "fill": "$paper", + "content": "服务状态", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "EmCdU", + "name": "Service Status Link", + "fill": "$brand-yellow", + "content": "查看全部 →", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "DrFmM", + "name": "API Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "QO0Jj", + "name": "API Service Name", + "fill": "$ink", + "content": "API", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "GGaK4", + "name": "API Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "Lomrp", + "name": "Worker Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "FrM7f", + "name": "Worker Service Name", + "fill": "$ink", + "content": "Worker", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "PKuYL", + "name": "Worker Service State", + "fill": "$danger", + "content": "DEGRADED", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "b7OOdJ", + "name": "Resend Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "X7D5Z8", + "name": "Resend Service Name", + "fill": "$ink", + "content": "Resend", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "JNeTX", + "name": "Resend Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "k7oik9", + "name": "高德 Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "N5Ri8w", + "name": "高德 Service Name", + "fill": "$ink", + "content": "高德", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "n3X5V8", + "name": "高德 Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "Qo8eh", + "name": "AI 网关 Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "wBaf0", + "name": "AI 网关 Service Name", + "fill": "$ink", + "content": "AI 网关", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "ZJJkD", + "name": "AI 网关 Service State", + "fill": "$danger", + "content": "1 个模型不可用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "oIoAq", + "name": "Admin Alerts Panel", + "width": 500, + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 10, + "padding": 14, + "children": [ + { + "type": "text", + "id": "xFKn5", + "name": "Admin Alerts Title", + "fill": "$ink", + "content": "需要处理", + "fontFamily": "$font-ui", + "fontSize": 16, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "zxTTz", + "name": "容量已进入 critical Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "ny5QO", + "name": "容量已进入 critical Alert Icon", + "width": 18, + "height": 18, + "icon": "hard-drive", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "ASjtk", + "name": "容量已进入 critical Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "IILhe", + "name": "容量已进入 critical Alert Title", + "fill": "$ink", + "content": "容量已进入 critical", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "tmnWR", + "name": "容量已进入 critical Alert Meta", + "fill": "$gray-600", + "content": "等待清理与重新计量", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "uAfFJ", + "name": "Worker degraded Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "FjZMF", + "name": "Worker degraded Alert Icon", + "width": 18, + "height": 18, + "icon": "circle-alert", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "q8iAc", + "name": "Worker degraded Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "CPjHM", + "name": "Worker degraded Alert Title", + "fill": "$ink", + "content": "Worker degraded", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "L1lFW", + "name": "Worker degraded Alert Meta", + "fill": "$gray-600", + "content": "生成新任务受影响", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "RrSX7", + "name": "2 项上游成本核对 Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "eXGZP", + "name": "2 项上游成本核对 Alert Icon", + "width": 18, + "height": 18, + "icon": "scale", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "D4zD2", + "name": "2 项上游成本核对 Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "yO3fm", + "name": "2 项上游成本核对 Alert Title", + "fill": "$ink", + "content": "2 项上游成本核对", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "XdWJW", + "name": "2 项上游成本核对 Alert Meta", + "fill": "$gray-600", + "content": "最早等待 46 分钟", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "QPIOJ", + "name": "Recent Admin Activity", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "DfpFW", + "name": "Recent Admin Activity Header", + "width": "fill_container", + "height": 42, + "fill": "$ink", + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "rNGXD", + "name": "Recent Admin Activity Title", + "fill": "$paper", + "content": "最近后台操作", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "t943Sy", + "name": "Recent Admin Activity Link", + "fill": "$brand-yellow", + "content": "打开审计 →", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "mE5hN", + "name": "Activity 18:20", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "Bx0d6", + "name": "Activity 18:20 18:20", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "qDhfk", + "name": "Activity 18:20 18:20 Text", + "fill": "$ink", + "content": "18:20", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "ORbHA", + "name": "Activity 18:20 运行时恢复检查", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "e0Ti0I", + "name": "Activity 18:20 运行时恢复检查 Text", + "fill": "$ink", + "content": "运行时恢复检查", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "KUkXX", + "name": "Activity 18:20 Gemini Flash", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "fcBuo", + "name": "Activity 18:20 Gemini Flash Text", + "fill": "$ink", + "content": "Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "SINqT", + "name": "Activity 18:20 succeeded", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "baLfm", + "name": "Activity 18:20 succeeded Text", + "fill": "$ink", + "content": "succeeded", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "p7hhZ", + "name": "Activity 17:42", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "haHBg", + "name": "Activity 17:42 17:42", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "dupe1", + "name": "Activity 17:42 17:42 Text", + "fill": "$ink", + "content": "17:42", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "JRNQ0", + "name": "Activity 17:42 贴纸清理候选查询", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "GEnNh", + "name": "Activity 17:42 贴纸清理候选查询 Text", + "fill": "$ink", + "content": "贴纸清理候选查询", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "hGuXd", + "name": "Activity 17:42 CLEANUP-19C", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "vdfS2", + "name": "Activity 17:42 CLEANUP-19C Text", + "fill": "$ink", + "content": "CLEANUP-19C", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "miaZO", + "name": "Activity 17:42 succeeded", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "z90Ucn", + "name": "Activity 17:42 succeeded Text", + "fill": "$ink", + "content": "succeeded", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "W8usc3", + "name": "Activity 16:08", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "L3JiM", + "name": "Activity 16:08 16:08", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "iwHXE", + "name": "Activity 16:08 16:08 Text", + "fill": "$ink", + "content": "16:08", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "exIVk", + "name": "Activity 16:08 调整点数", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "GoNXG", + "name": "Activity 16:08 调整点数 Text", + "fill": "$ink", + "content": "调整点数", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "pMsBM", + "name": "Activity 16:08 USER-7A2", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "noBS2", + "name": "Activity 16:08 USER-7A2 Text", + "fill": "$ink", + "content": "USER-7A2", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Xmn8r", + "name": "Activity 16:08 +5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "qN0ya", + "name": "Activity 16:08 +5 Text", + "fill": "$ink", + "content": "+5", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "yTtOp", + "name": "Activity 15:30", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "dJG0P", + "name": "Activity 15:30 15:30", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "qlE7S", + "name": "Activity 15:30 15:30 Text", + "fill": "$ink", + "content": "15:30", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "g29SrK", + "name": "Activity 15:30 模型配置保存", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "QBRsJ", + "name": "Activity 15:30 模型配置保存 Text", + "fill": "$ink", + "content": "模型配置保存", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "YQMBA", + "name": "Activity 15:30 CONFIG-12", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "J8BQky", + "name": "Activity 15:30 CONFIG-12 Text", + "fill": "$ink", + "content": "CONFIG-12", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "sp3o8", + "name": "Activity 15:30 version conflict", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "TABgn", + "name": "Activity 15:30 version conflict Text", + "fill": "$danger", + "content": "version conflict", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "V7ukAj", + "layoutPosition": "absolute", + "x": 220, + "y": 0, + "name": "Models Page Overlay Shell", + "width": 1380, + "height": 900, + "fill": "$paper", + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "xQp7A", + "name": "Models Top Bar", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "zMraO", + "name": "Models Page Title", + "fill": "$ink", + "content": "模型配置", + "fontFamily": "$font-ui", + "fontSize": 22, + "fontWeight": "900" + }, + { + "type": "text", + "id": "pz6GG", + "name": "Models Config Version", + "fill": "$gray-600", + "content": "CONFIG SET v12 · 全量原子保存", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "d4fBdH", + "name": "Models Main", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "gap": 18, + "padding": 24, + "children": [ + { + "type": "frame", + "id": "rzFm4", + "name": "Models Layer Summary", + "width": "fill_container", + "height": 72, + "gap": 10, + "children": [ + { + "type": "frame", + "id": "HGd32", + "name": "配置默认 Model Summary", + "width": "fill_container", + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 14 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Wg9q6", + "name": "配置默认 Model Summary Label", + "fill": "$gray-600", + "content": "配置默认", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "BKjEQ", + "name": "配置默认 Model Summary Value", + "fill": "$ink", + "content": "Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "900" + } + ] + }, + { + "type": "frame", + "id": "WbAwb", + "name": "运行时推荐 Model Summary", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 14 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "AhgpD", + "name": "运行时推荐 Model Summary Label", + "fill": "$gray-600", + "content": "运行时推荐", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Bp1mx", + "name": "运行时推荐 Model Summary Value", + "fill": "$ink", + "content": "Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "900" + } + ] + }, + { + "type": "frame", + "id": "rPsD0", + "name": "运行时可用 Model Summary", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 14 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "FXcH2", + "name": "运行时可用 Model Summary Label", + "fill": "$gray-600", + "content": "运行时可用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Ta0jD", + "name": "运行时可用 Model Summary Value", + "fill": "$ink", + "content": "2 / 3", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "900" + } + ] + } + ] + }, + { + "type": "frame", + "id": "UfCyA", + "name": "Model Configuration Table", + "width": "fill_container", + "height": 292, + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "ZJWRy", + "name": "Model Table Header", + "width": "fill_container", + "height": 44, + "fill": "$ink", + "children": [ + { + "type": "frame", + "id": "S9OFpQ", + "name": "模型 Model Header Cell", + "width": 230, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "L75gW", + "name": "模型 Model Header Text", + "fill": "$paper", + "content": "模型", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "B5o1Iz", + "name": "ENABLED Model Header Cell", + "width": 88, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "nhHBJ", + "name": "ENABLED Model Header Text", + "fill": "$paper", + "content": "ENABLED", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "k9Gss1", + "name": "DEFAULT Model Header Cell", + "width": 88, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "i1mI7", + "name": "DEFAULT Model Header Text", + "fill": "$paper", + "content": "DEFAULT", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "E8yuIN", + "name": "PRIORITY Model Header Cell", + "width": 90, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "T6O2YX", + "name": "PRIORITY Model Header Text", + "fill": "$paper", + "content": "PRIORITY", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "cBAaY", + "name": "CONTRACT Model Header Cell", + "width": 110, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "c7I9dT", + "name": "CONTRACT Model Header Text", + "fill": "$paper", + "content": "CONTRACT", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "U7oVe", + "name": "RUNTIME Model Header Cell", + "width": 170, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "tqZ6d", + "name": "RUNTIME Model Header Text", + "fill": "$paper", + "content": "RUNTIME", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "uHRiI", + "name": "RECOMMENDED Model Header Cell", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "wZPji", + "name": "RECOMMENDED Model Header Text", + "fill": "$paper", + "content": "RECOMMENDED", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "mEhOf", + "name": "成本 Model Header Cell", + "width": 78, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "gL1ho", + "name": "成本 Model Header Text", + "fill": "$paper", + "content": "成本", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "BStBe", + "name": "操作 Model Header Cell", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "J9ju6", + "name": "操作 Model Header Text", + "fill": "$paper", + "content": "操作", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "MdMdE", + "name": "Model Table Row 1", + "width": "fill_container", + "height": 82, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "A5YLs", + "name": "Model Row 1 Cell 1", + "width": 230, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "w063zY", + "name": "Model Row 1 Text 1", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "gemini-3.1-flash-image-preview", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "q6WKi", + "name": "Model Row 1 Cell 2", + "width": 88, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ixKoy", + "name": "Model Row 1 Text 2", + "fill": "$ink", + "content": "YES", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "MStrf", + "name": "Model Row 1 Cell 3", + "width": 88, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "JliJE", + "name": "Model Row 1 Text 3", + "fill": "$ink", + "content": "YES", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "KO1hV", + "name": "Model Row 1 Cell 4", + "width": 90, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "kP159", + "name": "Model Row 1 Text 4", + "fill": "$ink", + "content": "1", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "nhB2S", + "name": "Model Row 1 Cell 5", + "width": 110, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "p7Hw5O", + "name": "Model Row 1 Text 5", + "fill": "$ink", + "content": "VERIFIED", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "b4s3DP", + "name": "Model Row 1 Cell 6", + "width": 170, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "X3F1K", + "name": "Model Row 1 Text 6", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "AVAILABLE", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Sw9tT", + "name": "Model Row 1 Cell 7", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "iDGRh", + "name": "Model Row 1 Text 7", + "fill": "$ink", + "content": "YES", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "M0YnjP", + "name": "Model Row 1 Cell 8", + "width": 78, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "QiJgk", + "name": "Model Row 1 Text 8", + "fill": "$ink", + "content": "1 点", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "IB2gj", + "name": "Model Row 1 Cell 9", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Mw3ek", + "name": "Model Row 1 Text 9", + "fill": "$ink", + "content": "编辑", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "EaJ02", + "name": "Model Table Row 2", + "width": "fill_container", + "height": 82, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "J4L5G", + "name": "Model Row 2 Cell 1", + "width": 230, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "pWyr9", + "name": "Model Row 2 Text 1", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "gemini-3-pro-image-preview", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "mJvFl", + "name": "Model Row 2 Cell 2", + "width": 88, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "e1euE", + "name": "Model Row 2 Text 2", + "fill": "$ink", + "content": "YES", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "zjwqq", + "name": "Model Row 2 Cell 3", + "width": 88, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "wZYQ7", + "name": "Model Row 2 Text 3", + "fill": "$ink", + "content": "NO", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "B6dvb", + "name": "Model Row 2 Cell 4", + "width": 90, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "A38avo", + "name": "Model Row 2 Text 4", + "fill": "$ink", + "content": "2", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "DisW2", + "name": "Model Row 2 Cell 5", + "width": 110, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "i6QMU", + "name": "Model Row 2 Text 5", + "fill": "$ink", + "content": "VERIFIED", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "CFH9A", + "name": "Model Row 2 Cell 6", + "width": 170, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "byZ35", + "name": "Model Row 2 Text 6", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "AVAILABLE", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "e642e", + "name": "Model Row 2 Cell 7", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "C00vyJ", + "name": "Model Row 2 Text 7", + "fill": "$ink", + "content": "NO", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "P7Npe4", + "name": "Model Row 2 Cell 8", + "width": 78, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "bvpL2", + "name": "Model Row 2 Text 8", + "fill": "$ink", + "content": "1 点", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "MQGoW", + "name": "Model Row 2 Cell 9", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "k96hWd", + "name": "Model Row 2 Text 9", + "fill": "$ink", + "content": "编辑", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "fM8mR", + "name": "Model Table Row 3", + "width": "fill_container", + "height": 82, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "eiBNH", + "name": "Model Row 3 Cell 1", + "width": 230, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "n1llP", + "name": "Model Row 3 Text 1", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "gpt-image-2", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "FWTKx", + "name": "Model Row 3 Cell 2", + "width": 88, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "uKp0c", + "name": "Model Row 3 Text 2", + "fill": "$ink", + "content": "YES", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "ZpZ1S", + "name": "Model Row 3 Cell 3", + "width": 88, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ICxxu", + "name": "Model Row 3 Text 3", + "fill": "$ink", + "content": "NO", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "P4YS9", + "name": "Model Row 3 Cell 4", + "width": 90, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "mQNML", + "name": "Model Row 3 Text 4", + "fill": "$ink", + "content": "3", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "T6MnLh", + "name": "Model Row 3 Cell 5", + "width": 110, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "J6P4n", + "name": "Model Row 3 Text 5", + "fill": "$ink", + "content": "VERIFIED", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "bQocX", + "name": "Model Row 3 Cell 6", + "width": 170, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "jB8Ve", + "name": "Model Row 3 Text 6", + "fill": "$danger", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "UNAVAILABLE · BALANCE", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "X7Otu", + "name": "Model Row 3 Cell 7", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "FTXDU", + "name": "Model Row 3 Text 7", + "fill": "$ink", + "content": "NO", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "u59R9", + "name": "Model Row 3 Cell 8", + "width": 78, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Hkpgz", + "name": "Model Row 3 Text 8", + "fill": "$ink", + "content": "1 点", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "K7KlM", + "name": "Model Row 3 Cell 9", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "kkaXX", + "name": "Model Row 3 Text 9", + "fill": "$ink", + "content": "编辑", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "k8s0ZB", + "name": "Atomic Model Configuration Editor", + "width": "fill_container", + "height": "fill_container", + "gap": 18, + "children": [ + { + "type": "frame", + "id": "oszE0", + "name": "Model Set Edit Panel", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 12, + "padding": 16, + "children": [ + { + "type": "frame", + "id": "JoZyh", + "name": "Model Set Edit Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "D53lzG", + "name": "Model Set Edit Title", + "fill": "$ink", + "content": "完整配置集合", + "fontFamily": "$font-ui", + "fontSize": 17, + "fontWeight": "900" + }, + { + "type": "text", + "id": "YiaOP", + "name": "Model Set Edit Hint", + "fill": "$gray-600", + "content": "任一字段失败则整次不写入", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "tyliO", + "name": "Gemini Flash Config Row", + "width": "fill_container", + "height": 54, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Z6Yt7", + "name": "Gemini Flash Config Name", + "fill": "$ink", + "content": "Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "kYGjc", + "name": "Gemini Flash Config State", + "fill": "$gray-600", + "content": "停用 · 当前默认", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "OFW0S", + "name": "Gemini Pro Config Row", + "width": "fill_container", + "height": 54, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "R1PjHP", + "name": "Gemini Pro Config Name", + "fill": "$ink", + "content": "Gemini Pro", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "A5JA0C", + "name": "Gemini Pro Config State", + "fill": "$danger", + "content": "启用 · 替代默认:未指定", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "JB1so", + "name": "GPT Image Config Row", + "width": "fill_container", + "height": 54, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "iGosK", + "name": "GPT Image Config Name", + "fill": "$ink", + "content": "GPT Image", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "Iwm5t", + "name": "GPT Image Config State", + "fill": "$gray-600", + "content": "启用 · 优先级 3", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "MFo4F", + "name": "Default Replacement Error", + "width": "fill_container", + "height": 62, + "fill": "$paper", + "stroke": "$danger", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "c5wHR", + "name": "Default Replacement Error Icon", + "width": 18, + "height": 18, + "icon": "circle-alert", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "text", + "id": "t5ids", + "name": "Default Replacement Error Text", + "fill": "$danger", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "MODEL_DEFAULT_REPLACEMENT_REQUIRED\n停用当前默认模型时,必须在同一操作中指定替代默认。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "X49nV", + "name": "Save Full Model Set Button", + "width": 220, + "height": 42, + "fill": "$gray-100", + "stroke": "$gray-300", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "E3Uvs", + "name": "Save Full Model Set Label", + "fill": "$gray-600", + "content": "保存完整配置集合", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "JRlEa", + "name": "Runtime Availability Panel", + "width": 390, + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 12, + "padding": 16, + "children": [ + { + "type": "text", + "id": "bx1Xq", + "name": "Runtime Availability Title", + "fill": "$ink", + "content": "运行时状态", + "fontFamily": "$font-ui", + "fontSize": 17, + "fontWeight": "900" + }, + { + "type": "text", + "id": "o1k5SS", + "name": "Runtime Availability Copy", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "外部服务临时不可用只影响运行时可用性,不修改 enabled、default 或 recommendation_priority。", + "lineHeight": 1.6, + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "gjlKT", + "name": "Gateway Balance Runtime Alert", + "width": "fill_container", + "height": 88, + "fill": "$paper", + "stroke": "$danger", + "strokeWidth": 1, + "layout": "vertical", + "gap": 6, + "padding": 12, + "children": [ + { + "type": "text", + "id": "s9hmtQ", + "name": "Gateway Balance Runtime Title", + "fill": "$danger", + "content": "GPT Image · 当前不可用", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "900" + }, + { + "type": "text", + "id": "q9ihE1", + "name": "Gateway Balance Runtime Meta", + "fill": "$gray-600", + "content": "reason: gateway_balance_insufficient\nchecked_at: 18:31", + "lineHeight": 1.5, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "text", + "id": "SHSXB", + "name": "Runtime Recovery Note", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "确认真实余额恢复后,才显示“恢复运行时可用”动作并记录审计。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "A28V3c", + "x": 16960, + "y": 3760, + "name": "06C 素材与历史清理", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "children": [ + { + "type": "frame", + "id": "gmPAg", + "name": "Admin Sidebar", + "width": 220, + "height": "fill_container", + "fill": "$ink", + "layout": "vertical", + "gap": 6, + "padding": [ + 20, + 14 + ], + "children": [ + { + "type": "text", + "id": "auik5", + "name": "Admin Wordmark", + "fill": "$brand-yellow", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 28, + "fontWeight": "900" + }, + { + "type": "text", + "id": "OOiCJ", + "name": "Admin Domain Label", + "fill": "$gray-300", + "content": "OPERATIONS ADMIN", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "rectangle", + "id": "Xdwwn", + "name": "Admin Sidebar Rule", + "fill": "$gray-600", + "width": "fill_container", + "height": 1 + }, + { + "type": "frame", + "id": "gISeH", + "name": "Admin 总览 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "b1CZ9", + "name": "Admin 总览 Icon", + "width": 17, + "height": 17, + "icon": "layout-dashboard", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "RTawx", + "name": "Admin 总览 Label", + "fill": "$paper", + "content": "总览", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "y05lvl", + "name": "Admin 用户 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "R4evF", + "name": "Admin 用户 Icon", + "width": 17, + "height": 17, + "icon": "users", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "y77QA", + "name": "Admin 用户 Label", + "fill": "$paper", + "content": "用户", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "gNmRH", + "name": "Admin 邀请码 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "rbluJ", + "name": "Admin 邀请码 Icon", + "width": 17, + "height": 17, + "icon": "ticket-check", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "pdJ7j", + "name": "Admin 邀请码 Label", + "fill": "$paper", + "content": "邀请码", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "CsbIN", + "name": "Admin 模型 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "sy8iY", + "name": "Admin 模型 Icon", + "width": 17, + "height": 17, + "icon": "cpu", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "pjEwy", + "name": "Admin 模型 Label", + "fill": "$paper", + "content": "模型", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "ZVMfN", + "name": "Admin 素材 Nav", + "width": "fill_container", + "height": 40, + "fill": "$brand-yellow", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "JY8FP", + "name": "Admin 素材 Icon", + "width": 17, + "height": 17, + "icon": "shapes", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "r7tc7", + "name": "Admin 素材 Label", + "fill": "$ink", + "content": "素材", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "wEVpM", + "name": "Admin 内部预览 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "yDkJa", + "name": "Admin 内部预览 Icon", + "width": 17, + "height": 17, + "icon": "flask-conical", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "W9bXVD", + "name": "Admin 内部预览 Label", + "fill": "$paper", + "content": "内部预览", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "K6qjYl", + "name": "Admin 生成记录 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "dpHk3", + "name": "Admin 生成记录 Icon", + "width": 17, + "height": 17, + "icon": "image", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "GxRcH", + "name": "Admin 生成记录 Label", + "fill": "$paper", + "content": "生成记录", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "kCKxC", + "name": "Admin 服务与存储 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "Am2ib", + "name": "Admin 服务与存储 Icon", + "width": 17, + "height": 17, + "icon": "server", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "EN2gR", + "name": "Admin 服务与存储 Label", + "fill": "$paper", + "content": "服务与存储", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "tcLqN", + "name": "Admin 审计 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "bgtd4", + "name": "Admin 审计 Icon", + "width": 17, + "height": 17, + "icon": "shield-check", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "v453s2", + "name": "Admin 审计 Label", + "fill": "$paper", + "content": "审计", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "cT9Ma", + "name": "Admin Session Boundary", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 8, + "justifyContent": "end", + "children": [ + { + "type": "text", + "id": "HbiFl", + "name": "Admin Session Identity", + "fill": "$gray-300", + "content": "su•••@example.com", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "dfCd0", + "name": "Admin Session Hint", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "后台会话不能切换为普通用户", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "u8wwiy", + "name": "Admin Overview Shell", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "lThrD", + "name": "Admin Overview Top Bar", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ynibU", + "name": "Admin Overview Page Title", + "fill": "$ink", + "content": "总览", + "fontFamily": "$font-ui", + "fontSize": 22, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "Wx1Pr", + "name": "Admin Overall Health", + "gap": 8, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "LGFmS", + "name": "Admin Overall Health Icon", + "width": 17, + "height": 17, + "icon": "triangle-alert", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "text", + "id": "Z39x9", + "name": "Admin Overall Health Text", + "fill": "$danger", + "content": "有 2 项需要处理", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "QcZ28", + "name": "Admin Critical Storage Strip", + "width": "fill_container", + "height": 38, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "JjZ3C", + "name": "Admin Critical Storage Text", + "fill": "$ink", + "content": "LocalDataRoot 已使用 4.71 GB / 5 GB · critical · 最后计量 18:32", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "u9cIx", + "name": "Admin Critical Storage Action", + "fill": "$ink", + "content": "打开服务与存储 →", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "900" + } + ] + }, + { + "type": "frame", + "id": "GL45G", + "name": "Admin Overview Main", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "gap": 18, + "padding": 24, + "children": [ + { + "type": "frame", + "id": "vqu55", + "name": "Admin Overview Metrics", + "width": "fill_container", + "height": 122, + "gap": 10, + "children": [ + { + "type": "frame", + "id": "c63Fj", + "name": "普通用户 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "DLdC5", + "name": "普通用户 Admin Metric Label", + "fill": "$gray-600", + "content": "普通用户", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "ymt8G", + "name": "普通用户 Admin Metric Value", + "fill": "$ink", + "content": "7 / 10", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "KQgAg", + "name": "普通用户 Admin Metric Note", + "fill": "$gray-600", + "content": "active 6 · suspended 1", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "cEZBX", + "name": "生成任务 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "qF853", + "name": "生成任务 Admin Metric Label", + "fill": "$gray-600", + "content": "生成任务", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "ftsPU", + "name": "生成任务 Admin Metric Value", + "fill": "$ink", + "content": "1", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "xDJWL", + "name": "生成任务 Admin Metric Note", + "fill": "$gray-600", + "content": "queued / running", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "LQpS1", + "name": "成本核对 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "zdvmv", + "name": "成本核对 Admin Metric Label", + "fill": "$gray-600", + "content": "成本核对", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "jSEDV", + "name": "成本核对 Admin Metric Value", + "fill": "$ink", + "content": "2", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "j45tt", + "name": "成本核对 Admin Metric Note", + "fill": "$gray-600", + "content": "pending_manual_review", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "WexJO", + "name": "运行时模型 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "GKBZN", + "name": "运行时模型 Admin Metric Label", + "fill": "$gray-600", + "content": "运行时模型", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "D8pHMM", + "name": "运行时模型 Admin Metric Value", + "fill": "$ink", + "content": "2 / 3", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Uv3Al", + "name": "运行时模型 Admin Metric Note", + "fill": "$gray-600", + "content": "当前推荐 Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "Df6TA", + "name": "Admin Status Grid", + "width": "fill_container", + "height": 250, + "gap": 14, + "children": [ + { + "type": "frame", + "id": "SfOXR", + "name": "Service Status Panel", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "i3pnR", + "name": "Service Status Header", + "width": "fill_container", + "height": 42, + "fill": "$ink", + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "hO98e", + "name": "Service Status Title", + "fill": "$paper", + "content": "服务状态", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "h6e80q", + "name": "Service Status Link", + "fill": "$brand-yellow", + "content": "查看全部 →", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "YeQLR", + "name": "API Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "dBXaX", + "name": "API Service Name", + "fill": "$ink", + "content": "API", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "IWW4Z", + "name": "API Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "J62fq", + "name": "Worker Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "E3rJQ", + "name": "Worker Service Name", + "fill": "$ink", + "content": "Worker", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "DqI3t", + "name": "Worker Service State", + "fill": "$danger", + "content": "DEGRADED", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "tFveP", + "name": "Resend Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "lMlJI", + "name": "Resend Service Name", + "fill": "$ink", + "content": "Resend", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "O0st6", + "name": "Resend Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "o181CY", + "name": "高德 Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "h83Ir", + "name": "高德 Service Name", + "fill": "$ink", + "content": "高德", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "SDfVu", + "name": "高德 Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "T1Ftv", + "name": "AI 网关 Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "j7NUl", + "name": "AI 网关 Service Name", + "fill": "$ink", + "content": "AI 网关", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "wjASS", + "name": "AI 网关 Service State", + "fill": "$danger", + "content": "1 个模型不可用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "ME2XS", + "name": "Admin Alerts Panel", + "width": 500, + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 10, + "padding": 14, + "children": [ + { + "type": "text", + "id": "ym7fV", + "name": "Admin Alerts Title", + "fill": "$ink", + "content": "需要处理", + "fontFamily": "$font-ui", + "fontSize": 16, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "Fkndt", + "name": "容量已进入 critical Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "eCXhf", + "name": "容量已进入 critical Alert Icon", + "width": 18, + "height": 18, + "icon": "hard-drive", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "FvTpO", + "name": "容量已进入 critical Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "dufEz", + "name": "容量已进入 critical Alert Title", + "fill": "$ink", + "content": "容量已进入 critical", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "gnpb1", + "name": "容量已进入 critical Alert Meta", + "fill": "$gray-600", + "content": "等待清理与重新计量", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "bZsU8", + "name": "Worker degraded Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "RmMU3", + "name": "Worker degraded Alert Icon", + "width": 18, + "height": 18, + "icon": "circle-alert", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "c6FTP", + "name": "Worker degraded Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "fsmo2", + "name": "Worker degraded Alert Title", + "fill": "$ink", + "content": "Worker degraded", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "pUfGA", + "name": "Worker degraded Alert Meta", + "fill": "$gray-600", + "content": "生成新任务受影响", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "FTnFb", + "name": "2 项上游成本核对 Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "E0v5JN", + "name": "2 项上游成本核对 Alert Icon", + "width": 18, + "height": 18, + "icon": "scale", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "IuKOp", + "name": "2 项上游成本核对 Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "s9tLY", + "name": "2 项上游成本核对 Alert Title", + "fill": "$ink", + "content": "2 项上游成本核对", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "U4sVz", + "name": "2 项上游成本核对 Alert Meta", + "fill": "$gray-600", + "content": "最早等待 46 分钟", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "AHYNx", + "name": "Recent Admin Activity", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "YFHyB", + "name": "Recent Admin Activity Header", + "width": "fill_container", + "height": 42, + "fill": "$ink", + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "p4Mj4x", + "name": "Recent Admin Activity Title", + "fill": "$paper", + "content": "最近后台操作", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "UB3W4", + "name": "Recent Admin Activity Link", + "fill": "$brand-yellow", + "content": "打开审计 →", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "vlJtD", + "name": "Activity 18:20", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "QQnDn", + "name": "Activity 18:20 18:20", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "QU4mc", + "name": "Activity 18:20 18:20 Text", + "fill": "$ink", + "content": "18:20", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "j2Inr", + "name": "Activity 18:20 运行时恢复检查", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "pG3RQ", + "name": "Activity 18:20 运行时恢复检查 Text", + "fill": "$ink", + "content": "运行时恢复检查", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "NdKL5", + "name": "Activity 18:20 Gemini Flash", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "etmw5", + "name": "Activity 18:20 Gemini Flash Text", + "fill": "$ink", + "content": "Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "hzh7K", + "name": "Activity 18:20 succeeded", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "blppQ", + "name": "Activity 18:20 succeeded Text", + "fill": "$ink", + "content": "succeeded", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "N3KD3", + "name": "Activity 17:42", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "ou2Mf", + "name": "Activity 17:42 17:42", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "QBoxD", + "name": "Activity 17:42 17:42 Text", + "fill": "$ink", + "content": "17:42", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "B0Hug", + "name": "Activity 17:42 贴纸清理候选查询", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "kX0XD", + "name": "Activity 17:42 贴纸清理候选查询 Text", + "fill": "$ink", + "content": "贴纸清理候选查询", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "JZCeI", + "name": "Activity 17:42 CLEANUP-19C", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "tymJr", + "name": "Activity 17:42 CLEANUP-19C Text", + "fill": "$ink", + "content": "CLEANUP-19C", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "OoXOb", + "name": "Activity 17:42 succeeded", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "XjMlQ", + "name": "Activity 17:42 succeeded Text", + "fill": "$ink", + "content": "succeeded", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "s9dod", + "name": "Activity 16:08", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "rqurJ", + "name": "Activity 16:08 16:08", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "poknH", + "name": "Activity 16:08 16:08 Text", + "fill": "$ink", + "content": "16:08", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "m5mk1U", + "name": "Activity 16:08 调整点数", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "F0OprZ", + "name": "Activity 16:08 调整点数 Text", + "fill": "$ink", + "content": "调整点数", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "D5woj4", + "name": "Activity 16:08 USER-7A2", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "G5teNs", + "name": "Activity 16:08 USER-7A2 Text", + "fill": "$ink", + "content": "USER-7A2", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "kgCTC", + "name": "Activity 16:08 +5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "r5yjsM", + "name": "Activity 16:08 +5 Text", + "fill": "$ink", + "content": "+5", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "kCKLY", + "name": "Activity 15:30", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "pW6E8", + "name": "Activity 15:30 15:30", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "nIAOu", + "name": "Activity 15:30 15:30 Text", + "fill": "$ink", + "content": "15:30", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "rEBRE", + "name": "Activity 15:30 模型配置保存", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ibEId", + "name": "Activity 15:30 模型配置保存 Text", + "fill": "$ink", + "content": "模型配置保存", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "wzPSs", + "name": "Activity 15:30 CONFIG-12", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "vvEsQ", + "name": "Activity 15:30 CONFIG-12 Text", + "fill": "$ink", + "content": "CONFIG-12", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "WPTMH", + "name": "Activity 15:30 version conflict", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "G8TGzw", + "name": "Activity 15:30 version conflict Text", + "fill": "$danger", + "content": "version conflict", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "p0hivQ", + "layoutPosition": "absolute", + "x": 220, + "y": 0, + "name": "Assets Page Overlay Shell", + "width": 1380, + "height": 900, + "fill": "$paper", + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "jRMUu", + "name": "Assets Top Bar", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "DMSVr", + "name": "Assets Page Title", + "fill": "$ink", + "content": "素材", + "fontFamily": "$font-ui", + "fontSize": 22, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "qCFi1", + "name": "Disabled Sticker Upload", + "height": 36, + "fill": "$gray-100", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 7, + "padding": [ + 0, + 13 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "qJNRG", + "name": "Disabled Sticker Upload Icon", + "width": 16, + "height": 16, + "icon": "upload", + "library": "lucide", + "fill": "$gray-600" + }, + { + "type": "text", + "id": "DBKCG", + "name": "Disabled Sticker Upload Label", + "fill": "$gray-600", + "content": "上传普通贴纸", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "VeJHN", + "name": "Assets Full Storage Strip", + "width": "fill_container", + "height": 42, + "fill": "$danger", + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "sbgEz", + "name": "Assets Full Storage Text", + "fill": "$paper", + "content": "本机内容已达到 5 GB · full · 上传原图、生成缩略图和其他受管二进制写入已阻断", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "ajKNq", + "name": "Assets Full Storage Action", + "fill": "$paper", + "content": "打开存储详情 →", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "NFqSO", + "name": "Assets Main", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "gap": 16, + "padding": 24, + "children": [ + { + "type": "frame", + "id": "znNcZ", + "name": "Assets Tabs", + "width": "fill_container", + "height": 42, + "stroke": "$ink", + "strokeWidth": 1, + "children": [ + { + "type": "frame", + "id": "lUb67", + "name": "普通贴纸 Assets Tab", + "width": 170, + "height": "fill_container", + "fill": "$paper", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "sDOlE", + "name": "普通贴纸 Assets Tab Label", + "fill": "$ink", + "content": "普通贴纸", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "cBxxy", + "name": "版本与发布 Assets Tab", + "width": 170, + "height": "fill_container", + "fill": "$paper", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "lrxNK", + "name": "版本与发布 Assets Tab Label", + "fill": "$ink", + "content": "版本与发布", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "DMmqZ", + "name": "历史文件清理 Assets Tab", + "width": 170, + "height": "fill_container", + "fill": "$brand-yellow", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "dFSnI", + "name": "历史文件清理 Assets Tab Label", + "fill": "$ink", + "content": "历史文件清理", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "RERAn", + "name": "Asset Capacity Explanation", + "width": "fill_container", + "height": 62, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 14 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "MKYTP", + "name": "Asset Capacity Explanation Left", + "layout": "vertical", + "gap": 4, + "children": [ + { + "type": "text", + "id": "UyfRa", + "name": "Asset Capacity Explanation Title", + "fill": "$ink", + "content": "后台上传原图与 Dada 生成的缩略图均计入 managed_content_bytes", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "qwR7t", + "name": "Asset Capacity Explanation Note", + "fill": "$gray-600", + "content": "只读规范素材库不计入 5 GB,历史文件不会自动清理。", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "text", + "id": "dBlln", + "name": "Asset Capacity Explanation Value", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": 250, + "content": "上传贴纸 612 MB\n只读素材 3.57 GB · 不计入", + "lineHeight": 1.5, + "textAlign": "right", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "esp66", + "name": "Asset Cleanup Work Area", + "width": "fill_container", + "height": "fill_container", + "gap": 16, + "children": [ + { + "type": "frame", + "id": "j32Ph", + "name": "Cleanup Candidate Panel", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 12, + "children": [ + { + "type": "frame", + "id": "gK8w1", + "name": "Cleanup Candidate Header", + "width": "fill_container", + "height": 40, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "nFyYs", + "name": "Cleanup Candidate Title", + "fill": "$ink", + "content": "清理候选", + "fontFamily": "$font-ui", + "fontSize": 18, + "fontWeight": "900" + }, + { + "type": "text", + "id": "KdgEs", + "name": "Cleanup Candidate Refresh", + "fill": "$info", + "content": "重新查询候选", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "ri9Gc", + "name": "Cleanup Candidate Table", + "width": "fill_container", + "height": 292, + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "BBHx0", + "name": "Cleanup Candidate Header Row", + "width": "fill_container", + "height": 42, + "fill": "$ink", + "children": [ + { + "type": "frame", + "id": "inz17", + "name": "选择 Cleanup Header Cell", + "width": 60, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "K30g1", + "name": "选择 Cleanup Header Text", + "fill": "$paper", + "content": "选择", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "m4Nvf", + "name": "稳定 ID Cleanup Header Cell", + "width": 180, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "fWcjf", + "name": "稳定 ID Cleanup Header Text", + "fill": "$paper", + "content": "稳定 ID", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "xQV7k", + "name": "文件 Cleanup Header Cell", + "width": 160, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "QC65z", + "name": "文件 Cleanup Header Text", + "fill": "$paper", + "content": "文件", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "djCTR", + "name": "预计字节 Cleanup Header Cell", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "GkHZD", + "name": "预计字节 Cleanup Header Text", + "fill": "$paper", + "content": "预计字节", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "PMlHz", + "name": "引用摘要 Cleanup Header Cell", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "R5Hw6", + "name": "引用摘要 Cleanup Header Text", + "fill": "$paper", + "content": "引用摘要", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "DNe88", + "name": "Cleanup Candidate Row 1", + "width": "fill_container", + "height": 62, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "N1CyyR", + "name": "Cleanup Candidate 1 Cell 1", + "width": 60, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "b1fzoF", + "name": "Cleanup Candidate 1 Text 1", + "fill": "$ink", + "content": "☑", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "boi7L", + "name": "Cleanup Candidate 1 Cell 2", + "width": 180, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "VfgiX", + "name": "Cleanup Candidate 1 Text 2", + "fill": "$ink", + "content": "STICKER-901", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "S09aFg", + "name": "Cleanup Candidate 1 Cell 3", + "width": 160, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Ltif8", + "name": "Cleanup Candidate 1 Text 3", + "fill": "$ink", + "content": "原图 + 缩略图", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "H3AX84", + "name": "Cleanup Candidate 1 Cell 4", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "k5S6px", + "name": "Cleanup Candidate 1 Text 4", + "fill": "$ink", + "content": "18.4 MB", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "jj5Ou", + "name": "Cleanup Candidate 1 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "GUhJ7", + "name": "Cleanup Candidate 1 Text 5", + "fill": "$ink", + "content": "无引用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "XJTc3", + "name": "Cleanup Candidate Row 2", + "width": "fill_container", + "height": 62, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "YH8uE", + "name": "Cleanup Candidate 2 Cell 1", + "width": 60, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "uDXOF", + "name": "Cleanup Candidate 2 Text 1", + "fill": "$ink", + "content": "☑", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "R1LkS", + "name": "Cleanup Candidate 2 Cell 2", + "width": 180, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "zBkQQ", + "name": "Cleanup Candidate 2 Text 2", + "fill": "$ink", + "content": "STICKER-714", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "P9VAk", + "name": "Cleanup Candidate 2 Cell 3", + "width": 160, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "a6Bpk", + "name": "Cleanup Candidate 2 Text 3", + "fill": "$ink", + "content": "原图 + 缩略图", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "k68hXO", + "name": "Cleanup Candidate 2 Cell 4", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "J2vBns", + "name": "Cleanup Candidate 2 Text 4", + "fill": "$ink", + "content": "9.8 MB", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "kYGRQ", + "name": "Cleanup Candidate 2 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "wXBtn", + "name": "Cleanup Candidate 2 Text 5", + "fill": "$danger", + "content": "PROJECT-3A1 引用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "fn2Az", + "name": "Cleanup Candidate Row 3", + "width": "fill_container", + "height": 62, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "BOIyf", + "name": "Cleanup Candidate 3 Cell 1", + "width": 60, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "q2mCV", + "name": "Cleanup Candidate 3 Text 1", + "fill": "$ink", + "content": "☐", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "Ol27g", + "name": "Cleanup Candidate 3 Cell 2", + "width": 180, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "X7T1m", + "name": "Cleanup Candidate 3 Text 2", + "fill": "$ink", + "content": "STICKER-611", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "S1TX7O", + "name": "Cleanup Candidate 3 Cell 3", + "width": 160, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "lfjVW", + "name": "Cleanup Candidate 3 Text 3", + "fill": "$ink", + "content": "原图 + 缩略图", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "bueyJ", + "name": "Cleanup Candidate 3 Cell 4", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "pvb6y", + "name": "Cleanup Candidate 3 Text 4", + "fill": "$ink", + "content": "12.1 MB", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "OI7XP", + "name": "Cleanup Candidate 3 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "yYseY", + "name": "Cleanup Candidate 3 Text 5", + "fill": "$ink", + "content": "无引用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "dN8CO", + "name": "Cleanup Candidate Row 4", + "width": "fill_container", + "height": 62, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "damEA", + "name": "Cleanup Candidate 4 Cell 1", + "width": 60, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "l5XYu", + "name": "Cleanup Candidate 4 Text 1", + "fill": "$ink", + "content": "☐", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "tO66G", + "name": "Cleanup Candidate 4 Cell 2", + "width": 180, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "M1NJh", + "name": "Cleanup Candidate 4 Text 2", + "fill": "$ink", + "content": "STICKER-488", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "kNhyO", + "name": "Cleanup Candidate 4 Cell 3", + "width": 160, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "X404Fl", + "name": "Cleanup Candidate 4 Text 3", + "fill": "$ink", + "content": "原图 + 缩略图", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "a8Xdb5", + "name": "Cleanup Candidate 4 Cell 4", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "KX4le", + "name": "Cleanup Candidate 4 Text 4", + "fill": "$ink", + "content": "7.6 MB", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "TbeFo", + "name": "Cleanup Candidate 4 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "psiqA", + "name": "Cleanup Candidate 4 Text 5", + "fill": "$danger", + "content": "RELEASE-22 引用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "arLlz", + "name": "Cleanup Reference Conflict", + "width": "fill_container", + "height": 92, + "fill": "$paper", + "stroke": "$danger", + "strokeWidth": 1, + "gap": 10, + "padding": 14, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "PWTJu", + "name": "Cleanup Reference Conflict Icon", + "width": 20, + "height": 20, + "icon": "git-compare-arrows", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "text", + "id": "BiXLH", + "name": "Cleanup Reference Conflict Text", + "fill": "$danger", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "ASSET_HISTORY_REFERENCE_CONFLICT\n所选批次仍有项目引用,整批不排队、不减少容量。刷新候选后重新确认。", + "lineHeight": 1.6, + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "qhzPg", + "name": "Cleanup Candidate Actions", + "width": "fill_container", + "height": 44, + "gap": 10, + "justifyContent": "end", + "children": [ + { + "type": "frame", + "id": "nNNAu", + "name": "Cancel Cleanup Selection", + "width": 100, + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "pVXbN", + "name": "Cancel Cleanup Selection Label", + "fill": "$ink", + "content": "取消", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "ITgnE", + "name": "Blocked Cleanup Confirm", + "width": 220, + "height": "fill_container", + "fill": "$gray-100", + "stroke": "$gray-300", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "DsGQo", + "name": "Blocked Cleanup Confirm Label", + "fill": "$gray-600", + "content": "解决引用后确认清理", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "nU5iT", + "name": "Cleanup Flow Panel", + "width": 360, + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 10, + "padding": 16, + "children": [ + { + "type": "text", + "id": "onWyY", + "name": "Cleanup Flow Title", + "fill": "$ink", + "content": "清理流程", + "fontFamily": "$font-ui", + "fontSize": 18, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "Z5yff", + "name": "Cleanup Flow Step 1", + "width": "fill_container", + "height": 58, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "r83gTw", + "name": "Cleanup Flow Marker 1", + "width": 28, + "height": 28, + "fill": "$success", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "nu9JK", + "name": "Cleanup Flow Marker Text 1", + "fill": "$paper", + "content": "1", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "H7WOT", + "name": "Cleanup Flow Text 1", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "lyQm0", + "name": "Cleanup Flow Step Title 1", + "fill": "$ink", + "content": "候选查询", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "XfTM7", + "name": "Cleanup Flow Step State 1", + "fill": "$gray-600", + "content": "完成", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "JpRBh", + "name": "Cleanup Flow Step 2", + "width": "fill_container", + "height": 58, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "t5vyFy", + "name": "Cleanup Flow Marker 2", + "width": 28, + "height": 28, + "fill": "$success", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "MNIVA", + "name": "Cleanup Flow Marker Text 2", + "fill": "$paper", + "content": "2", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "qGh2Y", + "name": "Cleanup Flow Text 2", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "ZyQki", + "name": "Cleanup Flow Step Title 2", + "fill": "$ink", + "content": "管理员确认", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "L9vqu", + "name": "Cleanup Flow Step State 2", + "fill": "$gray-600", + "content": "完成", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "ddV3E", + "name": "Cleanup Flow Step 3", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$danger", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "SKcWN", + "name": "Cleanup Flow Marker 3", + "width": 28, + "height": 28, + "fill": "$danger", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "l4FDca", + "name": "Cleanup Flow Marker Text 3", + "fill": "$paper", + "content": "3", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "M1BMym", + "name": "Cleanup Flow Text 3", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "zFhvG", + "name": "Cleanup Flow Step Title 3", + "fill": "$ink", + "content": "引用复核", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "pBnBd", + "name": "Cleanup Flow Step State 3", + "fill": "$danger", + "content": "冲突", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "Puiqi", + "name": "Cleanup Flow Step 4", + "width": "fill_container", + "height": 58, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "Wmk1U", + "name": "Cleanup Flow Marker 4", + "width": 28, + "height": 28, + "fill": "$gray-300", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "bchhU", + "name": "Cleanup Flow Marker Text 4", + "fill": "$paper", + "content": "4", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "aBIpG", + "name": "Cleanup Flow Text 4", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "KNU47", + "name": "Cleanup Flow Step Title 4", + "fill": "$ink", + "content": "清理排队", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "EBnsH", + "name": "Cleanup Flow Step State 4", + "fill": "$gray-600", + "content": "未开始", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "WfUjP", + "name": "Cleanup Flow Step 5", + "width": "fill_container", + "height": 58, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "Nnnql", + "name": "Cleanup Flow Marker 5", + "width": 28, + "height": 28, + "fill": "$gray-300", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "f8WlP", + "name": "Cleanup Flow Marker Text 5", + "fill": "$paper", + "content": "5", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "jrBS9", + "name": "Cleanup Flow Text 5", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "R2ULug", + "name": "Cleanup Flow Step Title 5", + "fill": "$ink", + "content": "物理清理", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "iq01R", + "name": "Cleanup Flow Step State 5", + "fill": "$gray-600", + "content": "未开始", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "dYNQb", + "name": "Cleanup Flow Step 6", + "width": "fill_container", + "height": 58, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "lh1A4", + "name": "Cleanup Flow Marker 6", + "width": 28, + "height": 28, + "fill": "$gray-300", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "MXQgL", + "name": "Cleanup Flow Marker Text 6", + "fill": "$paper", + "content": "6", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "P5rasj", + "name": "Cleanup Flow Text 6", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "Vgo1T", + "name": "Cleanup Flow Step Title 6", + "fill": "$ink", + "content": "重新计量", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "rZoG7", + "name": "Cleanup Flow Step State 6", + "fill": "$gray-600", + "content": "未开始", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "text", + "id": "NCS35", + "name": "Cleanup Metering Note", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "物理清理和重新计量完成前,容量显示保持不变。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "OnsiT", + "x": 16960, + "y": 4820, + "name": "06D 生成记录与私有告知", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "children": [ + { + "type": "frame", + "id": "O0zVnf", + "name": "Admin Sidebar", + "width": 220, + "height": "fill_container", + "fill": "$ink", + "layout": "vertical", + "gap": 6, + "padding": [ + 20, + 14 + ], + "children": [ + { + "type": "text", + "id": "eDIsX", + "name": "Admin Wordmark", + "fill": "$brand-yellow", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 28, + "fontWeight": "900" + }, + { + "type": "text", + "id": "m7mvtj", + "name": "Admin Domain Label", + "fill": "$gray-300", + "content": "OPERATIONS ADMIN", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "rectangle", + "id": "wqLwy", + "name": "Admin Sidebar Rule", + "fill": "$gray-600", + "width": "fill_container", + "height": 1 + }, + { + "type": "frame", + "id": "gHlC3", + "name": "Admin 总览 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "Z0wP1T", + "name": "Admin 总览 Icon", + "width": 17, + "height": 17, + "icon": "layout-dashboard", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "kopWQ", + "name": "Admin 总览 Label", + "fill": "$paper", + "content": "总览", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "cnkKa", + "name": "Admin 用户 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "lOv6P", + "name": "Admin 用户 Icon", + "width": 17, + "height": 17, + "icon": "users", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "H7vsv", + "name": "Admin 用户 Label", + "fill": "$paper", + "content": "用户", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "Fgo22", + "name": "Admin 邀请码 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "nvbce", + "name": "Admin 邀请码 Icon", + "width": 17, + "height": 17, + "icon": "ticket-check", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "dQCPx", + "name": "Admin 邀请码 Label", + "fill": "$paper", + "content": "邀请码", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "qQsrh", + "name": "Admin 模型 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "XAhE7", + "name": "Admin 模型 Icon", + "width": 17, + "height": 17, + "icon": "cpu", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "h6bVYb", + "name": "Admin 模型 Label", + "fill": "$paper", + "content": "模型", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "q0MTQ", + "name": "Admin 素材 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "M9PKg0", + "name": "Admin 素材 Icon", + "width": 17, + "height": 17, + "icon": "shapes", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "mLDLL", + "name": "Admin 素材 Label", + "fill": "$paper", + "content": "素材", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "thDYs", + "name": "Admin 内部预览 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "rcON2", + "name": "Admin 内部预览 Icon", + "width": 17, + "height": 17, + "icon": "flask-conical", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "IGzT8", + "name": "Admin 内部预览 Label", + "fill": "$paper", + "content": "内部预览", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "TOHl4", + "name": "Admin 生成记录 Nav", + "width": "fill_container", + "height": 40, + "fill": "$brand-yellow", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "HnVqp", + "name": "Admin 生成记录 Icon", + "width": 17, + "height": 17, + "icon": "image", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "sGBNG", + "name": "Admin 生成记录 Label", + "fill": "$ink", + "content": "生成记录", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "iwBm4", + "name": "Admin 服务与存储 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "Ca7zU", + "name": "Admin 服务与存储 Icon", + "width": 17, + "height": 17, + "icon": "server", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "NDxs6", + "name": "Admin 服务与存储 Label", + "fill": "$paper", + "content": "服务与存储", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "h4i6KP", + "name": "Admin 审计 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "W9xasc", + "name": "Admin 审计 Icon", + "width": 17, + "height": 17, + "icon": "shield-check", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "lVEWF", + "name": "Admin 审计 Label", + "fill": "$paper", + "content": "审计", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "r0nIpu", + "name": "Admin Session Boundary", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 8, + "justifyContent": "end", + "children": [ + { + "type": "text", + "id": "iDUZQ", + "name": "Admin Session Identity", + "fill": "$gray-300", + "content": "su•••@example.com", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "BJpyb", + "name": "Admin Session Hint", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "后台会话不能切换为普通用户", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "xTsB8", + "name": "Admin Overview Shell", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "mAKvx", + "name": "Admin Overview Top Bar", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "b7lQR", + "name": "Admin Overview Page Title", + "fill": "$ink", + "content": "总览", + "fontFamily": "$font-ui", + "fontSize": 22, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "YEbME", + "name": "Admin Overall Health", + "gap": 8, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "sjR9k", + "name": "Admin Overall Health Icon", + "width": 17, + "height": 17, + "icon": "triangle-alert", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "text", + "id": "t5kiu", + "name": "Admin Overall Health Text", + "fill": "$danger", + "content": "有 2 项需要处理", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "MIeAa", + "name": "Admin Critical Storage Strip", + "width": "fill_container", + "height": 38, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "OtnMq", + "name": "Admin Critical Storage Text", + "fill": "$ink", + "content": "LocalDataRoot 已使用 4.71 GB / 5 GB · critical · 最后计量 18:32", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "Awpq8", + "name": "Admin Critical Storage Action", + "fill": "$ink", + "content": "打开服务与存储 →", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "900" + } + ] + }, + { + "type": "frame", + "id": "fD4Lo", + "name": "Admin Overview Main", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "gap": 18, + "padding": 24, + "children": [ + { + "type": "frame", + "id": "h4XBe", + "name": "Admin Overview Metrics", + "width": "fill_container", + "height": 122, + "gap": 10, + "children": [ + { + "type": "frame", + "id": "rqi7m", + "name": "普通用户 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "Od6XF", + "name": "普通用户 Admin Metric Label", + "fill": "$gray-600", + "content": "普通用户", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "E8PCV", + "name": "普通用户 Admin Metric Value", + "fill": "$ink", + "content": "7 / 10", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Xz0aH", + "name": "普通用户 Admin Metric Note", + "fill": "$gray-600", + "content": "active 6 · suspended 1", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "L97ypS", + "name": "生成任务 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "R7rjvk", + "name": "生成任务 Admin Metric Label", + "fill": "$gray-600", + "content": "生成任务", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "o9fiQc", + "name": "生成任务 Admin Metric Value", + "fill": "$ink", + "content": "1", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "T6uMFU", + "name": "生成任务 Admin Metric Note", + "fill": "$gray-600", + "content": "queued / running", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "i8Njdj", + "name": "成本核对 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "KGPIz", + "name": "成本核对 Admin Metric Label", + "fill": "$gray-600", + "content": "成本核对", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "kaEXE", + "name": "成本核对 Admin Metric Value", + "fill": "$ink", + "content": "2", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "GnWO7", + "name": "成本核对 Admin Metric Note", + "fill": "$gray-600", + "content": "pending_manual_review", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "vdZn1", + "name": "运行时模型 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "eqnHs", + "name": "运行时模型 Admin Metric Label", + "fill": "$gray-600", + "content": "运行时模型", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "dfS4R", + "name": "运行时模型 Admin Metric Value", + "fill": "$ink", + "content": "2 / 3", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "ILstS", + "name": "运行时模型 Admin Metric Note", + "fill": "$gray-600", + "content": "当前推荐 Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "jB8yn", + "name": "Admin Status Grid", + "width": "fill_container", + "height": 250, + "gap": 14, + "children": [ + { + "type": "frame", + "id": "J0CePb", + "name": "Service Status Panel", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "SxrxO", + "name": "Service Status Header", + "width": "fill_container", + "height": 42, + "fill": "$ink", + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Rdmxr", + "name": "Service Status Title", + "fill": "$paper", + "content": "服务状态", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "x49Au", + "name": "Service Status Link", + "fill": "$brand-yellow", + "content": "查看全部 →", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "mIFZC", + "name": "API Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "NVWbk", + "name": "API Service Name", + "fill": "$ink", + "content": "API", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "RzQ3c", + "name": "API Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "ZyWUS", + "name": "Worker Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "sWuQt", + "name": "Worker Service Name", + "fill": "$ink", + "content": "Worker", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Kb2eE", + "name": "Worker Service State", + "fill": "$danger", + "content": "DEGRADED", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "Tbz6a", + "name": "Resend Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "BhXTU", + "name": "Resend Service Name", + "fill": "$ink", + "content": "Resend", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "knaZw", + "name": "Resend Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "y8ybR", + "name": "高德 Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "eQLDM", + "name": "高德 Service Name", + "fill": "$ink", + "content": "高德", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "OQQJ4", + "name": "高德 Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "JVSX3", + "name": "AI 网关 Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "MvUgU", + "name": "AI 网关 Service Name", + "fill": "$ink", + "content": "AI 网关", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "WoowV", + "name": "AI 网关 Service State", + "fill": "$danger", + "content": "1 个模型不可用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "b225Hx", + "name": "Admin Alerts Panel", + "width": 500, + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 10, + "padding": 14, + "children": [ + { + "type": "text", + "id": "aN2Qy", + "name": "Admin Alerts Title", + "fill": "$ink", + "content": "需要处理", + "fontFamily": "$font-ui", + "fontSize": 16, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "qofL3", + "name": "容量已进入 critical Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "ck7Qr", + "name": "容量已进入 critical Alert Icon", + "width": 18, + "height": 18, + "icon": "hard-drive", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "nmShV", + "name": "容量已进入 critical Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "B20I5", + "name": "容量已进入 critical Alert Title", + "fill": "$ink", + "content": "容量已进入 critical", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "m31UzC", + "name": "容量已进入 critical Alert Meta", + "fill": "$gray-600", + "content": "等待清理与重新计量", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "p9YAcW", + "name": "Worker degraded Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "UB47y", + "name": "Worker degraded Alert Icon", + "width": 18, + "height": 18, + "icon": "circle-alert", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "xvgTN", + "name": "Worker degraded Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "j8rnsc", + "name": "Worker degraded Alert Title", + "fill": "$ink", + "content": "Worker degraded", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "SUG6L", + "name": "Worker degraded Alert Meta", + "fill": "$gray-600", + "content": "生成新任务受影响", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "C3BMP", + "name": "2 项上游成本核对 Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "RnZGw", + "name": "2 项上游成本核对 Alert Icon", + "width": 18, + "height": 18, + "icon": "scale", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "zrDuH", + "name": "2 项上游成本核对 Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "NofF6", + "name": "2 项上游成本核对 Alert Title", + "fill": "$ink", + "content": "2 项上游成本核对", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "c6dit", + "name": "2 项上游成本核对 Alert Meta", + "fill": "$gray-600", + "content": "最早等待 46 分钟", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "aqHhb", + "name": "Recent Admin Activity", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "Ii7zt", + "name": "Recent Admin Activity Header", + "width": "fill_container", + "height": 42, + "fill": "$ink", + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "oefmt", + "name": "Recent Admin Activity Title", + "fill": "$paper", + "content": "最近后台操作", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "qF2qA", + "name": "Recent Admin Activity Link", + "fill": "$brand-yellow", + "content": "打开审计 →", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "JnJMm", + "name": "Activity 18:20", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "W9htPo", + "name": "Activity 18:20 18:20", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "VLMRX", + "name": "Activity 18:20 18:20 Text", + "fill": "$ink", + "content": "18:20", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "I0xpbm", + "name": "Activity 18:20 运行时恢复检查", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "KtbiG", + "name": "Activity 18:20 运行时恢复检查 Text", + "fill": "$ink", + "content": "运行时恢复检查", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "hSIt8", + "name": "Activity 18:20 Gemini Flash", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "i4xpjt", + "name": "Activity 18:20 Gemini Flash Text", + "fill": "$ink", + "content": "Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Ea3xN", + "name": "Activity 18:20 succeeded", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "f3Ie9H", + "name": "Activity 18:20 succeeded Text", + "fill": "$ink", + "content": "succeeded", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "YeD6k", + "name": "Activity 17:42", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "uDfxF", + "name": "Activity 17:42 17:42", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "dLDOc", + "name": "Activity 17:42 17:42 Text", + "fill": "$ink", + "content": "17:42", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "G5hAaY", + "name": "Activity 17:42 贴纸清理候选查询", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "HGKwp", + "name": "Activity 17:42 贴纸清理候选查询 Text", + "fill": "$ink", + "content": "贴纸清理候选查询", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "ROrrM", + "name": "Activity 17:42 CLEANUP-19C", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "yX7aY", + "name": "Activity 17:42 CLEANUP-19C Text", + "fill": "$ink", + "content": "CLEANUP-19C", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "t7mmz9", + "name": "Activity 17:42 succeeded", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "L4Qr0z", + "name": "Activity 17:42 succeeded Text", + "fill": "$ink", + "content": "succeeded", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "YxVWY", + "name": "Activity 16:08", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "JEhP9", + "name": "Activity 16:08 16:08", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "YyCzV", + "name": "Activity 16:08 16:08 Text", + "fill": "$ink", + "content": "16:08", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "EVj2P", + "name": "Activity 16:08 调整点数", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "T3YPF9", + "name": "Activity 16:08 调整点数 Text", + "fill": "$ink", + "content": "调整点数", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "r1uk9", + "name": "Activity 16:08 USER-7A2", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "E6cNPR", + "name": "Activity 16:08 USER-7A2 Text", + "fill": "$ink", + "content": "USER-7A2", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "DuTOg", + "name": "Activity 16:08 +5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "r9xzjz", + "name": "Activity 16:08 +5 Text", + "fill": "$ink", + "content": "+5", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "BiDn4", + "name": "Activity 15:30", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "yM79B", + "name": "Activity 15:30 15:30", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "s3oZlE", + "name": "Activity 15:30 15:30 Text", + "fill": "$ink", + "content": "15:30", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "uXfVu", + "name": "Activity 15:30 模型配置保存", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ZOTiO", + "name": "Activity 15:30 模型配置保存 Text", + "fill": "$ink", + "content": "模型配置保存", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "RE8nj", + "name": "Activity 15:30 CONFIG-12", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "r93xE", + "name": "Activity 15:30 CONFIG-12 Text", + "fill": "$ink", + "content": "CONFIG-12", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "m2HHoY", + "name": "Activity 15:30 version conflict", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "VTUr8", + "name": "Activity 15:30 version conflict Text", + "fill": "$danger", + "content": "version conflict", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "zBeim", + "layoutPosition": "absolute", + "x": 220, + "y": 0, + "name": "Generation Records Overlay Shell", + "width": 1380, + "height": 900, + "fill": "$paper", + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "U2GiQI", + "name": "Generation Records Top Bar", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Skhvs", + "name": "Generation Records Title", + "fill": "$ink", + "content": "生成记录", + "fontFamily": "$font-ui", + "fontSize": 22, + "fontWeight": "900" + }, + { + "type": "text", + "id": "lH62S", + "name": "Generation Records Privacy Hint", + "fill": "$gray-600", + "content": "完整提示词与私有图片默认隐藏", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "QpMMR", + "name": "Generation Records Main", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "gap": 16, + "padding": 24, + "children": [ + { + "type": "frame", + "id": "f38Yz", + "name": "Generation Record List", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 12, + "children": [ + { + "type": "frame", + "id": "XVf0E", + "name": "Generation Record Controls", + "width": "fill_container", + "height": 40, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "TYrWC", + "name": "Generation Record Count", + "fill": "$ink", + "content": "记录 128 条", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "800" + }, + { + "type": "frame", + "id": "pLd4d", + "name": "Generation Record Filters", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "JCbB6", + "name": "全部任务状态 Record Filter", + "height": 34, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "o0FjF", + "name": "全部任务状态 Record Filter Text", + "fill": "$gray-600", + "content": "全部任务状态", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "equSh", + "name": "全部成本核对 Record Filter", + "height": 34, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "e6sPh", + "name": "全部成本核对 Record Filter Text", + "fill": "$gray-600", + "content": "全部成本核对", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "tkiNI", + "name": "Generation Record Table", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "eMGSy", + "name": "Generation Record Table Header", + "width": "fill_container", + "height": 42, + "fill": "$ink", + "children": [ + { + "type": "frame", + "id": "zw9ih", + "name": "任务 Record Header Cell", + "width": 126, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "CxGXy", + "name": "任务 Record Header Text", + "fill": "$paper", + "content": "任务", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "ZYBum", + "name": "账号 Record Header Cell", + "width": 110, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "g8lvpN", + "name": "账号 Record Header Text", + "fill": "$paper", + "content": "账号", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "ZaY3g", + "name": "模型 Record Header Cell", + "width": 180, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "F1n3tY", + "name": "模型 Record Header Text", + "fill": "$paper", + "content": "模型", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "guENn", + "name": "任务状态 Record Header Cell", + "width": 100, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "fH1kj", + "name": "任务状态 Record Header Text", + "fill": "$paper", + "content": "任务状态", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "KOhET", + "name": "上游成本核对 Record Header Cell", + "width": 150, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "G6j4J", + "name": "上游成本核对 Record Header Text", + "fill": "$paper", + "content": "上游成本核对", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "BwazK", + "name": "时间 Record Header Cell", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Vg7W6", + "name": "时间 Record Header Text", + "fill": "$paper", + "content": "时间", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "FItHG", + "name": "Generation Record Row 1", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "Z1d550", + "name": "Generation Record 1 Cell 1", + "width": 126, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "UApIF", + "name": "Generation Record 1 Text 1", + "fill": "$ink", + "content": "JOB-38A", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "zMGA5", + "name": "Generation Record 1 Cell 2", + "width": 110, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "FlQVF", + "name": "Generation Record 1 Text 2", + "fill": "$ink", + "content": "da•••", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "c5K7Jx", + "name": "Generation Record 1 Cell 3", + "width": 180, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "hgOEV", + "name": "Generation Record 1 Text 3", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "Gemini Flash", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "rmeq7", + "name": "Generation Record 1 Cell 4", + "width": 100, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "K2Ybz", + "name": "Generation Record 1 Text 4", + "fill": "$ink", + "content": "succeeded", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "t4zYhX", + "name": "Generation Record 1 Cell 5", + "width": 150, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "D6QIbC", + "name": "Generation Record 1 Text 5", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "not_required", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "dhpwe", + "name": "Generation Record 1 Cell 6", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "EOU3X", + "name": "Generation Record 1 Text 6", + "fill": "$ink", + "content": "今天 15:28", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "sHpkm", + "name": "Generation Record Row 2", + "width": "fill_container", + "height": 58, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "X954BL", + "name": "Generation Record 2 Cell 1", + "width": 126, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "jZFba", + "name": "Generation Record 2 Text 1", + "fill": "$ink", + "content": "JOB-377", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "G8jdY", + "name": "Generation Record 2 Cell 2", + "width": 110, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ZDFd0", + "name": "Generation Record 2 Text 2", + "fill": "$ink", + "content": "da•••", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "r1C4k", + "name": "Generation Record 2 Cell 3", + "width": 180, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Pkepy", + "name": "Generation Record 2 Text 3", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "Gemini Flash", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "sztlE", + "name": "Generation Record 2 Cell 4", + "width": 100, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Bx4ee", + "name": "Generation Record 2 Text 4", + "fill": "$ink", + "content": "failed", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "SUwmc", + "name": "Generation Record 2 Cell 5", + "width": 150, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "zuAzm", + "name": "Generation Record 2 Text 5", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "not_applicable", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "NZaGy", + "name": "Generation Record 2 Cell 6", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "GBdSo", + "name": "Generation Record 2 Text 6", + "fill": "$ink", + "content": "今天 15:21", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "Q3Umm4", + "name": "Generation Record Row 3", + "width": "fill_container", + "height": 58, + "fill": "$brand-yellow", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "Ah6sb", + "name": "Generation Record 3 Cell 1", + "width": 126, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "CcsCt", + "name": "Generation Record 3 Text 1", + "fill": "$ink", + "content": "JOB-351", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "C3dgBR", + "name": "Generation Record 3 Cell 2", + "width": 110, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ivc6X", + "name": "Generation Record 3 Text 2", + "fill": "$ink", + "content": "mi•••", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "BUjhG", + "name": "Generation Record 3 Cell 3", + "width": 180, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "nizVH", + "name": "Generation Record 3 Text 3", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "GPT Image", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "YUu8e", + "name": "Generation Record 3 Cell 4", + "width": 100, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ACwjR", + "name": "Generation Record 3 Text 4", + "fill": "$ink", + "content": "failed", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "KUR5s", + "name": "Generation Record 3 Cell 5", + "width": 150, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "wV4zo", + "name": "Generation Record 3 Text 5", + "fill": "$danger", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "pending_manual_review", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Zka3n", + "name": "Generation Record 3 Cell 6", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "be5Ww", + "name": "Generation Record 3 Text 6", + "fill": "$ink", + "content": "今天 14:46", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "mbGgv", + "name": "Generation Record Row 4", + "width": "fill_container", + "height": 58, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "dY3Vq", + "name": "Generation Record 4 Cell 1", + "width": 126, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "b40Sq", + "name": "Generation Record 4 Text 1", + "fill": "$ink", + "content": "JOB-34F", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "bLoiK", + "name": "Generation Record 4 Cell 2", + "width": 110, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "wdqCk", + "name": "Generation Record 4 Text 2", + "fill": "$ink", + "content": "lu•••", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "U9GiZ", + "name": "Generation Record 4 Cell 3", + "width": 180, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "xTS0f", + "name": "Generation Record 4 Text 3", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "Gemini Pro", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "WlIix", + "name": "Generation Record 4 Cell 4", + "width": 100, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "iNmWQ", + "name": "Generation Record 4 Text 4", + "fill": "$ink", + "content": "rejected", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "FnVEB", + "name": "Generation Record 4 Cell 5", + "width": 150, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "DqRXZ", + "name": "Generation Record 4 Text 5", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "not_required", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "XXViP", + "name": "Generation Record 4 Cell 6", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "t06lp", + "name": "Generation Record 4 Text 6", + "fill": "$ink", + "content": "今天 13:02", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "c4XG4", + "name": "Generation Record Row 5", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "PYSgp", + "name": "Generation Record 5 Cell 1", + "width": 126, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "YtXO0", + "name": "Generation Record 5 Text 1", + "fill": "$ink", + "content": "JOB-33A", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "rjFEW", + "name": "Generation Record 5 Cell 2", + "width": 110, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "pL9ig", + "name": "Generation Record 5 Text 2", + "fill": "$ink", + "content": "ch•••", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Oe1nj", + "name": "Generation Record 5 Cell 3", + "width": 180, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "GZ8vg", + "name": "Generation Record 5 Text 3", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "Gemini Flash", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "ewdBD", + "name": "Generation Record 5 Cell 4", + "width": 100, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "WenZR", + "name": "Generation Record 5 Text 4", + "fill": "$ink", + "content": "succeeded", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "A5ukkK", + "name": "Generation Record 5 Cell 5", + "width": 150, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "TojYV", + "name": "Generation Record 5 Text 5", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "confirmed_charged", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "y4YOQ", + "name": "Generation Record 5 Cell 6", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "XPblS", + "name": "Generation Record 5 Text 6", + "fill": "$ink", + "content": "昨天 18:40", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "hFLkK", + "name": "Generation Record Row 6", + "width": "fill_container", + "height": 58, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "gDPr4", + "name": "Generation Record 6 Cell 1", + "width": 126, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "qNxDn", + "name": "Generation Record 6 Text 1", + "fill": "$ink", + "content": "JOB-331", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "q91rW", + "name": "Generation Record 6 Cell 2", + "width": 110, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "N2t6b", + "name": "Generation Record 6 Text 2", + "fill": "$ink", + "content": "yu•••", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "kodW2", + "name": "Generation Record 6 Cell 3", + "width": 180, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "MVbPq", + "name": "Generation Record 6 Text 3", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "GPT Image", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "vkTGb", + "name": "Generation Record 6 Cell 4", + "width": 100, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "b9yJTX", + "name": "Generation Record 6 Text 4", + "fill": "$ink", + "content": "failed", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "bMZue", + "name": "Generation Record 6 Cell 5", + "width": 150, + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "q54Pi", + "name": "Generation Record 6 Text 5", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "confirmed_not_charged", + "lineHeight": 1.4, + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "MCrGu", + "name": "Generation Record 6 Cell 6", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 9 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "WJJa8", + "name": "Generation Record 6 Text 6", + "fill": "$ink", + "content": "昨天 17:25", + "lineHeight": 1.4, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "WLP27", + "name": "Generation Safe Detail Panel", + "width": 390, + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 13, + "padding": 16, + "children": [ + { + "type": "text", + "id": "tRlFw", + "name": "Generation Safe Detail Title", + "fill": "$ink", + "content": "JOB-351", + "fontFamily": "$font-data", + "fontSize": 16, + "fontWeight": "700" + }, + { + "type": "frame", + "id": "ZBuBt", + "name": "Generation Detail Status", + "width": "fill_container", + "height": 36, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "UriY9", + "name": "Generation Detail Status Label", + "fill": "$gray-600", + "content": "任务状态", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "pZ52D", + "name": "Generation Detail Status Value", + "fill": "$danger", + "content": "failed", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "ZK2Jf", + "name": "Generation Cost Reconciliation", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$danger", + "strokeWidth": 1, + "layout": "vertical", + "gap": 5, + "padding": [ + 7, + 10 + ], + "children": [ + { + "type": "text", + "id": "Tfjzh", + "name": "Generation Cost Reconciliation Label", + "fill": "$gray-600", + "content": "上游成本核对 · 与任务状态分列", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "text", + "id": "c82GJA", + "name": "Generation Cost Reconciliation Value", + "fill": "$danger", + "content": "pending_manual_review", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "dW2bV", + "name": "完整提示词 Private Section", + "width": "fill_container", + "height": 92, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 10, + "children": [ + { + "type": "frame", + "id": "V6Y7D", + "name": "完整提示词 Private Header", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "fQ5du", + "name": "完整提示词 Private Title", + "fill": "$ink", + "content": "完整提示词", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "J55DNb", + "name": "完整提示词 Private Hidden", + "fill": "$gray-600", + "content": "默认隐藏", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "s6HpeM", + "name": "完整提示词 Audited Open Button", + "width": "fill_container", + "height": 38, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 8, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "U3g936", + "name": "完整提示词 Audited Open Icon", + "width": 15, + "height": 15, + "icon": "shield-check", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "EvNqN", + "name": "完整提示词 Audited Open Label", + "fill": "$ink", + "content": "打开并记录审计", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "t3xfc", + "name": "参考图 Private Section", + "width": "fill_container", + "height": 92, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 10, + "children": [ + { + "type": "frame", + "id": "wz5Cm", + "name": "参考图 Private Header", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "PgHYO", + "name": "参考图 Private Title", + "fill": "$ink", + "content": "参考图", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "m2R4x", + "name": "参考图 Private Hidden", + "fill": "$gray-600", + "content": "默认隐藏", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "nIEWa", + "name": "参考图 Audited Open Button", + "width": "fill_container", + "height": 38, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 8, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "PH6gd", + "name": "参考图 Audited Open Icon", + "width": 15, + "height": 15, + "icon": "shield-check", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "NO0Wk", + "name": "参考图 Audited Open Label", + "fill": "$ink", + "content": "打开并记录审计", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "ZtexB", + "name": "生成图片 Private Section", + "width": "fill_container", + "height": 92, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 10, + "children": [ + { + "type": "frame", + "id": "kOIyc", + "name": "生成图片 Private Header", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "qXPZH", + "name": "生成图片 Private Title", + "fill": "$ink", + "content": "生成图片", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "wsCnJ", + "name": "生成图片 Private Hidden", + "fill": "$gray-600", + "content": "默认隐藏", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "brxkl", + "name": "生成图片 Audited Open Button", + "width": "fill_container", + "height": 38, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 8, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "M6Sonu", + "name": "生成图片 Audited Open Icon", + "width": 15, + "height": 15, + "icon": "shield-check", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "OTokc", + "name": "生成图片 Audited Open Label", + "fill": "$ink", + "content": "打开并记录审计", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "text", + "id": "uJPEW", + "name": "Private Open Rule", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "点击后不要求填写原因,也不增加逐次确认;审计写入失败则不打开。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "aDgiZ", + "layoutPosition": "absolute", + "x": 220, + "y": 0, + "name": "Private Notice Backdrop", + "width": 1380, + "height": 900, + "fill": "#11111199" + }, + { + "type": "frame", + "id": "bbr60", + "layoutPosition": "absolute", + "x": 620, + "y": 180, + "name": "Private Content Notice Dialog", + "width": 580, + "height": 520, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "gap": 16, + "padding": 24, + "children": [ + { + "type": "text", + "id": "WrFiK", + "name": "Private Notice Dialog Title", + "fill": "$ink", + "content": "查看私有内容前请确认", + "fontFamily": "$font-ui", + "fontSize": 22, + "fontWeight": "900" + }, + { + "type": "text", + "id": "UYWIA", + "name": "Private Notice Version", + "fill": "$gray-600", + "content": "告知版本 PRIVATE-CONTENT-03 · 2026-07-24 生效", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "frame", + "id": "g8w4GM", + "name": "Private Notice Rules", + "width": "fill_container", + "height": 250, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 12, + "padding": 16, + "children": [ + { + "type": "frame", + "id": "iRk6L", + "name": "Private Notice Rule 仅按运营需要最小化查看完整提示词或图片。", + "width": "fill_container", + "gap": 9, + "children": [ + { + "type": "rectangle", + "id": "vgnOj", + "name": "Private Notice Rule Marker 仅按运营需要最小化查看完整提示词或图片。", + "fill": "$brand-yellow", + "width": 8, + "height": 8, + "stroke": "$ink", + "strokeWidth": 1 + }, + { + "type": "text", + "id": "h0B7O", + "name": "Private Notice Rule Text 仅按运营需要最小化查看完整提示词或图片。", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "仅按运营需要最小化查看完整提示词或图片。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "kKMqu", + "name": "Private Notice Rule 每个入口固定标注“打开并记录审计”。", + "width": "fill_container", + "gap": 9, + "children": [ + { + "type": "rectangle", + "id": "x22Vh", + "name": "Private Notice Rule Marker 每个入口固定标注“打开并记录审计”。", + "fill": "$brand-yellow", + "width": 8, + "height": 8, + "stroke": "$ink", + "strokeWidth": 1 + }, + { + "type": "text", + "id": "eahOX", + "name": "Private Notice Rule Text 每个入口固定标注“打开并记录审计”。", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "每个入口固定标注“打开并记录审计”。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "TaT3u", + "name": "Private Notice Rule 点击后自动写入独立访问审计,不要求填写查看原因。", + "width": "fill_container", + "gap": 9, + "children": [ + { + "type": "rectangle", + "id": "K5Oy5", + "name": "Private Notice Rule Marker 点击后自动写入独立访问审计,不要求填写查看原因。", + "fill": "$brand-yellow", + "width": 8, + "height": 8, + "stroke": "$ink", + "strokeWidth": 1 + }, + { + "type": "text", + "id": "BNJqA", + "name": "Private Notice Rule Text 点击后自动写入独立访问审计,不要求填写查看原因。", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "点击后自动写入独立访问审计,不要求填写查看原因。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "kTIrO", + "name": "Private Notice Rule 审计记录包含管理员、目标、时间、内容类型和到期时间。", + "width": "fill_container", + "gap": 9, + "children": [ + { + "type": "rectangle", + "id": "VKbpp", + "name": "Private Notice Rule Marker 审计记录包含管理员、目标、时间、内容类型和到期时间。", + "fill": "$brand-yellow", + "width": 8, + "height": 8, + "stroke": "$ink", + "strokeWidth": 1 + }, + { + "type": "text", + "id": "q0hhn", + "name": "Private Notice Rule Text 审计记录包含管理员、目标、时间、内容类型和到期时间。", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "审计记录包含管理员、目标、时间、内容类型和到期时间。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "P2KAGQ", + "name": "Private Notice Rule 告知升版后需要重新确认;相同版本跨标签与重登不重复。", + "width": "fill_container", + "gap": 9, + "children": [ + { + "type": "rectangle", + "id": "KML7Y", + "name": "Private Notice Rule Marker 告知升版后需要重新确认;相同版本跨标签与重登不重复。", + "fill": "$brand-yellow", + "width": 8, + "height": 8, + "stroke": "$ink", + "strokeWidth": 1 + }, + { + "type": "text", + "id": "OSEXM", + "name": "Private Notice Rule Text 告知升版后需要重新确认;相同版本跨标签与重登不重复。", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "告知升版后需要重新确认;相同版本跨标签与重登不重复。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "text", + "id": "J88Kqo", + "name": "Private Notice Persistence", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "确认状态由后端按 super_admin 身份与告知版本持久记录,不依赖浏览器或会话。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "aLCDs", + "name": "Private Notice Actions", + "width": "fill_container", + "height": 44, + "gap": 10, + "justifyContent": "end", + "children": [ + { + "type": "frame", + "id": "nAX89", + "name": "Back To Generation Records", + "width": 150, + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "cE6UW", + "name": "Back To Generation Records Label", + "fill": "$ink", + "content": "返回生成记录", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "LnVL1", + "name": "Confirm Private Notice", + "width": 160, + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "CkvUg", + "name": "Confirm Private Notice Label", + "fill": "$ink", + "content": "确认并进入", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "900" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "L3lde2", + "x": 18720, + "y": 4820, + "name": "06E 服务与存储", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "children": [ + { + "type": "frame", + "id": "KT4tK", + "name": "Admin Sidebar", + "width": 220, + "height": "fill_container", + "fill": "$ink", + "layout": "vertical", + "gap": 6, + "padding": [ + 20, + 14 + ], + "children": [ + { + "type": "text", + "id": "RI6kI", + "name": "Admin Wordmark", + "fill": "$brand-yellow", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 28, + "fontWeight": "900" + }, + { + "type": "text", + "id": "t5LGk", + "name": "Admin Domain Label", + "fill": "$gray-300", + "content": "OPERATIONS ADMIN", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "rectangle", + "id": "zb79L", + "name": "Admin Sidebar Rule", + "fill": "$gray-600", + "width": "fill_container", + "height": 1 + }, + { + "type": "frame", + "id": "Kz4ng", + "name": "Admin 总览 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "BFgQd", + "name": "Admin 总览 Icon", + "width": 17, + "height": 17, + "icon": "layout-dashboard", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "SeLYQ", + "name": "Admin 总览 Label", + "fill": "$paper", + "content": "总览", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "itmQ8", + "name": "Admin 用户 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "oXB1H", + "name": "Admin 用户 Icon", + "width": 17, + "height": 17, + "icon": "users", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "uaYsf", + "name": "Admin 用户 Label", + "fill": "$paper", + "content": "用户", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "VUyxx", + "name": "Admin 邀请码 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "nlVll", + "name": "Admin 邀请码 Icon", + "width": 17, + "height": 17, + "icon": "ticket-check", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "Xcerd", + "name": "Admin 邀请码 Label", + "fill": "$paper", + "content": "邀请码", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "AlnLj", + "name": "Admin 模型 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "AwTXQ", + "name": "Admin 模型 Icon", + "width": 17, + "height": 17, + "icon": "cpu", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "j7BVYE", + "name": "Admin 模型 Label", + "fill": "$paper", + "content": "模型", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "brYNi", + "name": "Admin 素材 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "H5v0h", + "name": "Admin 素材 Icon", + "width": 17, + "height": 17, + "icon": "shapes", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "G09fCv", + "name": "Admin 素材 Label", + "fill": "$paper", + "content": "素材", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "e5Q7HE", + "name": "Admin 内部预览 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "FFct6", + "name": "Admin 内部预览 Icon", + "width": 17, + "height": 17, + "icon": "flask-conical", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "Qlnr8", + "name": "Admin 内部预览 Label", + "fill": "$paper", + "content": "内部预览", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "K7ZeKs", + "name": "Admin 生成记录 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "LdcL0", + "name": "Admin 生成记录 Icon", + "width": 17, + "height": 17, + "icon": "image", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "d23QD", + "name": "Admin 生成记录 Label", + "fill": "$paper", + "content": "生成记录", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "oXxrH", + "name": "Admin 服务与存储 Nav", + "width": "fill_container", + "height": 40, + "fill": "$brand-yellow", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "lxLK9", + "name": "Admin 服务与存储 Icon", + "width": 17, + "height": 17, + "icon": "server", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "Q9n39s", + "name": "Admin 服务与存储 Label", + "fill": "$ink", + "content": "服务与存储", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "nigk8", + "name": "Admin 审计 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "sg4ZH", + "name": "Admin 审计 Icon", + "width": 17, + "height": 17, + "icon": "shield-check", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "vOEJH", + "name": "Admin 审计 Label", + "fill": "$paper", + "content": "审计", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "xn2oN", + "name": "Admin Session Boundary", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 8, + "justifyContent": "end", + "children": [ + { + "type": "text", + "id": "aWEr9", + "name": "Admin Session Identity", + "fill": "$gray-300", + "content": "su•••@example.com", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "Z4j4NJ", + "name": "Admin Session Hint", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "后台会话不能切换为普通用户", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "f8sB7", + "name": "Admin Overview Shell", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "n8hrhQ", + "name": "Admin Overview Top Bar", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "yovlW", + "name": "Admin Overview Page Title", + "fill": "$ink", + "content": "总览", + "fontFamily": "$font-ui", + "fontSize": 22, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "KKKAl", + "name": "Admin Overall Health", + "gap": 8, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "EAvmx", + "name": "Admin Overall Health Icon", + "width": 17, + "height": 17, + "icon": "triangle-alert", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "text", + "id": "mJWfz", + "name": "Admin Overall Health Text", + "fill": "$danger", + "content": "有 2 项需要处理", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "GAqQG", + "name": "Admin Critical Storage Strip", + "width": "fill_container", + "height": 38, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "XOOtt", + "name": "Admin Critical Storage Text", + "fill": "$ink", + "content": "LocalDataRoot 已使用 4.71 GB / 5 GB · critical · 最后计量 18:32", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "CBF58", + "name": "Admin Critical Storage Action", + "fill": "$ink", + "content": "打开服务与存储 →", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "900" + } + ] + }, + { + "type": "frame", + "id": "uNVg6", + "name": "Admin Overview Main", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "gap": 18, + "padding": 24, + "children": [ + { + "type": "frame", + "id": "tETjY", + "name": "Admin Overview Metrics", + "width": "fill_container", + "height": 122, + "gap": 10, + "children": [ + { + "type": "frame", + "id": "zSJ4z", + "name": "普通用户 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "uVqs4", + "name": "普通用户 Admin Metric Label", + "fill": "$gray-600", + "content": "普通用户", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "ZUTYa", + "name": "普通用户 Admin Metric Value", + "fill": "$ink", + "content": "7 / 10", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "eh0di", + "name": "普通用户 Admin Metric Note", + "fill": "$gray-600", + "content": "active 6 · suspended 1", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "EOBs3", + "name": "生成任务 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "cw8bL", + "name": "生成任务 Admin Metric Label", + "fill": "$gray-600", + "content": "生成任务", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "OYM8t", + "name": "生成任务 Admin Metric Value", + "fill": "$ink", + "content": "1", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "ZZKxq", + "name": "生成任务 Admin Metric Note", + "fill": "$gray-600", + "content": "queued / running", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "L1TdJQ", + "name": "成本核对 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "XQn2t", + "name": "成本核对 Admin Metric Label", + "fill": "$gray-600", + "content": "成本核对", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "fmo3T", + "name": "成本核对 Admin Metric Value", + "fill": "$ink", + "content": "2", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "AhyE0", + "name": "成本核对 Admin Metric Note", + "fill": "$gray-600", + "content": "pending_manual_review", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Kgmem", + "name": "运行时模型 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "t89CNT", + "name": "运行时模型 Admin Metric Label", + "fill": "$gray-600", + "content": "运行时模型", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Brs0Q", + "name": "运行时模型 Admin Metric Value", + "fill": "$ink", + "content": "2 / 3", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "loiUJ", + "name": "运行时模型 Admin Metric Note", + "fill": "$gray-600", + "content": "当前推荐 Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "u7LmBq", + "name": "Admin Status Grid", + "width": "fill_container", + "height": 250, + "gap": 14, + "children": [ + { + "type": "frame", + "id": "G813p7", + "name": "Service Status Panel", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "LqFH2", + "name": "Service Status Header", + "width": "fill_container", + "height": 42, + "fill": "$ink", + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Q1DX8", + "name": "Service Status Title", + "fill": "$paper", + "content": "服务状态", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "zNOSX", + "name": "Service Status Link", + "fill": "$brand-yellow", + "content": "查看全部 →", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "o18fyt", + "name": "API Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "fuioF", + "name": "API Service Name", + "fill": "$ink", + "content": "API", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "KqsU4", + "name": "API Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "eNSoj", + "name": "Worker Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "XAalk", + "name": "Worker Service Name", + "fill": "$ink", + "content": "Worker", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "vOlee", + "name": "Worker Service State", + "fill": "$danger", + "content": "DEGRADED", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "F6lPA", + "name": "Resend Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "P2Puv3", + "name": "Resend Service Name", + "fill": "$ink", + "content": "Resend", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "n0VTFm", + "name": "Resend Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "W5mci1", + "name": "高德 Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "sWByY", + "name": "高德 Service Name", + "fill": "$ink", + "content": "高德", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "kzRPO", + "name": "高德 Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "X5EFF", + "name": "AI 网关 Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "pNgJK", + "name": "AI 网关 Service Name", + "fill": "$ink", + "content": "AI 网关", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Bwnk6", + "name": "AI 网关 Service State", + "fill": "$danger", + "content": "1 个模型不可用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "D3k6C", + "name": "Admin Alerts Panel", + "width": 500, + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 10, + "padding": 14, + "children": [ + { + "type": "text", + "id": "LEVMW", + "name": "Admin Alerts Title", + "fill": "$ink", + "content": "需要处理", + "fontFamily": "$font-ui", + "fontSize": 16, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "YAr5q", + "name": "容量已进入 critical Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "HpYey", + "name": "容量已进入 critical Alert Icon", + "width": 18, + "height": 18, + "icon": "hard-drive", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "roFAV", + "name": "容量已进入 critical Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "h58qAy", + "name": "容量已进入 critical Alert Title", + "fill": "$ink", + "content": "容量已进入 critical", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "zNfoB", + "name": "容量已进入 critical Alert Meta", + "fill": "$gray-600", + "content": "等待清理与重新计量", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "LoM6c", + "name": "Worker degraded Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "AZtnI", + "name": "Worker degraded Alert Icon", + "width": 18, + "height": 18, + "icon": "circle-alert", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "z0BLj5", + "name": "Worker degraded Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "DRxqb", + "name": "Worker degraded Alert Title", + "fill": "$ink", + "content": "Worker degraded", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "o5TKY", + "name": "Worker degraded Alert Meta", + "fill": "$gray-600", + "content": "生成新任务受影响", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "z24Fsz", + "name": "2 项上游成本核对 Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "M4EQ8", + "name": "2 项上游成本核对 Alert Icon", + "width": 18, + "height": 18, + "icon": "scale", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "p5NGy2", + "name": "2 项上游成本核对 Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "aGmrL", + "name": "2 项上游成本核对 Alert Title", + "fill": "$ink", + "content": "2 项上游成本核对", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "BFBBC", + "name": "2 项上游成本核对 Alert Meta", + "fill": "$gray-600", + "content": "最早等待 46 分钟", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "d2W5q", + "name": "Recent Admin Activity", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "SgU9D", + "name": "Recent Admin Activity Header", + "width": "fill_container", + "height": 42, + "fill": "$ink", + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "gFi2T", + "name": "Recent Admin Activity Title", + "fill": "$paper", + "content": "最近后台操作", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "spDdv", + "name": "Recent Admin Activity Link", + "fill": "$brand-yellow", + "content": "打开审计 →", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "a4L8M", + "name": "Activity 18:20", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "zVbes", + "name": "Activity 18:20 18:20", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "a1faa", + "name": "Activity 18:20 18:20 Text", + "fill": "$ink", + "content": "18:20", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "unuRg", + "name": "Activity 18:20 运行时恢复检查", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "NWHH5", + "name": "Activity 18:20 运行时恢复检查 Text", + "fill": "$ink", + "content": "运行时恢复检查", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Rl7pg", + "name": "Activity 18:20 Gemini Flash", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "DvdhO", + "name": "Activity 18:20 Gemini Flash Text", + "fill": "$ink", + "content": "Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "g6RuHC", + "name": "Activity 18:20 succeeded", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "VQHJw", + "name": "Activity 18:20 succeeded Text", + "fill": "$ink", + "content": "succeeded", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "yA0ch", + "name": "Activity 17:42", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "tN6Xk", + "name": "Activity 17:42 17:42", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "K9e4R", + "name": "Activity 17:42 17:42 Text", + "fill": "$ink", + "content": "17:42", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "ARnJu", + "name": "Activity 17:42 贴纸清理候选查询", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "AfZBC", + "name": "Activity 17:42 贴纸清理候选查询 Text", + "fill": "$ink", + "content": "贴纸清理候选查询", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "oBW41", + "name": "Activity 17:42 CLEANUP-19C", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "tjcGt", + "name": "Activity 17:42 CLEANUP-19C Text", + "fill": "$ink", + "content": "CLEANUP-19C", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "YGye7", + "name": "Activity 17:42 succeeded", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "C2C9i", + "name": "Activity 17:42 succeeded Text", + "fill": "$ink", + "content": "succeeded", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "lL4w9", + "name": "Activity 16:08", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "GOPvd", + "name": "Activity 16:08 16:08", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "iMm4m", + "name": "Activity 16:08 16:08 Text", + "fill": "$ink", + "content": "16:08", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "mk6Ud", + "name": "Activity 16:08 调整点数", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "xYHwW", + "name": "Activity 16:08 调整点数 Text", + "fill": "$ink", + "content": "调整点数", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "q3U0x", + "name": "Activity 16:08 USER-7A2", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "EMNfG", + "name": "Activity 16:08 USER-7A2 Text", + "fill": "$ink", + "content": "USER-7A2", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "MhgPB", + "name": "Activity 16:08 +5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "fCDT6", + "name": "Activity 16:08 +5 Text", + "fill": "$ink", + "content": "+5", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "fTicU", + "name": "Activity 15:30", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "zgsmu", + "name": "Activity 15:30 15:30", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "PPVBZ", + "name": "Activity 15:30 15:30 Text", + "fill": "$ink", + "content": "15:30", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "IyQ2F", + "name": "Activity 15:30 模型配置保存", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "NREBs", + "name": "Activity 15:30 模型配置保存 Text", + "fill": "$ink", + "content": "模型配置保存", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "iDge3", + "name": "Activity 15:30 CONFIG-12", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "PRMQk", + "name": "Activity 15:30 CONFIG-12 Text", + "fill": "$ink", + "content": "CONFIG-12", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "yMBF0", + "name": "Activity 15:30 version conflict", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "rqINO", + "name": "Activity 15:30 version conflict Text", + "fill": "$danger", + "content": "version conflict", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "J7XHkr", + "layoutPosition": "absolute", + "x": 220, + "y": 0, + "name": "Services Page Overlay Shell", + "width": 1380, + "height": 900, + "fill": "$paper", + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "ZHIoy", + "name": "Services Top Bar", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Ww1e4", + "name": "Services Page Title", + "fill": "$ink", + "content": "服务与存储", + "fontFamily": "$font-ui", + "fontSize": 22, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "ig2ij", + "name": "Open Diagnostics Button", + "height": 36, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 7, + "padding": [ + 0, + 13 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "SVr68", + "name": "Open Diagnostics Icon", + "width": 16, + "height": 16, + "icon": "stethoscope", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "f5lb1", + "name": "Open Diagnostics Label", + "fill": "$ink", + "content": "打开脱敏诊断", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "DCDwe", + "name": "Services Full Strip", + "width": "fill_container", + "height": 40, + "fill": "$danger", + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Vtg5o", + "name": "Services Full Strip Text", + "fill": "$paper", + "content": "storage_status = full · 新增受管二进制写入与 AI 调用已阻断", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "I9NW4s", + "name": "Services Full Strip Time", + "fill": "$paper", + "content": "last_measured_at 18:32", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "cdfqA", + "name": "Services Main", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "gap": 16, + "padding": 24, + "children": [ + { + "type": "frame", + "id": "pn2uF", + "name": "LocalDataRoot Status Section", + "width": "fill_container", + "height": 246, + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 12, + "padding": 16, + "children": [ + { + "type": "frame", + "id": "i5Zl7", + "name": "LocalDataRoot Status Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "k11PL7", + "name": "LocalDataRoot Status Title", + "fill": "$ink", + "content": "LocalDataRoot 容量", + "fontFamily": "$font-ui", + "fontSize": 18, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "Pj8o1", + "name": "LocalDataRoot Full Badge", + "fill": "$danger", + "padding": [ + 5, + 9 + ], + "children": [ + { + "type": "text", + "id": "uVbSq", + "name": "LocalDataRoot Full Text", + "fill": "$paper", + "content": "FULL", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "d7lGO", + "name": "Admin Storage Meter Header", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "gOXPt", + "name": "Admin Storage Meter Label", + "fill": "$gray-600", + "content": "managed_content_bytes", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "F9W0fP", + "name": "Admin Storage Meter Value", + "fill": "$danger", + "content": "5.00 GB / 5 GB", + "fontFamily": "$font-data", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "m0gnb", + "name": "Admin Storage Meter", + "width": "fill_container", + "height": 22, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "children": [ + { + "type": "rectangle", + "id": "sQhGr", + "name": "Admin Storage Meter Fill", + "fill": "$danger", + "width": "fill_container", + "height": "fill_container" + } + ] + }, + { + "type": "frame", + "id": "vVysf", + "name": "Storage Threshold Labels", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "msaVJ", + "name": "Storage Threshold Start", + "fill": "$gray-600", + "content": "0", + "fontFamily": "$font-data", + "fontSize": 9, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "DVwT0", + "name": "Storage Threshold Warning", + "fill": "$gray-600", + "content": "80% WARNING", + "fontFamily": "$font-data", + "fontSize": 9, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "z7207", + "name": "Storage Threshold Critical", + "fill": "$gray-600", + "content": "90% CRITICAL", + "fontFamily": "$font-data", + "fontSize": 9, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "T618Id", + "name": "Storage Threshold Full", + "fill": "$danger", + "content": "5 GB FULL", + "fontFamily": "$font-data", + "fontSize": 9, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "sG2JW", + "name": "Storage Accounting Note", + "width": "fill_container", + "height": 52, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "l2F2i", + "name": "Storage Accounting Main", + "fill": "$ink", + "content": "上传贴纸原图 + 缩略图计入 · 只读规范素材库不计入", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "kRgW9", + "name": "Storage Accounting Value", + "fill": "$gray-600", + "content": "上传贴纸 612 MB · 只读素材 3.57 GB", + "fontFamily": "$font-data", + "fontSize": 9, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "ZfOCw", + "name": "Storage Recovery Actions", + "width": "fill_container", + "height": 38, + "gap": 8, + "children": [ + { + "type": "frame", + "id": "Dpqp9", + "name": "先下载重要成品 Recovery Action", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 6, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "FwGxp", + "name": "先下载重要成品 Recovery Icon", + "width": 15, + "height": 15, + "icon": "download", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "TFYou", + "name": "先下载重要成品 Recovery Label", + "fill": "$ink", + "content": "先下载重要成品", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "YIAQv", + "name": "永久删除项目 Recovery Action", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 6, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "THIDF", + "name": "永久删除项目 Recovery Icon", + "width": 15, + "height": 15, + "icon": "trash-2", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "XbCZM", + "name": "永久删除项目 Recovery Label", + "fill": "$ink", + "content": "永久删除项目", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "fg7af", + "name": "清理无引用贴纸 Recovery Action", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 6, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "za1v2", + "name": "清理无引用贴纸 Recovery Icon", + "width": 15, + "height": 15, + "icon": "shredder", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "Ejtql", + "name": "清理无引用贴纸 Recovery Label", + "fill": "$ink", + "content": "清理无引用贴纸", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "p53X6P", + "name": "等待重新计量 Recovery Action", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 6, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "L411B7", + "name": "等待重新计量 Recovery Icon", + "width": 15, + "height": 15, + "icon": "refresh-cw", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "Aeqfa", + "name": "等待重新计量 Recovery Label", + "fill": "$ink", + "content": "等待重新计量", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "fjFiB", + "name": "External Services Grid", + "width": "fill_container", + "height": "fill_container", + "gap": 14, + "children": [ + { + "type": "frame", + "id": "nwVGf", + "name": "External Service Column", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 10, + "children": [ + { + "type": "frame", + "id": "o97K1N", + "name": "Resend Service Panel", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 14, + "children": [ + { + "type": "frame", + "id": "EnJEH", + "name": "Resend Service Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Jtkcf", + "name": "Resend Service Title", + "fill": "$ink", + "content": "Resend", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "900" + }, + { + "type": "text", + "id": "d5zwn", + "name": "Resend Service State", + "fill": "$success", + "content": "NORMAL", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "text", + "id": "p2SNKX", + "name": "Resend Service Impact", + "fill": "$ink", + "content": "验证码发送可用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "eWXIx", + "name": "Resend Service Secret", + "fill": "$gray-600", + "content": "Key 已配置 · 不显示值", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "M0B95", + "name": "高德 Service Panel", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 14, + "children": [ + { + "type": "frame", + "id": "o9QWcH", + "name": "高德 Service Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Zv8Q1", + "name": "高德 Service Title", + "fill": "$ink", + "content": "高德", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "900" + }, + { + "type": "text", + "id": "ilPxf", + "name": "高德 Service State", + "fill": "$success", + "content": "NORMAL", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "text", + "id": "O669KK", + "name": "高德 Service Impact", + "fill": "$ink", + "content": "DYN004 定位可用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "kitkk", + "name": "高德 Service Secret", + "fill": "$gray-600", + "content": "Key 已配置 · 月度额度正常", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "XK72m", + "name": "AI 网关 Service Panel", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 8, + "padding": 14, + "children": [ + { + "type": "frame", + "id": "nYQ35", + "name": "AI 网关 Service Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "sRxXv", + "name": "AI 网关 Service Title", + "fill": "$ink", + "content": "AI 网关", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "900" + }, + { + "type": "text", + "id": "rR6fU", + "name": "AI 网关 Service State", + "fill": "$danger", + "content": "DEGRADED", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "text", + "id": "i7GHd", + "name": "AI 网关 Service Impact", + "fill": "$ink", + "content": "GPT Image 运行时不可用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "yjluC", + "name": "AI 网关 Service Secret", + "fill": "$gray-600", + "content": "余额影响:model · 不改写模型配置", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "aTg0w", + "name": "API Worker Status Panel", + "width": 430, + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 12, + "padding": 16, + "children": [ + { + "type": "text", + "id": "UvXLz", + "name": "API Worker Status Title", + "fill": "$ink", + "content": "API / Worker", + "fontFamily": "$font-ui", + "fontSize": 18, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "HDm8G", + "name": "API System Health Row", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 10 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "n61Ni", + "name": "API System Health Name", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "D9vTf", + "name": "API System Health Label", + "fill": "$ink", + "content": "API", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "JQZJp", + "name": "API System Health Time", + "fill": "$gray-600", + "content": "checked 18:33:06", + "fontFamily": "$font-data", + "fontSize": 9, + "fontWeight": "normal" + } + ] + }, + { + "type": "text", + "id": "x4AGb", + "name": "API System Health State", + "fill": "$success", + "content": "NORMAL", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "x8PJ1", + "name": "Worker System Health Row", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 10 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "u7dIU", + "name": "Worker System Health Name", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "vkutd", + "name": "Worker System Health Label", + "fill": "$ink", + "content": "Worker", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "VI7M7", + "name": "Worker System Health Time", + "fill": "$gray-600", + "content": "checked 18:32:48", + "fontFamily": "$font-data", + "fontSize": 9, + "fontWeight": "normal" + } + ] + }, + { + "type": "text", + "id": "sN8T6", + "name": "Worker System Health State", + "fill": "$danger", + "content": "DEGRADED", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "wHG63", + "name": "Supervisor System Health Row", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 10 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "xHFjz", + "name": "Supervisor System Health Name", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "SZnOu", + "name": "Supervisor System Health Label", + "fill": "$ink", + "content": "Supervisor", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "hSIFV", + "name": "Supervisor System Health Time", + "fill": "$gray-600", + "content": "checked 18:33:10", + "fontFamily": "$font-data", + "fontSize": 9, + "fontWeight": "normal" + } + ] + }, + { + "type": "text", + "id": "Wy0g8", + "name": "Supervisor System Health State", + "fill": "$success", + "content": "NORMAL", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "ZcLHP", + "name": "Worker Degraded Detail", + "width": "fill_container", + "height": 88, + "fill": "$paper", + "stroke": "$danger", + "strokeWidth": 1, + "layout": "vertical", + "gap": 6, + "padding": 12, + "children": [ + { + "type": "text", + "id": "am60s", + "name": "Worker Degraded Detail Title", + "fill": "$danger", + "content": "生成任务领取暂停", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "900" + }, + { + "type": "text", + "id": "LZkFv", + "name": "Worker Degraded Detail Body", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "项目查看、已有内容下载和客户端导出仍可用。完整错误只进入脱敏诊断。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "text", + "id": "iKD9Z", + "name": "No Path Secret Note", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "页面不显示绝对路径、密钥、提示词或上游原始响应。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "DlCpN", + "x": 20480, + "y": 4820, + "name": "06F 私有内容访问审计", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "children": [ + { + "type": "frame", + "id": "YUoQd", + "name": "Admin Sidebar", + "width": 220, + "height": "fill_container", + "fill": "$ink", + "layout": "vertical", + "gap": 6, + "padding": [ + 20, + 14 + ], + "children": [ + { + "type": "text", + "id": "d7yi9", + "name": "Admin Wordmark", + "fill": "$brand-yellow", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 28, + "fontWeight": "900" + }, + { + "type": "text", + "id": "Dk8PN", + "name": "Admin Domain Label", + "fill": "$gray-300", + "content": "OPERATIONS ADMIN", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "rectangle", + "id": "ifRVj", + "name": "Admin Sidebar Rule", + "fill": "$gray-600", + "width": "fill_container", + "height": 1 + }, + { + "type": "frame", + "id": "l2q2no", + "name": "Admin 总览 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "WkvTB", + "name": "Admin 总览 Icon", + "width": 17, + "height": 17, + "icon": "layout-dashboard", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "RvcU1", + "name": "Admin 总览 Label", + "fill": "$paper", + "content": "总览", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "kNvxB", + "name": "Admin 用户 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "zHtbf", + "name": "Admin 用户 Icon", + "width": 17, + "height": 17, + "icon": "users", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "o1y1kl", + "name": "Admin 用户 Label", + "fill": "$paper", + "content": "用户", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "f9hbxg", + "name": "Admin 邀请码 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "x1hTn", + "name": "Admin 邀请码 Icon", + "width": 17, + "height": 17, + "icon": "ticket-check", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "afKG5", + "name": "Admin 邀请码 Label", + "fill": "$paper", + "content": "邀请码", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "Z5wkXZ", + "name": "Admin 模型 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "Iw88N", + "name": "Admin 模型 Icon", + "width": 17, + "height": 17, + "icon": "cpu", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "fW9g8", + "name": "Admin 模型 Label", + "fill": "$paper", + "content": "模型", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "ZvRQQ", + "name": "Admin 素材 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "qv7IJ", + "name": "Admin 素材 Icon", + "width": 17, + "height": 17, + "icon": "shapes", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "Wm0kN", + "name": "Admin 素材 Label", + "fill": "$paper", + "content": "素材", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "GWwvf", + "name": "Admin 内部预览 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "zMOVd", + "name": "Admin 内部预览 Icon", + "width": 17, + "height": 17, + "icon": "flask-conical", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "TA4Fk", + "name": "Admin 内部预览 Label", + "fill": "$paper", + "content": "内部预览", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "VcD7s", + "name": "Admin 生成记录 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "OjUc6", + "name": "Admin 生成记录 Icon", + "width": 17, + "height": 17, + "icon": "image", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "IkvLB", + "name": "Admin 生成记录 Label", + "fill": "$paper", + "content": "生成记录", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "PRiqu", + "name": "Admin 服务与存储 Nav", + "width": "fill_container", + "height": 40, + "fill": "$ink", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "HH2ym", + "name": "Admin 服务与存储 Icon", + "width": 17, + "height": 17, + "icon": "server", + "library": "lucide", + "fill": "$gray-300" + }, + { + "type": "text", + "id": "qKwIk", + "name": "Admin 服务与存储 Label", + "fill": "$paper", + "content": "服务与存储", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "I7MYKE", + "name": "Admin 审计 Nav", + "width": "fill_container", + "height": 40, + "fill": "$brand-yellow", + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "utmlF", + "name": "Admin 审计 Icon", + "width": 17, + "height": 17, + "icon": "shield-check", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "dDq6J", + "name": "Admin 审计 Label", + "fill": "$ink", + "content": "审计", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "B48OUh", + "name": "Admin Session Boundary", + "width": "fill_container", + "height": "fill_container", + "layout": "vertical", + "gap": 8, + "justifyContent": "end", + "children": [ + { + "type": "text", + "id": "D8grC3", + "name": "Admin Session Identity", + "fill": "$gray-300", + "content": "su•••@example.com", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "L0L68m", + "name": "Admin Session Hint", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "后台会话不能切换为普通用户", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "I4thZu", + "name": "Admin Overview Shell", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "izEFH", + "name": "Admin Overview Top Bar", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "QHNFM", + "name": "Admin Overview Page Title", + "fill": "$ink", + "content": "总览", + "fontFamily": "$font-ui", + "fontSize": 22, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "jbhFT", + "name": "Admin Overall Health", + "gap": 8, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "uPvBM", + "name": "Admin Overall Health Icon", + "width": 17, + "height": 17, + "icon": "triangle-alert", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "text", + "id": "qik5f", + "name": "Admin Overall Health Text", + "fill": "$danger", + "content": "有 2 项需要处理", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "xi70y", + "name": "Admin Critical Storage Strip", + "width": "fill_container", + "height": 38, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "CPLaK", + "name": "Admin Critical Storage Text", + "fill": "$ink", + "content": "LocalDataRoot 已使用 4.71 GB / 5 GB · critical · 最后计量 18:32", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "BoWDP", + "name": "Admin Critical Storage Action", + "fill": "$ink", + "content": "打开服务与存储 →", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "900" + } + ] + }, + { + "type": "frame", + "id": "B57Z2", + "name": "Admin Overview Main", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "gap": 18, + "padding": 24, + "children": [ + { + "type": "frame", + "id": "Y622xL", + "name": "Admin Overview Metrics", + "width": "fill_container", + "height": 122, + "gap": 10, + "children": [ + { + "type": "frame", + "id": "eMMsp", + "name": "普通用户 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "x3hvJP", + "name": "普通用户 Admin Metric Label", + "fill": "$gray-600", + "content": "普通用户", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Vgq3K", + "name": "普通用户 Admin Metric Value", + "fill": "$ink", + "content": "7 / 10", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Jd6BX", + "name": "普通用户 Admin Metric Note", + "fill": "$gray-600", + "content": "active 6 · suspended 1", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "NMgKf", + "name": "生成任务 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "dejxj", + "name": "生成任务 Admin Metric Label", + "fill": "$gray-600", + "content": "生成任务", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "p3ZcY", + "name": "生成任务 Admin Metric Value", + "fill": "$ink", + "content": "1", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "i4ZJTW", + "name": "生成任务 Admin Metric Note", + "fill": "$gray-600", + "content": "queued / running", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "f4Zpn", + "name": "成本核对 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "DFupR", + "name": "成本核对 Admin Metric Label", + "fill": "$gray-600", + "content": "成本核对", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "mQRj8", + "name": "成本核对 Admin Metric Value", + "fill": "$ink", + "content": "2", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "jCpuc", + "name": "成本核对 Admin Metric Note", + "fill": "$gray-600", + "content": "pending_manual_review", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "F3bwV6", + "name": "运行时模型 Admin Metric", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 16, + "children": [ + { + "type": "text", + "id": "D1DVYR", + "name": "运行时模型 Admin Metric Label", + "fill": "$gray-600", + "content": "运行时模型", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + }, + { + "type": "text", + "id": "jfnFJ", + "name": "运行时模型 Admin Metric Value", + "fill": "$ink", + "content": "2 / 3", + "fontFamily": "$font-data", + "fontSize": 28, + "fontWeight": "700" + }, + { + "type": "text", + "id": "ds9xV", + "name": "运行时模型 Admin Metric Note", + "fill": "$gray-600", + "content": "当前推荐 Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "BEwsw", + "name": "Admin Status Grid", + "width": "fill_container", + "height": 250, + "gap": 14, + "children": [ + { + "type": "frame", + "id": "yPcHU", + "name": "Service Status Panel", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "hLQ70", + "name": "Service Status Header", + "width": "fill_container", + "height": 42, + "fill": "$ink", + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "LF4Ol", + "name": "Service Status Title", + "fill": "$paper", + "content": "服务状态", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "nekpG", + "name": "Service Status Link", + "fill": "$brand-yellow", + "content": "查看全部 →", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "vEmSM", + "name": "API Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "YdSMH", + "name": "API Service Name", + "fill": "$ink", + "content": "API", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Risfs", + "name": "API Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "xTL77", + "name": "Worker Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "S8a5d", + "name": "Worker Service Name", + "fill": "$ink", + "content": "Worker", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "H6yVHo", + "name": "Worker Service State", + "fill": "$danger", + "content": "DEGRADED", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "X1x49", + "name": "Resend Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "hr9pF", + "name": "Resend Service Name", + "fill": "$ink", + "content": "Resend", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "FOTG1", + "name": "Resend Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "oaRjv", + "name": "高德 Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "C9O27", + "name": "高德 Service Name", + "fill": "$ink", + "content": "高德", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "X5jIf", + "name": "高德 Service State", + "fill": "$success", + "content": "正常", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "l4nCG", + "name": "AI 网关 Service Row", + "width": "fill_container", + "height": 39, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "fshsW", + "name": "AI 网关 Service Name", + "fill": "$ink", + "content": "AI 网关", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "cJoyf", + "name": "AI 网关 Service State", + "fill": "$danger", + "content": "1 个模型不可用", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "BaH75", + "name": "Admin Alerts Panel", + "width": 500, + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 10, + "padding": 14, + "children": [ + { + "type": "text", + "id": "c901J", + "name": "Admin Alerts Title", + "fill": "$ink", + "content": "需要处理", + "fontFamily": "$font-ui", + "fontSize": 16, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "jVwrj", + "name": "容量已进入 critical Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "jnk7U", + "name": "容量已进入 critical Alert Icon", + "width": 18, + "height": 18, + "icon": "hard-drive", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "iOC8G", + "name": "容量已进入 critical Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "oEqen", + "name": "容量已进入 critical Alert Title", + "fill": "$ink", + "content": "容量已进入 critical", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "D5Hm8", + "name": "容量已进入 critical Alert Meta", + "fill": "$gray-600", + "content": "等待清理与重新计量", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "vhlZe", + "name": "Worker degraded Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "oYWof", + "name": "Worker degraded Alert Icon", + "width": 18, + "height": 18, + "icon": "circle-alert", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "z71cwg", + "name": "Worker degraded Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "rTZCj", + "name": "Worker degraded Alert Title", + "fill": "$ink", + "content": "Worker degraded", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "T2WW0", + "name": "Worker degraded Alert Meta", + "fill": "$gray-600", + "content": "生成新任务受影响", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "J0hErm", + "name": "2 项上游成本核对 Alert", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 10 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "EsHmF", + "name": "2 项上游成本核对 Alert Icon", + "width": 18, + "height": 18, + "icon": "scale", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "frame", + "id": "pcCqC", + "name": "2 项上游成本核对 Alert Text", + "layout": "vertical", + "gap": 3, + "children": [ + { + "type": "text", + "id": "jmgIS", + "name": "2 项上游成本核对 Alert Title", + "fill": "$ink", + "content": "2 项上游成本核对", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + }, + { + "type": "text", + "id": "gPdpW", + "name": "2 项上游成本核对 Alert Meta", + "fill": "$gray-600", + "content": "最早等待 46 分钟", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "ZYLR3", + "name": "Recent Admin Activity", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "yX2lf", + "name": "Recent Admin Activity Header", + "width": "fill_container", + "height": 42, + "fill": "$ink", + "padding": [ + 0, + 12 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "QPYUT", + "name": "Recent Admin Activity Title", + "fill": "$paper", + "content": "最近后台操作", + "fontFamily": "$font-ui", + "fontSize": 14, + "fontWeight": "800" + }, + { + "type": "text", + "id": "BRif8", + "name": "Recent Admin Activity Link", + "fill": "$brand-yellow", + "content": "打开审计 →", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "HVeqr", + "name": "Activity 18:20", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "C8EJjA", + "name": "Activity 18:20 18:20", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "yMjsU", + "name": "Activity 18:20 18:20 Text", + "fill": "$ink", + "content": "18:20", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "eL5BK", + "name": "Activity 18:20 运行时恢复检查", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "SV9m9", + "name": "Activity 18:20 运行时恢复检查 Text", + "fill": "$ink", + "content": "运行时恢复检查", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "xhjTV", + "name": "Activity 18:20 Gemini Flash", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "YX8Di", + "name": "Activity 18:20 Gemini Flash Text", + "fill": "$ink", + "content": "Gemini Flash", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "PwBfI", + "name": "Activity 18:20 succeeded", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "p7BBrv", + "name": "Activity 18:20 succeeded Text", + "fill": "$ink", + "content": "succeeded", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "X4Diq", + "name": "Activity 17:42", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "QQnaW", + "name": "Activity 17:42 17:42", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "x3mtiF", + "name": "Activity 17:42 17:42 Text", + "fill": "$ink", + "content": "17:42", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "obPrN", + "name": "Activity 17:42 贴纸清理候选查询", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "GKVHY", + "name": "Activity 17:42 贴纸清理候选查询 Text", + "fill": "$ink", + "content": "贴纸清理候选查询", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "P2ziYt", + "name": "Activity 17:42 CLEANUP-19C", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "S1EQk1", + "name": "Activity 17:42 CLEANUP-19C Text", + "fill": "$ink", + "content": "CLEANUP-19C", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "c1gPQ", + "name": "Activity 17:42 succeeded", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "LWa85", + "name": "Activity 17:42 succeeded Text", + "fill": "$ink", + "content": "succeeded", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "GOMzq", + "name": "Activity 16:08", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "A93Fic", + "name": "Activity 16:08 16:08", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "V9LLvo", + "name": "Activity 16:08 16:08 Text", + "fill": "$ink", + "content": "16:08", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "AV9BF", + "name": "Activity 16:08 调整点数", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "nbnGh", + "name": "Activity 16:08 调整点数 Text", + "fill": "$ink", + "content": "调整点数", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Kf31m", + "name": "Activity 16:08 USER-7A2", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "hBfLF", + "name": "Activity 16:08 USER-7A2 Text", + "fill": "$ink", + "content": "USER-7A2", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "YDOW7", + "name": "Activity 16:08 +5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "HRPuB", + "name": "Activity 16:08 +5 Text", + "fill": "$ink", + "content": "+5", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "d2vuU", + "name": "Activity 15:30", + "width": "fill_container", + "height": 45, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "NT0nZ", + "name": "Activity 15:30 15:30", + "width": 120, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "AaKqD", + "name": "Activity 15:30 15:30 Text", + "fill": "$ink", + "content": "15:30", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "T5xer", + "name": "Activity 15:30 模型配置保存", + "width": 280, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Ao9Nk", + "name": "Activity 15:30 模型配置保存 Text", + "fill": "$ink", + "content": "模型配置保存", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "fuNrt", + "name": "Activity 15:30 CONFIG-12", + "width": 360, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "PClEd", + "name": "Activity 15:30 CONFIG-12 Text", + "fill": "$ink", + "content": "CONFIG-12", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "pLUme", + "name": "Activity 15:30 version conflict", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "S7GAp", + "name": "Activity 15:30 version conflict Text", + "fill": "$danger", + "content": "version conflict", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "y89SP", + "layoutPosition": "absolute", + "x": 220, + "y": 0, + "name": "Audit Page Overlay Shell", + "width": 1380, + "height": 900, + "fill": "$paper", + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "Ltjaw", + "name": "Audit Top Bar", + "width": "fill_container", + "height": 54, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": { + "bottom": 1 + }, + "padding": [ + 0, + 24 + ], + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "WLkp6", + "name": "Audit Page Title", + "fill": "$ink", + "content": "审计", + "fontFamily": "$font-ui", + "fontSize": 22, + "fontWeight": "900" + }, + { + "type": "text", + "id": "e6ZeIz", + "name": "Audit Retention", + "fill": "$gray-600", + "content": "180 天内不可修改或人工删除", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "JCTIy", + "name": "Audit Main", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "gap": 16, + "padding": 24, + "children": [ + { + "type": "frame", + "id": "alSgT", + "name": "Audit Tabs", + "width": "fill_container", + "height": 44, + "stroke": "$ink", + "strokeWidth": 1, + "children": [ + { + "type": "frame", + "id": "yEaky", + "name": "后台操作审计 Tab", + "width": 220, + "height": "fill_container", + "fill": "$paper", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "O9X9GE", + "name": "后台操作审计 Tab Label", + "fill": "$ink", + "content": "后台操作审计", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "600" + } + ] + }, + { + "type": "frame", + "id": "nSHDQ", + "name": "私有内容访问审计 Tab", + "width": 220, + "height": "fill_container", + "fill": "$brand-yellow", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "X0ZKtg", + "name": "私有内容访问审计 Tab Label", + "fill": "$ink", + "content": "私有内容访问审计", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "MmIjY", + "name": "Audit Separation Note", + "width": "fill_container", + "height": 66, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 14 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "y1xLyb", + "name": "Audit Separation Icon", + "width": 19, + "height": 19, + "icon": "shield-check", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "It64U", + "name": "Audit Separation Text", + "fill": "$ink", + "content": "私有内容查看只写入独立 PrivateContentAccessLog;不在后台操作审计中重复保存正文或图片。", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "x0VWc6", + "name": "Private Audit Controls", + "width": "fill_container", + "height": 40, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "z4E2h", + "name": "Private Audit Count", + "fill": "$ink", + "content": "私有内容访问 46 条", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "800" + }, + { + "type": "frame", + "id": "Q0Mng", + "name": "Private Audit Filters", + "gap": 8, + "children": [ + { + "type": "frame", + "id": "gV7io", + "name": "管理员 Private Audit Filter", + "height": 34, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "uG7q9", + "name": "管理员 Private Audit Filter Text", + "fill": "$gray-600", + "content": "管理员", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "FdRk5", + "name": "内容类型 Private Audit Filter", + "height": 34, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "lYLG2", + "name": "内容类型 Private Audit Filter Text", + "fill": "$gray-600", + "content": "内容类型", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "jjxNz", + "name": "最近 30 天 Private Audit Filter", + "height": 34, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "N2a2Jq", + "name": "最近 30 天 Private Audit Filter Text", + "fill": "$gray-600", + "content": "最近 30 天", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "ZAuqU", + "name": "Private Content Audit Table", + "width": "fill_container", + "height": "fill_container", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "pjzOl", + "name": "Private Audit Header Row", + "width": "fill_container", + "height": 44, + "fill": "$ink", + "children": [ + { + "type": "frame", + "id": "wHE5c", + "name": "访问时间 Private Audit Header Cell", + "width": 190, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "qb9j9", + "name": "访问时间 Private Audit Header Text", + "fill": "$paper", + "content": "访问时间", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "Pvb6r", + "name": "管理员 Private Audit Header Cell", + "width": 210, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "UOXSR", + "name": "管理员 Private Audit Header Text", + "fill": "$paper", + "content": "管理员", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "KbjVo", + "name": "目标安全标识 Private Audit Header Cell", + "width": 250, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "i0of0L", + "name": "目标安全标识 Private Audit Header Text", + "fill": "$paper", + "content": "目标安全标识", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "V4RW5", + "name": "查看内容类型 Private Audit Header Cell", + "width": 220, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "BZo58", + "name": "查看内容类型 Private Audit Header Text", + "fill": "$paper", + "content": "查看内容类型", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "PokwP", + "name": "expires_at Private Audit Header Cell", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "B6rN4u", + "name": "expires_at Private Audit Header Text", + "fill": "$paper", + "content": "expires_at", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "u7WLB", + "name": "Private Audit Row 1", + "width": "fill_container", + "height": 62, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "TLG5X", + "name": "Private Audit 1 Cell 1", + "width": 190, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "al1lt", + "name": "Private Audit 1 Text 1", + "fill": "$ink", + "content": "今天 17:32", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "qJGQr", + "name": "Private Audit 1 Cell 2", + "width": 210, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "E1a2sf", + "name": "Private Audit 1 Text 2", + "fill": "$ink", + "content": "su•••@example.com", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "ph7PY", + "name": "Private Audit 1 Cell 3", + "width": 250, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "BhRaL", + "name": "Private Audit 1 Text 3", + "fill": "$ink", + "content": "JOB-351", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "s0nGg9", + "name": "Private Audit 1 Cell 4", + "width": 220, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "HhXqC", + "name": "Private Audit 1 Text 4", + "fill": "$ink", + "content": "完整提示词", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "L7eKa", + "name": "Private Audit 1 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "D2yga", + "name": "Private Audit 1 Text 5", + "fill": "$ink", + "content": "2027-01-20 17:32", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "Nvwmc", + "name": "Private Audit Row 2", + "width": "fill_container", + "height": 62, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "g6d8Ji", + "name": "Private Audit 2 Cell 1", + "width": 190, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "hwOy7", + "name": "Private Audit 2 Text 1", + "fill": "$ink", + "content": "今天 17:31", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Jkaki", + "name": "Private Audit 2 Cell 2", + "width": 210, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "hhYCf", + "name": "Private Audit 2 Text 2", + "fill": "$ink", + "content": "su•••@example.com", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "ShTad", + "name": "Private Audit 2 Cell 3", + "width": 250, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "mBG2S", + "name": "Private Audit 2 Text 3", + "fill": "$ink", + "content": "JOB-351", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "PYoCQ", + "name": "Private Audit 2 Cell 4", + "width": 220, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "bSoGW", + "name": "Private Audit 2 Text 4", + "fill": "$ink", + "content": "参考图", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "Q7los1", + "name": "Private Audit 2 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ZC0Og", + "name": "Private Audit 2 Text 5", + "fill": "$ink", + "content": "2027-01-20 17:31", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "YvYW8", + "name": "Private Audit Row 3", + "width": "fill_container", + "height": 62, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "tdNeE", + "name": "Private Audit 3 Cell 1", + "width": 190, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "uu4jV", + "name": "Private Audit 3 Text 1", + "fill": "$ink", + "content": "今天 16:09", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "cpfAK", + "name": "Private Audit 3 Cell 2", + "width": 210, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "IuGtZ", + "name": "Private Audit 3 Text 2", + "fill": "$ink", + "content": "ad•••@example.com", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "COZcY", + "name": "Private Audit 3 Cell 3", + "width": 250, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "joBhz", + "name": "Private Audit 3 Text 3", + "fill": "$ink", + "content": "JOB-34F", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "we0ee", + "name": "Private Audit 3 Cell 4", + "width": 220, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Qi9mo", + "name": "Private Audit 3 Text 4", + "fill": "$ink", + "content": "生成图片", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "PSp4O", + "name": "Private Audit 3 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "KgVRb", + "name": "Private Audit 3 Text 5", + "fill": "$ink", + "content": "2027-01-20 16:09", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "dxzqo", + "name": "Private Audit Row 4", + "width": "fill_container", + "height": 62, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "f6vcj", + "name": "Private Audit 4 Cell 1", + "width": 190, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "y8PwSL", + "name": "Private Audit 4 Text 1", + "fill": "$ink", + "content": "昨天 19:44", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "E1l9EF", + "name": "Private Audit 4 Cell 2", + "width": 210, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "KK0aJ", + "name": "Private Audit 4 Text 2", + "fill": "$ink", + "content": "su•••@example.com", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "Xs5cS", + "name": "Private Audit 4 Cell 3", + "width": 250, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "zOnPH", + "name": "Private Audit 4 Text 3", + "fill": "$ink", + "content": "PROJECT-3A1", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "pNmAh", + "name": "Private Audit 4 Cell 4", + "width": 220, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "thUTm", + "name": "Private Audit 4 Text 4", + "fill": "$ink", + "content": "生成图片", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "NoVE4", + "name": "Private Audit 4 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "mVHEt", + "name": "Private Audit 4 Text 5", + "fill": "$ink", + "content": "2027-01-19 19:44", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "RLESL", + "name": "Private Audit Row 5", + "width": "fill_container", + "height": 62, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "OqZCd", + "name": "Private Audit 5 Cell 1", + "width": 190, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "L3k93", + "name": "Private Audit 5 Text 1", + "fill": "$ink", + "content": "昨天 14:12", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "FOuap", + "name": "Private Audit 5 Cell 2", + "width": 210, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "OkBFy", + "name": "Private Audit 5 Text 2", + "fill": "$ink", + "content": "ad•••@example.com", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "cBRqh", + "name": "Private Audit 5 Cell 3", + "width": 250, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ONYiC", + "name": "Private Audit 5 Text 3", + "fill": "$ink", + "content": "JOB-331", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "qvD3D", + "name": "Private Audit 5 Cell 4", + "width": 220, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "TMg7f", + "name": "Private Audit 5 Text 4", + "fill": "$ink", + "content": "完整提示词", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "y4c4fT", + "name": "Private Audit 5 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "ZQfu6", + "name": "Private Audit 5 Text 5", + "fill": "$ink", + "content": "2027-01-19 14:12", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + }, + { + "type": "frame", + "id": "NMomu", + "name": "Private Audit Row 6", + "width": "fill_container", + "height": 62, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "children": [ + { + "type": "frame", + "id": "MHDbZ", + "name": "Private Audit 6 Cell 1", + "width": 190, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "D995lx", + "name": "Private Audit 6 Text 1", + "fill": "$ink", + "content": "7 月 22 日", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "cGzoW", + "name": "Private Audit 6 Cell 2", + "width": 210, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "DoLKO", + "name": "Private Audit 6 Text 2", + "fill": "$ink", + "content": "su•••@example.com", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "NvzFY", + "name": "Private Audit 6 Cell 3", + "width": 250, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "FWol2", + "name": "Private Audit 6 Text 3", + "fill": "$ink", + "content": "ANON-X7K", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "xyYH4", + "name": "Private Audit 6 Cell 4", + "width": 220, + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "kzHT9", + "name": "Private Audit 6 Text 4", + "fill": "$ink", + "content": "参考图", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "dsynS", + "name": "Private Audit 6 Cell 5", + "width": "fill_container", + "height": "fill_container", + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "M5sADs", + "name": "Private Audit 6 Text 5", + "fill": "$ink", + "content": "2027-01-18 11:26", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "UMYX9", + "name": "Private Audit Footer Note", + "width": "fill_container", + "height": 60, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 10, + "padding": [ + 0, + 14 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "SBS59", + "name": "Private Audit Footer Icon", + "width": 18, + "height": 18, + "icon": "lock-keyhole", + "library": "lucide", + "fill": "$gray-600" + }, + { + "type": "text", + "id": "M71xPi", + "name": "Private Audit Footer Text", + "fill": "$gray-600", + "content": "列表不显示完整提示词、图片、密钥或查看原因;用户注销后目标替换为不可反推随机标识。", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "u1adni", + "x": 20480, + "y": 5880, + "name": "07A 浏览器硬阻断", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "children": [ + { + "type": "rectangle", + "id": "jLiwk", + "name": "Unsupported Browser Yellow Rule", + "fill": "$brand-yellow", + "width": "fill_container", + "height": 10 + }, + { + "type": "frame", + "id": "VNn2G", + "name": "Unsupported Browser Main", + "width": "fill_container", + "height": "fill_container", + "fill": "$paper", + "layout": "vertical", + "gap": 22, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "frame", + "id": "mW4ue", + "name": "Unsupported Browser Content", + "width": 700, + "layout": "vertical", + "gap": 18, + "children": [ + { + "type": "text", + "id": "ZBzMm", + "name": "Unsupported Browser Wordmark", + "fill": "$ink", + "content": "DADA", + "fontFamily": "$font-ui", + "fontSize": 34, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "ZSLOQ", + "name": "Unsupported Browser Code Badge", + "fill": "$ink", + "padding": [ + 5, + 9 + ], + "children": [ + { + "type": "text", + "id": "I6C7J", + "name": "Unsupported Browser Code Text", + "fill": "$brand-yellow", + "content": "BROWSER_UNSUPPORTED", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "text", + "id": "f4yzP", + "name": "Unsupported Browser Title", + "fill": "$ink", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "当前浏览器无法使用 Dada", + "fontFamily": "$font-ui", + "fontSize": 38, + "fontWeight": "900" + }, + { + "type": "text", + "id": "Z1UKv", + "name": "Unsupported Browser Description", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "本次 P0-A 发布仅支持当前这台 Windows 电脑上、已经完成验收的 Chrome 或 Edge 版本。当前环境无法可靠通过支持检查,因此不会加载任何产品功能。", + "lineHeight": 1.7, + "fontFamily": "$font-ui", + "fontSize": 15, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "tBr0X", + "name": "Browser Detection Summary", + "width": "fill_container", + "height": 120, + "fill": "$gray-050", + "stroke": "$ink", + "strokeWidth": 1, + "layout": "vertical", + "gap": 10, + "padding": 16, + "children": [ + { + "type": "frame", + "id": "yETqe", + "name": "检测原因 Detection Row", + "width": "fill_container", + "height": 24, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "Lk2vm", + "name": "检测原因 Detection Label", + "fill": "$gray-600", + "content": "检测原因", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "rCiCc", + "name": "检测原因 Detection Value", + "fill": "$danger", + "content": "brand_unsupported", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "h3QyFk", + "name": "当前浏览器 Detection Row", + "width": "fill_container", + "height": 24, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "D6jsnb", + "name": "当前浏览器 Detection Label", + "fill": "$gray-600", + "content": "当前浏览器", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "q1Jwxy", + "name": "当前浏览器 Detection Value", + "fill": "$ink", + "content": "Firefox 128", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "u4PQJ", + "name": "受支持环境 Detection Row", + "width": "fill_container", + "height": 24, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "zowFJ", + "name": "受支持环境 Detection Label", + "fill": "$gray-600", + "content": "受支持环境", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "IOfzS", + "name": "受支持环境 Detection Value", + "fill": "$ink", + "content": "Chrome 126 / Edge 126", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "TnMux", + "name": "Supported Browser Guide", + "width": "fill_container", + "height": 70, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": 1, + "gap": 12, + "padding": [ + 0, + 16 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "uiFES", + "name": "Supported Browser Guide Icon", + "width": 19, + "height": 19, + "icon": "external-link", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "g0tGK", + "name": "Supported Browser Guide Text", + "fill": "$ink", + "content": "查看如何在受支持的 Chrome / Edge 中打开本机地址", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "hWR95", + "name": "Unsupported Browser Actions", + "width": "fill_container", + "height": 44, + "gap": 10, + "children": [ + { + "type": "frame", + "id": "H0LFjF", + "name": "Retry Browser Check", + "width": 170, + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 8, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "moGXK", + "name": "Retry Browser Check Icon", + "width": 16, + "height": 16, + "icon": "refresh-cw", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "aGN9l", + "name": "Retry Browser Check Label", + "fill": "$ink", + "content": "重新检测", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "900" + } + ] + }, + { + "type": "frame", + "id": "tf5NY", + "name": "Copy Local Address", + "width": 180, + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 8, + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "vhgXm", + "name": "Copy Local Address Icon", + "width": 16, + "height": 16, + "icon": "copy", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "bXpnW", + "name": "Copy Local Address Label", + "fill": "$ink", + "content": "复制本机地址", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "text", + "id": "rWTGx", + "name": "No Bypass Statement", + "fill": "$danger", + "content": "没有“仍然继续”入口,也不会提供绕过令牌或参数。", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "rFbQU", + "name": "Unsupported Browser Bottom", + "width": "fill_container", + "height": 48, + "fill": "$ink", + "justifyContent": "center", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "O39eE", + "name": "Unsupported Browser Bottom Text", + "fill": "$brand-yellow", + "content": "P0-A · LOCALHOST ONLY · WINDOWS", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "awt96", + "x": 22240, + "y": 5880, + "name": "07B Windows 辅助系统界面", + "clip": true, + "width": 1600, + "height": 900, + "fill": "$gray-100", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "none", + "children": [ + { + "type": "rectangle", + "id": "G9gpo", + "x": 0, + "y": 0, + "name": "Auxiliary Board Yellow Rule", + "fill": "$brand-yellow", + "width": 1600, + "height": 12 + }, + { + "type": "text", + "id": "SXEcp", + "x": 40, + "y": 30, + "name": "Auxiliary Board Title", + "fill": "$ink", + "content": "Windows 辅助系统界面", + "fontFamily": "$font-ui", + "fontSize": 28, + "fontWeight": "900" + }, + { + "type": "text", + "id": "ghJF8", + "x": 40, + "y": 72, + "name": "Auxiliary Board Subtitle", + "fill": "$gray-600", + "content": "托盘 / 启动失败 / 端口占用 / API 与 Worker degraded / 脱敏诊断", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "600" + }, + { + "type": "frame", + "id": "c52fGD", + "x": 40, + "y": 125, + "name": "Windows Tray Menu", + "width": 340, + "height": 620, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "X4VOAQ", + "name": "Tray Menu Header", + "width": "fill_container", + "height": 88, + "fill": "$ink", + "layout": "vertical", + "gap": 8, + "padding": 14, + "children": [ + { + "type": "frame", + "id": "OHYUv", + "name": "Tray Menu Title Row", + "width": "fill_container", + "gap": 9, + "alignItems": "center", + "children": [ + { + "type": "rectangle", + "id": "mDoNq", + "name": "Tray Dada Mark", + "fill": "$brand-yellow", + "width": 28, + "height": 28 + }, + { + "type": "text", + "id": "k2zItX", + "name": "Tray Dada Title", + "fill": "$paper", + "content": "Dada", + "fontFamily": "$font-ui", + "fontSize": 18, + "fontWeight": "900" + } + ] + }, + { + "type": "text", + "id": "M4cfW", + "name": "Tray Overall Status", + "fill": "$brand-yellow", + "content": "运行中 · 有 2 项警告", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "g9WIZk", + "name": "Tray Status Summary", + "width": "fill_container", + "height": 156, + "fill": "$gray-050", + "layout": "vertical", + "gap": 8, + "padding": 14, + "children": [ + { + "type": "frame", + "id": "LoD0S", + "name": "API Tray Status", + "width": "fill_container", + "height": 34, + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "F8yxZq", + "name": "API Tray Label", + "fill": "$ink", + "content": "API", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "l828Z", + "name": "API Tray State", + "fill": "$success", + "content": "NORMAL", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "v58YtB", + "name": "Worker Tray Status", + "width": "fill_container", + "height": 34, + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "d9uSU", + "name": "Worker Tray Label", + "fill": "$ink", + "content": "Worker", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "OX34S", + "name": "Worker Tray State", + "fill": "$danger", + "content": "DEGRADED", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "I9m9A", + "name": "存储 Tray Status", + "width": "fill_container", + "height": 34, + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "wFJnK", + "name": "存储 Tray Label", + "fill": "$ink", + "content": "存储", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "700" + }, + { + "type": "text", + "id": "MK8mZ", + "name": "存储 Tray State", + "fill": "$danger", + "content": "FULL", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "kr6Fq", + "name": "打开 Dada Tray Item", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "gap": 12, + "padding": [ + 0, + 16 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "GPTSI", + "name": "打开 Dada Tray Icon", + "width": 18, + "height": 18, + "icon": "external-link", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "yj7UR", + "name": "打开 Dada Tray Label", + "fill": "$ink", + "content": "打开 Dada", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "p8O2X2", + "name": "运行状态 Tray Item", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "gap": 12, + "padding": [ + 0, + 16 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "djGHe", + "name": "运行状态 Tray Icon", + "width": 18, + "height": 18, + "icon": "activity", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "IXllk", + "name": "运行状态 Tray Label", + "fill": "$ink", + "content": "运行状态", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "yvHFG", + "name": "打开诊断 Tray Item", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "gap": 12, + "padding": [ + 0, + 16 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "M36Mb", + "name": "打开诊断 Tray Icon", + "width": 18, + "height": 18, + "icon": "stethoscope", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "RIMXm", + "name": "打开诊断 Tray Label", + "fill": "$ink", + "content": "打开诊断", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "xj0FU", + "name": "重新启动服务 Tray Item", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "gap": 12, + "padding": [ + 0, + 16 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "b37N9D", + "name": "重新启动服务 Tray Icon", + "width": 18, + "height": 18, + "icon": "refresh-cw", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "S659d", + "name": "重新启动服务 Tray Label", + "fill": "$ink", + "content": "重新启动服务", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "FozGs", + "name": "退出 Dada Tray Item", + "width": "fill_container", + "height": 58, + "fill": "$paper", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "gap": 12, + "padding": [ + 0, + 16 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "Q3kuZb", + "name": "退出 Dada Tray Icon", + "width": 18, + "height": 18, + "icon": "power", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "text", + "id": "awxbW", + "name": "退出 Dada Tray Label", + "fill": "$danger", + "content": "退出 Dada", + "fontFamily": "$font-ui", + "fontSize": 13, + "fontWeight": "700" + } + ] + }, + { + "type": "text", + "id": "kUi4n", + "layoutPosition": "absolute", + "x": 14, + "y": 574, + "name": "Tray Privacy Note", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": 312, + "content": "托盘不显示账号私有内容、提示词或完整错误堆栈。", + "lineHeight": 1.5, + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "BQtqg", + "x": 420, + "y": 125, + "name": "Startup Failure Window", + "width": 540, + "height": 350, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "gap": 14, + "padding": 20, + "children": [ + { + "type": "frame", + "id": "BP9JK", + "name": "Startup Failure Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "EDsVh", + "name": "Startup Failure App", + "fill": "$gray-600", + "content": "DADA SUPERVISOR", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "icon", + "id": "YihYs", + "name": "Startup Failure Close", + "width": 18, + "height": 18, + "icon": "x", + "library": "lucide", + "fill": "$ink" + } + ] + }, + { + "type": "frame", + "id": "LPLSW", + "name": "Startup Failure Title Row", + "width": "fill_container", + "gap": 10, + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "HoZkG", + "name": "Startup Failure Icon", + "width": 24, + "height": 24, + "icon": "circle-x", + "library": "lucide", + "fill": "$danger" + }, + { + "type": "text", + "id": "txSRG", + "name": "Startup Failure Title", + "fill": "$ink", + "content": "Dada 启动失败", + "fontFamily": "$font-ui", + "fontSize": 20, + "fontWeight": "900" + } + ] + }, + { + "type": "text", + "id": "yGJz4", + "name": "Startup Failure Description", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "本机 API 未能进入 ready 状态。产品页面不会使用旧数据继续工作。", + "lineHeight": 1.6, + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "HT45e", + "name": "Startup Failure Meta", + "width": "fill_container", + "height": 84, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 10, + "children": [ + { + "type": "text", + "id": "h2uR6U", + "name": "Startup Failure Code", + "fill": "$danger", + "content": "code: API_STARTUP_FAILED", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "text", + "id": "osZ1j", + "name": "Startup Failure Correlation", + "fill": "$gray-600", + "content": "correlation_id: 8F2A-14C9", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + }, + { + "type": "text", + "id": "z5fdy9", + "name": "Startup Failure Time", + "fill": "$gray-600", + "content": "occurred_at: 18:33:06", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "gS89P", + "name": "Startup Failure Actions", + "width": "fill_container", + "height": 42, + "gap": 8, + "justifyContent": "end", + "children": [ + { + "type": "frame", + "id": "hStJg", + "name": "退出 Startup Action", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 14 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "spf6c", + "name": "退出 Startup Action Label", + "fill": "$ink", + "content": "退出", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "LfQjm", + "name": "打开诊断 Startup Action", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 14 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "JKsA1", + "name": "打开诊断 Startup Action Label", + "fill": "$ink", + "content": "打开诊断", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "Qb70C", + "name": "重试启动 Startup Action", + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 14 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "N8L9q", + "name": "重试启动 Startup Action Label", + "fill": "$ink", + "content": "重试启动", + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "800" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "janNx", + "x": 1000, + "y": 125, + "name": "Port Occupied Window", + "width": 560, + "height": 350, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "gap": 14, + "padding": 20, + "children": [ + { + "type": "frame", + "id": "PdArB", + "name": "Port Occupied Header", + "width": "fill_container", + "justifyContent": "space_between", + "children": [ + { + "type": "text", + "id": "X7bndM", + "name": "Port Occupied App", + "fill": "$gray-600", + "content": "DADA SUPERVISOR", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "text", + "id": "FVR9O", + "name": "Port Occupied Code", + "fill": "$danger", + "content": "PORT_IN_USE", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + } + ] + }, + { + "type": "text", + "id": "LzC7r", + "name": "Port Occupied Title", + "fill": "$ink", + "content": "Dada 无法使用固定端口启动", + "fontFamily": "$font-ui", + "fontSize": 20, + "fontWeight": "900" + }, + { + "type": "text", + "id": "nZxrc", + "name": "Port Occupied Description", + "fill": "$gray-600", + "textGrowth": "fixed-width", + "width": "fill_container", + "content": "另一个程序或残留实例正在使用 Dada 的固定本机端口。系统不会暗换随机端口。", + "lineHeight": 1.6, + "fontFamily": "$font-ui", + "fontSize": 12, + "fontWeight": "normal" + }, + { + "type": "frame", + "id": "o774p", + "name": "Port Occupied Details", + "width": "fill_container", + "height": 88, + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "gap": 7, + "padding": 12, + "children": [ + { + "type": "text", + "id": "NBQHe", + "name": "Port Occupied Address", + "fill": "$ink", + "content": "address: 127.0.0.1:43121", + "fontFamily": "$font-data", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "text", + "id": "XFIu8", + "name": "Port Occupied Safety", + "fill": "$gray-600", + "content": "先检查是否已有 Dada 正在运行,再选择重试。", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "normal" + } + ] + }, + { + "type": "frame", + "id": "U5iFTD", + "name": "Port Occupied Actions", + "width": "fill_container", + "height": 42, + "gap": 8, + "justifyContent": "end", + "children": [ + { + "type": "frame", + "id": "yZ6VT", + "name": "退出 Port Action", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "gItj6", + "name": "退出 Port Action Label", + "fill": "$ink", + "content": "退出", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "OK7Rm", + "name": "打开诊断 Port Action", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "WEI9A", + "name": "打开诊断 Port Action Label", + "fill": "$ink", + "content": "打开诊断", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "qWMZV", + "name": "检查现有实例 Port Action", + "height": "fill_container", + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "x3eHF", + "name": "检查现有实例 Port Action Label", + "fill": "$ink", + "content": "检查现有实例", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + }, + { + "type": "frame", + "id": "Ozk8S", + "name": "重试 Port Action", + "height": "fill_container", + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "CXAO9", + "name": "重试 Port Action Label", + "fill": "$ink", + "content": "重试", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + } + ] + } + ] + }, + { + "type": "frame", + "id": "juM3f", + "x": 420, + "y": 515, + "name": "Sanitized Diagnostics Window", + "width": 1140, + "height": 330, + "fill": "$paper", + "stroke": "$ink", + "strokeWidth": 2, + "layout": "vertical", + "gap": 12, + "padding": 18, + "children": [ + { + "type": "frame", + "id": "OZFnX", + "name": "Diagnostics Header", + "width": "fill_container", + "justifyContent": "space_between", + "alignItems": "center", + "children": [ + { + "type": "text", + "id": "urVzC", + "name": "Diagnostics Title", + "fill": "$ink", + "content": "脱敏诊断", + "fontFamily": "$font-ui", + "fontSize": 20, + "fontWeight": "900" + }, + { + "type": "frame", + "id": "B2Xy1", + "name": "Copy Sanitized Diagnostics", + "height": 34, + "fill": "$brand-yellow", + "stroke": "$ink", + "strokeWidth": 1, + "gap": 7, + "padding": [ + 0, + 12 + ], + "alignItems": "center", + "children": [ + { + "type": "icon", + "id": "DY0nV", + "name": "Copy Sanitized Diagnostics Icon", + "width": 15, + "height": 15, + "icon": "copy", + "library": "lucide", + "fill": "$ink" + }, + { + "type": "text", + "id": "hjYr3", + "name": "Copy Sanitized Diagnostics Label", + "fill": "$ink", + "content": "复制脱敏诊断", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "800" + } + ] + } + ] + }, + { + "type": "frame", + "id": "ePlg7", + "name": "Diagnostics Grid", + "width": "fill_container", + "height": 190, + "gap": 12, + "children": [ + { + "type": "frame", + "id": "j4ok9u", + "name": "Diagnostics Column 1", + "width": "fill_container", + "height": "fill_container", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "WCJed", + "name": "发布版本 Diagnostic Row", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "layout": "vertical", + "gap": 5, + "padding": 10, + "children": [ + { + "type": "text", + "id": "Gw5Fa", + "name": "发布版本 Diagnostic Label", + "fill": "$gray-600", + "content": "发布版本", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "text", + "id": "H2cx0", + "name": "发布版本 Diagnostic Value", + "fill": "$ink", + "content": "P0A-0.1.0", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "LXiPp", + "name": "浏览器记录 Diagnostic Row", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "layout": "vertical", + "gap": 5, + "padding": 10, + "children": [ + { + "type": "text", + "id": "M36Em9", + "name": "浏览器记录 Diagnostic Label", + "fill": "$gray-600", + "content": "浏览器记录", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "text", + "id": "wn5oi", + "name": "浏览器记录 Diagnostic Value", + "fill": "$ink", + "content": "Chrome 126 / Edge 126", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "pcS9H", + "name": "固定端口 Diagnostic Row", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "layout": "vertical", + "gap": 5, + "padding": 10, + "children": [ + { + "type": "text", + "id": "c9GcF", + "name": "固定端口 Diagnostic Label", + "fill": "$gray-600", + "content": "固定端口", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "text", + "id": "tY9Lc", + "name": "固定端口 Diagnostic Value", + "fill": "$danger", + "content": "43121 · occupied", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "VuFz2", + "name": "Diagnostics Column 2", + "width": "fill_container", + "height": "fill_container", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "hTuKY", + "name": "API Diagnostic Row", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "layout": "vertical", + "gap": 5, + "padding": 10, + "children": [ + { + "type": "text", + "id": "qiMa9", + "name": "API Diagnostic Label", + "fill": "$gray-600", + "content": "API", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "text", + "id": "B2SFHt", + "name": "API Diagnostic Value", + "fill": "$danger", + "content": "DEGRADED", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "S97eC", + "name": "Worker Diagnostic Row", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "layout": "vertical", + "gap": 5, + "padding": 10, + "children": [ + { + "type": "text", + "id": "tQw2n", + "name": "Worker Diagnostic Label", + "fill": "$gray-600", + "content": "Worker", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "text", + "id": "GjNng", + "name": "Worker Diagnostic Value", + "fill": "$danger", + "content": "DEGRADED", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "yMqEv", + "name": "Supervisor Diagnostic Row", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "layout": "vertical", + "gap": 5, + "padding": 10, + "children": [ + { + "type": "text", + "id": "GWZFZ", + "name": "Supervisor Diagnostic Label", + "fill": "$gray-600", + "content": "Supervisor", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "text", + "id": "KBCeE", + "name": "Supervisor Diagnostic Value", + "fill": "$ink", + "content": "NORMAL", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + }, + { + "type": "frame", + "id": "jRx7V", + "name": "Diagnostics Column 3", + "width": "fill_container", + "height": "fill_container", + "stroke": "$gray-300", + "strokeWidth": 1, + "layout": "vertical", + "children": [ + { + "type": "frame", + "id": "jCECR", + "name": "存储 Diagnostic Row", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "layout": "vertical", + "gap": 5, + "padding": 10, + "children": [ + { + "type": "text", + "id": "HVoow", + "name": "存储 Diagnostic Label", + "fill": "$gray-600", + "content": "存储", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "text", + "id": "Fz3Q1", + "name": "存储 Diagnostic Value", + "fill": "$danger", + "content": "FULL · 5.00 GB", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "kGUnN", + "name": "素材根 Diagnostic Row", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "layout": "vertical", + "gap": 5, + "padding": 10, + "children": [ + { + "type": "text", + "id": "lVpG0", + "name": "素材根 Diagnostic Label", + "fill": "$gray-600", + "content": "素材根", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "text", + "id": "s9UIlH", + "name": "素材根 Diagnostic Value", + "fill": "$ink", + "content": "VERIFIED", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + }, + { + "type": "frame", + "id": "p0CSt", + "name": "最近检查 Diagnostic Row", + "width": "fill_container", + "height": "fill_container", + "fill": "$gray-050", + "stroke": "$gray-300", + "strokeWidth": { + "bottom": 1 + }, + "layout": "vertical", + "gap": 5, + "padding": 10, + "children": [ + { + "type": "text", + "id": "ADQdt", + "name": "最近检查 Diagnostic Label", + "fill": "$gray-600", + "content": "最近检查", + "fontFamily": "$font-ui", + "fontSize": 10, + "fontWeight": "700" + }, + { + "type": "text", + "id": "bm7kw", + "name": "最近检查 Diagnostic Value", + "fill": "$ink", + "content": "18:33:10", + "fontFamily": "$font-data", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + } + ] + }, + { + "type": "text", + "id": "S3Jyr", + "name": "Diagnostics Redaction Note", + "fill": "$gray-600", + "content": "不包含密钥、Windows 用户名、绝对路径、完整邮箱、提示词、图片或上游原始正文。", + "fontFamily": "$font-ui", + "fontSize": 11, + "fontWeight": "700" + } + ] + } + ] + } + ], + "variables": { + "brand-yellow": { + "type": "color", + "value": "#F2F400" + }, + "ink": { + "type": "color", + "value": "#111111" + }, + "paper": { + "type": "color", + "value": "#FFFFFF" + }, + "gray-050": { + "type": "color", + "value": "#F7F7F5" + }, + "gray-100": { + "type": "color", + "value": "#E8E8E5" + }, + "gray-300": { + "type": "color", + "value": "#B9B9B3" + }, + "gray-600": { + "type": "color", + "value": "#62625D" + }, + "danger": { + "type": "color", + "value": "#C92A24" + }, + "success": { + "type": "color", + "value": "#16794B" + }, + "info": { + "type": "color", + "value": "#1769AA" + }, + "font-ui": { + "type": "string", + "value": "Noto Sans SC" + }, + "font-data": { + "type": "string", + "value": "IBM Plex Mono" + } + }, + "fileToken": "817574d6-31e9-4a2c-90da-3e46eef0488f" +} \ No newline at end of file diff --git a/DevelopmentPlan.md b/DevelopmentPlan.md new file mode 100644 index 0000000..4213511 --- /dev/null +++ b/DevelopmentPlan.md @@ -0,0 +1,1022 @@ +# Dada DevelopmentPlan + +| 项目 | 内容 | +| --- | --- | +| 文档版本 | 1.1 | +| 适用产品版本 | PRD v1.10,P0-A 本机测试需求冻结稿 | +| 功能索引版本 | FeatureSummary 1.1 | +| 当前交付 | 仅 P0-A Windows 本机测试版 | +| 产品需求权威 | `PRD.md` | +| 输入文件 SHA-256 | PRD `31F93674DF1A90B557FEE3AA9E74FB084E246CA8FE09F6BD4B1DC9D56D606565`;FeatureSummary `6F80E272AAB08A5525B54501D83F16A4F6A7A170596947BBC25F1DA54F2FE844` | +| 文档职责 | 固定工程架构、组件边界、数据与接口、事务、实施顺序、阻塞和验收追踪 | + +## 1. 文档定位与工程目标 + +### 1.1 权威顺序 + +1. `PRD.md` v1.10 是产品状态、字段含义、业务规则、阶段边界和验收范围的唯一权威。 +2. `FeatureSummary.md` 1.1 只用于定位十三个功能模块、状态机、十九个数据契约和 AC 索引,不产生新需求。 +3. FeatureSummary 中的“批量生成”和“复制生成”仅用于导航 PRD 已排除的不做范围,不构成新需求或文档冲突。公开模型广场只作为三个模型存在和候选路由的线索,不改变 PRD 的网关契约验证门槛。 +4. 本文只作工程展开;若实现或后续文档与 PRD 冲突,先升级 PRD,再修改本文,不能以工程便利改变产品语义。 + +### 1.2 P0-A 工程交付目标 + +在项目方当前 Windows 电脑上交付一个免安装的本机系统:用户双击 `Dada.exe` 后,由托盘 Supervisor 启动本地 API 与 Generation Worker,并在发布记录支持的当前稳定版 Chrome 或 Edge 中打开 `http://127.0.0.1:43121`。浏览器支持门禁先于登录、注册及其他产品功能;通过后,系统在同一电脑上完成邀请注册、邮箱验证码登录、AI 生图、项目编辑、自动保存、素材渲染、JPG/PNG 导出、运营后台、审计和本机清理闭环。 + +交付完成必须同时满足: + +- 后端仅绑定 `127.0.0.1:43121`,不绑定局域网网卡、IPv6 任意地址或公网地址; +- 数据只写入 `LocalDataRoot`,素材只从安全配置引用的规范归档原地只读读取; +- API 密钥只保存在当前 Windows 用户的 Windows 凭据管理器; +- P0-A 的适用 AC 全部通过,三个模型、Resend 和高德的外部发布门槛已解除; +- 发布产物为未签名 `win-x64` 便携 ZIP 和对应 SHA-256 文件; +- 本机数据没有自动备份、项目归档、导入、迁移或恢复承诺。 +- 非支持浏览器只能加载独立阻断引导页所需的最小静态资源和支持状态,不能调用产品功能 API,也没有继续或绕过入口。 + +### 1.3 当前边界 + +P0-A 不实现手机编辑、手机访问、局域网访问、跨设备处理、远程部署、公司系统合并、正式对象存储、备案域名或产品 HTTPS 站点。浏览器与本机后端使用回环 HTTP;本机后端访问 AI 网关、Resend 和高德时必须使用外网 HTTPS。 + +P0-B 只在第 16 节记录未来开放门槛。AC-08、AC-26、AC-37、AC-54 以及 AC-15、AC-23、AC-36、AC-38 中明确属于 P0-B 的部分,不属于当前组件、里程碑、工作包或完成条件。 + +P1 的本地底图上传、空白画布、普通贴纸关键词搜索、公开注册准备、高德主体迁移和正式合规条款不进入当前工程。支付/充值/订阅、直发小红书、账号绑定、多页图组、批量画布、批量导出、社区、独立普通文字、用户自定义贴纸、AI 贴纸、动态/GIF/视频导出、文案生成、整版模板、提示词优化、局部重绘/扩图/移除背景、专业调色、实时协作、项目版本历史、编组和图层面板均不实现。 + +### 1.4 外部产品发布阻塞与可并行范围 + +| 外部项 | 当前状态 | 阻塞范围 | 可并行范围 | 解除条件 | +| --- | --- | --- | --- | --- | +| AI 网关 | 三个模型标识已确认存在;图片请求、参考图、比例、响应、同步/异步和错误协议未验证 | 三个 Adapter 定版、ModelConfig 路由、AC-40、真实点数结算联调、P0-A 发布 | 编辑器、素材、认证、项目、SQLite 队列、固定 Adapter 接口、模拟网关测试 | 三个模型分别完成第 8.3 节契约矩阵并保存脱敏证据 | +| Resend | 发信域名、免费规则和人工送达尚未完成发布验证 | 正式注册/登录验收、AC-01、AC-33、AC-41、AC-49、P0-A 发布 | 认证状态机、验证码挑战表、配额、模拟邮件、开发测试账号 | SPF/DKIM 通过;免费额度复核;QQ、163、企业邮箱各 20 封至少 19 封在 2 分钟内送达 | +| 高德 | 个人认证 Web 服务 Key 的接口、绑定、配额和限制未验证 | DYN004 自动定位、AC-17、AC-41、AC-47、P0-A 发布 | 手动地点输入、动态贴纸渲染、配额与暂停状态机、模拟地理编码 | 地理/逆地理接口、QPS、白名单、安全限制和每月 1,000 次应用硬上限实测通过 | + +外部阻塞不能用猜测消除。阻塞存在时可以完成相应模块的结构、模拟测试和本地独立功能,但不能在状态或里程碑中标记为集成完成。AI 网关、Resend 和高德是三项产品发布外部阻塞。 + +### 1.5 工程基础设施前置条件 + +Gitea Actions 是已确定的工程交付组件,不是 PRD 产品依赖,也不计入上述三项外部发布阻塞。当前电脑的 Windows 自托管 Runner 在隔离工作目录注册并跑通无真实凭据流水线之前,本地工程初始化和测试脚本可继续,但正式 CI 和 WP-0 工程完成不得宣告。 + +## 2. 技术架构与选型 + +### 2.1 固定技术基线 + +| 层级 | 固定选择 | 用途与约束 | +| --- | --- | --- | +| Web 前端 | React 19.2.8、Vite 8.1.5、TypeScript 7.0.2 | 单页应用;开发使用 Vite,发布后由 Fastify 同源提供静态文件 | +| 画布 | Fabric.js 7.4.0 | 桌面画布对象模型、变换、选区与客户端导出;业务状态使用 Dada 自有 JSON Schema,不直接持久化 Fabric 内部对象 | +| 后端 | Node.js 24.13.0、Fastify 5.10.0 | REST、SSE、鉴权、文件访问、后台与外部服务调用 | +| 契约 | TypeBox 0.34.52、OpenAPI 3.1、`@fastify/swagger` 9.8.1 | 请求、响应、事件和错误信封的单一 JSON Schema 来源;生成前端类型客户端 | +| 数据库 | SQLite WAL | 单机业务、队列、流水、审计和测量状态;不引入远程数据库 | +| 数据访问 | Drizzle ORM 0.45.2、better-sqlite3 13.0.1 | 迁移、类型化查询和同步事务;金融与任务状态使用 `BEGIN IMMEDIATE` | +| 异步执行 | 独立 Node Generation Worker | 从 `GenerationJob` 持久队列领取任务,执行外部调用、物理清理、保留期清理和测量作业 | +| 五色提取 | `@vibrant/core` 4.0.4、`@vibrant/quantizer-mmcq` 4.0.4 | 浏览器本地确定性 MMCQ;不上传底图,不使用随机采样 | +| Windows Supervisor | .NET 8 WinForms 托盘程序 | 进程监督、单实例、浏览器启动、离线配置和优雅退出;不承载产品页面 | +| 包管理 | pnpm 10.28.2 | monorepo 与唯一锁文件;CI 使用冻结锁文件安装 | +| 浏览器测试 | Playwright | 使用本机安装的当前稳定版 Chrome 和 Edge 通道执行 P0-A 验收 | +| 单元/集成测试 | Vitest | 纯函数、Schema、SQLite、服务和 Worker 测试 | + +补丁版本以本文基线和仓库锁文件共同固定。升级任一会影响画布、数据库驱动、接口或运行时的依赖,必须通过依赖升级变更重新运行契约、视觉、性能和发布检查。 + +WP-0 开始时必须对本表精确版本执行冻结锁文件安装、TypeScript 检查、最小 React/Fabric 渲染、Fastify 启动、better-sqlite3 在随包 Node `win-x64` 运行时的 native 加载以及便携包启动预检。任一失败时停止受影响实现,先正式修订 DevelopmentPlan 和锁文件;开发人员不得在实现中自行替换版本、框架、驱动或运行时。 + +### 2.2 组件边界 + +```text +Dada.exe (.NET 8 Tray Supervisor) + |-- runtime/node.exe -> Fastify API + | |-- React SPA / REST / SSE + | |-- SQLite / LocalDataRoot + | |-- Resend / Amap HTTPS + |-- runtime/node.exe -> Generation Worker + | |-- SQLite durable queue + | |-- AI Gateway HTTPS + | |-- cleanup / retention / measurement + |-- Chrome or Edge -> http://127.0.0.1:43121 + +Read-only asset roots --(resource ID + manifest)--> Fastify API +Asset compiler --(declarative metadata / derived files)--> Git metadata or LocalDataRoot +``` + +- **Supervisor**:只管理实例、配置、子进程、托盘状态和浏览器,不读取业务表,不持有用户会话。 +- **Web**:只保存当前页面内存中的未提交/未保存编辑态;不直接访问文件系统或外部供应商。 +- **API**:唯一业务写入口;执行鉴权、配额、状态版本、点数与任务创建事务;提供资源 ID 访问。 +- **Worker**:唯一 AI 执行入口;不对浏览器开放端口;通过 SQLite 领取任务并完成结算或释放。 +- **SQLite**:业务真相源和持久队列;不存二进制内容和真实密钥。 +- **LocalDataRoot**:存数据库、日志和 Dada 管理的私有/派生文件;不包含规范素材全库。 +- **素材编译器**:TypeScript CLI,只读解析规范归档,输出声明式目录、校验报告和必要派生文件;不执行 Lua/Prefab。 +- **发布组件**:Gitea Actions 生成前端、后端 bundle、托盘程序、随包 Node 运行时、迁移、manifest 和 SHA-256。 +- **浏览器支持门禁**:由 Fastify 的最小 gate shell、支持检查接口和产品 API 前置中间件共同执行;不依赖登录态,不把浏览器兼容判断下放给 React 产品路由。 + +### 2.3 不采用的基础设施 + +P0-A 不采用 Docker、Redis、远程任务队列、远程数据库、对象存储、公司服务器、外部日志平台、外部指标平台、自动更新服务或自动扩容。GenerationJob 表和 SQLite 租约足以支持当前单机且每账号单任务的容量。 + +## 3. 运行、环境与发布 + +### 3.1 便携包布局 + +```text +Dada-P0A--win-x64/ + Dada.exe + runtime/node.exe + server/api.mjs + server/worker.mjs + server/native/better_sqlite3.node + web/assets/... + migrations/... + asset-metadata/... + LICENSES/... + RELEASE.json + START-HERE.txt +Dada-P0A--win-x64.zip.sha256 +``` + +ZIP 不包含真实密钥、管理员邮箱、LocalDataRoot、只读素材二进制全库或验收账号。`RELEASE.json` 固定记录 app/schema 版本、构建提交、Windows 验收 build,以及 Chrome/Edge 各自的受支持产品标识、稳定版 major、实际验收 full version 和记录时间;发布门禁只接受记录的 major,patch 更新仍属于同一受支持 major。`START-HERE.txt` 固定说明 SHA-256 核验、未签名状态、SmartScreen 首次运行提示和杀软误报时核对下载制品/Gitea 构建记录的流程;不指导关闭杀软、添加宽泛排除或跳过哈希验证。更新时先从托盘退出,再整体替换程序目录;数据库迁移在下一次启动时事务化执行。P0-A 不支持数据库降级,也不为迁移创建自动备份副本;迁移失败时停止启动并保持原事务未提交状态。 + +### 3.2 Supervisor 生命周期 + +1. 获取 Windows 命名互斥量 `Dada.P0A.Instance`。第二次启动通过命名管道通知现有实例打开网页,然后退出。 +2. 读取 `%LOCALAPPDATA%\Dada\P0A\config\instance.json` 中的非敏感配置引用,检查 LocalDataRoot 不在程序、Git、项目或下载目录内。已初始化实例的根目录或数据库缺失时停止并报告 data_missing,不自动重建或从残留文件恢复;部署人员只能显式初始化一个新的空实例。 +3. 检查 Windows 凭据管理器中必要条目的存在状态。启动子进程时,Supervisor 读取所需条目并通过仅对应子进程继承的匿名管道一次性注入内存;值不进入命令行、环境变量、文件或日志。API 只取得 Resend/高德凭据,Worker 只取得 AI 网关凭据。 +4. 检查只读素材根目录、manifest 哈希、LocalDataRoot 可写性和 `127.0.0.1:43121` 端口;端口占用时停止,不动态换端口。 +5. 启动 API。API 打开 SQLite、执行事务迁移、完成容量对账并暴露仅回环可访问的健康端点。 +6. API ready 后启动 Worker;Worker 注册租约拥有者并执行过期租约恢复。 +7. 两个子进程均健康后,Supervisor 读取 `RELEASE.json` 并探测已安装浏览器版本:优先启动受支持 Chrome,其次为受支持 Edge;只有不支持版本时仍可打开 localhost 的阻断引导页,不进入产品。托盘菜单固定提供打开 Dada、用 Chrome 打开、用 Edge 打开、运行诊断、重试受影响组件和退出;选择不支持或无法识别的浏览器只得到阻断引导。 +8. 子进程异常退出时按 1 秒、5 秒、15 秒最多自动重启三次;五分钟内仍失败则进入 degraded,不继续循环重启。API degraded 时网页不可用;Worker degraded 时 API 禁止新任务但保留查看、下载、编辑和删除能力。 +9. 托盘退出通过受 Supervisor 控制的命名管道要求 Worker 停止领取任务并让 API 停止接收写请求;等待最多 15 秒后终止残留子进程。运行中的任务按第 8.4 节恢复。 + +### 3.3 离线配置命令 + +同一个 `Dada.exe` 提供以下部署人员命令;这些命令不是产品后台能力: + +- `Dada.exe configure init`:创建非敏感实例配置和默认 LocalDataRoot; +- `Dada.exe configure data-root`:校验并设置 LocalDataRoot; +- `Dada.exe configure asset-root`:按资源类别设置只读根目录引用; +- `Dada.exe secrets set|status|clear`:通过隐藏输入维护 Windows 凭据管理器条目;`status` 只返回已配置/未配置; +- `Dada.exe admin-allowlist add|remove|status`:维护管理员白名单摘要;`status` 只显示数量与配置版本; +- `Dada.exe doctor`:检查端口、目录、manifest、SQLite、浏览器和外部依赖配置状态,不输出密钥或白名单值。 + +所有修改配置的离线命令必须取得同一个实例互斥量;Dada 正在运行时拒绝修改,要求先从托盘退出。命令先完成语法、路径和必需凭据引用验证,再使用同目录临时文件和原子改名写入非敏感配置;每次成功写入将 `secure_config_revision` 递增 1。离线命令不连接产品数据库,也不直接写产品审计。`configure data-root` 不移动、复制或导入旧数据,只能在首次初始化时设置,或明确建立一个空的新实例;原目录仍由部署人员自行保留或处理,Dada 不提供恢复入口。 + +管理员白名单使用凭据管理器中的 pepper 生成规范化邮箱 HMAC,配置文件只保存 HMAC 集合。白名单邮箱完成验证码验证后,产品数据库才保存其管理员账号邮箱。API 启动时将配置的 `secure_config_revision` 与数据库 `secure_config_apply_state.applied_revision` 比较: + +1. 修订未变时不重复应用或记录审计。 +2. 新修订通过完整性、pepper 可用性、HMAC 格式和身份冲突检查后,在单一 `BEGIN IMMEDIATE` 事务中应用管理员访问变化、撤销被移除或失效管理员的全部会话、写入 `actor_type=system`、`actor_ref=backend_secure_config`、`result=succeeded` 的非敏感 AdminOperationLog,并推进 applied revision。事务提交后新配置才生效。 +3. 验证或应用失败时回滚所有业务变化且不推进 revision;数据库仍可写时,另起一个事务记录不含邮箱、HMAC、pepper 或配置值的 `result=failed` 审计。API 不进入 ready,由托盘报告安全配置待修正。 +4. 成功或失败审计无法按上述规则持久化时,配置不生效且 API 启动失败。离线命令执行者身份永不进入产品审计。 + +### 3.4 环境关系 + +| 环境 | 数据根 | 外部服务 | 浏览器 | 用途 | +| --- | --- | --- | --- | --- | +| 本地开发 | `%LOCALAPPDATA%\Dada\P0A-dev\` | 默认模拟;显式契约验证命令才允许真实调用 | 开发服务器加本机 Chrome/Edge | 日常开发;允许开发初始化脚本预置普通测试账号 | +| CI | `%RUNNER_TEMP%\dada-ci\` | 全部模拟;只有脱敏契约 fixture | Gitea Runner 上的 Chrome/Edge | 单元、集成、浏览器、视觉和打包;禁止读取真实 LocalDataRoot、凭据和账号 | +| P0-A 验收 | `%LOCALAPPDATA%\Dada\P0A\data` 或离线配置的合规目录 | 真实 AI 网关、Resend、高德 | 当前稳定版 Chrome 和 Edge | 由项目方控制的 1 个 super_admin 和 1 个普通账号人工验收 | +| P0-A 发布运行 | 与验收实例相同 | 与验收实例相同 | 与验收实例相同 | P0-A 没有独立远程生产环境 | + +CI 的真实素材发布检查可只读访问规范素材根目录,但使用独立输出目录,不能读取真实 LocalDataRoot,也不能复制全量素材。日常 CI 使用小型合成 fixture,不扫描 3.57 GB 归档。 + +CI 的单元/API/Worker 测试使用系统分配的临时回环端口;只有 P0-A 打包边界测试使用 43121。Gitea 对浏览器和打包 job 设置并发数 1,运行前确认真实 Dada 实例未启动,绝不停止或复用真实实例。Chrome/Edge 均使用 `%RUNNER_TEMP%` 下的一次性 user-data-dir,测试结束删除,不读取项目方日常浏览器 profile。 + +### 3.5 配置分层 + +- **编译配置**:应用版本、Schema 版本、固定端口、5 GB/150 MB 固定上限、固定错误注册表和发布浏览器支持记录,进入 Git/发布制品且后台不可修改。 +- **非敏感运行配置**:`secure_config_revision`、LocalDataRoot 引用、素材根引用、浏览器启动偏好(不含支持品牌/版本)和日志级别,保存在 ACL 限制为当前 Windows 用户的 `instance.json`;路径不返回前端。 +- **安全配置**:AI 网关、Resend、高德密钥和管理员白名单 pepper,保存在 Windows 凭据管理器。 +- **业务配置**:ModelConfig、邀请码、点数、模板状态、用量和服务状态,保存在 SQLite 并审计。 + +### 3.6 浏览器支持硬门禁 + +Fastify 为所有访问先提供独立、最小的 support gate,不直接提供 React 产品 shell。门禁流程固定如下: + +1. `GET /`、直接访问 `/app/*` 或 `/admin/*` 时只返回 gate HTML、其独立 CSS/JS 和 `RELEASE.json` 中的非敏感支持摘要;响应声明 `Accept-CH: Sec-CH-UA, Sec-CH-UA-Full-Version-List, Sec-CH-UA-Platform`。阻断页不加载产品 bundle、公开素材 manifest、登录组件或 Service Worker。 +2. gate 使用 `navigator.userAgentData.getHighEntropyValues(["fullVersionList", "platform"])` 取得 Chromium User-Agent Client Hints,并与请求头中的 `Sec-CH-UA`、`Sec-CH-UA-Full-Version-List`、`Sec-CH-UA-Platform` 交给 `POST /api/v1/support/check` 交叉校验。只接受 platform 为 Windows,且品牌明确为 `Google Chrome` 或 `Microsoft Edge`,major 与 `RELEASE.json` 对应记录相同;不使用 UA 字符串猜测 Chromium 品牌,UA-CH 缺失、冲突、解析失败或无法排除其他浏览器时统一按不支持处理。 +3. 通过后 API 设置签名 HttpOnly、SameSite=Strict、Path=/ 的 `dada_browser_support` Cookie,内容只含 app_version、品牌、major 和签发时间,不含指纹或用户身份。Cookie 最长 24 小时、API 重启后失效;产品 API 中间件每次仍比对当前 `Sec-CH-UA` 的品牌/major,浏览器升级、标识缺失或 app_version 变化时必须重新检查。 +4. 除 support gate 静态文件、`POST /api/v1/support/check` 和 Supervisor 健康探针外,全部产品 HTML、静态 bundle 和 `/api/v1` 路由都要求门禁通过。失败统一返回 HTTP `426`、`code=BROWSER_UNSUPPORTED`、`message_key=browser.unsupported`,`details.reason` 只允许 `platform_unsupported`、`brand_unsupported`、`version_unsupported` 或 `identity_unavailable`,并返回受支持品牌/major;不得返回继续令牌或绕过参数。 +5. 发布时 WP-7 先从 Chrome/Edge 官方稳定通道安装结果和浏览器可执行文件版本生成候选记录,再在该精确 full version 完成 AC-24/视觉/性能验收后写入 `RELEASE.json`。运行时不联网查询“当前版本”,不接受验收时前一 major,也不允许后台修改支持记录。 + +### 3.7 辅助系统界面契约 + +辅助系统界面只呈现本机进程与诊断,不新增产品角色或部署人员 CLI。稳定状态及动作如下: + +| 状态 | 产生者与判定 | 用户允许动作 | 产品功能影响 | +| --- | --- | --- | --- | +| `starting` / `ready` | Supervisor 汇总预检、API ready 和 Worker heartbeat | 打开 Dada、选择受支持浏览器、运行诊断、退出 | starting 时产品 API 不开放;ready 时按业务状态开放 | +| `startup_failed` | Supervisor 的配置、凭据存在性、目录、迁移或子进程启动检查失败 | 查看诊断结果、修正外部条件后重试启动、退出 | 全部产品功能阻断 | +| `port_in_use` | Supervisor 无法独占绑定 `127.0.0.1:43121` | 运行诊断、释放端口后重试、退出 | API/Worker 均不启动;不动态换端口 | +| `api_degraded` | API 连续健康失败且有限自动重启耗尽 | 重试 API、运行诊断、退出 | 网页和全部产品 API 阻断;Worker 停止领取新任务 | +| `worker_degraded` | Worker heartbeat 超时或有限自动重启耗尽 | 打开 Dada、重试 Worker、运行诊断、退出 | 禁止新 GenerationJob;查看、编辑、纯 JSON 保存、下载和允许的删除继续 | +| `diagnostics_running` / `diagnostics_ready` | Supervisor 调用本地只读探针并汇总 API/Worker 非敏感结果 | 重新运行、复制脱敏摘要、返回托盘 | 诊断本身不恢复、不停用业务能力,也不修改配置 | + +托盘和诊断结果只可读取 `app_version`、`supervisor_state`、`component`、稳定 `check_code`、`result=pass|warning|fail`、`message_key`、`checked_at`、固定端口与 `bind_scope=loopback`、浏览器支持版本记录、目录 `configured/readable/writable` 布尔值、manifest 哈希是否有效、SQLite/migration 状态、API/Worker 状态与 heartbeat age、LocalBackendStorageState 数值摘要,以及外部凭据是否已配置和服务状态。不得返回密钥、白名单值、邮箱、提示词、私有正文、图片、绝对路径、供应商原始错误或崩溃堆栈。UIDesign.md 负责托盘、启动失败、端口占用、degraded 和诊断结果的视觉呈现,但不得增加绕过、动态换端口、自动付费、打开私有目录或新的 CLI 操作。 + +## 4. LocalDataRoot 与文件访问 + +### 4.1 固定目录布局 + +默认根目录为 `%LOCALAPPDATA%\Dada\P0A\data`: + +```text +data/ + db/dada.sqlite3 + db/dada.sqlite3-wal + db/dada.sqlite3-shm + content/references// + content/generated// + content/exports///latest.jpg + content/exports///latest.png + managed-assets//original/ + managed-assets//thumbnail/ + derived-assets// + staging//... + logs/api/*.jsonl + logs/worker/*.jsonl + logs/supervisor/*.jsonl +``` + +数据库、WAL、审计记录和日志位于 LocalDataRoot,但不计入 `managed_content_bytes`。`content`、`managed-assets` 和 `derived-assets` 中由 Dada 管理的二进制文件计入,其中 `managed-assets` 明确包含后台上传普通贴纸原图和 Dada 生成的缩略图。既有只读素材根、程序文件、浏览器公开缓存和用户下载目录不计入。 + +目录的写入边界固定如下: + +- 约 3.57 GB 规范素材只存在已配置的只读源根目录,不进入 Git、`managed-assets`、`derived-assets` 或 LocalDataRoot 其他目录。 +- Git 只保存版本化 manifest、catalog、metadata、Schema、版本号、哈希和文本校验报告,不保存规范素材二进制或其等价副本。 +- `managed-assets` 只保存 super_admin 在产品上线后上传的 PNG/WebP 普通贴纸原图及 Dada 生成的必要缩略图;两类文件分别登记 `file_kind=sticker_original|sticker_thumbnail`、实际字节和哈希,均计入 5 GB,不接收现有归档素材的复制。 +- `derived-assets` 只保存浏览器和本地后端无法从规范源直接安全服务的最小运行产物;以内容 SHA-256 寻址并跨版本复用,禁止预转换全库、批量等价复制或为便利建立第二套素材库。 + +### 4.2 文件标识与路径隔离 + +- 所有私有文件使用随机 UUIDv4 `asset_id`;数据库只保存 `storage_class`、相对对象键、大小、MIME、SHA-256、所有者和状态。 +- API 响应只包含资源 ID 与受控 API URL,不包含绝对路径、素材根引用或可推导的对象键。 +- API 使用 `Path.GetFullPath` 等价的规范化检查确保最终路径仍在已配置根目录内,拒绝 `..`、符号链接逃逸和不在 manifest 中的资源。 +- 浏览器不得使用 `file://`、绝对路径或 File System Access API 读取 LocalDataRoot 或素材根;用户从标准文件选择器选择待提交参考图不受影响。 +- `public_release_asset` 使用公开版本化路由;`internal_preview_asset` 和 `private_user_asset` 使用不同路由、缓存头和鉴权中间件,不能共享静态目录。 + +### 4.3 文件与数据库一致性 + +所有二进制写入采用“预检 -> staging -> 内容校验 -> 原子改名 -> SQLite 提交 -> 异步补偿”的固定流程: + +1. 根据请求声明大小、当前实际字节数和存储预留计算预计写入。准入比较固定为 `managed_content_bytes + active_storage_reservations + projected_write_bytes > hard_limit_bytes` 时拒绝;预计写入后恰好等于硬上限时允许建立预留并继续,不能使用 `>=` 作写前拒绝。 +2. 文件流写入同一卷的 `staging/`,同时计算 SHA-256、实际大小和 MIME;禁止把整个文件读入内存。 +3. 校验成功后原子改名到内容寻址目标;SQLite 事务登记 `managed_file`、资源关系和实际字节增量。提交后总量恰好等于硬上限时,本次写入成功并在同一事务把 `storage_status` 置为 full。 +4. SQLite 事务失败时,将已改名但未引用的文件加入补偿清理;进程崩溃后由启动对账识别孤儿。 +5. 数据库先进入 `purged` 或删除身份关系后,文件立即无法通过 API 读取;物理删除由清理队列完成,完成后再减少 `managed_content_bytes`。 + +成功生成输出写入前使用 ModelConfig 中经契约验证的最大响应字节建立 `storage_reservation`。未验证模型必须保持 `available_for_new_jobs=false`,但不因此改写 configured enabled/default/priority。导出持久化失败或容量 full 时,浏览器仍可下载同一次客户端合成结果,但不更新 `latest_exports`。 + +`PUT /projects/{id}/state` 是纯 JSON 事务,不调用上述二进制流程。服务端对其中每个资源引用校验已提交、未撤销、属于当前用户且对当前项目可访问;该路由不得隐式上传、复制、替换或派生任何文件。需要新二进制的参考图、素材、派生物和 latest export 必须使用独立路由和容量预检。 + +### 4.4 LocalBackendStorageState 实现 + +- 固定 `hard_limit_bytes = 5,368,709,120`。 +- `normal`:小于 `4,294,967,296`;`warning`:达到该值且小于 `4,831,838,208`;`critical`:达到该值且小于硬上限。 +- API 每次受管文件提交或物理删除均在同一数据库事务更新计数;启动时在开放写能力前做全量文件对账,运行中每 60 秒执行可写性和磁盘余量探测。 +- 已提交 `managed_content_bytes >= hard_limit_bytes` 或已承诺的 `managed_content_bytes + active_storage_reservations >= hard_limit_bytes` 时,持久状态为 full 并拒绝新的受管二进制写入。单次写入准入仅在预计总量 `> hard_limit_bytes` 时拒绝并返回容量错误;预计总量 `= hard_limit_bytes` 时允许本次提交,提交后进入 full。因单个过大请求被拒绝但实际量与现有预留仍低于上限时,不伪造持久 full,较小且可容纳的后续请求仍可重新预检。 +- 数据库目录、日志目录、LocalDataRoot 不可写,或系统磁盘无可用空间时设为 `unavailable`。API 和 Worker 在该状态停止新增写入与 AI 调用。 +- warning/critical 只产生非阻断状态事件,不删除文件。critical 的引导顺序固定为下载成品、永久删除项目或由 super_admin 显式清理符合条件的无引用历史贴纸文件、等待物理清理与重测、恢复后继续生成。 +- full 仍允许已有项目编辑和上述纯 JSON 项目状态保存、查看、下载、客户端仅下载导出、永久删除,以及显式提交符合条件的历史贴纸清理;它阻止新 AI 任务、参考图持久化、后台贴纸原图上传、缩略图生成、其他受管/派生二进制新增和 latest export 保存。unavailable 拒绝包括项目 JSON、贴纸上传和缩略图在内的所有后端新增写入,但保留查看、下载、客户端仅下载导出和允许的删除入口;未保存编辑可以留在页面内存但不能显示为已保存。若 SQLite 仍可写,永久删除或显式贴纸清理可先提交逻辑删除/队列;SQLite 自身不可写时明确报告操作未提交并允许恢复后重试。 +- 物理删除完成、全量重测低于硬上限且目录可写后,状态才恢复 active。 + +自动清理只包括 PRD 已要求的 720 小时项目清理、账号注销、180 天保留期和 24 小时以上无引用 staging;不得因容量告警删除仍由用户拥有的内容,也不得自动清理任何后台上传普通贴纸历史原图或缩略图。贴纸历史文件在物理删除完成前始终计入 `managed_content_bytes`。 + +### 4.5 日志与数据库维护 + +- API、Worker、Supervisor 使用 JSONL 结构化日志,每文件 10 MiB,每进程最多保留 10 个轮转文件,并删除超过 30 天的诊断日志。 +- 日志只包含 correlation ID、内部非敏感对象 ID、状态类别、耗时和错误类别;禁止提示词、邮箱正文、验证码、密钥、会话令牌、图片、绝对路径和供应商原始错误正文。 +- Worker 每日执行 180 天保留期清理;每周在无运行任务时执行 WAL checkpoint 和 incremental vacuum。 +- CreditLedger、AdminOperationLog 与 PrivateContentAccessLog 通过 SQLite trigger 禁止普通 UPDATE/DELETE。只有 Worker 的保留期清理连接可在注册的 `dada_allow_retention_purge()` 作用域内删除到期审计;账号注销只能在 `dada_allow_privacy_purge()` 作用域中把原点数事件转成 AnonymousRetainedEvent 后删除身份关联流水。 +- 迁移、checkpoint、日志写入或审计写入失败均使 `storage_status` 进入 unavailable,并阻止后续 AI 调用。 + +## 5. 工程数据模型 + +### 5.1 SQLite 约束 + +数据库启动固定执行:`journal_mode=WAL`、`foreign_keys=ON`、`synchronous=FULL`、`busy_timeout=5000`。涉及任务、点数、名额、邀请码、配置版本和审计的写事务使用 `BEGIN IMMEDIATE`,避免 API 与 Worker 各自读后写造成竞态。 + +所有时间以 UTC 毫秒保存,对外使用 ISO 8601;用户界面再按本机时区显示。私有对象使用 UUIDv4。点数使用整数。枚举由数据库 CHECK、TypeBox Schema 和前端生成类型三层一致约束。 + +### 5.2 十九个产品数据契约映射 + +| 产品契约 | 工程映射 | 关键约束 | +| --- | --- | --- | +| 17.1 UserProfile | `users`、`user_profiles`、`credit_accounts`、`privacy_consents` | 规范化邮箱唯一;role 仅 user/super_admin;名额由 role、status、counts flag 计算;super_admin 的私有内容告知版本/时间由后端持久化;删除后移除身份字段 | +| 17.2 ModelConfig | `model_config_sets`、`model_config_versions`、`model_config_current`、`model_runtime_availability`、`gateway_route_profiles`、`error_mapping_profiles` | 配置集合不可变并原子切换;每集合恰好一个 enabled default;推荐优先级为集合内唯一正整数;运行时可用性独立且不回写配置;契约字段变化强制 unverified | +| 17.3 Project | `projects`、`project_states`、`latest_exports` | `state_version` 单调递增;比例/尺寸创建后不变;active 上限在事务内检查;purge_at 精确为 720 小时 | +| 17.4 GenerationJob | `generation_jobs`、`generation_job_references`、`job_leases` | 每账号 queued/running 部分唯一索引;配置、成本和参考图关系均快照;终态不可逆;上游不确定性只作内部诊断 | +| 17.5 CanvasElement | `project_states.canvas_json` 中经版本化 JSON Schema 校验的元素数组 | 最多 50;不持久化 Fabric 私有字段;动态值、色卡五色和 DYN004 坐标按产品字段快照 | +| 17.6 TemplateRegistry | `template_registry`、`template_versions`、`test_batches`、`template_batch_members` | 稳定 ID + resource_version 唯一;状态转换受服务校验;full_p0 不能逐批公开 | +| 17.7 StaticStickerCatalog | `static_sticker_catalog`、`static_sticker_versions`、`project_asset_refs`、`managed_files` | part1-25 和顺序稳定;记录 bundled/admin 来源及原图/缩略图文件关系;重复图片保留不同 ID;已发布版本与 active/trashed 项目引用阻止历史文件清理 | +| 17.8 DynamicStickerData | 固定 `dynamic_provider_registry` 代码注册表和 CanvasElement 实例快照 | 只提供模板声明的字段;DYN004 坐标仅在同意后写入;不执行 Lua | +| 17.9 CreditAccount 与 CreditLedger | `credit_accounts`、append-only `credit_ledger` | 余额 CHECK 和事务锁;reserve/commit/release 操作键唯一;管理员调点原因必填 | +| 17.10 PrivateContentAccessLog | append-only `private_content_access_logs` | 打开前先写成功审计;180 天;注销时目标改为不可反推随机标识 | +| 17.11 AnonymousRetainedEvent | `anonymous_retained_events` | 注销事务生成随机主体且不保存映射;无邮箱、IP、正文、资源或原 ID;最迟注销后 180 天删除 | +| 17.12 AssetReleaseManifest | Git 中的 immutable manifest + `asset_releases`、`asset_release_items` | release_version、ID、相对路径、大小、哈希和 access_class 固定;公开导出只含 public | +| 17.13 AssetPreviewGrant | `asset_preview_grants` | active/revoked/expired;每次 manifest 和资源读取重新校验;不改变用户角色 | +| 17.14 ClientCachePolicy | 前端固定配置 + 只含公开资源元数据的 IndexedDB `public_asset_lru` + Cache Storage | 157,286,400 字节 LRU;不存内部预览、私有内容、项目、验证码或会话 | +| 17.15 ExternalServiceUsage | `external_service_usage` | Resend 日/月和高德月度独立行;配额领取事务化;只含四个固定状态;恢复审计 | +| 17.16 AdminOperationLog | append-only `admin_operation_logs` | actor、结果、非敏感前后摘要;180 天;配置生效使用 system/backend_secure_config;贴纸清理请求、引用复核、拒绝/排队和物理结果均留痕 | +| 17.17 GatewayBalanceState | `gateway_balance_states`、`gateway_balance_affected_models` | model/account/unknown 影响范围;真实确认后才能恢复;不保存密钥或原始供应商正文 | +| 17.18 GenerationErrorCategory | 代码和迁移共同种入的九项固定只读注册表 `generation_error_categories` | 后台不可增删改;mapping profile 只能引用固定 ID;稳定 message_key | +| 17.19 LocalBackendStorageState | 单实例 `local_backend_storage_state`、`managed_files`、`storage_reservations` | 名称固定;原图/缩略图计量;预计量大于上限才拒绝、等于上限允许后进入 full;物理删除后重测;不与浏览器 localStorage 混淆 | + +### 5.3 支撑表 + +以下表只支撑冻结产品语义,不形成新产品对象: + +- `invite_codes`、`email_challenges`、`sessions`、`auth_rate_limits`:邀请码、10 分钟一次性验证码、60 秒重发限制、30 天会话;验证码只保存带 pepper 的摘要。 +- `idempotency_records`:路由、主体、键、请求哈希和响应引用。 +- `managed_files`、`file_cleanup_queue`、`storage_reservations`:文件一致性、清理和容量预留;贴纸原图/缩略图分别记录 file_kind,排队删除不提前扣减容量。 +- `project_asset_refs`、`asset_cleanup_requests`、`asset_cleanup_request_items`:从每次已提交项目状态提取资源版本引用,并保存管理员显式贴纸清理的候选快照、确认、复核与物理结果;只属工程支撑,不新增产品对象。 +- `model_config_sets`、`model_runtime_availability`:前者把三个模型的不可变配置版本作为一个可原子激活的集合,后者只记录逐模型 `available_for_new_jobs`、非敏感 reason、检测与恢复时间。 +- `browser_support_release`:从 `RELEASE.json` 导入当前 app_version 的 Windows、Chrome/Edge 品牌、major 和已验收 full version,只供门禁与诊断读取,后台不可编辑。 +- `job_leases`、`worker_heartbeats`:Worker 领取和崩溃恢复。 +- `outbox_events`:数据库提交后向 SSE 和清理队列发布,不承担跨机器消息。 +- `recent_assets`:账号级文字模板和贴纸最近使用,不存未保存项目状态。 +- `service_recovery_checks`:辅助服务和网关恢复的非敏感确认结果。 +- `secure_config_apply_state`:已生效安全配置修订号、非敏感摘要和应用时间;不保存白名单、HMAC、pepper 或凭据。 +- `generation_jobs.upstream_outcome_known` 与 `upstream_cost_reconciliation`:只供后台诊断与本地监控的上游结果/成本核对标记,不是新的 GenerationJob 状态、点数状态或 GenerationErrorCategory。 + +v1.10 同步迁移固定完成四项变化:为 `user_profiles` 增加可空的 `private_content_notice_version` 与 `private_content_notice_acknowledged_at`;建立不可变 `model_config_sets`、集合约束和独立运行时可用表;为后台贴纸原图/缩略图补齐 `managed_files` 关系、项目资源引用和显式清理表;导入当前发布浏览器支持记录。迁移只向前执行,先回填/校验再切换 Schema 版本,任一校验失败整体回滚并阻止 API ready。 + +## 6. API 与事件契约 + +### 6.1 通用协议 + +- 生产 API 前缀固定为 `/api/v1`,JSON 使用 UTF-8;文件上传使用 multipart 流式处理。 +- 生产只接受 Host `127.0.0.1:43121` 和同源 Origin;不开放 CORS。开发环境只允许显式 Vite origin。 +- 浏览器支持门禁中间件位于路由解析后的第一层,先于会话、CSRF、角色和业务处理;除 support check 与 Supervisor 健康探针外,未通过门禁的请求不得触发数据库业务读取、验证码发送、资源读取或外部调用。 +- OpenAPI 3.1 从 TypeBox Schema 生成;前端客户端由同一 Schema 生成,不能手写漂移类型。 +- 每个响应包含 `X-Correlation-Id`;客户端可传入合法 UUID,否则 API 生成。 +- 创建型和有金融/文件副作用的请求要求 `Idempotency-Key`。键为客户端随机 128 位以上值,不包含用户数据。 +- 列表使用 opaque cursor;不得用连续数据库 ID 暴露数量或顺序。 + +统一错误信封: + +```json +{ + "error": { + "code": "STABLE_ENGINEERING_CODE", + "message_key": "stable.ui.message.key", + "correlation_id": "opaque-id", + "error_category": "optional-generation-category", + "details": {} + } +} +``` + +`details` 只允许字段级校验、最新版本、容量状态或当前任务引用等白名单信息。禁止供应商原始错误、堆栈、内部 URL、绝对路径和凭据。 + +### 6.2 API 分组 + +| 分组 | 主要路由 | 语义 | +| --- | --- | --- | +| 浏览器支持 | `POST /support/check`;产品前缀外的 Supervisor health | 读取 UA-CH 与发布支持记录;仅返回支持/阻断状态和非敏感版本;不建立产品会话 | +| Bootstrap | `GET /bootstrap` | 仅门禁通过后返回应用版本、公开功能状态、模型配置/运行时摘要和非敏感依赖状态 | +| 普通认证 | `/auth/register/*`、`/auth/login/*`、`/auth/session`、`/auth/logout` | 注册/登录分离;发码前校验状态;验证码成功后创建会话 | +| 管理员认证 | `/admin-auth/login/*`、`/admin-auth/session` | 发码前校验 HMAC 白名单;首次验证创建 super_admin;session 返回当前私有内容告知版本、已确认版本和 `notice_acknowledged` | +| 账号 | `/me/profile`、`/me/credits`、`/me/credit-ledger`、`/me/delete` | 资料、点数、注销;注销为不可逆事务 | +| 模型 | `GET /models`、`GET /models/{model_id}`、`PUT /admin/models/configuration` | 读取同时返回 `configured_default_model_id`、逐模型配置/运行时状态和 `recommended_model_id`;后台以完整配置集合原子保存 | +| 生成 | `POST /generations`、`GET /generations/{id}`、`GET /generations/current` | multipart 提交;原子冻结;已有活动任务返回现有任务而非创建第二个 | +| 项目 | `/projects`、`/projects/{id}`、`/projects/{id}/state`、`/projects/{id}/trash|restore|purge` | 所有者鉴权;自动保存使用 If-Match state_version;回收站与清理 | +| 历史与成品 | `/projects/{id}/images`、`/projects/{id}/exports` | 原图下载、历史删除、latest JPG/PNG;资源 ID,不暴露路径 | +| 素材 | `/assets/public/*`、`/assets/preview/*`、`/private-assets/*` | 三类资源使用独立授权和缓存策略 | +| 管理员贴纸清理 | `GET /admin/assets/history-cleanup-candidates`、`POST /admin/assets/history-cleanup-intents`、`POST /admin/assets/history-cleanup-intents/{id}/confirm` | 只返回无引用候选;确认时事务复核全部引用并整体拒绝或排队;物理结果异步回读 | +| 私有内容告知与访问 | `POST /admin/private-content-notice/ack`、`/admin/private-content/*` | ack 按当前 super_admin 和版本持久化;未确认禁止进入区域;每次正文/图片打开仍先写独立访问审计 | +| 管理后台 | `/admin/users`、`/admin/invites`、`/admin/models`、`/admin/assets`、`/admin/preview-grants`、`/admin/services`、`/admin/audit` | 全部要求 active super_admin;敏感修改写 AdminOperationLog | +| 状态事件 | `GET /events` | 同源鉴权 SSE;任务、保存、存储和服务状态;事件不携带私有正文 | + +SSE 只作为状态变化提示,事件体固定为 event_id、event_type、entity_ref、state/config version 和 occurred_at。客户端收到后通过 REST 读取真相;断线或 event_id 不连续时执行一次 bootstrap/refetch,不依赖 SSE 保存业务状态或私有正文。模型事件只提示 config set version 或 runtime availability version 变化,客户端重新读取 `/models`,不得把运行时不可用写回配置表。 + +`GET /models` 顶层固定返回 `configured_default_model_id`、`recommended_model_id`(无运行时可用模型时为 null)和当前 `config_set_version`。每个模型固定返回 `enabled`、`is_default`、`recommendation_priority`、`config_version`、成本/限制、`contract_validation_status`,以及独立的 `runtime_availability={available_for_new_jobs, reason, checked_at}`。`recommended_model_id` 只从 enabled、contract verified、Worker/网关可用于新任务的模型中按 recommendation_priority 数值升序派生;它不形成第二个默认状态,也不更新任何 ModelConfig 字段。 + +`POST /generations` 的业务字段固定为 prompt、model_id、ratio、model_config_version、confirmed_credit_cost、创建模式(new_project 或 existing_project)以及参考图项;不接受负面提示词、种子、采样器、批量数量或模型专属高级参数。参考图项只能是本次 multipart 新文件,或同一所有者且同一项目中已有任务的 `existing_reference_asset_id`;复用时仍创建当前 GenerationJob 的关系快照,不能修改旧任务关系。 + +### 6.3 鉴权与会话 + +- 会话令牌为 256 位随机 opaque 值;数据库只保存 SHA-256 摘要、用户、创建、到期和撤销时间。 +- Cookie 固定为 HttpOnly、SameSite=Strict、Path=/,最长 30 天。因 P0-A 使用回环 HTTP,不把 Secure Cookie 当作安全前提。 +- 每次页面加载通过会话接口取得一次性 CSRF synchronizer token,仅保存在页面内存;所有写请求同时校验 CSRF、Origin、Host 和会话。 +- 用户暂停、注销、管理员停用或移出白名单时,在同一事务撤销全部会话;API 每次请求重新检查账号状态和管理员白名单配置版本。 +- 管理员和普通用户使用分离入口与会话 audience;普通账号不能因邮箱加入白名单原地提升。 +- `user_profiles.private_content_notice_version` 与确认时间是后端真相;Cookie、session、localStorage、IndexedDB 或页面内存只能缓存本次显示状态,不能作为确认依据。管理员 session/bootstrap 每次从当前后端告知版本和用户记录计算 `notice_acknowledged`。 + +### 6.4 HTTP 语义 + +- `400`:字段或确定性业务输入无效;`401`:无会话;`403`:角色、所有者或预览授权不足;`404`:不存在或对当前主体不可见。 +- `409`:幂等键请求哈希冲突、活动项目上限、历史上限或不可执行状态;已有活动 GenerationJob 返回 `200` 和现有任务引用。 +- `412`:`state_version` 或 `model_config_version` 过期;响应带最新安全版本摘要,客户端必须重新确认。 +- `413`:参考图或后台贴纸上传超过已验证限制。 +- `426`:浏览器品牌、平台或发布 major 不受支持,或无法可靠识别;只返回阻断引导所需字段。 +- `428`:active super_admin 尚未确认当前私有内容告知版本;不返回私有内容区域数据。 +- `429`:验证码频率限制;配额硬停止使用服务状态响应而不是伪造发送成功。 +- `503`:外部服务 paused、网关契约未验证、Worker degraded;生成类响应附固定 error_category(适用时)。 +- `507`:当路由要求新增受管内容且 LocalBackendStorageState 为 full/unavailable,或本次预计写入后将超过硬上限时返回;响应带非敏感容量状态和 remaining bytes。预计总量恰好等于硬上限不得以 507 拒绝。full 不影响已有项目状态保存,unavailable 时才拒绝该保存;查看、下载、客户端仅下载导出和删除按 4.4 节处理。 + +### 6.5 版本用途 + +- `config_version`:ModelConfig 每次影响启停、默认、recommendation_priority、成本、比例、参考图、提示词、路由或错误映射时生成新不可变版本;三个当前版本由一个 `config_set_version` 原子激活。生成提交必须同时带 `model_config_version` 和 `confirmed_credit_cost`。 +- `state_version`:每次项目保存成功递增。保存请求使用 `If-Match`;不匹配进入 conflicted,只读且不能另存副本。 +- `release_version`:每次素材发布生成不可变版本;项目元素保存稳定 ID 和 resource_version,历史渲染不跟随新版本漂移。 +- `schema_version`:数据库迁移版本;应用启动只允许向前执行已打包迁移。 +- `app_version`:发布包版本;写入 RELEASE.json、日志和诊断,但不改变产品数据语义。 + +### 6.6 新增稳定错误码 + +| code | HTTP | 触发与固定动作 | +| --- | ---: | --- | +| `BROWSER_UNSUPPORTED` | 426 | 品牌/版本/平台不支持或身份不可可靠识别;只显示无绕过引导 | +| `MODEL_CONFIG_VERSION_CONFLICT` | 412 | 后台提交的 expected config_set_version 已过期;返回最新非敏感版本摘要并要求重载 | +| `MODEL_DEFAULT_REPLACEMENT_REQUIRED` | 409 | 试图停用当前默认模型但未在同一请求指定另一个 enabled 默认;整体不写入 | +| `MODEL_DEFAULT_REPLACEMENT_INVALID` | 409 | 替代默认不存在、未启用或产生非唯一默认;整体不写入 | +| `MODEL_RECOMMENDATION_PRIORITY_INVALID` | 400 | 缺失、非整数或非正数;返回字段位置,整体不写入 | +| `MODEL_RECOMMENDATION_PRIORITY_CONFLICT` | 409 | 同一候选配置集合内优先级重复;返回冲突模型 ID,不部分写入 | +| `PRIVATE_CONTENT_NOTICE_ACK_REQUIRED` | 428 | 当前 super_admin 未确认当前告知版本;仅返回 current notice version/message_key | +| `ASSET_HISTORY_REFERENCE_CONFLICT` | 409 | 清理确认时任一文件仍被已发布版本、active/trashed 项目或其他有效关系引用;整批不排队 | +| `ASSET_CLEANUP_CANDIDATE_STALE` | 409 | 候选快照/确认令牌过期或文件状态已变化;重新查询候选 | +| `STORAGE_CAPACITY_EXCEEDED` | 507 | 当前已 full/unavailable 或预计写入后大于硬上限;不得创建副作用,等于上限不触发 | + +上述错误均使用统一错误信封和稳定 message_key,不新增 GenerationErrorCategory。模型因余额、契约或 Worker 状态不可用于新任务时,生成提交继续使用九类错误中的既有分类;模型读取接口只报告独立运行时原因。 + +## 7. 幂等、并发与事务 + +### 7.1 幂等规则 + +- 相同主体、路由和 `Idempotency-Key` 且请求哈希一致时返回第一次结果;哈希不一致返回 409。 +- GenerationJob 的 `client_submission_id`、点数流水 `operation_key`、管理员调点 `adjustment_id`、邀请码核销 `registration_id` 和 export `export_id` 具有永久唯一约束。 +- 普通 API 幂等响应缓存保留 24 小时;涉及任务、点数、邀请核销和管理员操作的实体唯一键随实体/审计保留,不依赖 24 小时缓存。 +- Worker 结算使用 `generation_id + final_credit_state` 唯一约束,重复回调、轮询或进程恢复不能再次 commit/release。 + +### 7.2 单任务约束 + +`generation_jobs` 保存 `owner_id`,并建立 SQLite 部分唯一索引:仅当 status 为 queued 或 running 时,owner_id 唯一。API 在 `BEGIN IMMEDIATE` 事务中先查询已有任务,再尝试插入;即使并发请求同时到达,索引仍保证只存在一个活动任务。命中已有任务时返回该任务,不新增项目、参考图关系、冻结点或上游调用。 + +### 7.3 生成提交事务 + +1. 校验会话、账号、项目/历史上限、当前 config set、所选模型 enabled、contract verified、独立 runtime availability、配置版本、比例、提示词、参考图、余额、Worker 健康和存储状态;recommended_model_id 仅用于默认推荐,不替代对用户所选模型的校验。 +2. 流式接收并校验参考图到 staging,建立预计容量预留。 +3. 在一个 `BEGIN IMMEDIATE` 中再次读取所有可变条件;需要时创建草稿 Project;创建 GenerationJob 和参考图关系;把 available 转入 reserved;写 generation_reserve 流水和 outbox。 +4. 提交后移动参考图到私有内容位置并登记 managed file。任一步失败则事务不创建任务、不冻结点;已暂存文件进入补偿清理。 +5. Worker 只处理已完整提交的 queued 任务。 + +### 7.4 结算事务 + +- 成功:验证图片、写入受管文件后,在同一事务把任务改为 succeeded、写 output_asset、把 reserved 变为已扣点、追加 generation_commit、更新项目历史与 draft_state。 +- 失败:在同一事务写 failed/rejected 和固定 error_category、把 reserved 返还 available、追加 generation_release;输出文件不得建立引用。 +- 供应商返回成功但文件不能安全落盘时,不把任务标为 succeeded;使用 `unknown_retryable` 失败并只释放一次,后台保留非敏感诊断类别。 +- 管理员调点只更新 available;原因必填;`reserved_balance` 不变;流水和 AdminOperationLog 与余额更新同事务提交。 + +### 7.5 项目保存并发 + +- 前端在一次已提交操作结束后 1 秒 debounce;同项目最多一个保存请求在途,新变化合并为下一份完整状态。 +- API 使用 `UPDATE ... WHERE project_id=? AND owner_id=? AND state_version=?` 原子 compare-and-swap。 +- 更新成功时完整 JSON Schema 校验、state_version +1、save_status=saved;失败返回 412,前端立即停止自动保存并进入只读 conflicted。 +- conflicted 页面把 `conflict_export_used` 只保存在当前页面内存;第一次本地导出结束后立即禁用再次导出,且始终不调用 latest export API。 +- 未保存状态、撤销栈、提示词和私有引用只在页面内存;刷新、关闭或崩溃后只恢复最后一次 saved 状态。 + +### 7.6 ModelConfig 原子配置与运行时推荐 + +`model_config_sets` 是工程事务容器,不新增产品对象。每次后台保存都生成一个候选 set,把三个模型各自新的或复用的 immutable config_version 作为 set 成员;Schema 与数据库固定执行: + +- `recommendation_priority` 为 JSON/TypeBox integer,数据库 `CHECK (recommendation_priority > 0)`,并以 `UNIQUE(config_set_id, recommendation_priority)` 禁止并列;缺失、浮点、零、负数或重复均拒绝整个请求。 +- `UNIQUE(config_set_id) WHERE enabled=1 AND is_default=1` 保证至多一个;`model_config_current` 指针更新 trigger 在切换前检查候选 set 中 enabled default 计数恰好为 1,否则中止事务。因此任何可读取的当前配置始终恰好有一个已启用默认模型。 +- `PUT /admin/models/configuration` 必须提交完整三模型集合、`expected_config_set_version` 和 Idempotency-Key。API 在 `BEGIN IMMEDIATE` 中复核当前版本、模型 ID 固定集合、默认模型、优先级、字段约束和契约重验规则,写 immutable 版本、AdminOperationLog/outbox,最后单语句切换 current set 指针;契约相关字段变化时同一事务把对应 runtime availability 置 false/reason=contract_unverified。任一失败回滚全部写入。 +- 当前默认由 enabled 变为 disabled 时,请求中的另一个模型必须同时为 enabled + is_default;缺失或非法分别返回固定 replacement 错误。该事务不得先产生无默认或双默认的可见中间态。 +- `model_runtime_availability` 不属于 config set。余额、契约、Worker 或外部服务变化只在独立事务更新逐模型运行时可用性、GatewayBalanceState/审计和 runtime version,不创建 config_version,也不修改 enabled、is_default 或 recommendation_priority。 +- 契约相关配置变化仍按 PRD 生成新 config_version 并把 `contract_validation_status` 置为 unverified,但新版本必须继承候选集合明确提交的 enabled/is_default/recommendation_priority;契约失效本身不得暗改这三个字段,只通过 runtime availability 禁止新任务。 +- 逐模型 runtime reason 固定为 `available`、`configured_disabled`、`contract_unverified`、`contract_blocked`、`gateway_balance_insufficient`、`gateway_paused` 或 `worker_degraded`;读取 API 不透传供应商文本。多个原因同时存在时按 configured disabled、contract、balance/paused、Worker 的顺序返回首要阻断原因,恢复一个原因后仍需重新计算其余原因。 +- 读取时先确定当前 config set,再对每个 enabled 模型联结 runtime availability;`recommended_model_id` 按有效候选的 recommendation_priority 升序取第一项,无候选返回 null。configured default 即使运行时不可用仍保持原 ID,前端不得把推荐结果写回后台默认。 + +初始化迁移种入固定三模型集合且三者 configured enabled=true:`gemini-3.1-flash-image-preview` 为 `is_default=true`、`recommendation_priority=1`;`gemini-3-pro-image-preview` 为 priority 2;`gpt-image-2` 为 priority 3。三者初始 contract 为 unverified、运行时不可用于真实任务;初始化和后续迁移都通过同一集合校验器,禁止专用旁路。 + +### 7.7 后台贴纸历史文件显式清理 + +项目保存事务从 Canvas Schema 提取普通贴纸 stable ID/resource_version,重建 `project_asset_refs`;active 和 trashed 项目均保留关系,只有项目进入 purged 后才撤销。`asset_release_items` 对所有仍保留的 immutable 已发布版本保留原图/缩略图关系。候选与清理流程固定为: + +1. 候选查询只选择 `asset_origin=admin_uploaded`、已不再供当前新增使用,且不存在任何 `asset_release_items`、active/trashed `project_asset_refs`、待发布集合或其他有效引用的原图/缩略图;返回内部 file ID、stable sticker ID、resource_version、file_kind、bytes、hash prefix、引用计数零和短期 `candidate_snapshot_version`,不返回路径。 +2. super_admin 以候选快照创建 cleanup intent;API 要求 Idempotency-Key,写入请求及候选摘要的 immutable AdminOperationLog,并返回必须由同一 active super_admin 明确确认的短期确认令牌。查询候选本身不删除、不排队。 +3. 确认接口在 `BEGIN IMMEDIATE` 中锁定 intent 和候选文件,重新检查管理员、快照、文件状态及全部引用。任一文件被任一已发布版本、active 项目、尚可恢复的 trashed 项目、待发布集合或其他有效关系引用时,整批不排队,提交 `result=denied` 的引用复核审计后返回 `ASSET_HISTORY_REFERENCE_CONFLICT`;快照失效返回 stale 错误并要求重查。 +4. 全部无引用时,同一事务把文件置 `pending_delete`、撤销新的目录读取、写入 `file_cleanup_queue`/outbox,并记录 `validated` 与 `scheduled` 审计。排队不减少 `managed_content_bytes`,也不提前改变 LocalBackendStorageState。 +5. Worker 按 operation/file 唯一键执行物理删除并可幂等重试。每轮完成后重新扫描受管文件实际字节,在单一事务更新文件物理结果、`managed_content_bytes`、notice/status/last_measured_at 和最终 AdminOperationLog;失败或部分完成记录非敏感计数并继续重试,绝不把未物理删除的字节扣除。 +6. 只有重计量确认容量低于硬上限且 LocalDataRoot 可写时才恢复 active。系统、容量告警、发布或保留期作业均不得自动创建贴纸历史 cleanup intent。 + +full 不阻止候选查询、确认和排队。unavailable 时仍可查询;只有 SQLite 可写时才能确认并排队,SQLite 不可写则明确返回操作未提交,恢复后重试。两种状态都不得借清理接口上传替换文件、生成新缩略图或写入其他受管二进制。 + +### 7.8 私有内容告知确认与逐次访问 + +当前私有内容告知版本作为编译期非敏感业务配置随 app_version 发布,包含稳定 version、message_key、content SHA-256 和 effective_at;修改文案必须递增 version。`POST /admin/private-content-notice/ack` 要求 active super_admin、CSRF、Idempotency-Key 和客户端看到的 expected notice version,在 `BEGIN IMMEDIATE` 中重新比较当前版本并更新该 super_admin 的 UserProfile 两个字段;版本过期时不写入并要求重新读取。 + +任何 `/admin/private-content/*` 区域数据接口都在服务端比较 UserProfile 已确认版本与当前版本;不相等先返回 `PRIVATE_CONTENT_NOTICE_ACK_REQUIRED`,不能用 Cookie、session 或浏览器存储绕过。图片/完整提示词打开接口在同一数据库事务再次检查 active super_admin 和当前告知确认,先插入 PrivateContentAccessLog 并提交,随后才发放一次受控读取;审计写入失败时不返回内容。告知升版会使所有旧确认自然失效,但确认记录绝不代替任何一次 PrivateContentAccessLog。 + +## 8. Generation Worker 与三模型适配 + +### 8.1 持久队列 + +Worker 使用 SQLite 原子领取 queued 任务并写入 `lease_owner`、`lease_expires_at`、`heartbeat_at` 和 `attempt_no`,任务转为 running。租约 30 秒,心跳每 10 秒更新;一次只有一个本机 Worker 实例持有命名锁。 + +Worker 不对供应商请求做自动重新提交。超时、连接中断或未知结果进入相应固定错误分类,由用户决定是否重试;这避免恢复时重复产生真实调用和扣费。 + +### 8.2 固定 Adapter 接口 + +三个模型各有独立模块,均实现: + +- `validateContract(routeProfile)`:检查当前配置引用已验证证据; +- `start(requestSnapshot)`:返回 completed 或 pending,pending 必须包含不含凭据的 upstream job reference; +- `poll(upstreamJobReference)`:只用于契约已经确认的异步模型; +- `normalizeOutput(response)`:输出统一图片流、MIME、像素、大小和供应商用量摘要; +- `classifyError(error, mappingProfile)`:只返回九类固定分类和非敏感 source category; +- `checkBalanceSignal(response)`:更新 GatewayBalanceState 的模型、账户或未知影响范围。 + +接口允许封装同步或异步供应商差异,但每个 Adapter 必须依据自身证据实现,不能复制另一个模型的字段或端点。每次请求固定一张输出;Adapter 按已验证协议发送单图约束,网关返回多图或结构不符时不得静默选取,按 gateway_contract_invalid 处理并使该配置重新进入 unverified。 + +初始数据通过 7.6 的配置集合迁移种入三个 PRD 模型 ID且三者 configured `enabled=true`:`gemini-3.1-flash-image-preview` 为唯一默认且 recommendation_priority=1,`gemini-3-pro-image-preview` 为 priority 2,`gpt-image-2` 为 priority 3,三者 `credit_cost=1`。在契约证据通过前 route profile 不填猜测字段、`contract_validation_status=unverified`、`available_for_new_jobs=false`;configured enabled 与运行时可用字段分离,验证通过并保存证据后才能恢复运行时真实任务能力。 + +### 8.3 契约验证证据 + +每个模型的验证记录必须包含: + +- 网关文档或平台支持确认的版本/日期; +- 脱敏请求与响应 fixture; +- 纯文字单图、参考图、四种比例; +- 返回 MIME、像素、获取方式和 URL 有效期; +- 同步/异步、任务查询、超时和取消/未知结果语义; +- 技术失败、安全拒绝、非安全参考图无效、余额不足和未知错误; +- error mapping profile 版本和 config_version; +- 证据 SHA-256、验证人和验证时间,不包含密钥、完整私有提示词或真实用户图片。 + +公开模型广场显示的端点与通用参数表只可作为验证输入,不可写成 verified 证据。任一端点、字段、参考图、响应、异步查询或错误协议改变,保存配置时立即将对应模型设为 unverified,停止其新任务并重新执行 AC-40。 + +`contract_validation_status` 初始和配置变更后为 unverified;完整矩阵通过后为 verified;平台确认不支持 PRD 必需能力或验证存在无法继续的外部条件时为 blocked。unverified 和 blocked 均禁止真实新任务并返回 gateway_contract_invalid,只有新证据完整通过后才能转为 verified。 + +### 8.4 崩溃恢复 + +- 启动时 Worker 扫描租约过期 running 任务。 +- 若任务已有经验证可查询的 upstream reference,只恢复 poll,不重新 submit。 +- `upstream_outcome_known` 初始为 false;Adapter 取得可验证终态时设为 true。`upstream_cost_reconciliation` 固定使用 `not_applicable`、`not_required`、`pending_manual_review`、`confirmed_charged` 或 `confirmed_not_charged`;该值不改变 Dada 点数处理。 +- 若已向上游提交但没有可安全查询的 upstream reference,任务以 `unknown_retryable` 失败并释放冻结点,不推测上游结果,也不自动重试;同时保持 `upstream_outcome_known=false`、设 `upstream_cost_reconciliation=pending_manual_review` 并记录非敏感提交时间/路由引用,供管理员核查网关实际消耗。 +- 管理员核对只能将 pending 转为 confirmed_charged 或 confirmed_not_charged 并写 AdminOperationLog;不得因核对结果补扣用户点数、改写任务终态或自动重新提交。 +- queued 任务可以由新 Worker 正常领取;页面关闭不改变其状态和点数。 +- 清理/结算 outbox 使用实体唯一键重放,保证最终只执行一次。 + +### 8.5 九类错误统一路径 + +| category | 创建前 | 创建后终态 | 点数 | 工程处理 | +| --- | --- | --- | --- | --- | +| upstream_timeout | 不适用 | failed | release | Adapter 超时映射;允许原输入重试 | +| upstream_failed | 不适用 | failed | release | 已知临时上游故障;稍后重试 | +| safety_rejected | 不适用 | rejected | release | 仅供应商安全拒绝;要求修改提示词或参考图 | +| model_disabled | 不创建 | 不适用 | no reserve | 配置 enabled=false;余额/契约/Worker 运行时原因由更具体分类优先 | +| gateway_balance_insufficient | 不创建或 failed | failed(若已创建) | no reserve/release | 更新独立运行时影响范围,不改配置;人工确认恢复 | +| gateway_contract_invalid | 不创建或 failed | failed(若已创建) | no reserve/release | contract 非 verified;停止运行时路由但不改配置默认/优先级,要求重新验证 | +| reference_invalid | 不创建或 failed | failed(若已创建) | no reserve/release | 格式、大小、数量或非安全型内容不可用;不得映射为 safety_rejected | +| unknown_retryable | 不适用 | failed | release | 无法细分但可稍后重试;保留非敏感诊断 | +| unknown_non_retryable | 不适用 | failed | release | 不应反复重试;联系管理员 | + +点数不足、配置版本变化、已有任务、项目/历史上限和本机 storage full/unavailable 使用确定性业务错误,不扩充 GenerationErrorCategory。 + +## 9. 核心业务工程方案 + +### 9.1 邀请注册、验证码、会话和管理员 + +- 注册发码前和验证码成功创建账号前均在事务中重新校验邀请码、账号状态和 10 人名额。 +- 邀请码由密码学安全随机数生成,仅在创建成功响应中显示一次;数据库保存带 pepper 的 HMAC、最大次数、有效期、状态和计数,不保存可再次读取的原码,日志与审计只保存邀请码内部 ID。 +- `email_challenges` 只保存验证码 HMAC、用途、过期时间、失败次数和 consumed_at;10 分钟过期、60 秒重发限制;连续失败和高频请求按邮箱摘要与本机会话组合限流。 +- Resend 用量领取与 `used_count` 更新使用 `BEGIN IMMEDIATE`。调用尝试一经放行即计数,供应商超时不回退计数,以保证不突破免费硬上限。 +- 账号创建、初始 10 点、registration_grant、邀请码使用次数和隐私告知版本同事务完成;失败不消耗邀请码。 +- active 与 suspended 普通用户计入 10 人;deleted 释放;super_admin 不计入且不使用邀请码。 +- 管理员登录使用独立入口。白名单外邮箱在调用 Resend 前拒绝;允许多个权限相同的 super_admin,不设置最后一个管理员保护。 +- 开发初始化脚本只写入 P0A-dev 数据根并在启动 banner 标识 DEV_SEEDED_ACCOUNT;发布构建不暴露入口,正式认证 AC 不可使用该账号作为证据。 + +### 9.2 项目、历史、失败草稿和回收站 + +- “新建创作”首次提交创建草稿项目;失败保留 `failed_empty`;重试复用项目并新增任务;“继续生成”只追加任务。 +- 默认项目名由 API 在创建事务内一次生成:将首次提示词做 Unicode 空白折叠,取前 24 个字素簇作摘要(空摘要使用固定 `未命名创作`),追加按当前 Windows 时区计算的 `YYYY-MM-DD`。同名允许,身份由 project_id 确定;用户重命名作为普通自动保存操作。 +- 项目固定 ratio/size;最多 20 个 active,成功历史最多 10 张。恢复 trashed 项目同样事务检查 active 上限。 +- 仅无成功图的 failed_empty 可进入批量移入回收站命令;API 根据数据库状态判断,不能相信客户端 batch_deletable。 +- 当前底图不能直接删除;切换底图保留覆盖元素、重置底图调整、重新提取已有色卡,并形成一次撤销/保存操作。 +- 自动保存由页面内单串行队列执行:已提交操作后 1 秒 debounce,同时最多一个保存请求,期间新变化合并为下一个最新快照。失败保持 failed/dirty 并在页面存活时指数退避重试,不写浏览器持久存储。 +- 站内离开守卫对 dirty/saving/failed 固定提供保存并离开、放弃修改和取消;保存并离开必须等待 saved,失败则不跳转。刷新/关闭使用 `beforeunload` 并发起最后一次 best-effort 保存;放弃、强制刷新、关闭或崩溃只能恢复最后 saved 版本。 +- trashed 精确保存 deleted_at/purge_at;到期或主动永久删除后先变 purged 并立即撤销访问,再进入物理清理队列。 + +### 9.3 画布状态与渲染 + +- Dada Canvas Schema 保存背景、调整、元素、资源版本和 z_index;加载时转换为 Fabric 对象,保存前再规范化,禁止持久化 Fabric 缓存、DOM 或函数。 +- 复杂资源统一编译为 `TemplateRenderModel v1`,由 TypeScript Canvas 2D/Fabric renderer 消费;文字运行、装饰图片、参数槽和动态字段均为声明式节点,不使用 HTML/CSS 布局作为导出真相。编辑预览与导出调用同一 renderer 和资源版本。 +- 画布最多 50 个覆盖元素;服务端和客户端同时校验。 +- 选择循环、长按候选、Shift/多选模式、框选、层级、吸附、撤销重做由编辑域控制器实现;撤销栈仅页面内存,保存的是撤销完成后的当前状态。 +- 字体加载必须等待 `FontFace` ready 后才能测量、生成基准图或导出。字体缺失使对应模板 unavailable;DYN012 明确使用 FONT081,不允许静默系统字体替代。 +- 切换文字模板只替换模板资源和模板默认样式,保留用户文本、换行、位置、缩放、旋转和层级;字体覆盖及填充/描边/背景/对齐/行距/字距写入 CanvasElement 的显式样式字段。 +- 底图调整使用确定性渲染参数,原图与显示调整分离;色卡算法始终读取未裁剪、未调色、未滤镜的原始底图像素。原图按保持比例缩放到最长边 256px 的离屏 Canvas,固定逐像素扫描,使用 MMCQ 生成五色;按像素占比降序、RGB 数值升序打破并列,并把 `palette_algorithm_version=mmcq-v1` 保存到色卡元素,确保同图同版本结果一致。 +- 动态贴纸由固定 TypeScript provider 生成声明式元素。时间取插入时本机值并保存;身份默认复制插入当时的账号资料到 DynamicStickerData,单实例覆盖只改该元素,账号资料后续变化不暗改已保存画布。需要 `@` 的 provider 先去掉用户值前导 `@` 再添加一个;DYN004 在确认后才调用定位并保存原始坐标。 + +### 9.4 素材面板与公开缓存 + +- 普通贴纸目录按 part 和稳定顺序分页;前端虚拟列表只保留视口与小缓冲,缩略图懒加载,原图只在加入画布或导出时加载。 +- 文字模板只按 catalog 分类、稳定展示顺序和 display_name 搜索;普通贴纸只按 part 浏览,不复用文字搜索索引,也不从哈希文件名推断关键词。 +- 最近使用只保存账号、稳定 ID、资源版本和时间,不保存项目内容。 +- 公开二进制使用版本化 URL、ETag 和 `Cache-Control: public, max-age=31536000, immutable`。 +- 应用主动缓存使用 Cache Storage,但 allowlist 仅包含 public_release_asset 中的公开缩略图、公开模板转换产物和公开字体;普通贴纸原图、生成图、成品和其他 public response 不进入 Dada 主动持久缓存。IndexedDB 只保存上述 allowlist 资源的 resource ID、release_version、bytes、last_accessed_at。写入前按 LRU 淘汰,确保不超过 157,286,400 字节。 +- internal preview 和 private response 使用 `Cache-Control: no-store`,Service Worker 不拦截;未保存状态不得进入任何浏览器持久化存储。 + +### 9.5 客户端导出与 latest exports + +- 导出由浏览器按项目真实像素在离屏 Canvas 合成;PNG 无损,JPG 默认 92 且仅允许 80-100;颜色空间固定 sRGB,无水印。 +- 未提交文字/样式在用户确认后先形成一个撤销操作,等待字体与图片稳定,再执行一次合成。 +- 同一 Blob 一路用于浏览器下载和后端 latest export 上传,避免下载与保存结果不同。 +- 上传携带 project_id、state_version、format、SHA-256、像素和 `export_id`;API 校验所有者、格式、像素和容量后原子替换该格式最新文件。 +- 项目 conflicted、项目 JSON 保存失败、latest export 持久化失败或 storage unavailable 时仍允许客户端下载,但不更新项目或 latest_exports。storage full 下仍按 4.3/4.4 节允许纯 JSON 项目保存,只禁止 latest export 上传;旧成功成品保持不变。 +- 从未导出的项目返回稳定空状态,不自动生成默认成品;P0-A 只提供本机重新下载和原始生成图下载。 + +### 9.6 运营后台与两类审计 + +- 后台使用同一 React 应用的独立 `/admin` 路由域和独立 API 权限中间件,不建立第二套服务。 +- 管理员 session/bootstrap 返回当前私有内容告知 version/message_key、该身份已确认 version/time 和计算后的 `notice_acknowledged`。私有内容区域数据路由在服务端强制当前版本确认;版本升高后重新阻断,确认不使用浏览器或会话状态代替。 +- 列表默认只返回非敏感摘要。完整提示词/图片必须调用专用 private access API;API 再次校验当前告知确认,先插入 PrivateContentAccessLog,再返回资源。告知确认不能替代逐次审计。 +- 管理员修改用户、点数、邀请码、模型、普通贴纸、复杂模板、预览授权、辅助服务或余额恢复,以及创建/确认/执行贴纸历史清理时,在对应业务事务内写 AdminOperationLog。 +- before/after summary 只保存枚举、数值、版本和内部对象引用;不保存正文、图片、凭据或完整白名单。 +- 后台不能编辑复杂模板内部样式、固定错误分类、服务硬上限上调、自动充值或付费通道。 + +### 9.7 内部预览授权 + +- 公开 manifest 在构建和响应时双重过滤,只能含 public_release_asset。 +- 内部预览 manifest 每次按 active session、active user、grant 状态、有效期和 test_batch_id 动态生成,资源 URL 使用随机 manifest item ID,不能由模板稳定 ID 推导。 +- 撤销、到期或暂停账号后立即拒绝后续 manifest/资源请求;已经取得的 response 为 no-store,不进入应用缓存。 +- full_p0 可以分批 imported/internal_preview/passed,但后台不提供逐批普通用户 enabled 操作。未来正式切换必须是一次事务化发布命令,并且只在 P0-B 全部门槛通过后存在。 + +## 10. 素材工程方案 + +### 10.1 唯一输入 + +素材编译器只读取 PRD 18.1-18.7 的规范入口: + +- `%USERPROFILE%\Desktop\sticker_web_handoff` 的交接说明、总 manifest 和完整性报告; +- 文字模板分类 `catalog.csv` 与 `templates//metadata.json`; +- 字体 `font_panel_catalog.csv` 与单字体 metadata; +- `%USERPROFILE%\Desktop\贴纸素材\sticker_part1` 至 `sticker_part25` 的 1,407 张 PNG; +- 色卡 `catalog.csv` 与 `styles//metadata.json`; +- 动态贴纸 `catalog.csv` 与 `templates//metadata.json`。 + +历史 PB、截图、录像和对账目录只作人工证据,不进入产品构建或运行时。编译器以只读句柄打开源文件,不修正、删除、重命名或生成旁路文件。 + +### 10.2 StaticStickerCatalog 构建 + +1. 按 part1-25 和目录稳定规则枚举 1,407 张 PNG,重复内容不去重目录项。 +2. 为每个入口生成稳定 ID、part、顺序、原文件名、相对路径、宽高、MIME、SHA-256 和缩略图引用。 +3. 校验计数、PNG 解码、路径唯一、ID 唯一和 manifest 哈希;任一失败阻止发布。 +4. Git 保存 catalog、metadata、manifest 和校验报告;PNG 原图仍在源目录原地只读,通过后端 ID 路由提供。 + +### 10.3 复杂资源包 + +- 文字、字体、色卡和动态贴纸由 TypeScript 编译器转换为版本化声明式 JSON、字体/图片引用和必要派生文件。 +- Lua/Prefab 仅作为转换输入和行为证据;编译器不执行脚本,浏览器和后端运行时也不解释或执行 Lua/Prefab。 +- 332 个文字模板、86 个字体面板项、16 个色卡和 35 个动态贴纸全部完成导入和注册;P0-A 普通用户 manifest 只导出 32 个文字白名单、其引用字体并强制 FONT081、4 个色卡和 10 个动态贴纸。色卡和动态贴纸不计入普通贴纸的 25 个 part。 +- 浏览器或后端无法从规范源直接安全服务的最小转换产物写入 `derived-assets//` 并计入 LocalBackendStorageState。编译器先查找已有内容哈希并复用;源二进制、可直接服务文件和未被 P0-A/内部预览 release 引用的预转换产物不复制或生成。 + +### 10.4 后台新增普通贴纸 + +管理员上传 PNG/WebP 后,API 分别为原图和 Dada 生成缩略图建立容量预留,流式写 staging,验证真实 MIME、解码、尺寸、大小、稳定 ID、part 和顺序;通过后创建新的 immutable release_version,将两类文件作为 `sticker_original`/`sticker_thumbnail` 写入 `managed-assets` 并计入 managed_content_bytes,catalog、metadata 和 manifest 只写版本化元数据。此路由在 storage full/unavailable 时拒绝上传和缩略图生成;预计总量大于上限时拒绝,恰好等于上限时允许提交并进入 full。不得把既有规范归档导入 `managed-assets`。发布事务切换 current release,旧版本只读保留;历史文件只能按 7.7 的候选、确认、引用复核、审计、队列、物理删除和重测流程释放。 + +后台不能上传 Lua、Prefab、文字模板、色卡渲染器或动态资源包。复杂资源只能走受控离线编译和版本发布。 + +### 10.5 Manifest 与发布路径 + +- `release_version` 使用 `asset-YYYYMMDD.`;每个 manifest 自身和每个文件均有 SHA-256。 +- 只读源对象键为 `root_ref + relative_path`;LocalDataRoot 派生对象键为 `release_version/content_hash`;浏览器只看到稳定资源 ID 和版本化 API URL。 +- manifest 一经发布不可修改;修正生成新版本。项目保存稳定 ID + resource_version,旧项目始终按旧版本渲染。 +- Gitea CI 对 catalog/schema/hash 使用 fixture 验证;受控 release job 在当前电脑只读校验真实归档并生成 manifest,不将 3.57 GB 二进制或其等价派生副本上传为 CI 制品。 + +### 10.6 三类资源隔离 + +| access_class | API | 鉴权 | 缓存 | +| --- | --- | --- | --- | +| public_release_asset | `/api/v1/assets/public/...` | 先通过浏览器 support gate;无用户会话要求;只允许 manifest 白名单资源 | 仅公开缩略图、转换产物和字体可进入 150 MB LRU;immutable | +| internal_preview_asset | `/api/v1/assets/preview/...` | active 普通账号 + 每次校验 AssetPreviewGrant | `no-store`;不得进入公开 manifest | +| private_user_asset | `/api/v1/private-assets/...` | 所有者,或先写审计的 active super_admin | `private, no-store`;不可推导路径 | + +### 10.7 素材授权边界 + +P0-A 只维护规范归档中已有的素材来源引用、manifest、catalog、metadata、版本和 SHA-256,并保持受控内测、三类资源隔离和不自行扩大公开范围。完整商业授权台账不新增为当前 P0-A 或本版已定义 P0-B 的技术/产品完成与发布门槛;若未来进入正式公开注册或商业化,则必须按届时适用的合规发布要求补齐。WP-5 主责 PRIV-05 不得被拆解为当前建设商业授权系统的任务。 + +## 11. 外部服务硬停止与恢复 + +### 11.1 Resend + +- `external_service_usage` 为每日 80 和自然月 2,400 分别建立计数行。事务领取调用额度;达到最后一个名额时先把服务置 paused_quota,再允许该次已领取调用结束。 +- paused_quota、paused_provider 或 disabled 时不调用供应商,不创建验证码假成功;注册和需要新验证码的登录暂停,现有有效会话继续。 +- 新免费周期开始时创建新计数行,但保持暂停,直到 super_admin 在后台确认周期和免费额度后执行恢复并审计。 +- 供应商恢复同样需要非敏感健康检查结果和 super_admin 人工恢复。免费额度下降只能下调 hard_limit 并审计;不能上调或切换付费通道。 +- QQ、163 和企业邮箱的发布前 20 封送达结果作为人工发布证据保存,不写入 ExternalServiceUsage,也不创建逐封 EmailVerificationEvent 或运行时质量状态。 + +### 11.2 高德 + +- 每自然月硬上限 1,000 次,配额领取与状态更新事务化;达到上限先 paused_quota。 +- paused 状态只关闭 DYN004 自动定位;手动地点文字和其他编辑功能继续。 +- 浏览器坐标只在 Dada 自有提示确认后取得,并由 API 发送高德;前端不持有高德密钥。 +- 新周期或供应商恢复后由 super_admin 人工恢复并写审计;不购买流量或自动扩容。 + +### 11.3 AI 网关余额 + +- Adapter 将非敏感余额信号写入 GatewayBalanceState。model 影响范围只停明确模型;account 或 unknown 停同 gateway_account_ref 全部模型。 +- 运行时停用事务只更新 `model_runtime_availability`、GatewayBalanceState 和 AdminOperationLog,并向 SSE 发布 runtime version;不得创建或改写 ModelConfig 版本、enabled、is_default 或 recommendation_priority。 +- 已创建失败任务只释放一次;Dada 点数不能覆盖真实网关余额。 +- 不自动探测后直接恢复。部署人员/管理员先确认真实余额,记录 confirmed recovery check,再由 super_admin 只恢复运行时可用状态并审计;恢复后重新派生 recommended_model_id,仍不回写配置默认或优先级。 + +## 12. 安全、隐私与保留 + +### 12.1 本机安全边界 + +- Fastify 只监听 `127.0.0.1`,拒绝其他 Host;Windows 防火墙不创建入站规则;不设置端口转发。 +- CSP 固定 `default-src 'self'`,图片/字体只允许同源 blob URL 和必要内存 URL;禁止第三方脚本。 +- AI 网关、Resend 和高德客户端只允许 HTTPS、正常校验 Windows 信任链与主机名、限制响应大小和超时,并拒绝重定向到未在固定供应商配置中的主机;任何环境都不得关闭证书验证。 +- 资源路由执行所有者/授权校验,404 隐藏对象是否存在;下载设置 `X-Content-Type-Options: nosniff` 和安全 Content-Disposition。 +- P0-A 不做 Dada 应用层文件加密,依赖当前 Windows 用户登录和 NTFS 权限;页面固定显示数据可丢失、不备份、不迁移提示。 + +### 12.2 账号注销 + +注销在一个事务中撤销会话、删除邮箱和资料、释放邮箱唯一约束、删除未使用点数、把项目/任务/资源标为不可访问、生成不含映射的匿名事件、匿名化私有访问日志目标并加入物理清理队列。事务提交后旧内容对任何用户都不可恢复;物理文件随后异步删除。 + +AnonymousRetainedEvent 最迟在注销后 180 天删除;AdminOperationLog 和 PrivateContentAccessLog 按原事件时间 180 天删除,注销不延长。不可回溯汇总只保存计数,不保留单次作品或主体键。 + +### 12.3 审计与敏感信息 + +- PrivateContentAccessLog 专用于打开完整提示词/图片;AdminOperationLog 专用于后台敏感操作,两者不重复保存正文。 +- 任何日志、错误信封、manifest、SSE、OpenAPI 示例和测试 fixture 都不得出现真实密钥、验证码、会话、管理员邮箱、完整提示词、私有图片或绝对用户路径。 +- Windows 凭据管理器读取只发生在子进程启动/重启时。Supervisor 通过继承的匿名管道按子进程最小权限传递一次,Node 在供应商客户端构造后清空接收缓冲;值不进入进程参数、环境变量、磁盘或日志。 +- CI 仅使用格式正确的假密钥和 `.invalid` 邮箱;正式验收凭据由离线命令写入。 + +## 13. 性能、可访问性与视觉一致性 + +### 13.1 P0-A 性能预算 + +在当前 Windows 电脑、当前稳定版 Chrome/Edge、1080p 以上视口、50 个混合覆盖元素的标准画布上: + +- 连续拖动/缩放/旋转 10 秒期间,指针到下一次画面更新的 p95 不超过 50 ms,单个主线程长任务不得超过 200 ms,不能出现连续 500 ms 无响应; +- 画布交互帧耗时 p95 不超过 33 ms;吸附和候选计算不得引起控件尺寸跳动; +- 自动保存序列化使用调度切片,单次主线程阻塞 p95 不超过 50 ms;网络/SQLite 保存不占用画布交互线程; +- 已缓存白名单资源的编辑器重新打开至可操作不超过 3 秒;未缓存资源显示稳定占位,不阻塞其他工具; +- 1080 x 1920、50 元素画布导出在 10 秒内完成,浏览器页面峰值额外内存不超过 1 GiB;失败不改变项目和 latest export; +- 普通贴纸面板 DOM 节点数不随 1,407 张总量线性增长;每个 part 只渲染视口和两屏缓冲。 + +性能测试使用固定数据集和采样脚本;未达到预算阻止对应 AC-27、AC-32 或发布门槛。本文不为 P0-B 手机定义当前实现预算。 + +### 13.2 视觉一致性 + +- Chrome/Edge 使用相同转换资产、字体文件、Canvas Schema、DPR 归一化和导出路径。 +- 基准运行固定 OS、浏览器、视口、DPR、字体 ready、动画时刻和动态数据;具体矩阵写入 tdd.md。 +- 元素边界偏差不超过 2px;颜色通道差异超过 16/255 的显著像素不超过总像素 1%;任一超限必须人工复核。 +- DYN012、style_02-16 和已知替代项无论自动差异是否通过均人工复核。 + +### 13.3 可访问性基础 + +- 所有关键命令、表单、对话框和画布外工具均可键盘到达;焦点不被托盘或 SSE 更新抢走。 +- 状态同时提供文字/图标/ARIA,不只依赖颜色;上传、任务、保存、冲突、存储和错误具有文字状态。 +- 浏览器不支持引导页必须在不加载产品 bundle 时仍具备语义标题、键盘可读说明和明确支持版本;WinForms 托盘、启动/端口/degraded 对话框和诊断结果使用 Windows UI Automation 可读名称、状态与动作。 +- CI 对关键页面运行 axe,critical/serious 问题为零;画布对象操作提供可聚焦的等价工具控件。最终焦点顺序、图标名称和文案由 UIDesign.md 固定。 + +## 14. 测试、监控与 AC 追踪 + +### 14.1 测试层级 + +| 层级 | 基础设施 | 覆盖目标 | +| --- | --- | --- | +| Schema/单元 | Vitest、TypeBox fixture | 状态转换、哈希、版本、九类错误、模型默认/优先级集合校验、运行时推荐、容量 `>`/`=` 边界、动态格式化、色卡确定性、路径校验 | +| SQLite 集成 | 每测试临时数据库和临时 LocalDataRoot | 事务、部分唯一索引、幂等、点数、名额、模型集合原子切换、告知确认持久化、审计不可变、贴纸引用竞争、清理和容量状态 | +| API 契约 | Fastify inject + OpenAPI snapshot | 浏览器门禁、分组路由、模型读取/保存、告知 ack、贴纸清理、稳定错误信封、鉴权、CSRF、If-Match、multipart、三类资源 | +| Worker 恢复 | 模拟网关、可控时钟、进程终止 harness | 租约、心跳、崩溃、poll 恢复、只结算/释放一次、运行时模型状态、上游结果/成本核对、贴纸物理删除/重测与清理重放 | +| 外部契约 | 三模型脱敏 fixture、Resend/Amap mock;受控真实验证命令 | 三模型分别验证;免费配额和错误分类;真实调用不在普通 CI | +| 浏览器 | Playwright Chrome/Edge 独立 profile + 原始 HTTP 客户端 | 发布记录中的真实 Chrome/Edge 通过;其他品牌、错误 major、缺失/冲突 UA-CH 和直调产品 API 均硬阻断;认证、项目、编辑、同机多标签、导出、越权和后台;Service Worker 不拦截 internal/private,Cache Storage/IndexedDB 只有 allowlist 公开资源元数据 | +| 安全/打包 | Windows 凭据测试 harness、进程检查、制品扫描 | 凭据缺失/清除、API/Worker 重启、最小权限传递;support gate 与辅助诊断最小字段;命令行、环境、文件、日志和崩溃诊断零真实凭据 | +| 视觉/性能 | 固定 Canvas fixture、截图 diff、PerformanceObserver | AC-32、50 元素、字体、动态模板、导出一致性 | +| 人工发布验收 | P0-A 便携包和真实外部依赖 | PRD 第 22、23 节适用门槛 | + +DevelopmentPlan 不定义逐场景操作步骤。tdd.md 必须从 `RELEASE.json` 接收并写定具体 Windows build、Chrome/Edge 品牌、major 与已验收 full version、DPR、视口、数据 fixture 和逐步断言;不得使用伪造 UA 字符串代替两种真实稳定浏览器的通过证据。 + +`reference_invalid` 必须分别覆盖格式/大小/数量和非安全型内容不可用;`safety_rejected` 必须使用供应商明确安全拒绝证据。二者不能通过同一个模拟错误或同一个断言替代。跨普通用户隔离验收使用独立 Chrome/Edge profile,通过正常邀请码、验证码和普通权限链路创建临时第二账号,完成越权检查后走正常注销并等待其内容清理;不得使用管理员直写、开发预置账号或隐藏测试后门替代。Playwright 每个缓存/私有资源场景后必须枚举 Service Worker registration、Cache Storage 键和 IndexedDB 记录,不能只依赖响应头断言。私有内容告知测试必须跨新标签页、API/浏览器重启、重新登录和另一受支持浏览器验证同版本不重复,并在告知 version 递增后验证服务端重新阻断;每次打开正文/图片仍单独断言 PrivateContentAccessLog。 + +### 14.2 本地监控 + +后台和诊断接口从 SQLite 聚合并显示: + +- GenerationJob queued/running 数、队列最老等待时间、租约过期数、各模型调用量/成功率/失败率/错误分类/耗时,以及 `pending_manual_review` 的上游成本核对数量和最老等待时间; +- configured_default_model_id、config_set_version、逐模型 recommendation_priority/runtime availability、recommended_model_id,以及无可用模型持续时间;运行时指标不得回写配置; +- 点数 reserve/commit/release 数和余额不变量异常; +- managed_content_bytes(分参考图、生成图、成品、派生文件、后台贴纸原图和缩略图)、阈值、storage_status、目录可写性、贴纸 cleanup intent/队列积压、引用冲突数、最近物理删除和重测时间; +- Resend 日/月用量、状态、硬上限和非敏感 pause reason; +- 高德月用量、状态和硬上限; +- GatewayBalanceState、影响范围、运行时不可用模型和最后确认时间; +- 审计到期清理、匿名事件清理、项目 purge、staging 清理和日志轮转结果; +- 素材 manifest 版本、根目录可用状态和校验失败数,不回显绝对路径。 + +固定本地告警条件:running 租约过期、队列等待超过 2 分钟、连续 5 个生成失败、无运行时可用模型、存在 `pending_manual_review` 上游成本核对、点数不变量失败、storage full/unavailable、贴纸或项目清理任务连续 3 次失败、外部服务 paused、网关余额不足/unknown、素材根校验失败、API/Worker degraded。告警进入后台和托盘状态,不发送外部告警或产生自动费用。 + +### 14.3 十三个功能模块落点 + +| FeatureSummary 模块 | 工程组件 | 主工作包 | +| --- | --- | --- | +| 邀请注册与邮箱登录 | Auth API、Resend adapter、session、admin allowlist | WP-1 | +| 点数与原子结算 | Credit service、ledger、SQLite 事务 | WP-2 | +| 三模型 AI 生图 | Generation API、ModelConfig set、runtime availability、Worker、三个 Adapter | WP-2 / WP-3 | +| 项目、历史、保存与冲突 | Project service、Canvas Schema、cleanup | WP-2 | +| 电脑画布与底图编辑 | React/Fabric editor | WP-4 | +| 文字模板与字体 | Asset compiler、Font loader、text renderer | WP-4 / WP-5 | +| 25 个普通贴纸 part | StaticStickerCatalog、虚拟列表、managed original/thumbnail、引用保护与显式清理、asset routes | WP-5 | +| 色卡与动态贴纸 | deterministic palette、dynamic provider registry | WP-4 / WP-5 | +| 导出 | browser compositor、latest export API | WP-4 | +| 运营后台 | Admin API/UI、模型配置集合、私有告知确认、贴纸清理、service state、audit | WP-6 | +| 素材发布与内部预览 | immutable release、grants、three access routes | WP-5 / WP-6 | +| 本机数据与资源访问 | Supervisor、浏览器 gate、辅助系统界面、SQLite、LocalDataRoot、storage state | WP-0 / WP-2 | +| 隐私、审计与免费服务边界 | deletion、retention、audit、quota state | WP-1 / WP-6 | + +### 14.4 AC 唯一主责映射 + +| 主责工作包 | 当前 AC | +| --- | --- | +| WP-0 基础工程与本机边界 | AC-24、AC-46、AC-55、AC-56 | +| WP-1 认证、身份、隐私与审计基础 | AC-01、AC-02、AC-22、AC-33、AC-39、AC-45、AC-49 | +| WP-2 项目、点数与 GenerationJob | AC-03、AC-04、AC-05、AC-06、AC-20、AC-21、AC-28、AC-29、AC-34、AC-35、AC-36 的 P0-A 子集、AC-38 的 P0-A 子集、AC-43、AC-44、AC-51、AC-53 | +| WP-3 三模型契约验证与适配 | AC-30、AC-40 | +| WP-4 桌面编辑器与导出 | AC-07、AC-09、AC-10、AC-11、AC-12、AC-14、AC-16、AC-17、AC-18、AC-19、AC-23 的 P0-A 子集、AC-27、AC-32 | +| WP-5 素材转换、发布与白名单 | AC-13、AC-15 的 P0-A 子集、AC-31、AC-42、AC-48 | +| WP-6 运营后台与外部服务控制 | AC-25、AC-47、AC-50、AC-52 | +| WP-7 P0-A 发布准备 | AC-41 | + +AC-08、AC-26、AC-37、AC-54 没有当前主责工作包。交叉 AC 可作为其他工作包的依赖或回归输入,但只能由上表主责工作包宣告完成。 + +### 14.5 PRD 需求 ID 覆盖索引 + +| 主责工作包 | PRD 需求 ID | +| --- | --- | +| WP-0 | PRIV-01、PRIV-02、NFR-01、NFR-07、NFR-09 | +| WP-1 | AUTH-01、AUTH-02、AUTH-03、AUTH-04、AUTH-05、AUTH-06、AUTH-07、PRIV-03、PRIV-04、PRIV-06、NFR-04 | +| WP-2 | CREDIT-01、CREDIT-02、CREDIT-03、CREDIT-04、CREDIT-05、CREDIT-06、PROJECT-01、PROJECT-02、PROJECT-03、PROJECT-04、PROJECT-05、PROJECT-06、PROJECT-07、PROJECT-08、PROJECT-09、GEN-03、GEN-04、GEN-05、GEN-06、GEN-11、GEN-12、GEN-14、GEN-16、NFR-05 | +| WP-3 | GEN-01、GEN-02、GEN-07、GEN-08、GEN-09、GEN-10、GEN-13、GEN-15、ADMIN-03 | +| WP-4 | EDITOR-01、EDITOR-02、EDITOR-03、EDITOR-04、EDITOR-05、EDITOR-06、EDITOR-07、EDITOR-08、EDITOR-09、TEXT-01、TEXT-02、TEXT-03、TEXT-04、TEXT-05、TEXT-06、TEXT-07、TEXT-08、TEXT-09、TEXT-10、TEXT-11、TEXT-12、TEXT-13、TEXT-14、COL-01、COL-02、COL-03、COL-04、COL-05、DYN-01、DYN-02、DYN-03、DYN-04、DYN-05、DYN-06、DYN-07、DYN-08、DYN-09、EXPORT-01、EXPORT-02、EXPORT-03、EXPORT-04、EXPORT-05、EXPORT-06、NFR-03、NFR-06 | +| WP-5 | STATIC-01、STATIC-02、STATIC-03、STATIC-04、ADMIN-06、ADMIN-07、PRIV-05、NFR-02 | +| WP-6 | ADMIN-01、ADMIN-02、ADMIN-04、ADMIN-05、ADMIN-08、ADMIN-09、NFR-08 | + +GEN-05、GEN-14、GEN-16、AUTH-07、CREDIT-06、ADMIN-06、ADMIN-07、NFR-02、NFR-04、NFR-07 和 PRIV-02 具有跨工作包依赖,但上表给出唯一主责。WP-7 不拥有新的产品需求 ID,只负责汇总全部当前需求和适用 AC 的发布证据。 + +### 14.6 跨工作包依赖矩阵 + +本表只定义必须交付的接口和回归关系,不改变 14.4/14.5 的唯一主责。 + +| 上游工作包/契约 | 下游工作包 | 需求/AC 交叉 | 强制交付边界 | +| --- | --- | --- | --- | +| WP-0 LocalBackendStorageState、纯 JSON/二进制路由分界 | WP-2 项目、删除与清理 | PROJECT-04-09、NFR-07/09、17.19;AC-20、35、36 P0-A、38 P0-A、43、55、56 | WP-2 只通过已提交资源 ID 保存 JSON;full 可保存,unavailable 按可写性拒绝;删除完成后回传重测 | +| WP-0 LocalBackendStorageState、容量预留 | WP-4 导出 | EXPORT-05/06、NFR-03/09;AC-23 P0-A、24、35、38 P0-A、55、56 | 客户端下载始终与 latest export 上传解耦;full/unavailable 不得覆盖旧 latest export | +| WP-0 LocalBackendStorageState、managed/derived 写策略 | WP-5 素材编译与发布 | STATIC-04、ADMIN-06/07、PRIV-05、NFR-02/07;AC-31、42、46、48、55 | 既有归档不复制;上传只进 managed;无法直接服务的最小产物去重后进 derived,两者均受 5 GB 约束 | +| WP-0 存储测量、日志和告警 | WP-6 运营后台 | ADMIN-08/09、17.16/17.19;AC-41、50、52、55 | 后台只读取非敏感容量/健康摘要,不能上调固定上限、强制恢复或回显绝对路径 | +| WP-0 安全配置修订/生效协议 | WP-1 认证、WP-6 审计 | AUTH-07、ADMIN-09、17.16;AC-45、49、50 | 只有 API 原子应用后才生效;离线执行者不成为审计角色;失败不部分生效 | +| WP-2 任务诊断字段 | WP-3 Adapter、WP-6 诊断 | GEN-13/16、ADMIN-04;AC-40、51、52、53 | 未知上游结果进入人工成本核对,不新增任务/错误状态,不补扣用户点数 | +| WP-0 浏览器支持记录、gate 与辅助状态 | WP-1 至 WP-7 全部 Web/API | NFR-01、17.1;AC-24、25、30、31、40、50、51、55 | 未通过品牌/major/平台检查只能读取最小引导;全部产品路由先执行 gate;辅助状态不泄露路径或正文 | +| WP-3 ModelConfig set 与 runtime availability | WP-2 生成、WP-6 模型/服务后台 | GEN-01/13-15、ADMIN-03、17.2/17.17;AC-30、40、51 | 默认/优先级以配置集合原子切换;推荐只从独立运行时状态派生;余额/契约降级不回写配置 | +| WP-1 UserProfile 告知字段 | WP-6 私有内容区域与访问审计 | ADMIN-05、17.1/17.10;AC-25、50 | 后端按身份+版本持久确认;区域服务端门禁;每次打开仍先写 PrivateContentAccessLog | +| WP-2 项目资源引用、WP-5 贴纸文件关系 | WP-6 清理后台、WP-0 容量重测 | STATIC-04、ADMIN-06/09、17.7/17.16/17.19;AC-31、50、55 | active/trashed/发布及其他有效引用阻止整批清理;排队不减容量;物理删除后重测才更新/恢复 | + +### 14.7 v1.10 重点 AC 工程闭环 + +| AC | 数据/状态 | API/事务 | 必须进入 tdd.md 的基础设施断言 | +| --- | --- | --- | --- | +| AC-24 | `browser_support_release`、Supervisor 辅助状态 | support check + 全产品路由前置 gate;426 无绕过 | 真实受支持 Chrome/Edge 通过;其他品牌、错误 major、UA-CH 缺失/冲突、直调 API、局域网/其他设备均阻断 | +| AC-25 | UserProfile 告知 version/time、PrivateContentAccessLog | ack 事务、区域服务端前置校验、打开前审计 | 跨标签/重启/重登/两浏览器同版本不重复;升版重新提示;每次内容读取独立审计 | +| AC-30 | immutable config set、唯一正整数 priority、runtime availability | 完整集合 CAS 保存、默认替换同事务、模型读取派生推荐 | 初始 seed;缺失/非正/重复;无替代停默认;合法原子替换;默认运行时不可用和全不可用 | +| AC-31 | managed original/thumbnail、release/project refs、cleanup intent | 上传/缩略图容量预留;候选、确认、引用复核、排队、物理删除/重测 | 两类字节计入;full/unavailable 阻断;有引用整批拒绝;无引用显式清理;旧项目继续渲染 | +| AC-40 | 三个独立 config/Adapter/contract evidence | 分模型验证与 config/runtime 分离 | 三模型各自端点、输入、参考图、比例、同步/异步、任务查询、九类错误和结算证据,任一变化重置 unverified | +| AC-50 | append-only AdminOperationLog / PrivateContentAccessLog | 模型配置、贴纸清理各阶段和服务恢复事务内审计;私有打开独立审计 | 请求、引用校验、拒绝/排队、物理结果完整且 180 天内不可改删;无敏感正文 | +| AC-51 | GatewayBalanceState + model_runtime_availability | model/account/unknown 运行时影响事务、人工恢复 | 三种影响均不改 enabled/is_default/priority;只释放一次点数;推荐重新派生;恢复审计 | +| AC-55 | LocalBackendStorageState、reservation、managed file kinds | 写前 `>`、等于允许后 full;清理后物理重测 | 精确阈值、等号、超限、原图/缩略图计量、full/unavailable 动作矩阵、清理前不减字节及恢复条件 | + +## 15. 实施阶段与依赖顺序 + +以下是工程阶段,不是 tasks.md。后续 tasks.md 必须在每个工作包内部继续拆分,但不得改变顺序、依赖和完成条件。 + +### WP-0 基础工程与本机边界 + +- **需求/AC**:NFR-01、NFR-07、NFR-09、PRIV-01/02、第 17.19、18.9/18.10、23.4;AC-24、46、55、56。 +- **输入**:冻结文档、固定技术栈、Gitea、当前 Windows 电脑。 +- **产出**:monorepo、冻结锁文件、版本兼容性预检证据、OpenAPI 基础、SQLite 迁移、LocalDataRoot、storage state、.NET 托盘、API/Worker 生命周期、浏览器 support gate、辅助系统界面状态/诊断契约、日志、隔离 CI、便携 ZIP、`START-HERE.txt` 和 SHA-256。 +- **依赖**:无。 +- **完成条件**:冻结安装、TypeScript、React/Fabric、Fastify、better-sqlite3 native 和便携包预检全部通过;单实例启动/退出、固定端口、回环绑定、浏览器品牌/major/平台硬门禁、无 UA-CH 阻断、API/Worker degraded、脱敏诊断、Gitea 隔离 CI、容量 `>`/`=` 状态和只读资源 ID 骨架通过集成测试。 +- **不能提前宣告**:任一固定依赖未通过预检且未正式修订 DevelopmentPlan,或未完成不可写/full 恢复、日志轮转、无备份/不迁移、局域网拒绝、产品 API 门禁和辅助界面敏感字段扫描时,基础环境不完成;AC-24 最终通过仍须等待 WP-7 写入真实稳定浏览器记录。 + +### WP-1 认证、权限、数据模型与审计基础 + +- **需求/AC**:AUTH-01-07、PRIV-03/04/06、ADMIN-09、第 17.1、17.10、17.11、17.16;AC-01、02、22、33、39、45、49;另向 WP-6 提供 AC-25 的 UserProfile 数据依赖,不取得其主责。 +- **输入**:WP-0;Resend mock;Windows 凭据和离线白名单命令。 +- **产出**:邀请、验证码挑战、普通/管理员分离会话、10 人名额、多 super_admin、安全配置修订/原子生效协议、开发账号脚本、UserProfile 私有内容告知字段/迁移、注销、匿名保留、两类审计基础。 +- **依赖**:WP-0。真实认证验收依赖 Resend 发布门槛。 +- **完成条件**:模拟状态机、原子邀请码核销、30 天撤销、全管理员停用/离线恢复、安全配置成功/失败生效审计、告知版本字段跨重启持久化、凭据缺失/清除/重启和全传递链零泄漏、注销不可恢复和 180 天清理通过。 +- **不能提前宣告**:开发预置账号或模拟邮件不能宣告 Resend、正式注册、管理员认证或 AC-41 完成。 + +### WP-2 项目、点数与 GenerationJob + +- **需求/AC**:CREDIT-01-06、GEN-03-06/11/12/14-16、PROJECT-01-09、第 17.3-5/9/18;AC-03-06、20、21、28、29、34、35、36 P0-A、38 P0-A、43、44、51、53。 +- **输入**:WP-0、WP-1 数据与会话;模拟 Adapter。 +- **产出**:项目/历史、failed_empty、自动保存、冲突、回收站、`project_asset_refs`、点数账户与流水、持久队列、单任务索引、模型运行时可用性消费、文件生命周期和九类错误路径。 +- **依赖**:WP-0、WP-1。真实完成态联调依赖 WP-3。 +- **完成条件**:并发提交、幂等、崩溃恢复、只结算/释放一次、上游不确定成本核对、active/trashed 项目资源引用一致、full 纯 JSON 保存/二进制阻断、同机多标签和本地导出例外均通过 SQLite/API/Worker 测试。 +- **不能提前宣告**:模拟成功不能宣告三模型真实结算或 AC-40 完成。 + +### WP-3 三模型契约验证与适配 + +- **需求/AC**:GEN-01/02/05/07-10/13-16、ADMIN-03、GatewayBalanceState;AC-30、40。 +- **输入**:WP-2 Adapter 接口;平台文档/支持确认;受控凭据与既有额度。 +- **产出**:初始三模型 seed、immutable config set/迁移、唯一优先级与默认替换事务、读取 API 的配置默认/运行时状态/recommended_model_id、三个独立 Adapter、三套脱敏证据、route/error mapping profile、比例/参考图矩阵、同步/异步恢复、余额影响与真实点数结算联调。 +- **依赖**:WP-2;AI 网关外部阻塞解除。 +- **完成条件**:初始化默认/1-2-3 优先级、非法优先级整批拒绝、默认模型合法原子替换、runtime 不回写配置、空推荐、三个模型在最后一次契约配置变化后均 verified,以及 AC-30/40 全矩阵通过。 +- **不能提前宣告**:配置集合能产生零/多个 enabled default、优先级可并列/非正、运行时降级改写配置,或任何一个模型未验证/只验证文字/单比例/无参考图/无错误时,WP-3 和真实结算联调不完成。 + +### WP-4 桌面编辑器与导出 + +- **需求/AC**:EDITOR-01-09、TEXT-01-14、COL-01-05、DYN-01-09、EXPORT-01-06;AC-07、09-12、14、16-19、23 P0-A、27、32。 +- **输入**:WP-2 Project/Canvas API;WP-5 的稳定资源 fixture 可并行替换。 +- **产出**:Fabric 编辑器、底图、选择/变换/撤销、文字/字体、色卡、动态 provider、客户端 JPG/PNG、latest export 和性能 harness。 +- **依赖**:WP-2。最终视觉依赖 WP-5 白名单资源。 +- **完成条件**:50 元素预算、Chrome/Edge 核心白名单一致性、保存失败本地导出和四种比例导出通过。 +- **不能提前宣告**:占位字体、未校验模板、只在一个浏览器通过或后端失败时不能下载,均不完成。 + +### WP-5 素材转换、发布与 P0-A 白名单 + +- **需求/AC**:STATIC-01-04、ADMIN-06/07、PRIV-05、NFR-02/07、第 17.6-8/12-14、第 18 节;AC-13、15 P0-A、31、42、48。 +- **输入**:只读规范归档和交接 manifest;WP-0 资源路由;WP-4 renderer contract。 +- **产出**:1,407 项 StaticStickerCatalog、全部复杂模板注册、P0-A 白名单 release、immutable manifest、哈希、转换产物、后台原图/缩略图关系、显式历史清理 API/队列/审计、三类路由和 150 MB LRU。 +- **依赖**:WP-0;可与 WP-4 前半并行,最终集成依赖 WP-4。 +- **完成条件**:源目录零改写、无全库/等价派生副本、managed/derived 分类和内容去重、原图/缩略图计量、full/unavailable 阻断、清理候选/确认/引用竞争/物理删除/重测、计数/哈希、公开 manifest 隔离、授权撤销立即生效和旧版本项目渲染均通过。 +- **不能提前宣告**:贴纸历史文件仍有发布或 active/trashed 项目引用、只排队未物理删除、容量提前扣减或存在自动清理时不完成;色卡/动态贴纸不能计入 25 part;白名单外 passed 不能逐批向普通用户 enabled;PRIV-05 不得被扩张为 P0-A/P0-B 商业授权台账阻塞。 + +### WP-6 运营后台与内部运营控制 + +- **需求/AC**:ADMIN-01-09、AUTH-07、CREDIT-06、GEN-15、ExternalServiceUsage、GatewayBalanceState;AC-25、47、50、52。 +- **输入**:WP-1/2/3/5 的服务和审计接口;Resend/Amap mock。 +- **产出**:用户、邀请、点数、模型配置/运行时状态、生成、素材/历史清理、预览、服务、存储、指标、审计后台;私有内容告知 ack/区域服务端门禁/逐次访问审计;人工恢复流程。 +- **依赖**:WP-1、WP-2、WP-5;模型页最终状态依赖 WP-3。 +- **完成条件**:告知确认按身份+版本跨标签/重启/重登持久且升版重置;每次私有内容打开仍有独立日志;模型/贴纸清理等全部敏感操作有不可变审计;硬上限不可上调;恢复前置条件强制执行。 +- **不能提前宣告**:以浏览器/session 状态代替告知持久化、确认后省略逐次访问审计、贴纸清理缺少请求/复核/结果日志、后台按钮缺服务端授权/事务,或可回显路径/密钥/正文时不完成。 + +### WP-7 P0-A 验收准备与发布 + +- **需求/AC**:第 22 节全部 P0-A 必验及四个 P0-A 子集、第 23 节;AC-41 主责。 +- **输入**:WP-0 至 WP-6 完成;真实外部依赖;当前稳定版 Chrome/Edge;规范素材根。 +- **产出**:发布 ZIP、SHA-256、带 Windows/Chrome/Edge 支持记录的 RELEASE.json、`START-HERE.txt`、辅助系统界面验收、验收环境、AC 结果、视觉/性能基准、外部门槛记录,以及页面/设置区持续显示的固定文案“测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。” +- **依赖**:所有当前工作包和三个外部阻塞全部解除。 +- **完成条件**:适用 AC 全部通过;真实稳定 Chrome/Edge full version 已验收并固化 major,其他浏览器/错误 major/无法识别/直调 API 无绕过;两个输入文档哈希未变化;`START-HERE.txt` 的未签名、SmartScreen/误报和 SHA-256 核验流程可用;固定数据风险文案持续可见;没有 P0-B 能力混入。 +- **不能提前宣告**:任一模型 unverified、模型配置/运行时状态仍混写、Resend 送达不达标、高德未核验、贴纸清理/告知确认/storage/素材/浏览器或辅助诊断门槛失败时不得开始或完成 P0-A 实际验收。 + +## 16. P0-B 未来开放门槛 + +P0-B 不进入当前工程实现。未来单独立项时,必须重新定版公司系统合并、正式存储、远程部署、域名、HTTPS、数据隔离、桌面继承和手机横竖屏完整编辑,并执行 AC-08、AC-26、AC-37、AC-54 及通用 AC 的 P0-B 子集。 + +扩大普通账号上限、开放全部复杂模板和移动端能力是同一发布门槛的一部分,不得把 P0-B 解释为只扩大人数。白名单外 full_p0 模板可以提前内部导入和 passed,但只有全部剩余复杂模板 passed,且所有 P0-B 门槛同时满足后,才可通过一次事务化发布全部 enabled。P0-A 数据不自动或手动迁移到该未来系统。 + +未来一次性开放前必须同时具备:P0-A 全部适用 AC 通过;332 个文字模板、86 个字体项、1,407 张普通贴纸、16 个色卡和 35 个动态贴纸完成全量验收;AC-26 和 AC-37 通过;白名单外复杂模板全部 passed;普通账号上限配置并验证为 50;公开 manifest 不含 internal_preview_asset;三个模型在最后一次契约配置变化后均 verified;公司系统合并、正式存储、远程部署、域名、HTTPS、数据隔离以及桌面与手机横竖屏能力全部定版并验收。缺少任一条件时仍保持 P0-A 的 10 人上限和普通用户白名单。 + +## 17. 后续文档接口 + +### 17.1 UIDesign.md 输入 + +UIDesign.md 接收页面/入口边界、角色权限、状态枚举、错误 `message_key`、保存/冲突/容量/服务暂停行为、P0-A 设备边界、可访问性要求和资源缓存限制;还必须接收 3.6 的无绕过浏览器阻断页、模型 configured default/runtime availability/recommended 三层显示、私有内容告知版本确认、贴纸历史清理确认/引用冲突/排队/物理结果,以及 3.7 的 Windows 托盘、启动失败、端口占用、API/Worker degraded、诊断入口和脱敏诊断字段。本地测试页或设置区必须持续显示且不得改写固定文案:“测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。”UIDesign.md 决定其布局和可访问呈现,但不能将它降级为仅首次启动、仅发布说明或可关闭后永久消失的提示。其他布局、视觉、图标、焦点顺序和具体中文文案由 UIDesign.md 决定,但不能改变 API 状态机、错误动作、AC、辅助状态允许动作或阶段范围。 + +### 17.2 tdd.md 输入 + +tdd.md 接收 OpenAPI 分组、稳定错误码、SQLite 不变量、事务/幂等规则、ModelConfig 集合/运行时推荐、Adapter 契约矩阵、九类错误、文件一致性、三类资源、贴纸显式清理、私有告知确认、工作包 AC 主责和性能/视觉阈值。它还必须接收凭据缺失/清除/重启与泄漏扫描门槛、UA-CH 硬门禁和真实稳定浏览器要求、辅助系统界面脱敏断言、Service Worker/Cache Storage/IndexedDB 持久存储断言、容量 `>`/`=` 与 full 纯 JSON/二进制拒绝矩阵,以及上游成本核对路径。tdd.md 补充 `RELEASE.json` 对应的具体 Windows build、浏览器 full version、DPR、视口、fixture、逐场景步骤和断言;必须把 `reference_invalid` 与 `safety_rejected` 分开。 + +### 17.3 tasks.md 输入 + +tasks.md 接收 WP-0 至 WP-7 的顺序、依赖、14.6 跨包矩阵、14.7 重点 AC 闭环、组件边界、产出、完成条件和禁止提前宣告事项,再拆为可执行任务。不得创建 P0-B 当前任务,不得重新选择技术栈,也不得把外部阻塞伪装成已完成开发任务。原型或兼容性验证失败时,必须先正式修订 DevelopmentPlan;实现任务不能把固定端口、进程模型、浏览器门禁、模型配置集合、SQLite 保护、容量等号语义、贴纸清理、日志轮转、凭据传递或依赖版本改成可选实现。 + +## 18. 风险与工程控制 + +| 风险 | 控制 | +| --- | --- | +| 网关公开说明与真实图片协议不一致 | 三模型独立证据;未验证即运行时不可用于新任务但不改配置;不从模型名称推断 | +| SQLite API/Worker 并发写 | WAL、busy timeout、BEGIN IMMEDIATE、部分唯一索引、事务重试仅限尚未产生外部副作用的操作 | +| Worker 崩溃造成重复上游调用 | 租约恢复只 poll,不重新 submit;无法查询则失败释放,用户手动重试;上游可能消耗进人工成本核对 | +| 文件与数据库跨事务不一致 | staging、哈希、同卷原子改名、managed_files、outbox 和启动对账 | +| 本机磁盘不足 | 精确 `>` 容量预检、等号提交后 full、storage reservation、full/unavailable 硬停止、物理删除后重测、无自动删除 | +| 默认模型、优先级和运行时状态相互覆盖 | immutable config set 原子切换、数据库集合约束、独立 runtime availability、读取时派生推荐 | +| 贴纸清理与项目/发布并发产生悬空引用 | 候选快照、BEGIN IMMEDIATE 复核、active/trashed/发布引用表、整批拒绝、队列幂等和物理后重测 | +| 私有内容告知被浏览器状态绕过 | UserProfile 身份+版本持久确认、区域服务端门禁、升版失效、每次打开独立访问审计 | +| 不支持浏览器绕过前端检查 | 最小 gate shell、UA-CH 交叉校验、发布 major 记录、全部产品路由前置中间件、426 无绕过 | +| 浏览器私有草稿泄漏 | 私有编辑态仅内存;Cache/IndexedDB 仅公开资源;自动化扫描浏览器存储 | +| 素材复制或源目录污染 | 只读根、manifest allowlist、release job 独立输出、源目录前后哈希/时间检查 | +| 字体与导出漂移 | 固定字体资源、FontFace ready、Canvas Schema、Chrome/Edge视觉阈值和人工复核 | +| 托盘或子进程残留 | 单实例 mutex、命名管道、健康检查、有限重启、15 秒优雅退出 | +| 未签名程序被 Windows 警告或杀软误报 | `START-HERE.txt`、SHA-256、固定 Gitea 构建记录和明确的项目方本机核对流程;不声称已签名,不指导关闭安全防护 | +| P0-A 被误写成远程正式系统 | 固定回环地址、无远程组件、AC-24 网络检查、P0-B 仅保留门槛 | + +## 19. 完成定义 + +DevelopmentPlan 的工程方案落实后,P0-A 只有在以下条件同时满足时可标记完成: + +- WP-0 至 WP-7 全部达到各自完成条件; +- FeatureSummary 十三个模块、PRD 十九个数据契约和九类 GenerationErrorCategory 均有实现与测试落点; +- AC-01-07、09-14、16-22、24-25、27-35、39-53、55-56 通过;AC-15、23、36、38 仅 P0-A 子集通过; +- AC-08、26、37、54 没有被实现结果冒充为当前完成条件; +- AI 网关、Resend、高德和本机发布门槛全部解除; +- 普通账号系统上限为 10,`super_admin` 不占普通账号名额;P0-A 人工验收固定使用 1 个 `super_admin` 和 1 个普通账号,跨普通用户隔离仅通过正常认证链临时创建第二普通账号,验收后注销并按规则清理; +- LocalDataRoot 与素材根严格分离,5 GB/80%/90%、150 MB LRU、三类资源隔离和无私有草稿持久化通过; +- 后台上传普通贴纸原图和缩略图均计入 managed_content_bytes;预计写入后超过上限拒绝、恰好等于上限允许后进入 full;历史文件只经 super_admin 显式确认、无有效引用、不可变审计、物理删除和重测后释放容量; +- 初始三模型默认和 recommendation_priority 为 1/2/3;后台配置始终恰好一个 enabled default,运行时不可用不改写 enabled/is_default/priority,recommended_model_id 只按可用模型派生且允许为空; +- 私有内容告知按 super_admin 身份与当前版本后端持久确认,升版后重确认;任何图片或完整提示词读取仍先写独立 PrivateContentAccessLog; +- 发布包只服务当前 Windows 电脑上 RELEASE.json 记录 major 的 Chrome/Edge;其他品牌、不支持版本或无法识别的浏览器只有无绕过引导,局域网、手机和其他设备无法访问; +- Windows 托盘、启动失败、固定端口占用、API/Worker degraded 和诊断结果具有稳定脱敏界面契约,不能泄露密钥、绝对路径或私有正文; +- 发布产物、日志、数据库配置、manifest 和文档中不存在真实密钥、验证码、会话令牌、管理员邮箱或硬编码用户绝对路径; +- 本地测试页或设置区始终明确显示“测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。”;用户只能主动下载原始生成图和 JPG/PNG 成品。 +- 所有固定技术决策已通过兼容性/原型门槛;任一失败只能先正式修订 DevelopmentPlan,不得由实现人员自由替换。 diff --git a/FeatureSummary.md b/FeatureSummary.md new file mode 100644 index 0000000..4592b23 --- /dev/null +++ b/FeatureSummary.md @@ -0,0 +1,260 @@ +# Dada Feature Summary 1.1 版本 + +## 1. 文档定位 + +| 项目 | 说明 | +| --- | --- | +| 唯一需求来源 | `PRD.md` v1.10,状态为“P0-A 本机测试需求冻结稿” | +| 当前交付 | 仅 P0-A | +| 文档用途 | 为后续 `DevelopmentPlan.md` 提供范围导航、需求索引、状态与契约入口;不替代 PRD,不增加或重新解释需求 | +| 冲突处理 | 本文与 PRD 不一致时以 PRD 为准;产品行为变化必须先升版 PRD | +| 非本文件职责 | 不定义技术选型、数据库/API 结构、UI 细节、测试步骤或任务拆分 | + +P0-A 是只在项目方当前 Windows 电脑运行的单机测试版:本地网页连接本地后端,本地后端只监听 localhost,并把业务数据保存到本机 `LocalDataRoot`。正式支持环境仅为该电脑上的当前稳定版 Chrome 和 Edge;其他浏览器及不受支持的 Chrome/Edge 版本只能进入无绕过入口的“浏览器不受支持”引导页,不能进入任何产品功能。 + +页面或设置区域必须持续显示: + +> 测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。 + +## 2. 产品目标与核心闭环 + +Dada 面向受邀的图片创作者。普通用户通过邀请码和邮箱验证码注册,填写创作署名与社交 ID,使用三个 AI 模型之一生成底图,在电脑画布中添加和编辑文字模板、普通贴纸、色卡及动态贴纸,由本地后端自动保存项目,最后下载 JPG/PNG 成品;用户也可在同一电脑再次打开项目、查看历史并下载原始生成图或已保存的最新成品。 + +核心闭环为: + +`邀请注册或邮箱登录 -> 查看点数与模型限制 -> AI 生图 -> 电脑画布编辑 -> 本地后端自动保存 -> 下载 JPG/PNG -> 同机继续处理或再次下载` + +P0-A 的目标是验证上述完整闭环、三模型契约、点数原子结算、素材还原、本机数据边界、管理员运营和审计能力,不以远程部署或扩大参与人数代替产品验收。 + +## 3. 阶段边界 + +| 范围 | 定位 | 关键边界 | +| --- | --- | --- | +| P0-A,当前交付 | 当前 Windows 电脑上的 localhost 单机测试版 | 本地网页、本地后端、本机磁盘;最多 10 个普通账号;电脑完整编辑;核心复杂模板白名单;全部 1,407 张初始规范普通贴纸;只允许本机当前稳定版 Chrome/Edge 进入产品,其他浏览器和不支持版本硬阻断 | +| P0-B,未来阶段 | 公司系统合并后的完整 P0 | 最多 50 个普通账号;全部规定素材一次性公开;正式存储与远程部署;正式数据隔离;手机完整编辑;必须满足第 10 节全部门槛后另行开放 | +| P1,后续候选 | 不属于 P0-A | 上传本地底图、空白纯色/渐变画布、为既有普通贴纸补标题和关键词后开放搜索、公开注册准备、高德公司主体迁移评估、公开合规与完整条款 | +| 明确不做 | 当前 PRD 已排除 | 付费订阅和在线支付、小红书账号绑定或直接发布、多页图组和批量生成、社区、脱离模板的普通文字、用户上传自定义贴纸、AI 生成贴纸、GIF/视频导出、复制生成、完整封面模板、提示词优化、局部重绘、去背景、专业调色、协作、项目版本历史、分组及图层面板/隐藏/锁定 | + +P0-A 不提供手机、局域网、远程访问或跨设备流程,不使用 COS、公司对象存储、公司服务器、备案域名、HTTPS 站点或其他远程文件存储。P0-A 后端仍需从本机向 AI 网关、Resend 和高德发起必要的外网 HTTPS 请求。 + +## 4. 用户与权限边界 + +| 身份或主体 | 能力边界 | +| --- | --- | +| 访客 | 通过浏览器支持检查后可访问独立注册和登录入口;未登录时只能读取 `public_release_asset` 的公开只读资源,不能访问项目、私有图片、内部预览或后台;未通过检查时只能看到无继续入口的阻断引导页 | +| 普通用户 | 通过有效邀请码和 Resend 邮箱验证码注册,或以已注册邮箱验证码登录;管理自己的资料、点数、项目、生成历史、私有资源和导出;不能访问其他用户内容或后台 | +| 获内部预览授权的普通用户 | 仍是普通用户,只能额外查看 `AssetPreviewGrant` 授权批次中 `internal_preview` 或 `passed` 的复杂模板;不获得后台、调点、模型配置、邀请码或私有内容权限 | +| `super_admin` | P0 唯一后台角色;管理邀请码、账号状态、点数、模型配置、普通贴纸、素材版本、内部预览、生成记录、辅助服务和审计;确认私有内容告知后按规定打开私有内容并产生独立访问审计;可确认并显式清理符合条件的无引用历史上传贴纸文件 | +| 部署人员 | 维护当前阶段后端安全配置;不是 Dada 用户或后台角色,没有产品账号、登录入口、后台会话或产品权限;配置生效由 `system` 审计 | + +P0 允许存在多个权限相同的 `super_admin`,第二个白名单邮箱可创建独立备用管理员。P0-A 人工验收固定使用项目方控制的 1 个 `super_admin` 和 1 个普通账号;跨普通用户隔离由测试程序在同机独立浏览器配置中临时创建第二个普通账号验证并清理。`super_admin` 不占普通账号名额。 + +私有内容区域的全局提示确认按“`super_admin` 身份 + 告知版本”持久记录,不按浏览器、标签页或会话记录;同一身份确认同一版本后不重复显示,告知文案升版后重新提示。该确认不替代逐次审计,每次打开图片或完整提示词仍写入独立 `PrivateContentAccessLog`。 + +账号状态只有 `active`、`suspended`、`deleted`。`active` 和 `suspended` 普通账号占用名额,`deleted` 释放名额;注销后旧数据不可恢复,原邮箱只能用新邀请码创建全新账号。 + +## 5. P0-A 功能摘要与追踪矩阵 + +下表只承担 PRD 与 AC 导航作用。AC 索引已按第 22 节分类表过滤,不把未来 P0-B 场景纳入当前实现。 + +| 模块 | P0-A 摘要 | PRD 索引 | 当前 AC 索引 | +| --- | --- | --- | --- | +| 邀请注册与邮箱登录 | 独立注册/登录入口;邀请码在发码前校验;Resend 验证码;30 天会话;创作署名、社交 ID 和版本化内测告知;管理员邮箱白名单与独立后台认证。开发环境可由初始化脚本预置一个普通测试账号,但正式认证验收必须真实调用 Resend,预置账号不能作为验收证据 | AUTH-01 至 AUTH-07 | AC-01、02、22、33、41、45、47、49 | +| 点数与原子结算 | 新用户默认 10 点;模型默认每次 1 点且可配置;维护 `available_balance` 与 `reserved_balance`;提交时原子冻结,成功只提交一次,失败/拒绝只释放一次;只有带原因和流水的管理员调点可使可用余额为负 | CREDIT-01 至 CREDIT-06 | AC-03 至 05、28、29、40、51、53、55 | +| 三模型 AI 生图 | 支持 `gemini-3.1-flash-image-preview`、`gemini-3-pro-image-preview`、`gpt-image-2`;输入仅含提示词、模型、比例、可选参考图和生成按钮;比例为 3:4、1:1、4:3、9:16;每次一张图。同账号同时只能有一个 `queued` 或 `running` 任务,再次提交返回当前任务,不创建第二个任务或重复冻结点数。后台始终恰好有一个已启用默认模型,停用当前默认模型必须原子指定合法替代默认模型。每个模型具有唯一正整数 `recommendation_priority`;运行时只在当前可用于新任务的模型中按数值由小到大返回推荐模型,无可用模型时返回空推荐,运行时降级不得回写启停、默认或推荐优先级。三个模型必须分别完成契约验证,不能按名称推断相同协议 | GEN-01 至 GEN-16、ADMIN-03 | AC-03 至 06、28、30、34、40、41、44、51、53、55 | +| 项目、历史、保存与冲突 | 新建创作建立项目,项目内继续生成只追加历史;项目比例创建后固定;最多 20 个 active 项目、每项目 10 张成功图。默认名来自提示词摘要和创建日期,用户可重命名并触发自动保存。无成功图的 `failed_empty` 草稿可批量移入回收站,含成功图的项目不得混入该快捷操作。删除后保留 720 小时;P0-A 只处理同机多标签 `state_version` 冲突 | PROJECT-01 至 PROJECT-09、GEN-11、GEN-12 | AC-03 至 07、20、21、34、35、AC-36 的 P0-A 子集、AC-38 的 P0-A 子集、43、44、55、56 | +| 电脑画布与底图编辑 | 任何产品功能前先执行浏览器支持检查;仅本机当前稳定版 Chrome/Edge 可进入完整编辑器,其他浏览器和不支持版本硬阻断且无继续入口。编辑器支持选择、移动、缩放、旋转、翻转、透明度、复制、层级、对齐吸附、循环选择、长按候选、多选和框选;无图层面板。覆盖元素最多 50 个。底图支持裁剪、适配、亮度、对比度、饱和度、色温和固定滤镜;换底图保留覆盖元素并重置底图编辑状态 | EDITOR-01 至 EDITOR-09、GEN-12、NFR-01 | AC-07、14、20、24、27、32、35、AC-36 的 P0-A 子集 | +| 文字模板与字体 | 添加文字必须先选模板;P0-A 仅公开 32 个白名单模板及其实际引用字体,并包含 FONT081。模板按分类和 catalog 稳定顺序展示,支持显示名称搜索和账号级最近使用;切换模板保留文本、换行和变换;支持内容、填充、描边、背景、对齐、行距和字距等冻结能力。普通贴纸关键词搜索仍属于 P1 | TEXT-01 至 TEXT-14 | AC-09 至 12、19、32 | +| 25 个普通贴纸 part | 初始规范素材为 part1 至 part25 的 1,407 张 PNG,色卡和动态贴纸不计入这些 part。支持虚拟列表、懒加载和账号级最近使用。`super_admin` 可上传 PNG/WebP,配置稳定 ID、既有 part、顺序、启停和可选内部名称;上传原图及 Dada 生成的缩略图写入 `LocalDataRoot` 并计入 `managed_content_bytes`,只读规范素材库不计入。`full/unavailable` 阻断上传、缩略图生成和其他受管二进制写入。无引用历史上传文件只能由 `super_admin` 确认并审计后显式清理;下架只阻止新添加,已有项目按保存版本继续渲染 | STATIC-01 至 STATIC-04、ADMIN-06、第 17.7、17.19 节 | AC-13、14、27、31、32、41、46、48、50、55 | +| 色卡与动态贴纸 | P0-A 色卡仅启用 COLOR001、COLOR002、COLOR008、COLOR016;从当前底图未经裁剪、调色和滤镜处理的原始图片中在浏览器本地稳定提取五色,裁剪、调色或滤镜变化不重新提取。动态贴纸仅启用 DYN001-004、007、008、011、012、015、016,编辑时注入时间、地点或身份数据,导出为静态内容。DYN004 在调用定位前先告知原始坐标会保存到项目并显示在成品中,用户确认后才调用定位;DYN012 使用 FONT081 并标明替代字体 | COL-01 至 COL-05、DYN-01 至 DYN-09 | AC-07、AC-15 的 P0-A 子集、AC-16 至 19、32、41、47 | +| 导出 | 客户端按画布真实像素合成 JPG/PNG,无 Dada 水印;未提交文字或样式修改需确认,确认后形成一次撤销记录并导出,取消则不提交也不导出。下载文件与写入 `LocalDataRoot` 的成品必须来自同一次合成;每种格式只保留最新一份。后端持久化失败时仍可下载,但不得更新 `latest_exports` | EXPORT-01 至 EXPORT-06 | AC-23 的 P0-A 子集、24、27、35、AC-38 的 P0-A 子集、55、56 | +| 运营后台 | 邀请码、账号状态、点数、模型默认与推荐配置、普通贴纸及无引用历史文件显式清理、素材版本、内部预览批次与授权、生成记录、辅助服务、操作审计和私有内容访问;私有内容列表默认隐藏正文,区域提示按管理员身份与告知版本持久确认,文案升版后重新提示,每次打开仍记录独立审计。P0 只有一种后台角色,但可有多个管理员账号 | AUTH-07、CREDIT-06、ADMIN-01 至 ADMIN-09 | AC-25、29 至 31、41、42、45、47、49 至 52、55 | +| 素材发布与内部预览 | 复杂模板按稳定 ID、版本和发布状态注册;P0-A 普通用户只见已通过且已启用的白名单。授权测试账号可见授权批次中的 `internal_preview` 或 `passed`;剩余 `full_p0` 模板可分批验收,但不能逐批向普通用户公开。公开、内部预览、用户私有三类资源严格隔离 | STATIC-04、ADMIN-06、ADMIN-07、NFR-07、第 17.6、17.11 至 17.14 节、第 18 节 | AC-31、32、41、42、46、48 | +| 本机数据与资源访问 | `LocalDataRoot` 与只读素材根目录分离;业务数据、后台上传普通贴纸原图和缩略图由本地后端写入本机磁盘,后两类计入 `managed_content_bytes`,只读规范素材库不计入。浏览器只用资源 ID 访问,不得取得目录绝对路径。`LocalBackendStorageState` 执行 5 GB 内容上限及 80%/90% 预警;`full/unavailable` 阻断新增受管二进制写入,历史上传贴纸文件不得自动清理,物理清理并重新计量后才更新容量状态。数据不自动备份、不迁移、不提供可编辑项目归档 | PROJECT-04 至 PROJECT-09、STATIC-04、ADMIN-06、NFR-07、NFR-09、第 17.19、18.9、18.10、23.4 节 | AC-20、24、31、35、AC-36 的 P0-A 子集、41、46、48、50、55、56 | +| 隐私、审计与免费服务边界 | API 密钥只在本地后端安全配置;用户内容私有;私有内容区域提示按 `super_admin` 身份与告知版本持久确认,告知升版后重新提示且每次打开继续写访问审计;注销立即删除业务内容,匿名事件和审计最多保留 180 天;Resend 与高德达到应用硬上限或供应商不可用时硬停止,不启用付费备用、自动购买或自动扩容;AI 网关不开自动充值 | PRIV-01 至 PRIV-06、NFR-05、NFR-08、ADMIN-05、ADMIN-08、ADMIN-09、第 23.1 至 23.5 节 | AC-22、25、39 至 41、47、49 至 53、56 | + +v1.10 重点变更的 AC 导航为:AC-24(不支持浏览器硬阻断)、AC-25(私有内容告知持久化与逐次审计)、AC-30(默认模型原子替换与运行时推荐)、AC-31(贴纸容量、写入阻断与显式清理)、AC-50(贴纸清理审计)、AC-51(运行时不可用不回写模型配置)和 AC-55(本机容量计量与恢复)。 + +### 5.1 P0-A 复杂素材白名单 + +| 类型 | 当前普通用户可见范围 | +| --- | --- | +| 文字模板 | FLOWER001-008、H001-008、TAG001-007、TAG051、SIMPLE001-008,共 32 个 | +| 字体 | P0-A 仅显示白名单模板实际引用的字体面板项,并强制包含 FONT081;不显示白名单之外的其他字体项 | +| 色卡 | COLOR001、COLOR002、COLOR008、COLOR016,共 4 个 | +| 动态贴纸 | DYN001、DYN002、DYN003、DYN004、DYN007、DYN008、DYN011、DYN012、DYN015、DYN016,共 10 个 | +| 普通贴纸 | part1 至 part25 的 1,407 张初始规范 PNG 全量可见;P0-A 不支持普通贴纸关键词搜索,该能力属于 P1 | + +白名单外复杂模板必须先注册,但对未授权普通用户不可发现;获授权内部测试账号仍可查看其授权批次中的 `internal_preview` 或 `passed` 模板。`full_p0` 模板可以分批进入 `passed`,只能在 P0-B 全部门槛满足后一次性改为 `enabled`。 + +## 6. 关键状态与规则 + +| 对象 | 状态与导航规则 | +| --- | --- | +| 浏览器支持检查 | 本机当前稳定版 Chrome/Edge 通过检查后才可进入产品;其他浏览器或不受支持版本只进入“浏览器不受支持”引导页,不提供继续或绕过入口 | +| 账号 | `active`、`suspended`、`deleted`;暂停账号不能注册或登录,注销立即失效且旧数据不可恢复 | +| `UserProfile` 私有内容告知确认 | 确认按 `super_admin` 身份与告知版本持久记录;同一版本不因新标签页、重启或重新登录重复提示,告知升版后重新提示;每次打开私有内容仍独立写入 `PrivateContentAccessLog` | +| `ModelConfig` 默认与推荐 | 所有配置中始终恰好有一个已启用默认模型;停用当前默认模型与指定合法替代模型必须原子成功或整体失败。`recommendation_priority` 为不并列的唯一正整数,1 最高;缺失、非正整数或重复时整次配置保存失败且不部分写入。运行时推荐只从当前可用于新任务的模型派生,无可用模型时为空,不形成第二个默认状态或回写配置 | +| `GenerationJob` | `queued`、`running`、`succeeded`、`failed`、`rejected`;同账号已有 `queued` 或 `running` 时不创建第二个任务;成功只提交一次冻结点,失败或拒绝只释放一次 | +| `Project` | `active`、`trashed`、`purged`;只有 active 计入 20 个上限,trashed 在 `deleted_at + 720 小时` 前可在名额允许时恢复,purged 用户侧不可恢复 | +| `save_status` | `saved`、`dirty`、`saving`、`failed`、`conflicted`;刷新、关闭或崩溃后只恢复最后一次本地后端 `saved` 状态,浏览器不保存可恢复的私有草稿 | +| `TemplateRegistry.release_status` | `imported`、`internal_preview`、`passed`、`enabled`、`disabled`;授权测试账号可见授权批次中的 `internal_preview` 或 `passed`,`full_p0` 不得据此逐批公开 | +| `ExternalServiceUsage.service_status` | `active`、`paused_quota`、`paused_provider`、`disabled`;发布前送达测试失败只阻止发布,不创建运行时质量状态。只有免费周期或供应商可用条件重新满足后,`super_admin` 才能恢复暂停服务并留下后台审计 | +| `GatewayBalanceState` | 余额为可用、不足或无法可靠确认;影响范围为模型、账户或未知。模型级只把对应模型标记为运行时不可用,账户级或未知处理共享结算账户的全部模型;不得改写 `ModelConfig.enabled`、`is_default` 或 `recommendation_priority`,确认真实余额恢复后才可由 `super_admin` 恢复运行时可用状态并审计 | +| `LocalBackendStorageState` | `capacity_notice_level` 为 `normal`、`warning`、`critical`;`storage_status` 为 `active`、`full`、`unavailable`。受管内容包含后台上传普通贴纸原图和缩略图,不含只读规范素材;`full/unavailable` 阻断上传和缩略图生成,清理后的容量状态只在物理清理和重新计量后更新,详见第 8 节 | +| 历史上传贴纸清理 | 只允许 `super_admin` 确认并显式清理不再被任何已发布版本或项目引用的原图/缩略图;仍有引用时拒绝整个操作,清理请求、校验和结果均审计,物理清理与重新计量前不更新容量状态 | + +### 6.1 九类生成错误 + +| 分类 | 用户动作 | 任务与点数 | +| --- | --- | --- | +| `upstream_timeout` | 使用原输入重试 | `failed`,释放冻结点 | +| `upstream_failed` | 稍后重试 | `failed`,释放冻结点 | +| `safety_rejected` | 修改提示词或参考图 | `rejected`,释放冻结点 | +| `model_disabled` | 选择其他模型或等待 | 不创建任务、不冻结点 | +| `gateway_balance_insufficient` | 选择未受影响模型或联系管理员 | 未创建则不冻结;已创建则 `failed` 并释放 | +| `gateway_contract_invalid` | 选择其他模型或联系管理员 | 未创建则不冻结;已创建则 `failed` 并释放 | +| `reference_invalid` | 更换或移除参考图 | 未创建则不冻结;已创建则 `failed` 并释放 | +| `unknown_retryable` | 稍后重试 | `failed`,释放冻结点 | +| `unknown_non_retryable` | 联系管理员 | `failed`,释放冻结点 | + +`reference_invalid` 沿用 PRD 的“参考图格式、大小、数量或内容无效”边界;供应商安全策略拒绝提示词或参考图时使用 `safety_rejected`。三个模型共用固定分类。P0 使用统一 `config_version`,错误映射变化递增该版本,不拆分错误映射版本;后台不能新增、重命名或删除分类。 + +## 7. 十九个产品数据契约导航 + +本节只说明用途,不复制或重新设计字段。 + +| 契约 | 用途 | +| --- | --- | +| `UserProfile` | 账号身份、资料、角色、状态、注册告知同意、`super_admin` 最近确认的私有内容告知版本与时间,以及注销时间的产品记录 | +| `ModelConfig` | 每模型启停、唯一已启用默认模型、唯一正整数推荐优先级、点数、输入限制、网关路由、契约验证和统一版本复核 | +| `Project` | 项目比例、底图、生成历史、画布、最新成品、版本和保存状态;同时表达 `draft_state`、`batch_deletable`、回收站时间及清理边界 | +| `GenerationJob` | 每次生成的配置快照、任务状态、参考图关系、点数和错误分类 | +| `CanvasElement` | 文字、普通贴纸、色卡和动态贴纸的通用画布状态与类型专用数据 | +| `TemplateRegistry` | 复杂模板稳定 ID、资源版本、验证、批次、发布层级和可见状态 | +| `StaticStickerCatalog` | 普通贴纸稳定 ID、既有 part、顺序、资源引用、版本、启停状态与 `bundled_read_only/admin_uploaded` 来源分类;后台上传文件受容量计量和无引用显式清理规则约束 | +| `DynamicStickerData` | 动态贴纸类型、原始/格式化值、覆盖值及 DYN004 授权坐标 | +| `CreditAccount` 与 `CreditLedger` | 可用/冻结余额,以及初始化、管理员调点、冻结、提交和释放的不可变流水 | +| `PrivateContentAccessLog` | `super_admin` 每次打开私有图片或完整提示词时产生的独立 180 天审计,不因全局提示已确认而省略 | +| `AnonymousRetainedEvent` | 注销后保留的不可回溯随机主体事件和有限统计字段 | +| `AssetReleaseManifest` | 版本化素材清单、哈希、资源类别与 P0-A `local_filesystem` 发布引用 | +| `AssetPreviewGrant` | 普通测试账号对指定内部模板批次的限时授权与撤销 | +| `ClientCachePolicy` | 公开素材主动缓存 150 MB 上限、LRU 和私有内容禁存规则 | +| `ExternalServiceUsage` | Resend/高德的周期用量、硬上限、暂停原因和恢复状态 | +| `AdminOperationLog` | 除私有内容查看外的后台敏感操作、普通贴纸历史文件清理请求/引用校验/结果,以及系统配置生效审计 | +| `GatewayBalanceState` | 网关余额、影响范围、运行时不可用模型和人工确认恢复;不改写模型启停、默认或推荐优先级 | +| `GenerationErrorCategory` | 三模型共享的固定错误、用户动作、重试和点数口径 | +| `LocalBackendStorageState` | P0-A 本机受管内容容量、80%/90% 提醒、5 GB 硬上限、可用状态和重计量时间;计入后台上传贴纸原图/缩略图,不计只读规范素材,清理完成后才更新状态 | + +## 8. 本机数据与资源访问边界 + +### 8.1 `LocalDataRoot` + +- `LocalDataRoot` 默认位于当前 Windows 用户的应用数据目录,由本地后端解析;必须可配置,且不得位于 Git 仓库、项目目录、用户主动下载目录或只读素材根目录。 +- 本机数据库、账号、项目、参考图、生成图、导出成品、审计日志、派生文件,以及后台上传的普通贴纸原图和 Dada 生成的缩略图写入 `LocalDataRoot`。浏览器只通过资源 ID 和本地后端鉴权接口访问私有文件。 +- 浏览器不得通过 `file://`、本机绝对路径或 File System Access API 读取 `LocalDataRoot` 或素材根目录;用户主动用标准文件选择器选择参考图不受此限制。 +- 未保存画布、提示词、私有图片引用和编辑内容只存在当前页面内存,不写入 `localStorage`、`IndexedDB` 或 Cache Storage。强制刷新、关闭或崩溃后只恢复最后一次本地后端 `saved` 状态。 +- P0-A 不创建自动备份,不提供可编辑项目包、数据库、账号、点数、审计日志或素材关系的导出/导入,也不把本机业务数据迁移到 P0-B。用户只能主动下载原始生成图和 JPG/PNG 成品。 +- P0-A 不对本机文件实施 Dada 应用层加密,依赖当前 Windows 用户登录和文件系统权限;机器损坏、重装或删除 `LocalDataRoot` 后不可由 Dada 恢复。 + +### 8.2 容量与可用性 + +`hard_limit_bytes` 固定为 5,368,709,120 字节,对用户显示 5 GB。`managed_content_bytes` 统计参考图、生成图、导出成品、派生二进制文件,以及 `super_admin` 后台上传的普通贴纸原图和 Dada 生成的缩略图;不统计产品随安装包提供或通过本机安全配置原地引用的只读规范素材库、应用代码、150 MB 浏览器公开素材缓存、数据库元数据、审计记录或用户下载目录。 + +| 条件 | 状态与行为 | +| --- | --- | +| 低于 80% 且目录可写 | `normal` / `active`,正常写入 | +| 达到 80% 且低于 90% | `warning`,非阻断提醒;继续允许生图、保存、后台贴纸原图上传和缩略图生成,不自动删除 | +| 达到 90% 且低于 5 GB | `critical`,持续清理提醒;仍允许生图、保存、后台贴纸原图上传和缩略图生成,不自动删除 | +| 已达到或本次写入预计超过 5 GB | `full`;不创建新任务、不调用 AI、不冻结点数,不持久化新参考图、`latest_exports`、后台贴纸原图、缩略图或其他受管二进制内容;仍可编辑已有项目、读取和下载已有内容、只下载客户端导出、永久删除项目及显式清理符合条件的无引用历史贴纸文件 | +| `LocalDataRoot` 不可写或系统磁盘已满 | `unavailable`;停止新增写入、后台贴纸上传、缩略图生成和 AI 调用,保留已有项目及素材的查看、下载和删除入口 | + +`warning` 和 `critical` 的清理引导顺序固定为:下载需保留的成品、永久删除不需要的项目或由 `super_admin` 显式清理符合条件的无引用历史贴纸文件、等待物理清理和重新测量、恢复后继续生成。历史上传原图和缩略图不得自动清理;只有不再被任何已发布版本或项目引用时,才能由 `super_admin` 确认后显式清理,清理请求、引用校验与结果必须写入不可修改的 `AdminOperationLog`,仍有引用时拒绝整个操作。只有物理清理完成并重新计量后,才能更新 `managed_content_bytes`、`capacity_notice_level`、`storage_status` 和 `last_measured_at`;容量低于硬上限且目录可写时才能恢复 `active`。 + +### 8.3 素材原地只读复用 + +P0-A 通过本地后端安全配置解析以下 `%USERPROFILE%` 路径。解析后的绝对路径不得进入 Git、普通项目数据或浏览器响应。 + +| 素材 | 只读入口 | +| --- | --- | +| 总交接 | `%USERPROFILE%\Desktop\sticker_web_handoff\STICKER_WEB_REPLICATION_HANDOFF.md` | +| 机器总 manifest | `%USERPROFILE%\Desktop\sticker_web_handoff\sticker_web_catalog_manifest.json` | +| 完整性报告 | `%USERPROFILE%\Desktop\sticker_web_handoff\sticker_archive_validation_20260722.json`,当前 `all_valid=true` | +| 文字模板 | `%USERPROFILE%\Desktop\sticker_text\模板\单模板归档`;分类 `catalog.csv` 与 `templates//metadata.json` | +| 字体 | `%USERPROFILE%\Desktop\sticker_text\字体\面板全量采集\font_panel_full_20260722`;`reports/font_panel_catalog.csv` 与单字体 `metadata.json` | +| 文字行为资料 | `%USERPROFILE%\Desktop\sticker_text\键盘`、`%USERPROFILE%\Desktop\sticker_text\样式` | +| 普通贴纸 | `%USERPROFILE%\Desktop\贴纸素材`;`sticker_part1` 至 `sticker_part25`,共 1,407 张 PNG | +| 色卡 | `%USERPROFILE%\Desktop\sticker_colour\单模板归档`;`catalog.csv` 与 `styles//metadata.json` | +| 动态贴纸 | `%USERPROFILE%\Desktop\sticker_interactive\单模板归档`;`catalog.csv` 与 `templates//metadata.json` | + +约 3.57 GB 规范素材在原目录只读复用,不复制全库、不提交 Git、不放入 `LocalDataRoot`,也不计入 `managed_content_bytes`。后台上传的普通贴纸原图和缩略图写入 `LocalDataRoot` 并计入容量,不得写回只读素材根目录。Git 只保存版本化 manifest、catalog、metadata、版本号和哈希。普通贴纸当前缺少统一 catalog,开发准备需生成 `StaticStickerCatalog`,但不得改写源素材。目录移动、改名、不可读或校验失败时,只暂停依赖功能并提示重新配置,不修改代码或自动复制素材。 + +## 9. P0-A 验收分类与发布准备 + +### 9.1 第 22 节 AC 分类 + +| 分类 | AC 范围 | `DevelopmentPlan.md` 处理规则 | +| --- | --- | --- | +| P0-A 必验 | AC-01 至 AC-07、AC-09 至 AC-14、AC-16 至 AC-22、AC-24 至 AC-25、AC-27 至 AC-35、AC-39 至 AC-53、AC-55 至 AC-56 | 必须拆入当前开发与验收任务 | +| 通用规则,当前只验 P0-A 子集 | AC-15、AC-23、AC-36、AC-38 | 只拆入下表列出的本机操作和预期 | +| P0-B 门槛与未来验收 | AC-08、AC-26、AC-37、AC-54 | 不属于当前交付,不得拆入当前迭代或阻止 P0-A 完成 | + +AC-15、AC-23、AC-36、AC-38 的完整规则仍保留在 PRD;本节只筛选当前 P0-A 验收子集,并未删除其余规则。 + +四个通用 AC 的当前子集为: + +| AC | P0-A 当前子集 | +| --- | --- | +| AC-15 | 仅验 COLOR001、COLOR002、COLOR008、COLOR016 四种色卡及其共同提色、换底图更新和原始底图边界 | +| AC-23 | 在四种比例导出 JPG/PNG,验证像素、画布一致性、未提交修改确认、每格式最新一份和同一电脑再次下载 | +| AC-36 | 仅验同一台 Windows 电脑两个标签页的 `state_version` 冲突、旧页只读、一次本地导出和刷新本地后端最新版本 | +| AC-38 | 仅验本机“暂无导出成品”空状态、进入编辑并导出、下载原始生成图,以及不自动创建默认成品 | + +### 9.2 P0-A 启动门槛 + +AC-41 必须在实际验收开始前通过,重点包括: + +- 本地网页和本地后端可启动,后端只监听 localhost,局域网地址和其他设备不能访问。 +- 第 18 节素材根目录可读,manifest 与素材文件校验通过,且未复制第二套约 3.57 GB 全量素材。 +- `LocalDataRoot` 独立、可写、未硬编码用户名;80%/90% 预警和 5 GB 限制可用。 +- 正式验收账号真实调用 Resend;发信域名验证完成,QQ、163、企业邮箱各 20 封至少 19 封在 2 分钟内送达;应用硬上限为每天 80 封、每月 2,400 封,不配置付费备用通道。 +- 高德个人 Web 服务 Key 的接口、绑定、安全限制和每月 1,000 次应用硬上限实测通过。 +- AI 网关不开自动充值,三个模型的 AC-40 完整契约矩阵通过,模型级/账户级/未知影响范围的余额停用与恢复规则可用。 +- 版本化内测告知、本机数据风险提示、150 MB 公开素材缓存上限和私有状态禁存通过。 +- AI 网关、Resend、高德所需外网 HTTPS 调用可用,任何 API 密钥均未进入 PRD、Git、前端、manifest 或本机数据日志。 + +任一启动门槛失败时不得开始 P0-A 实际验收。开发初始化账号只用于并行开发,不能替代 AUTH-01、AUTH-02、AUTH-07、AC-01、AC-33、AC-41 或 AC-49。 + +## 10. P0-B 未来开放门槛 + +P0-B 仅作为未来阶段的不可弱化门槛记录,不是当前功能或当前完成条件。未经未来单独立项,不得纳入当前开发任务。向普通用户开放前必须同时满足: + +- P0-A 验收已通过。 +- 全量 332 个文字模板、86 个字体面板项、1,407 张初始规范普通贴纸、16 个色卡和 35 个动态贴纸完成规定验收。 +- AC-26 全量跨平台视觉回归和 AC-37 手机横竖屏完整编辑通过。 +- 所有白名单外复杂模板均为 `passed`,随后一次性切换为 `enabled`,不得逐批向普通用户开放。 +- 普通账号阶段上限切换并验证为 50;公开 manifest 始终不含 `internal_preview_asset`。 +- 三个模型在最后一次契约相关配置变化后均为 `verified`。 +- 公司系统合并、正式存储后端、远程服务器、域名、HTTPS、正式数据隔离和移动端访问方案均已定版并验收。 +- P0-A 本机账号、项目、点数、审计日志和素材关系不自动或手动导入 P0-B;用户下载的图片不是迁移包。 + +不能通过只扩大人数、只开放部分模板或只完成手机编辑来宣称进入 P0-B。AC-08、AC-26、AC-37、AC-54 及 AC-15/23/36/38 中的 P0-B 子集须在未来单独立项。 + +## 11. 后续 DevelopmentPlan 输入约束 + +以下条目仅作为 `DevelopmentPlan.md` 必须处理的约束索引。它们不代表实现顺序、技术选型或任务拆分;`DevelopmentPlan.md` 必须在完整阅读 PRD v1.10 和本文件后编写,并至少处理以下工程主题: + +1. localhost 单机部署边界、启动方式、本地后端回环监听、进程与故障恢复,不引入 P0-B 基础设施。 +2. 邀请码、Resend 验证码、30 天会话、管理员白名单、多 `super_admin`、开发初始化账号隔离和正式验收切换。 +3. 点数事务、任务幂等、`queued/running` 单任务约束、提交时 `ModelConfig` 复核、默认模型原子替换、`recommendation_priority` 与运行时推荐、结算与失败释放。 +4. 三模型独立适配器、脱敏契约证据、同步/异步差异、参考图生命周期、统一 `config_version` 和九类错误映射。 +5. 项目/历史/失败草稿、自动保存、同机多标签冲突、撤销重做、回收站 720 小时与资源异步清理。 +6. Chrome/Edge 支持版本硬检查与无绕过阻断、画布渲染、字体加载、导出一致性、50 元素性能预算及固定浏览器版本、Windows 版本、DPR、视口和动画基准;具体环境在后续 `tdd.md` 记录。 +7. 只读素材根目录发现、manifest/catalog/metadata 校验、`StaticStickerCatalog` 生成、`asset_origin`、后台上传贴纸原图/缩略图、无引用显式清理、资源版本化、三类访问隔离和浏览器资源 ID 接口。 +8. `LocalDataRoot` 布局、`LocalBackendStorageState` 计量与写入前预判、后台贴纸容量归属、80%/90% 提示、5 GB 硬停止、`full/unavailable` 上传与缩略图阻断、物理清理后重新计量、数据库/日志目录不可写、日志轮转和 180 天清理。 +9. JPG/PNG 单次合成、下载与本地后端持久化一致性、失败降级及“只下载图片、无项目归档/迁移”的产品边界。 +10. Resend、高德和 AI 网关的免费或余额硬停止、运行时不可用不回写模型默认/推荐配置、无自动费用、管理员确认恢复及审计。 +11. 私有资源鉴权、按 `super_admin` 身份与告知版本持久确认私有内容提示、逐次访问审计、注销删除、匿名保留、密钥隔离和本机数据风险告知。 +12. 严格按第 22 节 AC 分类进行任务拆分和测试分层;当前只实现 P0-A 必验项及 AC-15/23/36/38 的 P0-A 子集。 + +素材授权台账在正式公开或商业化前补齐,不改变当前 P0-A 或未来 P0-B 的既定阻塞规则。后续文档不得把 P0-B 门槛弱化为分批开放,也不得把未来能力写入当前 P0-A 实现。 diff --git a/PRD.md b/PRD.md new file mode 100644 index 0000000..b52bdb6 --- /dev/null +++ b/PRD.md @@ -0,0 +1,3008 @@ +# Dada 产品需求文档 + +| 项目 | 内容 | +| --- | --- | +| 产品代号 | Dada | +| 文档类型 | 产品需求文档(PRD) | +| 文档版本 | 1.10 | +| 文档状态 | P0-A 本机测试需求冻结稿 | +| 更新日期 | 2026-07-24 | +| 首发形态 | P0-A 仅在项目方当前 Windows 电脑上以 localhost 单机运行并验收;P0-B 为与公司系统合并后的远程受控内测 | +| 当前交付范围 | 仅 P0-A;P0-B 只保留未来开放门槛和不可弱化约束,不属于当前开发交付 | +| 首发语言 | 简体中文 | + +## 1. 文档定位 + +本文件定义 Dada 第一阶段产品的目标、范围、用户流程、功能要求、业务规则、产品数据契约、异常状态和验收标准。 + +本文件不包含: + +- 技术架构、框架、数据库和部署方案; +- UI 配色、视觉规范和页面高保真设计; +- TDD、详细测试用例、开发排期和任务拆分; +- 任何 API 密钥、访问令牌或其他凭据。 + +后续文档分别为 FeatureSummary.md、DevelopmentPlan、UIDesign.md、tdd.md 和 tasks.md。若后续文档与本 PRD 冲突,以本 PRD 的产品范围和业务规则为准,除非本 PRD 正式升版。 + +后续文档不得把 P0-A 描述为云端保存、对象存储、跨设备继续处理、手机访问或任一设备再次下载。P0-A 统一使用“本地后端保存”“同机访问”和“同机再次下载”等阶段准确措辞。FeatureSummary.md 与 DevelopmentPlan.md 必须声明其输入 PRD 版本;PRD 升版后,两份下游文档在重新同步并冻结前不得作为开发或设计基准。 + +## 2. 产品概述 + +### 2.1 产品目标 + +Dada 是一个面向小红书内容创作者的图片创作工具。P0-A 以本机网页、本地后端和本机磁盘组成的单机测试版运行;用户可以先通过 AI 生成一张图片,再在同一项目中添加、编辑文字模板与贴纸,最终导出符合常用小红书图片比例的高清 JPG 或 PNG。P0-B 才进入与公司系统合并后的远程部署阶段。 + +P0 必须跑通以下闭环: + +1. 用户通过邀请码和邮箱验证码注册; +2. 用户选择模型、输入提示词,并可按模型能力添加参考图; +3. 系统生成一张图片并保存到项目历史; +4. 用户在当前阶段支持的网页编辑器中调整底图,添加文字和贴纸; +5. 项目自动保存; +6. 用户导出无水印高清 JPG 或 PNG; +7. 用户可在当前阶段支持的环境继续处理项目或重新下载成品。 + +### 2.2 核心用户 + +核心用户为需要快速制作小红书封面或笔记配图的个人内容创作者。 + +典型需求: + +- 不依赖专业设计软件完成一张可发布图片; +- 在多个图片模型之间选择; +- 使用接近小红书操作逻辑的文字模板、字体和贴纸; +- 保留可编辑项目并再次下载成品。 + +### 2.3 核心价值 + +- 将 AI 生图和社交图片编辑合并为连续工作流; +- 提供已归档的文字、字体、普通贴纸、色卡和动态贴纸; +- 保留图层级可编辑状态,而不是只保存合成图; +- 使用额度、并发和项目数量限制控制内测成本。 + +### 2.4 成功标准 + +P0 的首要成功标准是完整任务成功率,即测试用户可以在不依赖人工代操作的情况下完成注册、生成、编辑、保存和导出。 + +P0 分为两个发布门槛: + +- P0-A 本机测试:仅在项目方当前 Windows 电脑运行,由项目方控制的 1 个超级管理员账号和 1 个普通账号完成人工验收,普通账号系统上限为 10,只向普通用户展示已经通过首轮验收的复杂模板白名单;跨普通用户隔离由测试程序临时创建第二个普通账号验证,不要求朋友或第二个真实用户参与; +- P0-B 公司合并后阶段:最多 50 个普通账号,全部 332 个文字模板、86 个字体面板项、1,407 张普通贴纸、16 个色卡和 35 个动态贴纸均通过全量验收,并完成正式存储、远程部署、数据隔离与移动端能力验收。 + +P0 不设“必须在几分钟内完成”的产品目标,也不承诺公开服务 SLA。核心白名单门槛和完整 P0 门槛分别以本文件对应场景全部通过为准。 + +## 3. 发布阶段与优先级 + +### 3.1 P0-A:本机核心白名单测试 + +P0-A 只在项目方当前 Windows 电脑运行本地网页、本地后端和本机磁盘存储。本地后端只监听 localhost 回环地址,不监听局域网网卡地址;不支持手机、局域网、远程访问或朋友远程注册,也不使用 COS、公司对象存储、公司服务器、备案域名或 HTTPS。P0-A 由项目方控制的 1 个超级管理员账号和 1 个普通账号完成人工验收,不要求朋友参与,也不要求招满 10 人。系统最多开放 10 个普通账号;超级管理员不占普通账号名额。跨普通用户的数据隔离和资源越权由测试程序在同一电脑的隔离浏览器配置中临时创建第二个普通账号完成,测试结束后清理该账号。P0-A 必须跑通完整产品闭环,但只向普通用户展示以下已经验收的复杂模板: + +- 文字模板:FLOWER001 至 FLOWER008、H001 至 H008、TAG001 至 TAG007、TAG051、SIMPLE001 至 SIMPLE008,共 32 个; +- 字体:上述白名单模板实际引用的全部字体面板项,并强制包含 FONT081; +- 色卡:COLOR001、COLOR002、COLOR008、COLOR016; +- 动态贴纸:DYN001、DYN002、DYN003、DYN004、DYN007、DYN008、DYN011、DYN012、DYN015、DYN016; +- 普通贴纸:part1 至 part25 的全部 1,407 张 PNG。 + +白名单外复杂模板必须完成导入和注册,但默认停用且不向普通用户展示。只有超级管理员明确指定的普通测试账号可以查看被授权的内部测试批次;该授权不授予后台、调点、私有内容查看或其他管理员权限。 + +白名单覆盖矩阵如下。一个模板可以同时覆盖多个机制,正式验收以对应资源和快照为准: + +| 白名单范围 | 主要覆盖理由 | +| --- | --- | +| FLOWER001 至 FLOWER008 | 花字资源结构、材质与装饰资源、缺失预览,以及 FLOWER007 的合法 parameter_only 类型 | +| H001 至 H008 | 多行默认文本、多字体、双 Prefab、多贴图与大资源包;其中 H005 覆盖默认换行,H006 覆盖四字体与双 Prefab | +| TAG001 至 TAG007、TAG051 | 标签结构、材质与贴图,以及 TAG051 的 mapped_zip_deduplicated 去重映射 | +| SIMPLE001 至 SIMPLE008 | 简约模板、双 Prefab、多材质、缺失预览与大资源包 | + +P0-A 同时包含: + +- 分开的邀请码注册和邮箱验证码登录入口、30 天登录状态; +- 创作署名与社交 ID; +- 初始点数、生成扣点和超级管理员调点; +- 三个指定图片模型; +- 文字加参考图的单图生成; +- 单张画布、项目历史和本地后端自动保存; +- Windows Chrome 和 Edge 中的完整编辑器; +- 高清 JPG/PNG 导出; +- 基础运营后台和私有内容访问审计。 + +P0-A 本地测试页或设置区域必须明确显示:“测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。” + +### 3.2 P0-B:公司系统合并后的完整 P0 + +P0-B 是公司系统合并后的未来阶段。本版仅定义其对普通用户开放前必须满足的门槛和不可弱化产品约束;P0-B 的功能实现、排期和验收不属于当前 P0-A 必交付范围,也不得阻止 P0-A 完成。未经未来单独立项,不得因为本节保留手机完整编辑、远程部署或正式存储要求,就把这些能力纳入当前开发任务。 + +完整 P0 最多开放 50 个普通账号。除 P0-A 的全部能力外,必须完成: + +- 全部 332 个文字模板与 86 个字体面板项的真实资源渲染; +- 全部 16 个色卡和 35 个动态贴纸的参数渲染; +- 全量视觉回归、人工复核和支持浏览器验收; +- 与公司系统完成合并,并定版正式存储后端、远程服务器、域名、HTTPS、数据隔离和移动端访问; +- 手机竖屏和横屏完整编辑器; +- 白名单外复杂模板允许在后台和内部测试账号中分批验收、分批标记通过,但所有剩余复杂模板全部通过后才一次性向普通用户启用,不逐批公开。 + +P0-B 的以下条件是未来对普通用户开放门槛。未来单独立项后可以提前进行内部开发、导入、预览和验收;在当前 P0-A 交付中不要求提前实施。扩大普通账号上限并向普通用户开放全部复杂模板前,必须同时满足: + +- P0-A 全部适用验收场景已经通过; +- 332 个文字模板、86 个字体面板项、1,407 张普通贴纸、16 个色卡和 35 个动态贴纸完成全量验收; +- AC-26 全量模板视觉回归和 AC-37 手机横竖屏完整编辑通过; +- 白名单外复杂模板全部为 passed,正式开放操作将这些模板一次性切换为 enabled,不逐批公开; +- 普通账号阶段上限已经配置并验证为 50; +- 浏览器公开 manifest 不包含 internal_preview_asset; +- 三个模型在最后一次契约相关配置变化后,contract_validation_status 均为 verified。 +- 公司系统合并方案、正式存储后端、远程服务器、域名、HTTPS、正式数据隔离和移动端访问均已定版并通过验收;P0-A 本机测试数据不迁移。 + +任一条件不满足时系统继续保持 P0-A 的普通用户可见范围和 10 个普通账号上限,不能只扩大人数或只开放部分模板来宣称进入 P0-B。 + +### 3.3 P1:内测后的明确增强 + +P1 包含: + +- 上传本地图片作为编辑底图; +- 新建纯色或渐变空白画布; +- 为普通静态贴纸补充标题和关键词后开放搜索; +- 移除邀请码前的公开注册准备; +- 从个人认证高德 Key 迁移到公司主体的正式运营评估; +- 面向公开注册的正式地区合规方案和完整条款升级。 + +### 3.4 明确不做 + +以下功能不属于 P0 或当前已承诺的 P1: + +- 支付、充值、订阅、订单和退款; +- 网页内直接发布到小红书; +- 小红书账号绑定; +- 多页图组、批量画布和批量导出; +- 公开作品广场、评论、点赞和社区推荐; +- 独立普通文字入口; +- 用户上传自定义贴纸; +- AI 生成贴纸; +- 动态贴纸、GIF 或视频导出; +- 笔记标题、正文和话题标签生成; +- 整版封面或海报模板; +- AI 提示词优化; +- 局部重绘、擦除、扩图和背景移除; +- 专业调色工具,如曲线、HSL、蒙版和局部调整; +- 实时多人协作; +- 项目版本历史; +- 文字或贴纸编组; +- 图层面板、元素隐藏和元素锁定。 + +## 4. 用户与权限 + +### 4.1 访客 + +通过浏览器支持检查的访客可以: + +- 查看登录和注册入口; +- 输入邮箱验证码完成登录; +- 使用有效邀请码注册。 + +访客不能: + +- 调用生图模型; +- 查看任何用户项目; +- 访问编辑器或运营后台。 + +### 4.2 注册用户 + +注册用户可以: + +- 使用个人点数调用已启用模型; +- 创建、编辑、导出、删除和恢复自己的项目; +- 管理创作署名和社交 ID; +- 查看个人点数余额和点数变动; +- 注销账号。 + +所有项目默认私有。其他普通用户不能通过项目 ID、图片地址或搜索访问这些内容。 + +### 4.3 超级管理员 + +P0 只有 super_admin 一种后台角色,允许存在多个后台账号,且所有后台账号权限相同。P0-A 管理员邮箱由本地后端安全配置中的白名单决定,具体邮箱不得写入 PRD、Git、前端代码或前端配置。超级管理员不开放自助注册,不使用普通邀请码,也不能由普通账号提升而来;详细创建、登录、停用和恢复规则见 AUTH-07。 + +超级管理员可以: + +- 查看和搜索用户; +- 调整用户点数; +- 暂停或恢复用户账号; +- 创建、停用和限制邀请码; +- 查看生成任务状态和用量; +- 启用、停用和配置模型; +- 上传与管理普通静态贴纸; +- 调整复杂模板的启停、分类顺序和展示顺序; +- 按需查看用户图片和完整提示词。 + +生成记录列表默认只显示元数据。超级管理员可以直接打开私有图片或完整提示词,不要求二次确认或填写原因;每次打开都必须自动记录管理员、时间、目标记录和查看内容类型。审计记录在 180 天保留期内不可修改或人工删除,到期后由系统清理。 + +超级管理员首次进入私有内容查看区域时必须看到一次全局规则提示。确认状态按“super_admin 身份 + 告知版本”持久记录,不按浏览器、标签页或会话记录;同一身份确认同一版本后不重复显示,告知文案升版后必须重新提示。每个查看入口必须明确标注“打开并记录审计”。全局提示确认不替代逐次自动审计,也不增加逐次填写原因的要求。 + +## 5. 信息架构与主流程 + +### 5.1 未登录入口 + +任何访问者进入 Dada 产品功能前,系统必须先检查当前浏览器是否属于 P0-A 支持环境。只有运行本地后端的同一台 Windows 电脑上的当前稳定版 Chrome 和 Edge 可以继续进入登录、邀请码注册或其他产品入口。 + +其他浏览器或不受支持的浏览器版本必须直接进入“浏览器不受支持”引导页。该页面只说明受支持的浏览器及使用受支持浏览器重新打开 localhost 的方式,不提供“仍然继续”入口;阻断状态下不得进入登录、注册、项目、编辑器、运营后台或任何其他产品功能。本规则不增加手机、局域网、远程或跨设备支持。 + +通过浏览器检查后,未登录用户首先看到登录或邀请码注册入口,不要求独立营销落地页。 + +### 5.2 登录后工作台 + +登录后默认进入创作工作台,工作台包含: + +- AI 生图输入区; +- 当前模型和本次点数消耗; +- 当前点数余额; +- 最近项目入口; +- 进入全部项目列表的入口。 + +### 5.3 新建项目流程 + +1. 用户输入提示词; +2. 用户选择模型; +3. 用户选择画布比例; +4. 用户按当前模型能力添加参考图; +5. 用户确认本次点数消耗; +6. 用户提交生成; +7. 系统创建草稿项目和生成任务; +8. 生成成功后,结果加入项目生成历史; +9. 用户可选择“继续编辑”进入本机完整编辑器,或下载原始生成图。 + +“新建创作”入口永远创建新项目,不默认追加到最近项目。 + +### 5.4 项目内继续生成 + +1. 用户从已有项目选择“继续生成”; +2. 系统沿用该项目固定画布比例; +3. 用户选择支持该比例的启用模型并提交; +4. 成功图片追加到该项目生成历史; +5. 当前项目达到 10 张成功图时阻止追加,但不影响用户通过“新建创作”创建其他项目。 + +### 5.5 编辑流程 + +1. AI 结果作为底图进入画布; +2. 用户可裁剪、适配、定位和调色; +3. 用户从文字模板或贴纸分区添加元素; +4. 用户在画布上移动、缩放、旋转和调整层级; +5. 已提交的修改自动保存; +6. 用户导出 JPG 或 PNG。 + +### 5.6 设备与访问流程 + +P0-A 是单机单设备测试版: + +- 只能从运行本地后端的同一台 Windows 电脑通过 localhost 访问; +- 不显示手机、局域网、远程访问或跨设备继续编辑入口; +- 同一电脑可以使用独立 Chrome/Edge 浏览器配置分别登录 super_admin、普通账号和测试程序临时账号; +- 多标签页仍遵守 state_version 冲突规则,但 P0-A 不承诺跨设备会话或项目同步; +- 项目、生成图和成品只保存在本机;需要长期保留的原始生成图或 JPG/PNG 成品由用户主动下载; +- P0-A 不提供可编辑项目包、数据库、账号、点数、审计日志或素材关系的导出、导入或迁移,下载图片仅作为用户留存文件,不作为 P0-B 正式系统的数据迁移来源。 + +P0-B 才恢复远程和多设备产品能力: + +- 公司系统合并和远程部署完成后,受支持设备可通过正式域名访问; +- 手机竖屏和横屏支持与电脑等价的完整编辑,旋转屏幕不得丢失当前编辑状态; +- 桌面键盘操作必须有可发现的手机触控按钮或手势替代; +- 任一设备创建或编辑的项目可以在其他受支持设备继续处理,但必须遵守多端冲突规则。 + +## 6. 账号与认证需求 + +### AUTH-01 邀请码注册 + +P0 仅允许持有效邀请码的用户注册。注册和登录使用两个独立入口,不自动把用户静默切换到另一流程。 + +邀请码可以配置最大使用次数、有效期和启停状态。注册时: + +1. 发送验证码前校验邀请码当前有效; +2. 发送验证码前校验当前阶段占用名额的普通账号总量未达到 P0-A 的 10 人或完整 P0 的 50 人上限; +3. 验证码、注册资料和告知同意均通过后,再次校验邀请码和阶段账号上限; +4. 账号创建与邀请码使用次数递增必须在同一原子操作中成功; +5. 账号未创建时不消耗邀请码次数。 + +账号名额规则: + +- active 和 suspended 普通账号均占用当前阶段名额; +- deleted 普通账号释放名额,但历史累计创建数量继续保留在后台统计中; +- 预置或创建的 super_admin 不占普通账号名额,也不使用普通邀请码; +- 暂停账号不能通过释放名额绕过内测人数限制。 + +### AUTH-02 邮箱验证码 + +注册和登录均采用邮箱验证码,不使用密码,但分别从“注册”和“登录”入口发起。 + +业务规则: + +- 验证码一次性有效; +- 验证码有效期为 10 分钟; +- 同一邮箱 60 秒内不能重复发送; +- 连续失败或高频请求必须触发频率限制; +- 验证码、邀请码和会话令牌不得写入项目数据或日志正文。 + +认证状态按以下规则处理: + +| 入口与账号状态 | 产品行为 | +| --- | --- | +| 注册入口 + 未注册邮箱 + 有效邀请码 | 发送验证码,验证后允许创建账号 | +| 注册入口 + 已注册邮箱 | 不重复创建账号,明确提示前往登录 | +| 注册入口 + 已暂停邮箱 | 不创建账号,明确提示账号已暂停并联系管理员 | +| 登录入口 + active 账号 | 发送验证码,验证后创建会话 | +| 登录入口 + 未注册或已注销邮箱 | 不创建会话,明确提示前往注册 | +| 登录入口 + suspended 账号 | 不创建会话,明确提示账号已暂停并联系管理员 | + +已注销邮箱在注册入口中按未注册邮箱处理,可使用新的有效邀请码创建全新账号。 + +### AUTH-03 注册资料 + +注册时必须填写: + +- 创作署名:用于用户类贴纸中的展示昵称; +- 社交 ID:用于需要账号格式的贴纸,展示时最多保留一个前导 @; +- 勾选同意简短的《内测使用与隐私告知》。 + +创作署名和社交 ID 与 Dada 内部账号标识分离,用户可在账号设置中修改,也可在单个贴纸实例中临时覆盖。 + +### AUTH-04 登录状态 + +受信设备登录状态保持 30 天。以下情况必须立即失效: + +- 用户主动退出; +- 用户注销账号; +- 管理员暂停账号; +- 系统检测到会话无效。 + +### AUTH-05 账号暂停 + +账号暂停后: + +- 用户不能继续生成、编辑或导出; +- 已登录会话立即失效; +- 项目在账号恢复前保持私有保存; +- 超级管理员可以恢复账号。 + +### AUTH-06 账号注销 + +用户确认注销后立即执行: + +- 使所有会话失效; +- 删除账号资料; +- 删除所有项目、参考图、生成图、原始坐标和导出成品; +- 删除未使用点数; +- 无法恢复账号。 + +注销完成后,同一邮箱可使用新的有效邀请码注册全新账号,但不得恢复旧账号资料、项目、点数、署名或任何历史内容。 + +注销后的数据处理规则: + +- 邮箱、账号资料、提示词、参考图、生成图、项目、原始坐标和导出成品立即删除; +- 匿名生成和点数事件明细保留 180 天,可保留随机匿名主体、时间、模型、成功或失败、错误类别和点数变化; +- 匿名事件不得保留邮箱、IP、提示词、图片、项目 ID、生成任务原 ID或其他可恢复内容; +- 私有内容访问审计保留执行查看的超级管理员身份,被注销用户和目标记录替换为不可反推的随机标识,并在原访问事件发生 180 天后由系统删除; +- 匿名事件在注销后最多保留 180 天; +- 不可回溯到个人或单次作品的汇总统计可以长期保留。 + +### AUTH-07 超级管理员创建与登录 + +P0-A 的超级管理员由本地后端安全配置中的邮箱白名单控制。具体邮箱、验证码、会话令牌和恢复配置均不得进入 PRD、Git、前端代码、前端配置、素材 manifest 或本机数据日志。 + +本节所称“部署人员”不是 Dada 用户或后台角色,不进入 UserProfile.role,没有 Dada 登录入口、后台会话或产品权限。P0-A 中由项目方作为本机配置维护者管理本地后端安全配置;P0-B 中该职责由公司既有运维流程承接。配置变更在 Dada 读取并生效时,由系统写入不包含人员身份或安全配置内容的审计记录。 + +业务规则: + +- 超级管理员使用与普通用户分离的后台入口,并通过邮箱验证码登录,不使用密码; +- 后台在发送验证码前校验邮箱白名单,非白名单邮箱直接拒绝,不发送验证码,也不泄露完整白名单; +- 白名单邮箱首次完成验证码验证后创建 super_admin,后续从同一后台入口登录; +- 白名单允许包含多个邮箱;后台不提供管理员邀请、添加或普通账号提升功能,增加管理员只能由部署人员修改当前阶段的后端安全配置; +- 超级管理员不使用普通邀请码、不占普通账号上限,普通账号即使邮箱后来进入白名单也不能原地提升,必须由部署人员先解决账号身份冲突后再按受控管理员流程创建独立管理员身份; +- 管理员会话保持 30 天;主动退出、账号停用、邮箱被移出白名单或会话无效时立即失效; +- 任一超级管理员可以停用其他超级管理员,相关操作必须审计;系统不设置“最后一个管理员”保护,允许全部管理员被停用; +- 全部管理员被停用或移出白名单后,后台不提供自助恢复,只能由部署人员通过当前阶段的后端安全配置恢复受控管理员入口; +- 管理员账号创建、登录结果、停用和恢复均形成不可修改的后台操作审计;当前阶段后端安全配置中的管理员白名单、身份冲突处理或恢复配置生效时,以 system 身份形成审计,按 ADMIN-09 和 AdminOperationLog 保留 180 天。 + +## 7. 点数与额度需求 + +### CREDIT-01 初始点数 + +新注册用户默认获得 10 点。初始点数由后台配置,P0 默认值为 10。 + +每个账号同时维护: + +- available_balance:可用于新任务的点数,可因超级管理员调点变为负数; +- reserved_balance:已被运行中任务冻结的点数,只能由对应任务提交或释放。 + +### CREDIT-02 模型点数 + +每个模型的单次生成点数由后台独立配置。P0 初始默认均为 1 点,超级管理员可根据真实成本调整。 + +生成按钮附近必须在提交前显示: + +- 当前模型; +- 本次消耗点数; +- 当前可用点数; +- 当前冻结点数; +- 生成后的预计可用点数。 + +### CREDIT-03 原子扣点 + +提交生成时以原子操作把本次所需点数从 available_balance 转入 reserved_balance。 + +- 生成成功:对应点数从 reserved_balance 转为已扣点; +- 上游失败、超时或安全拒绝:对应点数从 reserved_balance 返还 available_balance; +- 页面关闭或刷新:不改变任务与冻结状态; +- 重复提交不能产生重复任务或重复扣点; +- 生成并发、重试和任务结算本身不得使 available_balance 变为负数。 + +### CREDIT-04 余额不足 + +available_balance 低于所选模型单次点数时: + +- 禁用生成提交; +- 明确显示所需点数、当前可用点数和冻结点数; +- 不创建上游任务; +- P0 仅提示联系管理员,不提供充值入口。 + +### CREDIT-05 点数流水 + +用户可以查看个人点数变动。每条记录至少包含: + +- 变动类型; +- 变动数量; +- 变动前后的 available_balance 和 reserved_balance; +- 关联模型或管理员操作; +- 管理员调点原因; +- 时间; +- 成功、释放或撤销状态。 + +### CREDIT-06 超级管理员调点 + +- 增加或扣减点数只修改 available_balance,不得修改 reserved_balance; +- 超级管理员可以把 available_balance 调整为负数; +- 负余额必须如实向用户显示,后续增加点数先抵扣负余额; +- available_balance 再次达到所选模型成本前,用户不能提交新生成; +- 每次调点必须记录超级管理员、原因、数量、调整前后余额和时间; +- 除超级管理员调点外,任何系统流程不得制造负余额。 + +## 8. AI 生图需求 + +### GEN-01 支持模型 + +P0 支持以下模型标识: + +| 模型标识 | P0-A 初始配置默认 | 选择方式 | +| --- | --- | --- | +| gemini-3.1-flash-image-preview | 是 | 用户手动选择 | +| gemini-3-pro-image-preview | 否 | 用户手动选择 | +| gpt-image-2 | 否 | 用户手动选择 | + +后台可以停用任何模型。停用后: + +- 新任务不能选择该模型; +- 历史记录仍显示原模型名; +- 已使用该模型生成的项目和图片保持可用。 + +后台配置必须始终存在且只存在一个已启用的默认模型。超级管理员主动停用当前默认模型时,必须在同一原子操作中指定另一个已启用模型作为新默认模型;替代模型缺失、未启用或不合法时,整个操作失败,原模型启停和默认状态均保持不变,不允许出现部分更新或无默认模型状态。 + +每个 ModelConfig 必须配置唯一正整数 recommendation_priority,数值 1 表示最高推荐优先级,不允许不同模型并列。后端只在当前运行时可用于新任务的模型中按推荐优先级由高到低(即数值由小到大)返回一个推荐模型;没有运行时可用模型时返回空推荐,并进入既有生成禁用或失败状态。运行时推荐是派生结果,不是第二个后台默认状态,也不得写回 ModelConfig。外部服务临时不可用、AI 网关余额不足、契约失效或其他运行时降级只改变运行时可用性,不得改写 ModelConfig.enabled、is_default 或后台配置的 recommendation_priority。具体 API 字段和响应结构由后续 DevelopmentPlan 同步,不属于本 PRD 的产品契约范围。 + +### GEN-02 统一基础输入 + +生图面板只提供所有模型都能映射的基础输入: + +- 提示词; +- 模型; +- 画布比例; +- 参考图; +- 生成按钮。 + +P0 不展示负面提示词、种子、采样器或模型专属高级参数。 + +### GEN-03 提示词 + +- 支持简体中文自由输入; +- P0 不提供模板、示例、自动补全或 AI 优化; +- 提示词长度上限由 ModelConfig 决定; +- 超出上限时在客户端阻止提交并说明限制。 + +### GEN-04 画布比例 + +P0 支持: + +| 比例 | 标准像素 | +| --- | ---: | +| 3:4 | 1080 × 1440 | +| 1:1 | 1080 × 1080 | +| 4:3 | 1440 × 1080 | +| 9:16 | 1080 × 1920 | + +3:4 为默认比例。 + +每个模型通过 ModelConfig 声明支持的比例。切换到不支持当前比例的模型时,系统必须要求用户选择该模型支持的比例,不能静默改动。 + +项目首次创建时确定 canvas_ratio 和 canvas_size,此后不可修改。项目内“继续生成”只能选择支持项目既有比例的模型;用户需要其他比例时必须通过“新建创作”创建新项目。 + +### GEN-05 参考图 + +- 参考图为可选项; +- 支持 JPG、PNG 和 WebP; +- 数量上限、单文件大小和总大小由当前模型配置; +- 切换模型后若现有参考图超过新模型上限,必须要求用户移除超出部分; +- 用户在提交生成前选择的本地参考图只存在于当前页面内存,不上传且不写入浏览器持久化存储; +- 点击提交生成时才上传参考图,并绑定到本次 GenerationJob; +- 每个成功、失败或被拒绝的 GenerationJob 保留提交时的参考图关系,不因后续重试而替换; +- 相同项目内重试时可以复用已有参考图资源,但每个任务仍保存自己的关系快照; +- 删除项目或注销账号时按对应规则删除参考图。 + +### GEN-06 每次结果 + +每次生成只返回并保存一张候选图。 + +### GEN-07 并发限制 + +同一账号同时只能有一个运行中的生图任务。任务运行时再次提交必须被阻止,并提供返回当前任务的入口。 + +### GEN-08 任务状态 + +生成任务状态为: + +- queued:已创建,等待调用; +- running:上游处理中; +- succeeded:已获得并保存图片; +- failed:技术失败或超时; +- rejected:上游安全策略拒绝。 + +页面刷新或切换设备后,用户仍能看到当前任务的真实状态。P0 不展示虚假的百分比进度。 + +### GEN-09 失败处理 + +失败状态必须: + +- 显示可理解的错误类别; +- 不暴露上游密钥、原始堆栈或内部地址; +- 释放冻结点数; +- 保留用户提示词和草稿项目; +- 允许用户在失败页或当前草稿中重新提交; +- 重试只新增 GenerationJob,不创建新项目。 + +### GEN-10 内容安全 + +P0 依赖模型供应商的安全策略,不建设人工内容审核流程。 + +当供应商拒绝请求时: + +- 任务状态为 rejected; +- 不保存违规输出; +- 不扣点; +- 向用户显示不包含敏感内部细节的拒绝提示。 + +### GEN-11 生成历史 + +每个项目最多保留 10 张成功生成图。 + +- 用户可删除单张历史图; +- 达到 10 张后必须先删除旧图才能在该项目继续生成; +- 工作台“新建创作”不受其他项目生成历史上限影响,但仍受 20 个项目上限约束; +- 当前作为底图的图片不能直接删除,除非先切换底图; +- 每张历史图保留模型、比例、提示词、参考图关系、生成时间和点数记录; +- 同一项目内所有历史图比例必须与项目固定比例一致。 + +### GEN-12 更换底图 + +切换到项目内另一张生成历史图时: + +- 保留所有文字和贴纸覆盖层; +- 元素的位置和尺寸按相同画布比例保留; +- 底图的裁剪、适配和调色状态重置为新底图默认状态; +- 已有色卡按 COL-04 重新提取; +- 切换动作进入撤销历史并触发自动保存。 + +### GEN-13 AI 网关契约验证门槛 + +取得网关图片 API 文档、脱敏调用示例或平台支持确认之前,可以并行开发编辑器、素材、认证等独立模块,但不得按猜测定版 AI 适配器、ModelConfig 路由、参考图协议或点数结算联调。 + +三个模型分别完成以下验证并保存脱敏证据后,才能解除 AI 契约阻塞: + +- 纯文字生成一张底图; +- 按模型能力使用参考图生成; +- 3:4、1:1、4:3、9:16 四种比例; +- 技术失败、超时和安全拒绝; +- 返回图片的格式、尺寸和获取方式; +- 请求是同步还是异步,以及异步任务查询方式; +- 错误映射、任务状态与冻结点数释放语义。 + +不得假设三个模型使用相同图片端点或参数格式。 + +模型端点、请求字段、参考图协议、响应结构、同步或异步模式、任务查询方式或上游错误协议发生变化时,必须立即把对应模型的 contract_validation_status 重置为 unverified,并重新执行 AC-40。显示名称、点数等不改变上游调用协议的配置变化不触发该重验规则。 + +### GEN-14 提交时配置复核 + +生图页面必须保存用户确认时的 model_config_version 和 confirmed_credit_cost。服务端收到提交时重新读取当前 ModelConfig,并核对模型启停、点数、支持比例、参考图限制和提示词限制。 + +- 当前配置与用户确认版本一致时,才允许创建任务并冻结点数; +- 点数、比例、参考图限制、提示词限制或启停状态发生变化时,本次提交必须拒绝; +- 拒绝时不创建 GenerationJob、不调用上游、不冻结点数; +- 页面显示最新配置并要求用户重新确认,不能静默按更高点数或不同限制继续; +- 已经成功提交的任务继续按提交时保存的配置快照结算。 + +### GEN-15 AI 网关余额影响范围 + +AI 网关余额不足不等同于 Dada 点数不足。系统根据网关返回结果和后台配置确定真实上游影响范围: + +- 能明确确认某一模型额度不足或仅该模型受影响时,只把该模型标记为运行时不可用于新任务; +- 只能确认共享网关账户余额不足,或无法可靠判断模型级影响范围时,把所有依赖同一网关结算账户的模型标记为运行时不可用于新任务; +- 因网关余额不足而失败的已提交任务必须进入失败状态,并且只释放一次对应 reserved_balance,不消耗用户点数; +- 运行时不可用后向超级管理员显示影响范围和检测时间,不得自动充值或用 Dada 点数继续制造无法支付的上游调用,也不得改写后台配置的默认模型、enabled 或 recommendation_priority; +- 只有确认真实网关余额已经恢复后,超级管理员才能恢复受影响模型的运行时可用状态,恢复操作必须审计。 + +### GEN-16 产品级生成错误分类 + +Dada 使用稳定的 GenerationErrorCategory 统一三个模型的提交和执行错误。上游原始错误码、堆栈和内部地址不得直接面向用户展示。失败或拒绝的 GenerationJob 必须保存 error_category;queued、running 和 succeeded 任务不保存错误分类。提交前被阻止时不创建 GenerationJob,但提交响应仍返回对应 error_category。 + +| error_category | 产品含义 | 用户下一步 | 任务与点数 | +| --- | --- | --- | --- | +| upstream_timeout | 上游超时 | 使用原输入重试 | failed,释放冻结点 | +| upstream_failed | 上游临时失败 | 稍后重试 | failed,释放冻结点 | +| safety_rejected | 供应商安全拒绝 | 修改提示词或参考图 | rejected,释放冻结点 | +| model_disabled | 模型因普通启停规则不可用 | 选择其他模型或等待 | 不创建任务、不冻结点 | +| gateway_balance_insufficient | 真实网关余额不足 | 选择未受影响模型或联系管理员 | 未创建则不冻结;已创建则 failed 并释放 | +| gateway_contract_invalid | 网关契约未验证或失效 | 选择其他模型或联系管理员 | 未创建则不冻结;已创建则 failed 并释放 | +| reference_invalid | 参考图格式、大小、数量或内容无效 | 更换或移除参考图 | 未创建则不冻结;已创建则 failed 并释放 | +| unknown_retryable | 未知但判断为临时错误 | 稍后重试 | failed,释放冻结点 | +| unknown_non_retryable | 未知且不应反复重试 | 联系管理员 | failed,释放冻结点 | + +已知禁用原因是网关余额或契约状态时,gateway_balance_insufficient 或 gateway_contract_invalid 优先于通用 model_disabled。用户点数不足、ModelConfig 版本变化、已有并发任务、项目上限、生成历史上限以及 P0-A 本机存储 full 或 unavailable 继续使用现有确定性业务阻止规则,不扩入本错误分类。 + +ModelConfig.error_mapping_profile 负责把各供应商的错误映射到上述固定分类。P0 后台可以调整上游错误映射,但不能新增临时分类;映射变化必须产生新的 config_version。UIDesign.md 可以确定中文文案,但不能改变分类对应的重试、修改输入、选择模型或联系管理员动作。 + +## 9. 项目与持久化保存 + +### PROJECT-01 项目创建 + +工作台“新建创作”首次提交时始终创建新的草稿项目。项目即使生成失败也保留提示词和当前配置,方便重试。失败页或该草稿中的“重试”复用原项目并只新增 GenerationJob;只有用户再次主动进入工作台“新建创作”才创建其他项目。 + +已有项目的“继续生成”只创建新的 GenerationJob,不创建新项目;成功结果追加到该项目历史,失败时保留原项目和本次配置。 + +没有任何成功生成图的失败草稿支持在项目列表中多选并批量移入回收站;包含成功生成图的项目不进入该快捷批量操作。 + +### PROJECT-02 项目命名 + +项目名称默认由提示词摘要和创建日期生成,用户可以随时重命名。 + +### PROJECT-03 项目数量 + +每个用户最多拥有 20 个 status=active 的项目。status=trashed 和 status=purged 均不占活动项目名额;达到 20 个 active 项目后阻止创建新项目。 + +### PROJECT-04 自动保存 + +自动保存对象为最新可编辑项目状态,而不是仅保存合成图。 + +自动保存发生在: + +- 文字或样式点击“完成”; +- 元素移动、缩放、旋转或多选移动结束; +- 元素添加、复制、删除或层级变化; +- 底图裁剪、调色或切换确认; +- 项目重命名; +- 撤销或重做完成。 + +保存队列遵守以下规则: + +- 一次已提交操作结束后等待 1 秒,将连续变化合并为当前最新项目状态; +- 同一项目同一时间最多一个保存请求在途; +- 请求在途期间的新变化合并到下一次最新状态,不逐条并发发送; +- 保存失败时显示“未保存”,页面保持打开期间在网络恢复后自动重试; +- 不把未保存画布、提示词、私有图片引用或编辑内容写入 localStorage、IndexedDB 或 Cache Storage; +- 刷新页面等同离开页面;强制刷新、关闭页面或浏览器崩溃后,只恢复最后一次后端 save_status=saved 的状态,不恢复未保存修改; +- 保存成功前不能继续显示“已保存”。 + +### PROJECT-05 离开页面 + +项目存在未提交或未保存修改时: + +- 站内跳转必须提供“保存并离开”“放弃修改”“取消”三个选项; +- 选择“保存并离开”后,必须提交当前编辑态并等待保存成功; +- 刷新或关闭页面时使用浏览器离开警告并尝试最后一次保存; +- 用户明确放弃、强制刷新、强制关闭或浏览器崩溃后,未保存修改丢失;重新打开项目时只加载最后一次后端 saved 状态。 + +### PROJECT-06 撤销与重做 + +- 仅保留当前编辑会话的多步撤销和重做; +- 重新打开项目后撤销栈为空; +- 一次连续拖拽作为一个操作; +- 一次文字编辑从进入编辑到点击完成作为一个操作; +- 取消编辑不进入撤销历史。 + +### PROJECT-07 多端冲突 + +P0 不支持同一项目多人协作。P0-A 在同一电脑的多个标签页编辑同一项目时必须比较 state_version;P0-B 扩展到多个设备。 + +旧页面检测到后端已有较新版本后: + +- 立即停止自动保存并进入只读冲突状态; +- 不允许继续编辑、覆盖后端状态或另存为项目副本; +- 允许用户把旧页面当前画面本地导出一次,导出结果不更新后端成品; +- 用户确认放弃本地修改后,刷新加载后端最新版本。 + +### PROJECT-08 删除与恢复 + +用户删除项目后: + +- 项目进入回收站; +- 系统按删除时间计算 purge_at = deleted_at + 720 小时,在 purge_at 前可以恢复; +- 到达 purge_at 后,用户侧立即视为 purged 且不可恢复,即使本机文件物理清理仍在异步队列中; +- 用户可以在 purge_at 前主动永久删除,确认后立即进入不可恢复的 purged 状态; +- purged 项目的项目数据、生成图、参考图、原始坐标和导出成品进入异步物理清理; +- 恢复操作只有在当前 active 项目少于 20 个时才能把项目从 trashed 改为 active;活动项目已达 20 个时阻止恢复,项目继续保持 trashed,原 deleted_at 和 purge_at 不变,用户必须先释放活动项目名额。 + +### PROJECT-09 项目可见性 + +- 项目默认且始终私有; +- P0 不提供公开链接; +- P0 不提供作品广场; +- P0-A 参考图、生成图和导出成品必须通过本地后端登录鉴权接口访问,不能从静态公开目录直接读取; +- P0-B 的正式私有资源访问方案必须在公司系统合并时重新定版; +- 私有资源地址不得通过猜测获得未授权访问。 + +## 10. 编辑器通用需求 + +### EDITOR-01 设备范围 + +P0-A 完整编辑器只支持运行本地后端的同一台 Windows 电脑上的 Chrome 和 Edge,不提供手机网页、局域网或远程访问能力。 + +P0-B 才正式支持手机完整编辑器: + +- 手机竖屏和横屏均可完成底图、文字、贴纸、多选、层级、撤销重做和导出; +- 屏幕旋转只改变布局,不提交、取消或丢失当前编辑状态; +- 手机使用适配小屏的面板、触控按钮和手势,不得以“请使用电脑”替代功能; +- 电脑键盘快捷键不要求手机模拟键盘,但必须有等价触控操作。 + +### EDITOR-02 画布与底图 + +底图支持: + +- 填充画布; +- 完整适应画布; +- 裁剪; +- 缩放; +- 定位; +- 从项目生成历史中更换。 + +P0 不能上传本地图片作为底图,也不能创建空白画布。 + +### EDITOR-03 底图调色 + +P0 提供: + +- 亮度; +- 对比度; +- 饱和度; +- 色温; +- 锐度; +- 预设滤镜; +- 一键恢复原图。 + +滤镜名称、缩略图和具体视觉值由 UIDesign.md 定义。PRD 要求所有调节可撤销、可保存并反映在导出结果中。 + +### EDITOR-04 元素上限 + +单张画布最多包含 50 个覆盖元素。覆盖元素包括文字模板、普通贴纸、色卡贴纸和动态贴纸,不包含底图。 + +达到上限后不能继续添加,必须提示用户删除现有元素。 + +### EDITOR-05 单选与多选 + +支持: + +- 点击或轻点优先选择命中区域中 z_index 最高的元素; +- 在同一点连续点击或轻点时,按 z_index 从高到低循环选择候选元素; +- 长按重叠区域时,显示仅包含该命中点候选元素的临时列表,通过文字内容、元素类型或缩略图区分; +- 桌面 Shift 点击追加或移除选择; +- 电脑提供可见的“多选模式”;P0-B 手机完整编辑器提供等价触控多选模式,用于逐个追加或移除选择; +- 框选多个元素; +- 多选元素整体移动、复制或删除。 + +选择循环在用户移动指针、开始拖拽或点击其他位置后重置。候选列表不是完整图层面板,不显示未命中该点的元素,也不提供全局排序。 + +不支持编组。多选状态下不能合并不同文字元素的样式编辑。 + +### EDITOR-06 画布变换 + +所有覆盖元素支持: + +- 移动; +- 等比缩放; +- 旋转; +- 复制; +- 删除; +- 置顶; +- 上移一层; +- 下移一层; +- 置底。 + +普通贴纸额外支持水平翻转和元素透明度。 + +### EDITOR-07 对齐辅助 + +移动元素时提供画布中心线、边缘和其他元素的吸附提示。辅助线只用于编辑,不进入导出图片。 + +### EDITOR-08 键盘操作 + +桌面端至少支持: + +- 撤销与重做; +- Delete 或 Backspace 删除选中元素; +- 方向键微移; +- Shift 加方向键大步移动; +- 复制与粘贴内部画布元素; +- 多选修饰键。 + +具体快捷键展示方式由 UIDesign.md 定义。 + +P0-B 手机完整编辑器必须为撤销、重做、删除、复制、层级调整和多选提供触控入口;需要拖拽的操作必须兼容单指触控,并避免与页面滚动无意冲突。 + +### EDITOR-09 不提供图层面板 + +P0 不提供常驻或展示全部元素的图层面板,不提供元素锁定或隐藏。长按命中点出现的候选列表不视为图层面板。所有元素必须能通过循环选择、候选列表或框选触达。 + +## 11. 文字系统 + +### TEXT-01 规范素材范围 + +完整 P0 接入全部 332 个文字模板: + +| 分类 | 数量 | 稳定 ID | +| --- | ---: | --- | +| 花字 | 145 | FLOWER001 至 FLOWER145 | +| 标题 | 119 | H001 至 H119 | +| 标签 | 51 | TAG001 至 TAG051 | +| 简约 | 17 | SIMPLE001 至 SIMPLE017 | + +其中 330 个为 ZIP 资源模板,FLOWER007“好柿花生”和 FLOWER025“分享瞬间”为 parameter_only 模板。它们没有 ZIP 是合法状态,不能按资源缺失处理。 + +### TEXT-02 添加文字 + +P0 添加文字必须先选择一个模板,不提供独立普通文字入口。 + +模板列表支持: + +- 按花字、标题、标签、简约分类; +- 按显示名称搜索; +- 按 catalog.csv 的稳定顺序展示; +- 记录账号级最近使用。 + +### TEXT-03 文字内容 + +- 支持输入和替换文字; +- 支持 UTF-8 多行文本; +- 保留换行符; +- 编辑中可以暂时为空; +- 点击完成时若内容为空,提示用户输入内容或删除该元素。 + +### TEXT-04 字体 + +完整 P0 展示 86 个字体面板项,对应 85 份唯一字体二进制。即使两个面板项共用同一字体文件,也保留各自稳定 ID 和面板顺序。 + +字体规则: + +- 模板自带字体用于模板默认视觉; +- 字体面板用于用户主动覆盖; +- 字体缩略图仅用于名称预览; +- 实际渲染必须加载归档字体文件; +- 用户选择字体后保留当前模板的其他样式。 + +有效字体规则为: + +effectiveFont = 用户主动选择字体,否则使用模板默认字体。 + +### TEXT-05 模板切换 + +已有文字元素切换模板时: + +- 保留文本内容和换行; +- 重置字体为新模板默认字体; +- 重置颜色、描边、背景、对齐、行距和字距为新模板默认值; +- 保持画布位置、旋转和整体视觉尺寸; +- 作为一次可撤销操作提交。 + +### TEXT-06 文字大小 + +用户可以: + +- 通过画布控制柄缩放文字; +- 通过数值字号精确设置; +- 两种操作保持同步; +- 文字框随内容、换行和字号重新测量,不能裁掉可见文字。 + +### TEXT-07 颜色 + +文字填充色、描边色和背景色均支持: + +- 参考预设色; +- 自定义色盘; +- 十六进制颜色输入。 + +已验证参考值包括: + +- 红色填充:#FA5751; +- 黑色描边:#000000; +- 亮黄色背景:#FFE62C。 + +### TEXT-08 描边 + +- 支持开启或关闭描边; +- 描边宽度范围为 0 至 12; +- 描边颜色与填充颜色独立; +- 描边变化不能下载或替换模板资源。 + +### TEXT-09 背景 + +- 支持开启或关闭文字背景; +- 背景颜色独立于文字填充; +- 背景透明度范围为 0% 至 100%; +- 背景透明度只影响背景,不影响文字; +- 复合预设可以一次更新填充、描边和背景。 + +### TEXT-10 对齐 + +支持三种水平对齐: + +- 左对齐; +- 居中; +- 右对齐。 + +### TEXT-11 行距 + +- 有效范围:1.0 至 1.9; +- 步长:0.1; +- 未显式修改时使用模板默认值; +- 归档中的 -1.0 是“未设置”哨兵,不能直接作为渲染值。 + +### TEXT-12 字距 + +- 有效范围:1.0 至 20.0; +- 步长:1.0; +- 未显式修改时使用模板默认值; +- 归档中的 -1.0 是“未设置”哨兵。 + +### TEXT-13 编辑提交 + +进入文字内容或样式编辑后: + +- 所有修改实时预览; +- 点击“完成”后形成一次撤销记录并触发自动保存; +- 点击“取消”恢复进入编辑前状态; +- 滑杆的每个中间值不单独进入撤销历史。 + +### TEXT-14 真实资源渲染 + +文字模板不能使用预览 PNG 代替真实渲染。必须依据模板 metadata.json、资源包、Prefab 转换结果、样式参数和字体文件还原。 + +## 12. 贴纸系统 + +### 12.1 总体结构 + +贴纸功能由三个相互独立的系统组成: + +- 普通静态贴纸库:固定为 part1 至 part25,共 25 个普通贴纸 part; +- 色卡贴纸系统:按 COLOR 稳定 ID 管理,不计入普通贴纸 part; +- 动态数据贴纸系统:按 DYN 稳定 ID 管理,不计入普通贴纸 part。 + +历史交接资料中的 part26 和 part27 仅用于说明素材来源批次,不作为产品运行时的普通贴纸 part。三个区域必须在产品上保持独立,不能把色卡或动态贴纸降级为普通图片。 + +### STATIC-01 普通贴纸范围 + +P0 接入本地后端安全配置所引用的 `%USERPROFILE%\Desktop\贴纸素材` 中全部 1,407 张 PNG。 + +业务规则: + +- 保留原 part1 至 part25; +- 保留所有原始文件; +- part18 与 part25 的 3 组重复图片仍作为两份入口展示和保存; +- 不静默去重; +- 不根据文件名猜测贴纸含义。 + +### STATIC-02 普通贴纸目录 + +由于现有文件名主要为哈希且没有关键词,P0 支持: + +- 按 part 浏览; +- 保持 part 内稳定顺序; +- 账号级最近使用; +- 后台上下架。 + +加载规则: + +- 进入普通贴纸面板时只加载 part 列表和首屏必要数据,不预下载 1,407 张原图; +- 每个 part 使用虚拟列表,只渲染可视区域及少量缓冲项; +- 缩略图按视口懒加载,离开可视范围的列表节点可回收; +- 贴纸原图只在加入画布或导出确有需要时按需加载; +- 最近使用区域同样优先加载缩略图,不因最近使用而批量预取原图。 + +P0 不支持普通贴纸关键词搜索。 + +### STATIC-03 普通贴纸编辑 + +普通贴纸支持: + +- 移动; +- 等比缩放; +- 旋转; +- 水平翻转; +- 0% 至 100% 透明度; +- 复制; +- 删除; +- 层级调整; +- 多选移动。 + +### STATIC-04 后台上传 + +超级管理员可以上传 PNG 或 WebP 普通贴纸,并配置: + +- 稳定素材 ID; +- 所属 part; +- part 内顺序; +- 启用或停用; +- 可选的内部名称。 + +超级管理员上传的普通静态贴纸原图及由 Dada 生成的缩略图写入 LocalDataRoot,并从首次物理写入起计入 managed_content_bytes。产品随安装包提供或通过第 18 节本机安全配置原地引用的只读规范素材库不计入 managed_content_bytes,也不得因后台上传而复制进 LocalDataRoot。 + +storage_status 为 full 或 unavailable 时,后台必须阻止继续上传原图、生成缩略图或写入其他受管二进制内容;已经存在的普通贴纸仍按其权限、启停和版本规则读取。 + +超级管理员可以显式清理不再被任何已发布版本或项目引用的历史上传原图和缩略图。清理前必须展示确认,系统必须再次校验引用关系并形成不可修改的 AdminOperationLog;不得自动清理,不得删除仍被任何已发布版本或项目引用的文件。只有物理清理完成并重新计量后,才能更新 managed_content_bytes、capacity_notice_level、storage_status 和 last_measured_at。 + +P0 后台不能直接上传文字模板、色卡渲染器、Lua、Prefab 或复杂动态资源包。 + +## 13. 色卡贴纸 + +### COL-01 范围 + +完整 P0 接入 COLOR001 至 COLOR016,对应稳定网页样式 style_01 至 style_16。P0-A 只启用第 3.1 节规定的四个色卡 ID。 + +### COL-02 五色提取 + +- 色卡从当前底图未经裁剪、调色和滤镜处理的原始图片提取五个主要颜色; +- 提取在浏览器本地执行; +- 不因色卡功能额外上传底图; +- 提取结果必须可重复,不能在同一图片上随机变化; +- 色卡可以使用额外固定背景色或装饰色,但用户图片调色板为五色。 + +### COL-03 样式映射 + +- style_01 与原生 TYPE_1 有单样本确认; +- style_02 至 style_16 保持当前网页稳定顺序; +- style_02 至 style_16 不宣称与小红书内部 TYPE 编号逐项准确对应; +- 色值只要求接近当前确定性网页实现,不承诺与小红书原生 ColorExtract 模型逐色一致。 + +### COL-04 刷新规则 + +- 首次插入时从当前底图提取五色; +- 用户更换项目底图时,已有色卡自动重新提取; +- 裁剪、调色或滤镜变化不触发重新提取; +- P0 不提供手动吸色或手动刷新按钮; +- 色卡面板标题旁提供信息图标,说明“色卡基于原始底图,更换底图时更新,不随裁剪、调色和滤镜变化”。 + +### COL-05 编辑 + +生成后的色卡作为独立画布元素,支持移动、缩放、旋转、复制、删除和层级调整。 + +## 14. 动态贴纸 + +### DYN-01 范围 + +完整 P0 接入 DYN001 至 DYN035,分类如下: + +| 分类 | 数量 | +| --- | ---: | +| 地点/POI | 6 | +| 时间/日期 | 7 | +| 用户昵称/ID | 21 | +| 综合信息 | 1 | + +P0-A 只启用第 3.1 节规定的十个动态贴纸 ID。 + +原始 inventory 中没有动态绑定的额外目录不计入这 35 个模板。 + +### DYN-02 数据按需提供 + +每个模板只能要求和显示其真实消费的字段。通用 Lua 中存在但当前 Prefab 不消费的相机、日期或位置字段不能变成无关的用户表单。 + +### DYN-03 时间数据 + +- 插入时间贴纸时使用用户浏览器的本地当前日期和时间; +- 用户可以在提交前修改日期和时间; +- 项目保存用户确认后的值; +- 重新打开项目后不自动改成新的当前时间。 + +### DYN-04 地点数据 + +地点贴纸支持: + +- 用户授权浏览器定位; +- 通过部署时配置的地理编码服务转换地点; +- 用户手动修改地点名称; +- 定位拒绝、失败或供应商不可用时回退到手动输入。 + +系统不能读取密码、Cookie、认证令牌或与定位无关的浏览器数据。 + +### DYN-05 坐标保存 + +DYN004 会把经纬度作为可见贴纸内容。 + +当用户选择 DYN004 并授权定位时: + +- 在调用浏览器定位权限前显示一次 Dada 自有提示,明确说明原始经纬度会保存到当前项目并显示在导出成品中; +- 用户确认后才调用浏览器定位,不再要求取得坐标后的第二次确认; +- 保存原始坐标和用户可见格式化值; +- 用户可以手动修改可见文本; +- 坐标只属于当前私有项目; +- 删除项目或注销账号时按对应规则删除。 + +用户拒绝 Dada 自有提示或浏览器定位时,不调用或停止调用定位,也不能自动插入 DYN004。用户可以改用仅显示地点名称的其他模板;其他地点模板默认只保存用户确认的地点文字,不保存原始坐标。 + +### DYN-06 用户身份数据 + +用户类贴纸默认使用注册资料中的: + +- 创作署名; +- 社交 ID。 + +用户可以在单个贴纸中覆盖显示值,覆盖不自动修改账号资料。 + +需要 @ 前缀的模板由模板格式化规则添加,不能重复显示 @@。 + +### DYN-07 静态导出 + +动态贴纸只在编辑器内按数据生成视觉内容。导出 JPG 或 PNG 后: + +- 文字和图形成为静态像素; +- 地点、账号或时间不可点击; +- 不创建小红书平台内的真实 POI、话题或账号链接。 + +### DYN-08 DYN012 字体替代 + +DYN012 引用的 DIN_MediumAlternate.otf 当前缺失。 + +P0 使用字体面板 FONT081,即 Lexend Deca,作为明确替代: + +- 产品和测试记录必须标记为替代字体; +- 不能宣称为原字体; +- 后续获得合法原字体后可通过模板资源升版替换。 + +### DYN-09 运行时边界 + +Android Capa Prefab 和 Lua 仅作为布局、格式化和字段绑定参考。网页产品不得直接执行这些 Android 运行时文件,必须使用转换后的受控模板模型。 + +## 15. 导出需求 + +### EXPORT-01 格式 + +支持: + +- JPG; +- PNG。 + +### EXPORT-02 尺寸 + +导出像素必须与项目画布规格完全一致: + +- 3:4 为 1080 × 1440; +- 1:1 为 1080 × 1080; +- 4:3 为 1440 × 1080; +- 9:16 为 1080 × 1920。 + +### EXPORT-03 质量 + +- 导出使用 sRGB; +- 不添加 Dada 水印; +- PNG 使用无损导出; +- JPG 质量可在 80 至 100 之间选择,默认值为 92; +- 导出结果必须与画布中已提交状态一致; +- 若存在未提交文字或样式修改,必须提示“将应用当前修改并导出”; +- 用户确认后把当前编辑形成一次撤销记录,并等待本地画布渲染稳定后导出; +- 用户取消确认时不提交编辑,也不导出。 + +### EXPORT-04 最新成品 + +每个项目按格式保存最新一份成品: + +- 正常导出由当前客户端根据已提交画布状态完成合成; +- P0-A 客户端将同一成品提供给用户下载并通过本地后端保存到 LocalDataRoot;P0-B 的正式上传方式由后续方案定版; +- 再次导出 JPG 覆盖上一次 JPG; +- 再次导出 PNG 覆盖上一次 PNG; +- 不保存完整导出版本历史; +- 删除项目时一并处理; +- P0-A 可在同一电脑重新下载,P0-B 才支持其他受支持设备再次下载; +- 从未导出过对应格式时,不自动生成成品。 + +没有任何已保存导出成品时,成品区域显示“暂无导出成品”,并提供“进入编辑并导出”和“下载原始生成图”。 + +### EXPORT-05 失败 + +导出失败时: + +- 不覆盖上一份成功成品; +- 显示失败原因和重试入口; +- 不改变项目可编辑状态。 + +### EXPORT-06 后端保存失败时的本地导出 + +当前画布能够在浏览器正确合成、但后端项目保存失败时: + +- 允许用户把当前画面导出并下载到本机; +- 明确提示项目和后端最新成品尚未更新; +- 本地下载不得覆盖后端上一次成功成品; +- 成品上传失败时也不得更新 latest_exports; +- 页面保持打开期间继续重试项目保存; +- 用户刷新、关闭页面或浏览器崩溃后,只恢复最后一次后端 saved 状态,不恢复本地导出时仍未保存的编辑状态。 + +## 16. 运营后台 + +### ADMIN-01 用户管理 + +超级管理员可以: + +- 按邮箱、状态或内部账号标识查询用户; +- 查看注册时间、最近活动、项目数量和生成用量; +- 增加或扣减点数; +- 调点时填写必填原因,并允许把 available_balance 调整为负数; +- 暂停或恢复账号。 + +### ADMIN-02 邀请码 + +超级管理员可以: + +- 创建邀请码; +- 设置最大使用次数; +- 设置有效期; +- 停用邀请码; +- 查看已使用次数。 + +### ADMIN-03 模型管理 + +超级管理员可以配置: + +- 模型标识和展示名; +- 是否启用; +- 是否为默认模型; +- 推荐优先级,使用唯一正整数且 1 为最高,不允许并列; +- 路由类型; +- 支持的比例; +- 参考图数量和文件限制; +- 提示词长度上限; +- 单次点数; +- 超时配置; +- 版本化 error_mapping_profile,用于把供应商错误映射到固定的 GenerationErrorCategory。 + +任何影响模型启停、用户确认或任务结算的配置保存后必须生成新的 config_version,旧版本不能被原地静默改写。 + +后台配置必须始终存在且只存在一个已启用的默认模型。超级管理员主动停用当前默认模型时,必须在同一原子操作中指定另一个已启用模型作为新默认模型;未提供合法替代模型时,整个操作失败,不修改任何模型的启停、默认或推荐优先级。外部服务临时不可用、网关余额不足或其他运行时降级不得改写后台配置的默认模型或推荐优先级。 + +recommendation_priority 缺失、不是正整数或与其他模型重复时,整个模型配置保存操作失败,不允许部分写入。 + +后台只能配置上游错误到现有分类的映射,不能新增、重命名或删除 GenerationErrorCategory。模型端点、请求字段、参考图协议、响应结构、异步模式、任务查询或错误协议变化时,保存配置必须同时把 contract_validation_status 重置为 unverified。 + +后台不能显示完整 API 密钥。 + +### ADMIN-04 生成记录 + +默认列表显示: + +- 用户标识; +- 模型; +- 状态; +- 创建和完成时间; +- 耗时; +- 点数状态; +- 错误类别。 + +图片和完整提示词默认隐藏。 + +### ADMIN-05 私有内容访问审计 + +超级管理员首次进入私有内容查看区域时必须看到一次全局规则提示。提示确认按“super_admin 身份 + 告知版本”持久记录,不按浏览器、标签页或会话记录;同一身份确认同一告知版本后不重复显示,告知文案升版后必须重新提示。图片和完整提示词入口必须显示“打开并记录审计”;点击后不再显示逐次确认,也不要求填写查看原因。每次打开必须自动记录: + +- 管理员账号; +- 被查看的任务或项目; +- 访问时间; +- 查看内容类型。 + +全局提示确认不能替代任何一次 PrivateContentAccessLog。审计记录在 180 天保留期内不可修改或人工删除,到期后由系统清理。只有 super_admin 可以查看审计后台,普通用户不能访问。 + +### ADMIN-06 普通贴纸管理 + +超级管理员可以: + +- 上传 PNG/WebP; +- 选择 part; +- 调整 part 内顺序; +- 启用或下架; +- 查看尺寸和文件状态。 + +下架只阻止新项目添加。已有项目必须继续正确渲染原贴纸,直至项目被删除。 + +后台上传的普通贴纸原图和缩略图计入 managed_content_bytes。storage_status 为 full 或 unavailable 时,后台必须禁用上传、缩略图生成和其他受管二进制写入入口,但仍允许按权限查看已有素材。 + +超级管理员可以在确认后清理不再被任何已发布版本或项目引用的历史上传原图和缩略图。后台必须在执行前重新校验引用关系;仍被引用时拒绝整个清理操作。系统不得自动清理,清理请求、校验结果和最终结果必须写入不可修改的 AdminOperationLog。只有物理清理完成并重新计量后,后台容量汇总和 LocalBackendStorageState 才能更新。 + +### ADMIN-07 复杂模板管理 + +文字、字体、色卡和动态贴纸通过经过校验的版本化资源包发布。后台只支持: + +- 启用或停用; +- 分类顺序; +- 展示顺序; +- 查看当前资源版本和校验状态。 + +后台不提供可视化模板编辑器。 + +复杂模板允许按测试批次导入和验收。超级管理员可以: + +- 创建或关闭内部测试批次; +- 把指定模板标记为 imported、internal_preview、passed、enabled 或 disabled; +- 将指定普通账号授权到指定测试批次并设置有效期; +- 随时撤销预览授权。 + +普通账号获得内部预览授权后,只能在素材面板中看到对应批次,不能访问运营后台、调点、模型配置、邀请码、生成记录或私有内容。白名单外模板即使分批 passed,也必须等全部剩余复杂模板通过后才可在 P0-B 一次性向普通用户 enabled。 + +### ADMIN-08 基础数据 + +后台至少显示: + +- 当前占名额普通账号数,并分别显示 active 与 suspended; +- 历史累计创建普通账号数和已注销普通账号数; +- super_admin 数量,且明确不计入普通账号上限; +- 活跃用户数; +- 各模型生成次数、成功率和失败率; +- 已扣点与已释放点数; +- 项目和图片存储数量; +- P0-A managed_content_bytes(包含后台上传的普通贴纸原图和缩略图)、5 GB 硬上限、capacity_notice_level、storage_status 和素材根目录可用状态,但不向后台回显本机绝对路径; +- 最常使用的文字模板和贴纸 part; +- Resend 当日与当月用量、硬上限、供应商可用状态和暂停原因; +- 高德当月用量、硬上限和暂停原因; +- AI 网关余额可用、不足或未知状态,以及当前识别的模型级、账户级或未知影响范围,但不提供自动充值入口。 + +super_admin 只有在新的免费周期开始或供应商恢复后,才可以恢复被暂停的辅助服务。AI 网关余额不足造成的模型运行时不可用状态必须在真实余额确认恢复后才能解除。后台不能提高 Resend 或高德的 P0 硬上限,也不能开启付费通道。 + +### ADMIN-09 后台操作审计 + +以下敏感操作必须形成不可修改的 AdminOperationLog: + +- 管理员账号首次创建、登录结果、停用、恢复和白名单状态生效; +- 普通用户账号暂停或恢复、点数调整; +- 邀请码创建、停用和限制变更; +- 模型路由、点数、比例、参考图限制、启停、默认模型、推荐优先级和余额恢复; +- 普通贴纸与复杂模板的上传、版本发布、排序、启停和测试批次变更,以及普通贴纸历史原图和缩略图清理的请求、引用校验与结果; +- AssetPreviewGrant 的授予、撤销和到期配置; +- Resend、高德等辅助服务的硬上限下调、暂停和恢复。 + +超级管理员通过后台执行的操作使用 actor_type=super_admin,并以管理员账号标识作为 actor_ref。当前阶段后端安全配置中的管理员白名单、身份冲突处理或恢复配置被 Dada 读取并生效时使用 actor_type=system,actor_ref 固定为 backend_secure_config;不得记录执行配置变更的人员身份、白名单内容、密钥或其他安全配置值。 + +私有图片或完整提示词查看继续写入独立的 PrivateContentAccessLog,不要求在 AdminOperationLog 中重复保存私有内容或目标正文。两类日志均不得记录验证码、API 密钥、会话令牌、完整提示词、图片内容或其他不必要的私有正文;除系统按保留期清理外,任何管理员和后台功能均不能修改或删除记录。 + +## 17. 产品数据契约 + +本节定义产品语义,不指定数据库表、API JSON 或代码类型。 + +### 17.1 UserProfile + +| 字段 | 含义 | +| --- | --- | +| user_id | Dada 内部不可猜测标识 | +| email | 登录邮箱 | +| creator_name | 创作署名 | +| social_id | 成品展示用社交 ID | +| role | user 或 super_admin | +| account_status | active、suspended 或 deleted | +| counts_toward_stage_limit | 普通账号为 true,super_admin 为 false | +| available_balance | 可用于新任务的点数,超级管理员调点时可为负数 | +| reserved_balance | 运行中任务冻结点数,不能被管理员直接修改 | +| private_content_notice_version | super_admin 最近确认的私有内容区域告知版本;普通用户为空 | +| private_content_notice_acknowledged_at | super_admin 确认该告知版本的时间;普通用户为空 | +| created_at | 注册时间 | + +### 17.2 ModelConfig + +| 字段 | 含义 | +| --- | --- | +| model_id | 上游模型标识 | +| display_name | 前台名称 | +| config_version | 每次影响用户确认或任务结算的配置变更均递增 | +| route_profile | 网关路由和协议配置 | +| gateway_account_ref | 不包含密钥的网关结算账户引用,用于判断共享账户的模型停用范围 | +| error_mapping_profile | 版本化供应商错误映射,只能指向固定 GenerationErrorCategory | +| enabled | 是否允许新任务 | +| is_default | 是否为后台配置默认模型;所有配置中必须始终恰好有一个已启用默认模型 | +| recommendation_priority | 运行时推荐顺序使用的唯一正整数;1 为最高优先级,不允许模型间并列 | +| credit_cost | 单次点数 | +| supported_ratios | 支持比例 | +| reference_limits | 参考图数量、格式和大小限制 | +| prompt_limit | 提示词长度限制 | +| safety_source | 当前依赖的供应商安全策略 | +| contract_validation_status | unverified、verified 或 blocked;契约相关配置变化后立即重置为 unverified | +| contract_evidence_ref | 三模型网关脱敏验证证据引用 | + +### 17.3 Project + +| 字段 | 含义 | +| --- | --- | +| project_id | 私有项目标识 | +| owner_id | 项目所有者 | +| name | 可修改项目名 | +| canvas_ratio | 创建后不可修改的画布比例 | +| canvas_size | 固定导出像素 | +| active_background_id | 当前生成历史底图 | +| background_adjustments | 裁剪、适配和调色状态 | +| canvas_elements | 文字和贴纸元素,最多 50 个 | +| latest_exports | 最新 JPG 和 PNG | +| state_version | 自动保存和冲突检测版本 | +| save_status | saved、dirty、saving、failed 或 conflicted | +| status | active、trashed 或 purged;只有 active 计入 20 个活动项目上限 | +| draft_state | generating、failed_empty 或 has_success_output | +| batch_deletable | 仅没有成功生成图的 failed_empty 草稿为 true | +| deleted_at / purge_at | 进入回收站时间,以及精确增加 720 小时后的不可恢复时间 | +| created_at / updated_at | 创建与更新时间 | + +### 17.4 GenerationJob + +| 字段 | 含义 | +| --- | --- | +| generation_id | 任务标识 | +| project_id | 所属项目 | +| model_id | 实际模型 | +| model_config_version | 用户确认并提交时使用的配置版本 | +| confirmed_credit_cost | 用户提交前确认的点数成本 | +| prompt | 用户提示词 | +| ratio | 请求比例 | +| reference_assets | 私有参考图关系 | +| status | queued、running、succeeded、failed、rejected | +| reserved_credits | 冻结点数 | +| final_credit_state | 扣除或释放 | +| output_asset | 成功图片 | +| error_category | 引用 GenerationErrorCategory;failed 或 rejected 时必填,queued、running 或 succeeded 时为空 | +| created_at / finished_at | 任务时间 | + +### 17.5 CanvasElement + +共有字段: + +- element_id; +- type; +- template_or_asset_id; +- position; +- scale; +- rotation; +- z_index; +- opacity; +- created_at。 + +type 取值: + +- text_template; +- static_sticker; +- color_card; +- dynamic_sticker。 + +文字元素额外保存内容、模板 ID、字体覆盖、字号和样式参数。色卡保存当前五色结果和 style ID。动态贴纸保存模板真实消费的字段、格式化值,以及 DYN004 经授权的原始坐标。 + +### 17.6 TemplateRegistry + +复杂模板注册项至少包含: + +- 稳定 ID; +- family; +- category; +- display_name; +- default_text; +- resource_class; +- resource_version; +- canonical resource reference; +- default font; +- preview reference; +- required dynamic fields; +- release_status; +- test_batch_ids; +- display order; +- validation status。 + +release_status 取值为 imported、internal_preview、passed、enabled 或 disabled。复杂模板额外包含 release_tier,取值为 alpha_whitelist 或 full_p0。 + +- P0-A 普通用户只可见 alpha_whitelist、validation status 为 passed 且 release_status 为 enabled 的模板; +- 指定内部测试账号可见授权批次中 release_status 为 internal_preview 或 passed 的模板; +- full_p0 模板可以分批进入 passed,但必须在全部剩余复杂模板通过后一次性改为 enabled; +- disabled 对所有普通账号和内部测试账号隐藏,但已有项目仍按其资源版本渲染。 + +### 17.7 StaticStickerCatalog + +普通贴纸目录至少包含: + +- 稳定贴纸 ID; +- part 编号; +- part 内顺序; +- 原始文件名; +- 相对资源路径; +- thumbnail reference; +- 文件格式; +- 宽高; +- 文件哈希; +- enabled; +- resource version; +- asset_origin:bundled_read_only 或 admin_uploaded。 + +普通贴纸目录项属于 public_release_asset;目录和缩略图可以公开只读,但不能由公开目录推导用户私有资源地址。 + +asset_origin 为 admin_uploaded 时,原图和由 Dada 生成的缩略图存放在 LocalDataRoot 并计入 managed_content_bytes;asset_origin 为 bundled_read_only 时,资源属于产品随安装包提供或通过第 18 节安全配置原地引用的只读规范素材库,不计入 managed_content_bytes。历史上传原图和缩略图只有在不再被任何已发布版本或项目引用时才可显式清理。 + +重复文件仍使用不同贴纸 ID 和目录条目。 + +### 17.8 DynamicStickerData + +动态数据提供器按模板需要提供以下受控字段: + +- 时间和日期; +- 地点名称、城市或英文城市名; +- 经授权的经纬度; +- 创作署名; +- 社交 ID; +- 模板明确消费的格式化派生值。 + +不得因为通用脚本包含字段,就要求用户填写当前模板不使用的信息。 + +### 17.9 CreditAccount 与 CreditLedger + +CreditAccount 至少包含 available_balance、reserved_balance 和更新时间。每次点数变化必须形成不可静默修改的流水,流水至少包含类型、数量、操作前后两类余额、关联任务或管理员、管理员调点原因和时间。 + +流水类型支持: + +- registration_grant; +- generation_reserve; +- generation_commit; +- generation_release; +- admin_adjustment。 + +### 17.10 PrivateContentAccessLog + +记录超级管理员查看私有内容的事件,至少包含管理员账号、目标、访问时间、查看内容类型和 expires_at。expires_at 固定为访问事件发生后 180 天。记录在保留期内不可修改或人工删除,到期后由系统清理。 + +用户注销后,管理员账号继续保留,用户和目标替换为不可反推的随机匿名标识;注销不会延长原日志的 expires_at。 + +### 17.11 AnonymousRetainedEvent + +注销后保留的匿名事件明细至少定义: + +- anonymous_subject_id:注销时生成且不保留身份映射的随机标识; +- event_type; +- model_id; +- outcome 和 error_category; +- credit_delta; +- occurred_at; +- expires_at:不晚于注销时间后 180 天。 + +该对象不得包含邮箱、IP、提示词、图片、项目 ID、原任务 ID 或其他可恢复内容。 + +### 17.12 AssetReleaseManifest + +版本化素材发布清单至少包含: + +- release_version; +- storage_backend; +- storage_base_ref; +- 资源稳定 ID、相对路径、大小和哈希; +- access_class:public_release_asset、internal_preview_asset 或 private_user_asset; +- catalog 与 metadata 版本; +- release_tier; +- validation_status; +- created_at。 + +AssetReleaseManifest 是后端内部资源清单,可以用 access_class 区分资源。浏览器可读取的公开 manifest 是其受控导出,只能包含 public_release_asset。P0-A 的 storage_backend 固定为 local_filesystem,storage_base_ref 只引用本地安全配置中的素材根目录,不向浏览器暴露本机绝对路径。internal_preview_asset 不得进入公开 manifest,其资源路径不得仅由模板稳定 ID 推导;授权账号只能通过本地后端按 AssetPreviewGrant 下发的授权 manifest 和登录鉴权资源接口访问。private_user_asset 的路径和可推导标识同样不得进入公开导出,必须通过所有者登录鉴权或经审计的超级管理员访问。P0-A 运行时依赖发布清单和本机只读素材根目录,不依赖公司对象存储;P0-B 的 storage_backend 和 storage_base_ref 必须在公司系统合并时重新定版,且不得在本版预设为 COS。 + +### 17.13 AssetPreviewGrant + +内部素材预览授权至少包含: + +- grant_id; +- user_id:被授权的普通账号; +- test_batch_id; +- granted_by:执行授权的 super_admin; +- granted_at / expires_at; +- status:active、revoked 或 expired。 + +AssetPreviewGrant 不改变 UserProfile.role,不进入公开素材 manifest,也不能授予批次预览以外的任何权限。P0-A 本地后端每次下发内部预览 manifest 或读取内部预览资源前必须重新校验登录状态和授权;授权被撤销、到期或账号被停用后不得再取得资源。P0-B 若采用短时地址,必须在公司系统合并方案中重新定义有效期和撤销语义。 + +### 17.14 ClientCachePolicy + +客户端主动持久缓存策略至少包含: + +- max_public_cache_bytes:157,286,400 字节,对用户显示为 150 MB 上限; +- current_public_cache_bytes; +- eviction_policy:LRU; +- cached_release_version; +- last_eviction_at。 + +只有 public_release_asset 中的公开缩略图、公开模板转换产物和公开字体可以进入该缓存。internal_preview_asset、提示词、私有图片引用、项目状态、未保存编辑内容、验证码和会话令牌不得进入该缓存。用户主动下载到系统下载目录的图片不属于 Dada 缓存。 + +### 17.15 ExternalServiceUsage + +免费辅助服务用量至少包含: + +- service_id:resend_email 或 amap_web_service; +- period_type 与 period_start; +- hard_limit; +- used_count; +- service_status:active、paused_quota、paused_provider 或 disabled; +- pause_reason; +- updated_at。 + +service_status 只使用上述四种状态,不设置独立的运行时邮件质量降级状态。达到 hard_limit 后必须先把服务状态改为 paused_quota,再拒绝后续调用;Resend 接口不可用、明确退信故障或其他供应商异常统一使用 paused_provider,并通过 pause_reason 记录非敏感错误类别。发布前人工送达测试失败只阻止发布,不写入运行时 service_status。P0 不设计支付、自动购买、自动充值或自动扩容状态。 + +### 17.16 AdminOperationLog + +后台敏感操作审计至少包含: + +- log_id; +- actor_type:super_admin 或 system; +- actor_ref:super_admin 使用管理员账号标识,system 使用 backend_secure_config 等固定非个人来源标识; +- operation_type; +- target_type 和不可猜测的 target_ref; +- result:succeeded 或 failed; +- before_summary / after_summary:仅保存完成审计所需的非敏感状态摘要; +- occurred_at; +- expires_at:固定为 occurred_at 后 180 天。 + +记录在保留期内不可修改或人工删除,到期后由系统清理。不得记录验证码、API 密钥、会话令牌、完整提示词、图片内容或其他不必要的私有正文。私有内容查看使用 PrivateContentAccessLog,不在本对象中重复保存。 + +### 17.17 GatewayBalanceState + +AI 网关余额状态至少包含: + +- gateway_account_ref:不包含密钥的网关结算账户配置引用; +- balance_status:available、insufficient 或 unknown; +- impact_scope:model、account 或 unknown; +- affected_model_ids; +- runtime_unavailable_model_ids; +- detected_at 和 last_confirmed_at; +- recovery_status:not_required、awaiting_confirmation 或 confirmed; +- source_category:用于说明来自网关响应、后台配置或人工确认的非敏感类别。 + +impact_scope 为 model 时仅把明确受影响模型标记为运行时不可用;为 account 或 unknown 时把所有共享 gateway_account_ref 的模型标记为运行时不可用。该状态不得改写 ModelConfig.enabled、is_default 或 recommendation_priority。恢复运行时可用状态前必须把余额恢复确认为 confirmed,并形成 AdminOperationLog。 + +### 17.18 GenerationErrorCategory + +生成提交响应和失败任务使用同一套固定产品错误注册表。每个分类至少定义: + +- category_id:GEN-16 固定的九个 error_category 之一; +- task_outcome:not_created、failed、rejected 或 failed_or_not_created; +- user_action:retry_same_input、wait_and_retry、edit_input、choose_model_or_contact_admin 或 contact_admin; +- retry_policy:immediate、after_wait、after_edit、after_model_change 或 none; +- credit_behavior:no_reserve 或 release_if_reserved; +- message_key:供 UIDesign.md 绑定用户文案的稳定键。 + +该注册表在 P0 中不是后台可编辑素材。ModelConfig.error_mapping_profile 只能把上游结果映射到现有 category_id;不得把供应商原始错误码、错误正文、堆栈或内部地址作为用户消息。提交前错误返回分类但不创建 GenerationJob;任务创建后的 failed 或 rejected 必须记录分类并只释放一次冻结点数。 + +### 17.19 LocalBackendStorageState + +P0-A 本机内容存储状态至少包含: + +| 字段 | 含义 | +| --- | --- | +| storage_backend | 固定为 local_filesystem | +| data_root_ref | LocalDataRoot 的安全配置引用,不保存硬编码用户名或对前端暴露绝对路径 | +| managed_content_bytes | Dada 管理的参考图、生成图、成品、派生二进制文件,以及后台上传的普通贴纸原图和缩略图当前总字节数 | +| hard_limit_bytes | 固定为 5,368,709,120 字节,对用户显示为 5 GB | +| capacity_notice_level | normal、warning 或 critical;按 managed_content_bytes 与硬上限比例确定 | +| storage_status | active、full 或 unavailable | +| last_measured_at | 最近一次容量测量时间 | + +LocalDataRoot 默认位于当前 Windows 用户的应用数据目录,必须可配置,且不得放在 Git 仓库或项目目录中。P0-A 的本机数据库、账号、项目、参考图、生成图、导出成品、审计日志和派生文件均写入 LocalDataRoot。 + +LocalDataRoot 是本地后端管理的文件系统存储,不是浏览器 localStorage、IndexedDB 或 Cache Storage。后端把已提交项目状态写入本机磁盘,不改变“浏览器不得持久化私有草稿、提示词或图片引用”的规则。 + +managed_content_bytes 只统计 Dada 管理的参考图、生成图、导出成品、派生二进制文件,以及 super_admin 通过后台上传的普通静态贴纸原图和由 Dada 生成的缩略图。产品随安装包提供或通过第 18 节本机安全配置原地引用的只读规范素材库、应用代码、157,286,400 字节的浏览器公开素材缓存、数据库元数据、审计记录和用户主动下载目录均不计入。5 GB 是整个 P0-A 本机实例的内容硬上限,不按账号重复计算。 + +数据库元数据、审计记录、诊断日志和错误日志不计入 5 GB 内容额度,也不在本版增加单独文件大小硬上限。DevelopmentPlan 必须定义 180 天审计清理的执行机制、诊断与错误日志轮转,以及数据库或日志目录不可写时把 storage_status 切换为 unavailable 的处理,防止这些文件无限增长或写入失败后继续调用 AI。 + +capacity_notice_level 按以下固定阈值计算: + +- normal:managed_content_bytes 低于 4,294,967,296 字节,即低于硬上限的 80%; +- warning:managed_content_bytes 达到 4,294,967,296 字节且低于 4,831,838,208 字节,即达到 80% 且低于 90%;显示非阻断容量提醒; +- critical:managed_content_bytes 达到 4,831,838,208 字节且低于 5,368,709,120 字节,即达到 90% 且尚未满额;持续显示清理提醒。 + +warning 和 critical 均不阻止生图、参考图持久化、最新成品保存、后台普通贴纸原图上传或缩略图生成,也不得触发自动删除。critical 提示必须按以下顺序引导用户:先下载需要保留的成品,再永久删除不需要的项目,并可由 super_admin 确认清理符合条件的无引用历史贴纸文件,随后等待物理清理和容量重新测量,storage_status 恢复 active 后继续生成。告警展示、容量监控和物理清理队列的工程实现由 DevelopmentPlan 定义,但不得改变阈值、阻断条件或人工清理顺序。 + +- 达到或预计本次写入后超过 hard_limit_bytes 时,storage_status 为 full;系统不得自动删除任何文件,必须阻止新生图、参考图持久化、latest_exports 保存、后台普通贴纸原图上传、缩略图生成和其他受管二进制写入,并且不得创建 AI 任务、调用上游或冻结点数; +- full 状态仍允许编辑已有项目、按既有权限查看和下载已有文件、永久删除项目释放空间、显式清理符合条件的历史普通贴纸原图和缩略图,以及只下载但不更新 latest_exports 的客户端导出; +- LocalDataRoot 不可写或系统磁盘已满时,storage_status 为 unavailable;系统停止新增写操作、后台普通贴纸原图上传、缩略图生成和 AI 调用,但保留已有项目及素材的查看、下载和删除入口; +- 普通贴纸历史文件不得自动清理。只有不再被任何已发布版本或项目引用的后台上传原图和缩略图才可由 super_admin 确认后显式清理;清理必须形成不可修改的 AdminOperationLog,仍有引用时必须拒绝; +- 对项目文件或普通贴纸历史文件执行清理后,只有物理清理完成并重新计量,系统才可更新 managed_content_bytes、capacity_notice_level、storage_status 和 last_measured_at;LocalDataRoot 可写且容量低于硬上限时才能恢复 active; +- P0-A 不创建自动备份,本机测试账号、项目、内容和日志均视为可丢失,不自动或手动迁移到公司正式系统;需要保留的原始生成图或 JPG/PNG 成品由用户主动下载; +- P0-A 不对本机文件实施 Dada 应用层加密,依赖当前 Windows 用户登录和文件系统权限保护。 + +## 18. 素材来源与运行边界 + +### 18.1 总交接入口 + +以下路径表示 2026-07-23 当前机器上的素材交接默认位置,使用 Windows `%USERPROFILE%` 占位符,不包含具体用户名。P0-A 通过本地后端安全配置解析并引用这些素材根目录,原地只读复用;解析后的绝对路径不得写入 PRD、Git、普通项目数据或浏览器响应: + +- 交接说明:%USERPROFILE%\Desktop\sticker_web_handoff\STICKER_WEB_REPLICATION_HANDOFF.md +- 机器总入口:%USERPROFILE%\Desktop\sticker_web_handoff\sticker_web_catalog_manifest.json +- 完整性报告:%USERPROFILE%\Desktop\sticker_web_handoff\sticker_archive_validation_20260722.json + +当前完整性报告 all_valid 为 true。 + +### 18.2 文字模板 + +- 根目录:%USERPROFILE%\Desktop\sticker_text\模板\单模板归档 +- 规范入口:各分类 catalog.csv 和 templates//metadata.json + +### 18.3 字体 + +- 根目录:%USERPROFILE%\Desktop\sticker_text\字体\面板全量采集\font_panel_full_20260722 +- 规范入口:reports/font_panel_catalog.csv 和单字体 metadata.json + +### 18.4 文字行为资料 + +- 输入资料:%USERPROFILE%\Desktop\sticker_text\键盘 +- 样式资料:%USERPROFILE%\Desktop\sticker_text\样式 + +### 18.5 普通贴纸 + +- 根目录:%USERPROFILE%\Desktop\贴纸素材 +- 当前结构:sticker_part1 至 sticker_part25 +- 当前数量:1,407 张 PNG + +普通贴纸当前缺少统一 catalog,开发准备阶段必须生成 StaticStickerCatalog,但不得改写原始素材。 + +### 18.6 色卡 + +- 根目录:%USERPROFILE%\Desktop\sticker_colour\单模板归档 +- 规范入口:catalog.csv 和 styles//metadata.json + +### 18.7 动态贴纸 + +- 根目录:%USERPROFILE%\Desktop\sticker_interactive\单模板归档 +- 规范入口:catalog.csv 和 templates//metadata.json + +### 18.8 只读规则 + +- 规范归档是运行素材转换的唯一输入; +- 历史 PB、截图、录像、采集批次和对账目录仅为证据层; +- 产品运行时不读取证据层; +- 不删除、覆盖或原地改写历史资源; +- 规范目录中的硬链接资源按只读处理; +- 需要修正模板时通过新资源版本发布。 + +### 18.9 P0-A 本机素材交付 + +- 现有约 3.57 GB 规范素材通过第 18.1 节的 manifest 和本节各素材根目录原地只读复用,不复制全库,不提交到 Git,也不放入 LocalDataRoot; +- Git 只保存版本化 AssetReleaseManifest、catalog、metadata、版本号和哈希; +- 素材根目录由本地后端安全配置管理,代码和普通项目数据不得硬编码当前用户名或桌面绝对路径; +- 浏览器只能使用资源 ID 调用本地后端接口,不得通过 file://、本机绝对路径或 File System Access API 直接读取素材根目录;本地后端响应不得回显素材根目录绝对路径; +- 目录移动、改名、不可读或清单校验失败时,相关素材功能进入 unavailable 并提示重新配置路径,不修改代码、不自动复制素材; +- 本地后端根据 manifest 提供 public_release_asset 的公开只读接口,并对 internal_preview_asset 执行登录状态和 AssetPreviewGrant 校验; +- 发布新资源版本时创建新的 manifest 与版本引用,不覆盖已经被项目引用的旧版本; +- 产品随安装包提供或由本机安全配置原地引用的只读规范素材库不计入 managed_content_bytes;super_admin 后台上传的普通贴纸原图和缩略图必须存放在 LocalDataRoot 并计入 managed_content_bytes,不得写回只读素材根目录; +- 开发准备产生的临时转换文件必须计入 LocalBackendStorageState 的派生二进制文件,确认不再使用后可以显式清理,但不得改写素材源目录; +- P0-B 的正式存储、制品发布、CI 获取和资源交付格式由公司系统合并方案重新定版,本版不假设使用 COS 或任何特定对象存储。 + +### 18.10 P0-A 本机数据目录 + +- LocalDataRoot 与只读素材根目录严格分离; +- 默认位置使用当前 Windows 用户的应用数据目录,由本地后端解析,不硬编码用户名; +- 本机数据库、账号、项目、参考图、生成图、导出成品、审计日志和派生文件写入 LocalDataRoot; +- LocalDataRoot 不得位于 Git 仓库、项目目录或用户主动下载目录; +- 浏览器只能使用资源 ID 通过本地后端鉴权接口访问 LocalDataRoot 中的私有文件,不得获得绝对路径,也不得通过 file:// 或 File System Access API 直接读取;用户主动使用标准文件选择器选择参考图不受此限制; +- 删除项目、回收站到期和账号注销均按本 PRD 规则删除相关本机文件;用户侧不可恢复后,物理文件可以由本地后端异步清理; +- 删除 LocalDataRoot 或重新安装时不提供自动恢复;P0-A 不创建自动备份,也不向 P0-B 自动或手动导入测试账号、项目或日志; +- P0-A 不提供可编辑项目包、数据库、账号、点数、审计日志或素材关系的导出与导入。用户只能主动下载原始生成图和 JPG/PNG 成品,且这些图片不作为 P0-B 正式系统的数据迁移来源。 + +## 19. 隐私、安全与合规要求 + +### PRIV-01 API 密钥 + +- P0-A API 密钥只能存在于本地后端安全配置;P0-B 迁移到公司正式安全配置; +- 不进入前端包; +- 不进入 PRD、日志、项目或错误提示; +- 后台不能回显完整密钥。 + +### PRIV-02 用户内容 + +- 提示词、参考图、生成图和项目状态均为私有内容; +- 发往 AI 网关、Resend 和高德的外部传输必须使用 HTTPS;P0-A 浏览器与 localhost 本地后端之间不作为远程公开传输; +- 存储访问必须按项目所有者鉴权; +- P0-A 私有资源只能通过本地后端登录鉴权接口访问,不能进入公开素材 manifest 或本地公开静态目录; +- 浏览器不得通过 file://、本机绝对路径或 File System Access API 直接读取素材根目录、LocalDataRoot 或私有文件;本地后端接口使用资源 ID 且不得回显绝对路径;用户主动使用标准文件选择器选择参考图不受影响; +- 未保存画布、提示词、私有图片引用和编辑内容不得写入 localStorage、IndexedDB 或 Cache Storage; +- 超级管理员查看内容必须自动审计;记录在 180 天保留期内不可修改或人工删除,到期后由系统清理。 + +### PRIV-03 定位 + +- DYN004 请求浏览器定位前必须说明坐标会保存到项目并显示在导出成品中; +- 用户拒绝后仍可手动输入地点; +- 用户拒绝 Dada 提示后不得调用浏览器定位或自动插入 DYN004; +- 只有 DYN004 在一次明确提示并取得同意后保存原始坐标; +- 坐标不用于广告、用户画像或公开搜索。 + +### PRIV-04 第三方处理 + +简短《内测使用与隐私告知》必须告知用户: + +- 提示词、参考图和必要参数会发送到所选图片模型服务; +- 邮箱验证码由 Resend 处理; +- 定位可能发送到个人认证的高德 Web 服务; +- P0-A 图片、字体和模板素材从项目方电脑上的只读素材根目录经本地后端提供,账号、项目和生成内容保存在 LocalDataRoot;P0-B 的正式存储在公司系统合并时重新告知; +- P0-A 测试数据依赖当前 Windows 用户登录和文件系统权限保护,Dada 不提供应用层加密或云备份;机器损坏、重装或 LocalDataRoot 被删除后数据不可恢复,重要原始生成图和 JPG/PNG 成品需要用户主动下载; +- 超级管理员在排障或管理场景下可以直接查看私有内容且操作会被记录; +- 注销时内容立即删除,匿名事件和访问审计最多保留 180 天。 + +P0-A 本地测试页或设置区域还必须明确告知:“测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。” + +### PRIV-05 素材授权 + +项目方已确认当前素材获得公开使用授权。授权记录整理暂不作为 P0-A 或 P0-B 阻塞门槛;正式公开注册或商业化前必须保留可核查记录,并明确字体、贴纸和模板的来源、商用、再分发和二次创作导出范围。该假设不构成对法律风险的绝对保证。 + +### PRIV-06 内测告知版本 + +- 注册必须勾选同意简短《内测使用与隐私告知》; +- 告知必须具有版本号和生效日期,账号记录用户同意的版本与时间; +- P0 不要求单独生成完整法律条款,但简短告知不得省略 PRIV-04 的处理方和数据用途; +- 正式公开注册前必须升级并重新评估完整服务条款与隐私政策。 + +## 20. 非功能需求 + +### NFR-01 支持环境 + +P0-A 只正式支持运行本地后端的同一台 Windows 电脑上的当前稳定版 Chrome 和 Edge,且只能通过 localhost 访问。P0-A 不支持 macOS Safari、iOS Safari、Android Chrome、手机、局域网、远程访问或跨设备流程。 + +P0-A 必须在进入任何产品功能前硬性检查浏览器支持状态。非当前支持版本的 Chrome/Edge 以及其他浏览器只能进入浏览器不受支持引导页,不得继续进入登录、注册、项目、编辑器或运营后台;引导页不得提供绕过或“仍然继续”入口。 + +P0-B 在完成公司系统合并与远程部署验收后,计划支持发布时当前稳定版的 Windows Chrome、Windows Edge、macOS Safari、iOS Safari 和 Android Chrome,其中手机竖屏与横屏提供完整编辑。各阶段均不承诺兼容验收时的前一稳定版或更旧版本。 + +### NFR-02 视觉一致性 + +同一发布阶段中提供相同编辑能力的支持环境必须保持: + +- 相同字体选择; +- 相同换行; +- 相同布局; +- 相同颜色、描边、背景和元素尺寸; +- 相同导出像素。 + +阶段范围按以下规则执行: + +- P0-A 只对核心白名单文字模板及其字体、4 个色卡和 10 个动态贴纸,在本机 Windows Chrome 与 Edge 当前稳定版之间执行视觉一致性验收,对应 AC-32; +- P0-B 才对全部 332 个文字模板、86 个字体项、16 个色卡和 35 个动态贴纸,在 Windows Chrome/Edge、macOS Safari、iOS Safari 和 Android Chrome 当前稳定版中执行全量视觉回归,对应 AC-26; +- P0-B 的全量和跨平台回归结果不属于 P0-A 完成条件。 + +视觉回归使用固定浏览器版本、操作系统、视口、DPR、字体加载完成状态、动画状态和确定动态数据生成基准图。 + +- 元素边界相对基准图偏差不得超过 2px; +- 任一颜色通道绝对差异超过 16/255 的像素视为显著差异; +- 显著差异像素不得超过画布总像素的 1%; +- 超过任一阈值必须人工复核,不能自动判定通过; +- DYN012、style_02 至 style_16 和其他已知替代或近似项无论是否低于阈值均需人工复核。 + +### NFR-03 编辑性能 + +P0-A 电脑完整编辑器和 P0-B 电脑完整编辑器在包含 50 个元素的标准画布中: + +- 选择和移动元素不能出现持续无响应; +- 画布控件不能因动态内容改变尺寸而跳动; +- 自动保存不能阻塞正在进行的本地画布操作; +- 导出失败不能破坏项目状态。 + +P0-B 手机完整编辑器采用两级门槛: + +- 20 个混合元素为常规画布,选择、移动、缩放、旋转、撤销重做和面板操作不得出现持续无响应或操作丢失; +- 50 个混合元素为压力上限,必须能完成选择、修改、保存和导出; +- 50 元素压力模式允许关闭实时辅助线或降低编辑预览分辨率,但必须明确提示,不得删除元素、改变布局或降低最终导出分辨率与质量; +- 手机旋转屏幕不得改变画布内容、选区、撤销栈或未保存状态。 + +具体性能预算由 DevelopmentPlan 定义。 + +### NFR-04 内测容量 + +P0-A 人工验收固定使用项目方控制的 1 个超级管理员账号和 1 个普通账号,不要求朋友参与或招满 10 人。跨普通用户隔离验收由测试程序在同一电脑的独立浏览器配置中临时创建第二个普通账号,按普通权限和名额规则运行,完成后清理。系统最多开放 10 个普通账号,P0-B 最多开放 50 个普通账号。active 和 suspended 普通账号占名额,deleted 普通账号释放名额,super_admin 不占普通账号名额。同账号仅一个运行中生成任务,系统必须具备用量、失败和本机存储状态监控。 + +### NFR-05 数据完整性 + +- 点数扣减必须原子化; +- 只有带完整流水的超级管理员调点可以使 available_balance 为负数,生成与结算流程不得制造负数; +- 自动保存必须有明确成功或失败状态; +- 项目资源与项目状态必须保持引用一致; +- 素材下架不能破坏已有项目; +- 账号注销不能残留可恢复作品; +- AdminOperationLog 和 PrivateContentAccessLog 在 180 天保留期内不得被后台修改或人工删除,到期后必须由系统清理。 + +### NFR-06 可访问性基础 + +- 关键按钮必须可用键盘访问; +- 控件不能只依赖颜色表达状态; +- 图片上传、生成状态和错误必须有文字说明; +- 图标名称和焦点顺序由 UIDesign.md 明确。 + +### NFR-07 客户端存储上限 + +- Dada 主动建立的公开素材持久缓存硬上限为 157,286,400 字节,对用户显示为 150 MB; +- 缓存采用 LRU 淘汰,资源升版后优先清理不再引用的旧版本; +- 不预下载全量文字模板、普通贴纸、色卡、动态贴纸或字体; +- 用户主动下载到系统下载目录的成品不计入 Dada 缓存; +- 浏览器自身不受 Dada 控制的通用 HTTP 缓存不计入应用内计数,但 Dada 不能借此建立第二套应用持久缓存。 + +### NFR-08 辅助服务零新增自动费用 + +- P0-A 使用项目方现有电脑、本机磁盘和用户主动配置的 AI 生图额度,不接入会自动转为付费的辅助服务; +- 邮件和高德达到应用侧硬上限时必须暂停对应调用,不能购买流量、自动充值或自动扩容; +- AI 网关不得开启自动充值;模型级余额不足只把对应模型标记为运行时不可用,账户级或无法确定影响范围时把共享该网关结算账户的全部模型标记为运行时不可用,不改写后台默认模型; +- P0 不承诺 AI 调用成本为零;P0-B 公司基础设施费用需在合并方案中另行确认。 + +### NFR-09 P0-A 本机运行边界 + +- 本地后端只监听 localhost 回环地址,不监听局域网地址,也不提供公网映射; +- LocalDataRoot 必须位于项目目录和 Git 仓库之外,并使用当前 Windows 用户权限读写; +- P0-A 不创建本机自动备份,不承诺恢复被删除的数据目录或操作系统故障后的测试数据; +- 既有约 3.57 GB 素材原地只读使用,不复制到 LocalDataRoot; +- API 密钥只进入本地后端安全配置,不写入仓库、前端、manifest 或本机数据日志。 +- DevelopmentPlan 必须定义审计清理、诊断与错误日志轮转,以及数据库或日志目录不可写时进入 unavailable 的实现;本版不规定数据库或日志文件大小硬上限。 + +## 21. 异常与边界状态 + +| 场景 | 预期产品行为 | +| --- | --- | +| 邀请码无效或过期 | 阻止注册并说明原因 | +| 已注册邮箱再次注册 | 不重复创建账号,明确引导登录 | +| 未注册或已注销邮箱尝试登录 | 不创建会话,明确引导使用邀请码注册 | +| 暂停账号注册或登录 | 不创建账号或会话,明确提示联系管理员 | +| 非管理员白名单邮箱尝试后台登录 | 发送验证码前拒绝,不创建管理员账号或会话 | +| 管理员被停用或移出白名单 | 已有管理员会话立即失效,不允许继续后台操作 | +| 全部管理员被停用 | 后台不提供自助恢复,只能由部署人员通过当前阶段的后端安全配置恢复 | +| 验证码错误或过期 | 不创建会话,允许按频率限制重试 | +| 点数不足 | 不创建任务,不调用上游 | +| 超级管理员扣点超过可用余额 | available_balance 可变为负数,reserved_balance 不变并记录完整流水 | +| 模型被停用 | 从新任务选择中移除,历史仍可见 | +| 超级管理员停用当前默认模型但未提供合法替代模型 | 原子操作整体失败,原启停、默认和推荐优先级均不变 | +| 模型推荐优先级缺失、非正整数或重复 | 整个模型配置保存失败,不允许部分写入 | +| 后台默认模型运行时不可用 | 不改写配置默认模型;在其他运行时可用模型中按 recommendation_priority 返回推荐模型,没有可用模型时返回空推荐并进入既有生成禁用或失败状态 | +| 当前比例不被模型支持 | 要求重新选择比例 | +| 参考图数量超出模型限制 | 阻止提交并指出超出数量 | +| 提交时 ModelConfig 已变化 | 不创建任务或冻结点数,显示最新配置并要求重新确认 | +| 已有运行中任务 | 返回当前任务,不创建第二个 | +| upstream_timeout、upstream_failed 或 unknown_retryable | 进入 failed,释放点数,保留草稿并按分类提供重试 | +| AI 网关明确为模型级余额不足 | 释放任务冻结点数,只把明确受影响模型标记为运行时不可用,不改写后台默认模型 | +| AI 网关账户级余额不足或影响范围未知 | 释放任务冻结点数,把共享该网关结算账户的全部模型标记为运行时不可用,不改写后台默认模型 | +| safety_rejected | 进入 rejected,不保存输出,释放点数并要求修改输入 | +| 生成历史达到 10 张 | 要求删除旧图后再生成 | +| active 项目达到 20 个 | 阻止创建或恢复;trashed 项目保持原 purge_at,要求先释放活动项目名额 | +| 强制刷新、关闭或浏览器崩溃 | 丢弃未保存修改,重新打开时只加载最后一次后端 saved 状态 | +| 画布达到 50 个元素 | 阻止添加并提示删除元素 | +| 自动保存失败 | 显示未保存,允许重试 | +| 多标签或多设备版本冲突 | 旧页面只读,可本地导出一次,之后刷新后端最新版;P0-A 只验收同机多标签 | +| 定位被拒绝 | 回退到地点手动输入 | +| 地理编码失败 | 保留手动输入,不阻塞其他编辑 | +| 字体资源失败 | 显示模板不可用或明确回退,不能无提示换字形 | +| 导出失败 | 保留上次成功成品和当前项目 | +| 非当前支持版本 Chrome/Edge 或其他浏览器访问 P0-A | 直接显示浏览器不受支持引导页,不进入任何产品功能且不提供继续入口 | +| 非本机、局域网或远程地址尝试访问 P0-A | 无法连接本地后端,产品不显示远程或移动端入口 | +| P0-B 手机旋转屏幕 | 自适应重排,不丢失画布、撤销栈或未保存状态 | +| 超级管理员查看私有内容 | 按 super_admin 身份与告知版本持久记录首次提示确认;同版本不重复、文案升版后重新提示,每次点击“打开并记录审计”仍生成独立不可篡改审计 | +| 后端保存失败但浏览器可渲染 | 允许下载本地导出,不更新后端成品 | +| 项目没有导出成品 | 显示明确空状态,不自动导出 | +| Resend 达到硬上限或供应商接口不可用 | 暂停注册和需要新验证码的登录,显示真实状态并通知超级管理员 | +| 高德达到每月硬上限或不可用 | 停用 DYN004 自动定位,保留其他不依赖定位的能力 | +| 公开素材缓存达到 150 MB | 按 LRU 淘汰旧资源后再缓存,不写入任何私有状态 | +| 本机内容达到 80% 且低于 90% | 显示非阻断容量提醒,继续允许生图、保存、后台贴纸上传和缩略图生成,不自动删除 | +| 本机内容达到 90% 且低于 5 GB | 持续显示清理提醒,按下载成品、永久删除项目或显式清理符合条件的无引用贴纸文件、等待清理重测、恢复后继续生成的顺序引导,不自动删除 | +| 本机内容达到 5 GB | 不自动删除;阻止新生图、参考图持久化、最新成品保存、后台普通贴纸原图上传、缩略图生成和其他受管二进制写入,保留编辑、已有内容读取、下载和符合规则的显式清理 | +| LocalDataRoot 不可写或系统磁盘已满 | storage_status 进入 unavailable,停止新增写入、后台贴纸上传、缩略图生成和 AI 调用,保留已有内容查看、下载和删除 | +| 超级管理员清理后台上传贴纸历史文件 | 只允许清理无任何已发布版本或项目引用的原图和缩略图;要求确认并审计,物理清理和重新计量完成前不更新容量状态 | +| 素材根目录移动、改名或不可读 | 只暂停依赖该目录的素材功能并提示重新配置,不修改代码或自动复制素材 | +| 浏览器尝试直接读取本机素材或私有目录 | 阻止 file://、绝对路径和 File System Access API 访问,要求通过本地后端资源 ID 接口 | + +## 22. 场景式验收标准 + +本节 AC 按当前交付阶段分为三类: + +| 分类 | AC 范围 | 当前 P0-A DevelopmentPlan 处理规则 | +| --- | --- | --- | +| P0-A 必验 | AC-01–07、AC-09–14、AC-16–22、AC-24–25、AC-27–35、AC-39–53、AC-55–56 | 必须拆入当前开发与验收任务 | +| 通用规则、当前只验 P0-A 子集 | AC-15、AC-23、AC-36、AC-38 | 只拆入各场景明确写出的 P0-A 操作和预期;P0-B 子集留待未来单独立项 | +| P0-B 门槛与未来验收 | AC-08、AC-26、AC-37、AC-54 | 不属于当前 P0-A 开发交付,不得拆入当前迭代,也不得阻止 P0-A 完成 | + +DevelopmentPlan 按 AC 编号拆任务时必须先应用本表,不能因为某个 AC 位于同一章节或包含完整 P0 描述,就把 P0-B 能力纳入当前 P0-A。未来 P0-B 单独立项后仍须执行其专属 AC 及通用场景中的 P0-B 子集。 + +### AC-01 有效邀请注册 + +前置条件:超级管理员创建了未过期且未达使用上限的邀请码,当前阶段占用名额的普通账号总量未达上限。 + +操作: + +1. 新用户进入独立注册入口并输入邀请码和邮箱; +2. 系统在发送验证码前确认邀请码有效; +3. 用户输入有效验证码并填写创作署名和社交 ID; +4. 用户勾选同意当前版本《内测使用与隐私告知》; +5. 系统原子创建账号并占用一次邀请码。 + +预期: + +- 账号创建成功; +- 默认获得 10 点; +- 邀请码只增加一次已使用次数; +- 登录状态保持 30 天; +- 进入创作工作台。 + +### AC-02 无效邀请注册 + +前置条件:邀请码不存在、过期、停用或已达使用上限。 + +操作:用户在注册入口提交邀请码和邮箱。 + +预期: + +- 注册失败; +- 不发送验证码; +- 不创建账号; +- 不赠送点数; +- 显示明确原因。 + +### AC-03 生成成功 + +前置条件:用户 available_balance 足够,当前没有运行中任务。 + +操作: + +1. 选择启用模型; +2. 输入提示词; +3. 选择比例和合法参考图; +4. 从工作台“新建创作”提交生成。 + +预期: + +- 创建一个任务; +- 冻结正确点数; +- 成功后保存一张图片; +- 点数转为已扣除; +- 图片加入当前项目历史; +- 创建的是一个新项目; +- 用户可以继续编辑。 + +### AC-04 生成失败退款 + +前置条件:上游失败、超时或安全拒绝。 + +操作:用户提交生成并等待结果,然后从失败页重试。 + +预期: + +- 任务进入 failed 或 rejected; +- 冻结点数全部释放; +- 不产生成功图片; +- 提示词和草稿项目保留; +- 重试在同一项目内只新增 GenerationJob,不创建第二个项目; +- 用户也可以返回工作台主动“新建创作”创建其他项目。 + +### AC-05 并发限制 + +前置条件:账号已有 queued 或 running 任务。 + +操作:用户再次点击生成。 + +预期: + +- 不创建第二个任务; +- 不再次冻结点数; +- 提供返回当前任务的入口。 + +### AC-06 生成历史上限 + +前置条件:项目已有 10 张成功生成图。 + +操作:用户从该项目的“继续生成”入口尝试再次生成。 + +预期: + +- 阻止提交; +- 提示先删除旧历史图; +- 删除非当前底图后可继续生成。 +- 用户仍可通过工作台“新建创作”创建其他比例的新项目。 + +### AC-07 更换底图 + +前置条件:画布已有文字、普通贴纸、色卡和动态贴纸。 + +操作:用户切换到另一张项目历史图。 + +预期: + +- 所有覆盖元素保留; +- 普通文字和贴纸位置不变; +- 新底图比例与项目固定比例一致; +- 色卡重新提取五色; +- 新底图调色状态使用默认值; +- 操作可撤销并自动保存。 + +### AC-08 P0-B 文字模板全量加载 + +前置条件:准备从 P0-A 升级到完整 P0。 + +操作:系统读取四类 catalog.csv 并完成全量模板验证。 + +预期: + +- 展示 145 个花字、119 个标题、51 个标签和 17 个简约模板; +- 共 332 个; +- FLOWER007 和 FLOWER025 不因缺少 ZIP 被判为失败; +- 列表按稳定 ID 和 catalog 顺序工作; +- 白名单外模板可以按批次进入 internal_preview 或 passed,未授权普通账号不能发现; +- 全部通过后一次性启用,不逐批向普通用户开放。 + +### AC-09 文字内容与换行 + +前置条件:用户已选择文字模板。 + +操作:输入两行文字并点击完成。 + +预期: + +- 画布显示两行; +- 换行保存到项目; +- 重新打开项目后内容一致; +- 导出内容一致。 + +### AC-10 模板切换 + +前置条件:用户已输入多行文字并修改样式。 + +操作:切换到另一文字模板。 + +预期: + +- 文本和换行保留; +- 使用新模板默认字体和样式; +- 画布位置、旋转和整体尺寸保留; +- 可以撤销回原模板和样式。 + +### AC-11 字体覆盖 + +操作:完整 P0 用户从 86 个字体项中选择字体;P0-A 用户只使用白名单模板实际引用字体及 FONT081。 + +预期: + +- 实际渲染加载归档字体文件; +- 模板颜色、描边和装饰保留; +- 共享同一字体二进制的两个面板项仍保持各自入口; +- 重新打开项目后字体一致。 + +### AC-12 文字样式 + +操作:用户设置自定义填充色、描边色与宽度、背景色与透明度、对齐、行距和字距。 + +预期: + +- 行距只能在 1.0 至 1.9 间按 0.1 调整; +- 字距只能在 1.0 至 20.0 间按 1.0 调整; +- 背景透明度不影响文字; +- 点击完成后作为一次撤销记录; +- 导出与画布一致。 + +### AC-13 普通贴纸全量加载 + +操作:用户在弱网条件下打开贴纸面板,依次进入 part1 至 part25、滚动列表并把贴纸加入画布。 + +预期: + +- 共显示 1,407 张普通 PNG; +- 3 组重复资源在各自 part 中均存在; +- 不按文件名生成虚假标题; +- 用户可浏览和查看最近使用; +- 面板使用虚拟列表,未滚动到的缩略图不提前加载; +- 未加入画布的贴纸原图不因打开 part 而批量下载; +- 加入画布后才按需取得原图,滚动过程不持续增加 DOM 节点。 + +### AC-14 普通贴纸编辑 + +操作:用户添加贴纸并移动、缩放、旋转、翻转、调透明度、复制和调整层级。 + +预期: + +- 每个操作正确反映画布和导出; +- 操作可撤销; +- 自动保存后重新打开结果一致。 + +### AC-15 分阶段色卡 + +前置条件:画布有底图。P0-A 启用 COLOR001、COLOR002、COLOR008、COLOR016;P0-B 未来启用全部 16 种色卡。 + +操作:当前 P0-A 用户依次添加 4 种白名单色卡;未来 P0-B 再依次添加全部 16 种色卡样式。 + +预期: + +- 每个色卡提取相同的五色调色板; +- P0-A 的 4 种白名单布局均可生成;P0-B 子集验收时全部 16 种布局均可生成; +- 更换底图后自动更新; +- 裁剪、调色或滤镜变化不更新已有色卡; +- 面板信息图标准确解释其基于原始底图; +- 不因色卡提取额外上传底图。 + +### AC-16 动态时间贴纸 + +操作:用户添加时间贴纸,修改日期时间并提交。 + +预期: + +- 默认使用浏览器本地当前值; +- 使用用户修改后的值渲染; +- 重新打开项目不自动改变; +- 导出为不可点击的静态内容。 + +### AC-17 动态地点贴纸 + +操作: + +1. 用户选择 DYN004; +2. Dada 在调用定位前说明原始坐标会保存并显示在成品中; +3. 用户确认并授权浏览器定位; +4. 系统解析地点; +5. 用户修改地点文字并插入。 + +预期: + +- 普通地点模板保存确认后的地点文字; +- DYN004 只提示一次并保存原始坐标; +- 用户拒绝 Dada 提示时不调用定位,也不自动插入 DYN004; +- 用户可改用仅保存地点文字的其他地点模板; +- 删除项目或注销账号后坐标按规则删除。 + +### AC-18 身份贴纸 + +操作:用户添加普通署名贴纸和带 @ 的社交 ID 贴纸。 + +预期: + +- 默认读取注册资料; +- @ 前缀不重复; +- 单贴纸覆盖不修改账号资料; +- 导出为静态视觉内容。 + +### AC-19 DYN012 + +操作:用户添加 DYN012。 + +预期: + +- 使用 FONT081 Lexend Deca; +- 模板仍可编辑和导出; +- 测试结果明确标注为替代字体; +- 不宣称使用 DIN_MediumAlternate.otf。 + +### AC-20 自动保存与撤销 + +操作: + +1. 用户在 1 秒内连续完成多次画布操作; +2. 执行撤销和重做; +3. 等待自动保存; +4. 模拟一次保存失败后恢复网络; +5. 记录当前后端 saved 状态,再断网创建未保存修改并尝试正常刷新; +6. 取消离开警告后继续修改,再分别模拟强制刷新和浏览器崩溃; +7. 重新打开项目。 + +预期: + +- 当前会话撤销和重做顺序正确; +- 同一时间只有一个保存请求,连续变化合并到最新状态; +- 后端保存最终已提交状态; +- 正常刷新被离开警告拦截并尝试最后一次保存; +- 强制刷新或崩溃后重新打开时,只恢复最后一次后端 saved 状态且撤销栈为空; +- 保存失败时不显示已保存,页面保持打开后自动重试; +- 浏览器持久化存储中不存在未保存项目副本。 + +### AC-21 项目删除与恢复 + +操作: + +1. 用户删除项目; +2. 把其他 active 项目补到 20 个,并在 deleted_at 后 720 小时内尝试恢复; +3. 删除一个 active 项目释放名额,再次恢复; +4. 再次删除并主动永久删除; +5. 另一个项目等待到 purge_at。 + +预期: + +- 删除后释放活动项目名额; +- 20 个 active 项目已满时恢复被阻止,待恢复项目继续保持 trashed,原 deleted_at 和 purge_at 不变; +- 释放活动项目名额后,purge_at 前可以恢复为 active; +- 主动永久删除后立即不可恢复; +- 到达 purge_at 后即使物理清理任务尚未完成,用户侧也不可恢复; +- 关联生成图、参考图、坐标和导出成品进入异步物理清理。 + +### AC-22 账号注销 + +操作:用户确认注销。 + +预期: + +- 所有会话立即失效; +- 账号和所有作品立即删除; +- 旧账号和作品无法恢复; +- 原邮箱可以使用新邀请码创建全新账号; +- 匿名事件和访问审计按 180 天规则保留且不能恢复用户内容。 + +### AC-23 导出 + +操作:在仍有未提交文字修改时确认提交,并分别在四种比例导出 JPG 和 PNG。 + +预期: + +- 像素尺寸准确; +- 无 Dada 水印; +- 画布元素无错位、缺字或裁切; +- 未提交文字经确认后进入撤销历史并出现在导出中; +- 每种格式只保留最新一份; +- P0-A 可在同一电脑再次下载;P0-B 可在任一受支持设备再次下载。 + +### AC-24 P0-A 本机访问边界 + +操作:在项目方 Windows 电脑启动本地后端,分别从该电脑的 localhost、该电脑的局域网 IP、同一局域网内另一设备和手机尝试访问;再在本机当前稳定版 Chrome、Edge、其他浏览器和不受支持的 Chrome/Edge 版本中检查产品入口,并尝试从不受支持引导页继续进入登录、项目、编辑器和运营后台。 + +预期: + +- localhost 在本机 Windows Chrome 和 Edge 当前稳定版中可用,并可完成注册登录、生图、编辑、项目管理和导出; +- 其他浏览器和不受支持的 Chrome/Edge 版本直接进入浏览器不受支持引导页,只说明支持环境及重新打开方式; +- 引导页没有“仍然继续”或其他绕过入口,且不能进入登录、注册、项目、编辑器、运营后台或任何产品功能; +- 本地后端只监听回环地址,通过局域网 IP、另一设备或手机均不能访问; +- P0-A 页面不显示手机、局域网、远程访问或跨设备继续编辑能力; +- 页面或设置区域显示“测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。”; +- 不要求备案域名、HTTPS、公司服务器或对象存储即可完成 P0-A 验收。 + +### AC-25 管理员私有内容访问 + +操作:super_admin 首次进入私有内容区域并确认当前告知版本,随后在新标签页、重启浏览器和重新登录后再次进入;再升级告知文案版本并进入区域;最后从生成记录打开图片或完整提示词。 + +预期: + +- 内容不会在列表中默认展示; +- 首次进入私有内容区域时显示一次全局规则提示,确认状态按 super_admin 身份和告知版本持久记录; +- 同一告知版本在新标签页、新会话或其他本机受支持浏览器中不重复显示,告知文案升版后必须重新提示; +- 每个入口显示“打开并记录审计”; +- 不要求二次确认或查看原因即可打开; +- 自动产生包含管理员、目标、时间、内容类型和 expires_at 的 PrivateContentAccessLog; +- 全局提示是否已确认不影响每次打开均创建独立 PrivateContentAccessLog; +- 审计记录在 180 天内不能修改或人工删除,到期后由系统清理; +- 只有 super_admin 可以访问审计后台。 + +### AC-26 全量模板视觉回归 + +前置条件:P0-B 已经未来单独立项并进入内部验收环境。本场景不属于 P0-A 验收范围,缺少本场景结果不阻止 P0-A 完成,但必须阻止 AC-54 的 P0-B 普通用户开放。 + +操作: + +- 使用固定画布、默认文字和确定数据渲染全部 332 个文字模板、16 个色卡和 35 个动态贴纸; +- 生成截图; +- 自动比较并人工复核。 + +预期: + +- 所有模板均可加载; +- 字体、布局、换行、颜色、描边和装饰与归档参考结构一致; +- Windows Chrome/Edge、macOS Safari、iOS Safari 和 Android Chrome 当前稳定版结构一致; +- 元素边界偏差不超过 2px; +- 单通道差异超过 16/255 的显著像素不超过画布的 1%; +- style_02 至 style_16 和 DYN012 的已知近似或替代必须在报告中标明。 + +### AC-27 50 元素画布 + +前置条件:P0-A 或 P0-B 电脑完整编辑器。 + +操作: + +1. 在画布添加 50 个混合元素; +2. 多选并移动; +3. 导出; +4. 尝试添加第 51 个元素。 + +预期: + +- 前 50 个元素可编辑、保存和导出; +- 第 51 个被阻止; +- 页面不持续无响应; +- 不破坏已有项目。 + +### AC-28 余额不足 + +前置条件:用户 available_balance 低于所选模型的单次点数。 + +操作:用户填写合法提示词并尝试提交生成。 + +预期: + +- 生成按钮不可提交; +- 显示当前可用点数、冻结点数、本次所需点数和联系管理员的提示; +- 不创建生成任务; +- 不调用上游模型; +- 不产生点数流水或余额变化。 + +### AC-29 超级管理员调点与原子扣减 + +操作: + +1. 超级管理员为指定用户增加点数并填写原因; +2. 用户同时发起两个生成提交; +3. 在任务仍冻结点数时,超级管理员扣减超过 available_balance 的点数。 + +预期: + +- 每次超级管理员调整均形成独立流水,记录管理员、原因、变动前后余额和时间; +- 同一账号只创建一个生成任务并只冻结一次点数; +- reserved_balance 不因管理员调点变化; +- available_balance 可以因管理员操作变为负数并向用户显示; +- 生成并发和任务结算本身不会额外制造负数; +- 生成成功时冻结点数只提交一次,失败时只释放一次; +- 用户可以查看自己的调整和生成点数流水。 + +### AC-30 模型启停与配置 + +前置条件:三个模型均已建立独立 ModelConfig。 + +操作: + +1. 用户打开生图页并确认当前模型点数和限制; +2. 超级管理员修改该模型的点数、比例或参考图上限; +3. 用户不刷新旧页面直接提交; +4. 用户重新确认最新配置并提交; +5. 超级管理员先尝试停用当前默认模型但不提供合法替代模型,再在同一操作中指定另一个已启用模型作为新默认模型并停用原默认模型; +6. 先尝试保存缺失、非正整数或重复的 recommendation_priority,再为三个模型配置互不重复的正整数,并分别模拟后台默认模型运行时不可用、全部模型运行时不可用和外部服务恢复; +7. 超级管理员修改 error_mapping_profile,再修改模型端点或响应协议。 + +预期: + +- 旧页面提交被拒绝,不创建任务、不调用上游且不冻结点数; +- 页面显示最新配置并要求用户重新确认; +- 重新确认后才使用最新启用配置创建任务; +- 未提供合法替代模型时整个停用操作失败,原模型启停、默认和推荐优先级均不变; +- 提供另一个已启用模型后,停用原默认模型和设置新默认模型在同一原子操作中成功,系统始终恰好有一个已启用默认模型; +- recommendation_priority 只能使用唯一正整数,1 为最高,不允许并列; +- recommendation_priority 缺失、非正整数或重复时整个保存失败,不产生部分配置更新; +- 后台默认模型运行时不可用时,ModelConfig.enabled、is_default 和 recommendation_priority 均不改变,后端按优先级返回其他运行时可用模型;全部模型不可用时返回空推荐并进入既有生成禁用或失败状态; +- 外部服务恢复只恢复运行时可用状态,不改写后台默认模型或推荐优先级; +- 停用后该模型不可创建新任务; +- 停用前已经提交的任务继续完成并按提交时配置结算; +- error_mapping_profile 只能映射到固定 GenerationErrorCategory,保存后生成新的 config_version; +- 模型端点或响应协议变化后 contract_validation_status 立即重置为 unverified; +- 后台不显示完整 API 密钥。 + +### AC-31 素材上下架与版本发布 + +操作: + +1. 超级管理员上传合法的普通 PNG 或 WebP,指定 part、顺序并上架; +2. 用户把该素材加入项目; +3. 超级管理员将素材下架; +4. 检查上传原图和生成缩略图对 managed_content_bytes 的影响; +5. 分别在 storage_status 为 full 和 unavailable 时尝试上传原图、生成缩略图和读取已有贴纸; +6. 分别尝试清理仍被已发布版本或项目引用的文件,以及不再被任何已发布版本或项目引用的历史上传原图和缩略图; +7. 超级管理员尝试发布校验失败的复杂模板资源包,再发布校验通过的新版本。 + +预期: + +- 上架后的普通贴纸按指定 part 和顺序出现; +- 后台上传的普通贴纸原图和缩略图均计入 managed_content_bytes,产品只读规范素材库不计入; +- full 或 unavailable 时不能上传原图、生成缩略图或写入其他受管二进制内容,但已有贴纸仍可按权限读取; +- 下架后不能添加到新项目,但已有项目仍可渲染和导出; +- 非法格式、缺失文件或哈希不一致的资源被拒绝; +- 校验失败的复杂模板资源包不能启用; +- 校验通过的新版本可启用,且保留稳定模板 ID、版本号和发布记录; +- 后台不能直接修改复杂模板内部样式; +- 仍被任何已发布版本或项目引用的原图或缩略图不能清理;无引用历史文件只有在 super_admin 明确确认后才能清理; +- 清理请求、引用校验和结果形成不可修改的 AdminOperationLog,不发生自动清理; +- 只有物理清理完成并重新计量后,managed_content_bytes 和 LocalBackendStorageState 才更新。 + +### AC-32 P0-A 核心白名单与视觉一致性 + +前置条件:系统处于普通账号上限 10 个的 P0-A 阶段,普通用户没有内部预览授权。 + +操作:普通用户浏览文字、字体、色卡、动态贴纸和普通贴纸面板;再使用固定画布、默认文字、确定动态数据、固定视口和 DPR,分别在本机 Windows Chrome 与 Edge 当前稳定版中渲染全部 P0-A 核心白名单复杂模板并比较结果。 + +预期: + +- 只显示 FLOWER001–008、H001–008、TAG001–007、TAG051、SIMPLE001–008; +- 字体只显示上述模板实际引用项并包含 FONT081; +- 只显示 COLOR001、COLOR002、COLOR008、COLOR016; +- 只显示 DYN001–004、DYN007、DYN008、DYN011、DYN012、DYN015、DYN016; +- part1 至 part25 的 1,407 张普通贴纸全部显示; +- 白名单外复杂模板已经注册但对该普通用户不可发现; +- 第 11 个占用名额的普通账号被阻止创建; +- super_admin 不占普通账号名额。 +- P0-A 白名单文字模板及其字体、4 个色卡和 10 个动态贴纸在 Windows Chrome 与 Edge 中均可加载; +- 两个浏览器中的字体、换行、布局、颜色、描边、装饰和导出像素保持一致; +- 元素边界偏差、显著颜色差异和人工复核规则遵守 NFR-02; +- 本场景不要求 macOS Safari、iOS Safari、Android Chrome 或白名单外复杂模板通过。 + +### AC-33 认证状态机 + +操作:分别测试未注册、已注册、已注销和 suspended 邮箱在注册与登录两个入口的行为。 + +预期: + +- 未注册邮箱只可通过有效邀请码注册; +- 已注册邮箱重复注册时明确引导登录且不消耗邀请码; +- 未注册或已注销邮箱登录时明确引导注册; +- suspended 邮箱不能注册或登录,并明确提示联系管理员; +- 已注销邮箱可用新邀请码创建全新账号,旧数据不恢复; +- 账号创建与邀请码次数增加保持原子一致。 + +### AC-34 新建、追加与固定比例 + +操作: + +1. 从工作台连续使用两次“新建创作”; +2. 从其中一个项目使用“继续生成”; +3. 尝试在项目内切换比例。 + +预期: + +- 两次新建产生两个项目; +- 项目内继续生成只追加历史,不创建第三个项目; +- 追加生成只能沿用项目比例; +- 改比例入口引导新建项目; +- 一个项目达到 10 张不会阻止创建另一个项目。 + +### AC-35 保存失败、离开与本地导出 + +操作:用户在有未保存修改时使本地后端保存失败、尝试离开页面并导出,再分别强制刷新、关闭页面和模拟浏览器崩溃;另一次正常导出中模拟成品写入 LocalDataRoot 失败。 + +预期: + +- 未保存画布、提示词、私有图片引用和编辑内容只存在当前页面内存,不写 localStorage、IndexedDB 或 Cache Storage; +- 页面保持打开时自动重试; +- 站内离开提供保存并离开、放弃和取消; +- 后端保存失败时仍可本地下载当前 JPG/PNG; +- 正常导出由客户端合成,同一文件用于下载和写入 LocalDataRoot; +- 项目保存或成品持久化失败时,本地导出不更新后端 latest_exports; +- 强制刷新、关闭或崩溃后重新打开,只恢复最后一次后端 saved 状态; +- 浏览器持久化存储中不存在可用于恢复的私有项目草稿。 + +### AC-36 多标签与 P0-B 多设备冲突 + +前置条件:P0-A 只验收同一台 Windows 电脑中的多标签冲突。P0-B 另用电脑和手机执行的多设备冲突属于未来验收,不是 P0-A 完成条件。 + +操作:P0-A 在同机两个标签页同时基于同一 state_version 编辑;未来 P0-B 再使用不同电脑和手机重复该场景。较新的页面先保存,旧页面后保存。 + +预期: + +- 旧版本页面进入只读冲突状态; +- 不允许覆盖后端状态或另存项目副本; +- 允许本地导出一次且不更新后端成品; +- 用户确认后刷新到电脑保存的最新版本。 + +### AC-37 P0-B 手机横竖屏完整编辑 + +前置条件:系统处于 P0-B 内部验收环境,尚未要求向普通用户开放 P0-B。 + +操作:分别在 iOS Safari 和 Android Chrome 当前稳定版中编辑 20 元素常规画布和 50 元素压力画布,并在编辑中旋转屏幕。 + +预期: + +- 20 元素画布在竖屏和横屏均能完成全部编辑与导出,不出现持续无响应或操作丢失; +- 50 元素画布可完成选择、修改、保存和导出; +- 50 元素时允许关闭实时辅助线或降低编辑预览分辨率,但必须提示且不得改变最终导出; +- 旋转后画布、选区、撤销栈和未保存状态不变; +- 工具栏和面板不重叠、不溢出; +- 触控多选、循环选择、长按候选列表和框选可用。 + +### AC-38 无导出成品 + +前置条件:项目已有生成图但从未导出。 + +操作:P0-A 用户在本机打开成品下载区域;P0-B 在各受支持设备重复该场景。 + +预期: + +- 显示“暂无导出成品”; +- P0-A 本机提供进入编辑并导出以及下载原始生成图; +- P0-B 电脑和手机提供等价入口; +- 系统不自动生成默认 PNG 或 JPG。 + +### AC-39 注销后匿名保留 + +操作:注销一个曾生成图片且被超级管理员查看过内容的账号。 + +预期: + +- 个人资料、内容、项目、坐标和业务原 ID 立即删除; +- 匿名事件只保留随机主体、时间、模型、结果、错误类别和点数变化; +- 私有访问审计保留超级管理员身份,被查看用户和目标断链; +- 匿名事件在注销 180 天后删除,私有访问审计在各自访问事件发生 180 天后删除,注销不延长访问审计期限; +- 长期汇总统计不能回溯到个人或单次作品。 + +### AC-40 三模型网关契约 + +操作:对三个模型分别执行纯文字、参考图、四种比例、失败、超时和安全拒绝验证;在某一模型验证通过后,修改其端点、请求字段、参考图协议、响应结构、同步或异步模式、任务查询方式或错误协议中的任一项。 + +预期: + +- 每个模型形成独立脱敏证据; +- 明确同步或异步模式、图片返回格式和任务查询方式; +- 错误状态正确映射,冻结点数只提交或释放一次; +- 未验证模型的 contract_validation_status 不能设为 verified; +- 不因一个模型成功而推断另外两个模型协议相同; +- 任一契约相关配置变化后,对应模型立即重置为 unverified,必须重新执行本场景才能恢复 verified。 + +### AC-41 P0-A 本机测试准备 + +操作:在使用项目方控制的 1 个超级管理员账号和 1 个普通账号执行 P0-A 人工验收前完成发布检查。 + +预期: + +- 本地网页与本地后端可启动,后端只监听 localhost,局域网和其他设备无法访问; +- 第 18 节现有素材根目录可读,manifest 与素材文件校验通过,且没有复制第二套约 3.57 GB 全量素材; +- LocalDataRoot 位于项目目录和 Git 仓库之外、可写且未硬编码 Windows 用户名,LocalBackendStorageState 的 80%/90% 预警和 5 GB 限制可用; +- Resend 发信域名完成验证,QQ、163 和企业邮箱分别 20 封中至少 19 封在 2 分钟内送达; +- Resend 每天 80 封、每月 2,400 封的应用硬上限与暂停状态可用,未配置付费备用通道; +- 正式验收的普通账号与超级管理员认证真实调用 Resend;开发环境预置普通测试账号不能替代 AC-01、AC-33、AC-41 或 AC-49; +- 个人认证高德 Web 服务 Key 的定位、逆地理编码、绑定、安全限制和每月 1,000 次硬上限实测通过; +- AI 网关未开启自动充值,模型级、账户级和未知影响范围的余额不足运行时不可用规则可用,且不改写后台默认模型; +- AI 网关完整矩阵通过; +- 注册页展示并记录用户同意的《内测使用与隐私告知》版本; +- 注册告知和本地测试提示明确说明数据由当前 Windows 用户登录和文件系统权限保护、不提供应用层加密或云备份、机器损坏/重装/LocalDataRoot 删除后不可恢复,并提示主动下载重要图片; +- Dada 主动公开素材缓存的 150 MB 硬上限和私有状态禁存规则通过; +- AI 网关、Resend 和高德的必要外网 HTTPS 调用在本机可用,所有 API 密钥均未进入 PRD、Git、前端、manifest 或本机数据日志; +- 页面或设置区域显示本机数据无自动备份且不迁移的固定提示; +- 任一门槛失败时不得开始 P0-A 实际验收。 + +### AC-42 内部模板分批预览 + +操作: + +1. super_admin 创建一个测试批次并加入白名单外模板; +2. 只把项目方指定的一个普通测试账号授权到该批次; +3. 授权账号、未授权普通账号和 super_admin 分别访问素材面板、公开 manifest 和服务端授权 manifest; +4. 尝试根据模板稳定 ID 推导本机资源接口或文件路径,并通过 file://、本机绝对路径和 File System Access API 绕过本地后端直接读取; +5. 撤销授权后再次请求内部预览 manifest 和资源接口。 + +预期: + +- 授权普通账号可以看到该批次中 internal_preview 或 passed 的模板; +- 未授权普通账号不能发现模板、批次或资源地址,公开 manifest 不包含 internal_preview_asset; +- 未公开资源路径不能仅由模板稳定 ID 推导; +- 授权账号只能使用资源 ID 通过本地后端授权 manifest 和登录鉴权资源接口加载资源,浏览器不能获得绝对路径,也不能通过 file:// 或 File System Access API 直接读取; +- 预览授权不提供后台、调点、模型配置、邀请码或私有内容权限; +- 撤销后普通账号立即失去新添加入口且不能再取得资源,已有项目仍按保存的资源版本渲染; +- internal_preview_asset 不进入 Dada 的公开素材持久缓存; +- 全部剩余复杂模板通过前,不向普通用户逐批公开。 + +### AC-43 失败草稿重试与批量删除 + +操作:用户在同一失败草稿中连续重试三次,再创建多个无成功图片的失败草稿并执行批量删除。 + +预期: + +- 同一草稿的三次重试产生三个新 GenerationJob,但项目数量不增加; +- 每个失败任务独立释放冻结点数; +- 多个 failed_empty 草稿可以一次移入回收站并释放活动项目名额; +- 包含任一成功生成图的项目不能混入失败草稿快捷批量删除; +- 用户主动回到工作台“新建创作”时仍创建新项目。 + +### AC-44 参考图生命周期 + +操作: + +1. 用户选择参考图但不提交并刷新页面; +2. 重新选择参考图并提交失败任务; +3. 更换参考图后在同一草稿重试成功; +4. 删除项目并等待物理清理。 + +预期: + +- 未提交参考图不上传,也不出现在 localStorage、IndexedDB 或 Cache Storage; +- 失败任务保存其提交时参考图关系; +- 成功重试保存新一组关系,不覆盖失败任务快照; +- 两组参考图始终为私有资源; +- 项目进入 purged 后关系立即不可访问,资源随后由异步任务删除。 + +### AC-45 内测账号名额 + +操作:P0-A 在同一 Windows 电脑上使用独立浏览器配置,先用项目方控制的 1 个 super_admin 和 1 个普通账号完成人工验收;测试程序临时创建第二个普通账号执行跨用户项目、图片、内部预览和本地鉴权接口越权测试,再清理该账号;随后创建普通 active、普通 suspended、普通 deleted 和 super_admin 账号,达到 P0-A 的 10 个普通账号名额后继续注册。 + +预期: + +- active 和 suspended 普通账号都占名额; +- super_admin 不占普通账号名额且不消耗普通邀请码; +- 临时账号只有普通用户权限,不能访问另一普通账号的项目、图片、内部预览授权或私有文件接口,测试完成后被清理; +- P0-A 不要求朋友或第二个真实普通用户参与; +- 第 11 个占用名额的普通账号不能创建; +- 普通账号注销为 deleted 后释放一个名额,新用户可注册; +- 后台历史累计创建账号数不因注销减少。 + +### AC-46 客户端缓存上限 + +操作:连续浏览足以超过 150 MB 的公开缩略图、模板转换产物和字体,并检查浏览器的 Dada 应用存储。 + +预期: + +- Dada 主动持久缓存不超过 157,286,400 字节; +- 超限前按 LRU 淘汰最久未用资源; +- 不预下载全量素材; +- 旧发布版本优先淘汰且当前画布所需资源仍可重新按需加载; +- 缓存中不存在 internal_preview_asset、提示词、私有图片引用、项目状态或未保存编辑内容; +- 用户主动下载的成品不计入缓存上限。 + +### AC-47 免费辅助服务硬停止 + +操作: + +1. 分别模拟 Resend 达到每天 80 封、每月 2,400 封; +2. 分别模拟 Resend 接口不可用、明确退信故障和其他供应商异常; +3. 在发布前人工送达测试中模拟某类邮箱 20 封中只有 18 封在 2 分钟内送达; +4. 模拟高德当月达到 1,000 次调用; + +预期: + +- Resend 达到任一上限后进入 paused_quota,暂停注册和需要新验证码的登录,不发送第 81 封或超过月上限的邮件; +- Resend 接口不可用、明确退信故障或其他供应商异常进入 paused_provider,通过 pause_reason 区分非敏感错误类别,不创建验证码发送成功假状态; +- 发布前人工送达测试未达到每类 19/20 的门槛时阻止 P0-A 发布,但不创建运行时质量暂停状态; +- 已存在且有效的 30 天会话继续使用,页面不显示验证码发送成功假状态; +- 系统不切换到腾讯云 SES 或其他收费邮件通道; +- 高德不发起第 1,001 次调用,DYN004 自动定位停用,其他手动地点或非地点功能可用; +- 系统不保存或计算运行时“最近 20 封”滚动送达率,不建立 EmailVerificationEvent; +- 所有暂停均记录原因并通知 super_admin,恢复必须在免费额度或供应商可用状态重新满足后进行。 + +### AC-48 三类素材与私有资源隔离 + +操作:在本机不同浏览器账号中,未登录访问公开素材 manifest 和缩略图,再尝试从稳定 ID 推导内部预览资源接口或本机路径,通过 file://、本机绝对路径和 File System Access API 直接读取,并使用未授权账号和其他用户会话访问内部预览素材、参考图、生成图与导出成品。 + +预期: + +- public_release_asset 可以公开只读并长期缓存; +- 公开 manifest 不包含 internal_preview_asset、private_user_asset 路径或可推导标识; +- internal_preview_asset 路径不得仅由稳定 ID 推导,只能通过本地后端授权 manifest 和登录鉴权接口访问; +- 未登录、未授权和错误用户均不能访问内部预览或私有资源;浏览器不能取得或直接使用本机绝对路径,file:// 和 File System Access API 均不能绕过本地后端鉴权; +- 正确所有者通过本地后端登录鉴权接口可以访问; +- 私有资源访问策略不影响已有项目正常渲染和下载。 + +### AC-49 超级管理员认证与恢复 + +操作:依次使用白名单外邮箱、白名单内新邮箱和第二个白名单邮箱访问独立后台入口;完成首次验证和后续登录,等待或模拟 30 天会话到期,再将一个管理员移出白名单并停用全部管理员;最后由部署人员修改当前阶段的后端安全配置并让 Dada 读取生效。 + +预期: + +- 白名单外邮箱在发送验证码前被拒绝,不创建管理员账号或会话; +- 白名单内邮箱首次验证后创建 super_admin,第二个白名单邮箱可创建独立备用 super_admin; +- 普通账号不能通过后台、邀请码或角色修改被提升为 super_admin; +- 管理员会话最长保持 30 天,主动退出、停用或移出白名单后立即失效; +- super_admin 不占普通账号名额; +- 允许全部管理员被停用,此后后台无自助恢复入口,只有部署人员修改当前阶段的后端安全配置后才能恢复; +- 部署人员不是 Dada 用户或后台角色,不能创建对应产品账号、登录后台或获得产品权限; +- 管理员创建、登录结果、停用、移出白名单和恢复均形成审计; +- 后端安全配置生效事件记录为 actor_type=system、actor_ref=backend_secure_config,且不包含部署人员身份、白名单内容或安全配置值。 + +### AC-50 后台敏感操作审计 + +操作:分别执行调点、账号状态变更、邀请码变更、模型配置、素材启停、普通贴纸历史文件清理及引用校验、预览授权、辅助服务恢复和私有内容查看,再尝试从后台修改或删除日志并推进时间超过 180 天。 + +预期: + +- 除私有内容查看外的敏感操作写入 AdminOperationLog; +- 普通贴纸历史文件清理的请求、引用校验、成功或拒绝结果均被审计; +- 私有内容查看只写入独立的 PrivateContentAccessLog,不在普通操作日志中重复保存私有正文; +- 超级管理员后台操作使用 actor_type=super_admin,后端安全配置生效事件使用 actor_type=system,不存在第三种 Dada 审计角色; +- 日志包含执行者、操作、目标摘要、结果、发生时间和 expires_at; +- 日志不包含验证码、API 密钥、会话令牌、完整提示词、图片内容或不必要的私有正文; +- 180 天内任何管理员均不能修改或人工删除日志; +- 到期后系统自动清理两类日志。 + +### AC-51 AI 网关余额影响范围 + +操作:分别模拟网关明确返回单模型余额不足、明确返回共享账户余额不足,以及只能确认余额问题但无法判断影响范围;随后补充余额并确认恢复。 + +预期: + +- 单模型影响只把对应模型标记为运行时不可用; +- 账户级影响把共享该 gateway_account_ref 的全部模型标记为运行时不可用; +- 未知影响范围按账户级处理,把共享账户的全部模型标记为运行时不可用; +- 三种失败都只释放一次相关 GenerationJob 的 reserved_balance,不扣用户点数; +- 系统不自动充值; +- 三种情况均不改写 ModelConfig.enabled、is_default 或 recommendation_priority; +- 未确认真实余额恢复前不能恢复运行时可用状态,恢复操作形成 AdminOperationLog。 + +### AC-52 免费额度下调 + +操作:模拟 Resend 或高德供应商免费额度低于当前应用侧 hard_limit,再分别尝试下调和提高运行上限,并尝试启用收费服务。 + +预期: + +- 运行配置可以在不扩大能力的前提下直接下调 hard_limit,无需升版 PRD; +- 下调形成配置审计和发布检查记录,且新上限立即阻止超额调用; +- 提高 hard_limit、启用收费通道或自动扩容必须先升版 PRD,不能只改后台或运行配置。 + +### AC-53 产品级生成错误分类 + +操作:对三个模型的提交和执行链路分别模拟 upstream_timeout、upstream_failed、safety_rejected、model_disabled、gateway_balance_insufficient、gateway_contract_invalid、reference_invalid、unknown_retryable 和 unknown_non_retryable,并让供应商返回包含原始错误码、错误正文、堆栈或内部地址的响应。 + +预期: + +- 三个模型把等价错误映射为相同的 GenerationErrorCategory,前台、GenerationJob、后台生成记录和统计使用同一 category_id; +- upstream_timeout、upstream_failed 和 unknown_retryable 进入 failed,并按规定提供原输入重试或稍后重试; +- safety_rejected 进入 rejected 并要求修改输入; +- model_disabled 在提交前阻止任务,并要求选择其他模型或等待; +- gateway_balance_insufficient 和 gateway_contract_invalid 优先于通用 model_disabled,要求选择其他模型或联系管理员; +- reference_invalid 要求更换或移除参考图; +- unknown_non_retryable 不提供重复重试入口,提示联系管理员; +- 提交前阻止时不创建任务或冻结点数,任务创建后失败或拒绝时只释放一次冻结点数; +- queued、running 和 succeeded 任务的 error_category 为空; +- 页面不显示供应商原始错误码、错误正文、堆栈或内部地址; +- 后台不能创建、重命名或删除固定分类。 + +### AC-54 P0-B 对普通用户开放门槛 + +操作:依次让 P0-A 验收、全量素材验收、AC-26、AC-37、白名单外模板 passed 状态、50 人账号上限、公开 manifest 隔离、任一模型 verified 状态、公司系统合并方案、正式存储后端、远程服务器、域名、HTTPS、正式数据隔离或移动端访问中的任一条件缺失,再尝试向普通用户开放 P0-B;最后满足全部条件并执行正式开放。 + +预期: + +- 任一门槛缺失时,普通用户继续处于 P0-A,只能看到核心白名单且普通账号上限保持 10; +- 内部开发、模板导入、内部预览和验收不受普通用户开放门槛阻止; +- 公开 manifest 始终不包含 internal_preview_asset; +- 任一模型在最后一次契约相关配置变化后不是 verified 时不得开放; +- AC-26 或 AC-37 尚未执行或未通过时不影响 P0-A 完成,但必须阻止 P0-B 向普通用户开放; +- 公司系统合并、正式存储、远程部署、域名、HTTPS、数据隔离和移动端访问任一方案未定版或未验收时不得开放; +- 全部条件满足后,白名单外 passed 模板一次性切换为 enabled,普通账号阶段上限切换并验证为 50; +- 不能通过只扩大人数、只开放部分模板或只完成手机编辑来宣称进入 P0-B。 + +### AC-55 P0-A 本机存储状态 + +操作:依次模拟 LocalDataRoot 正常可写且 managed_content_bytes 低于 4,294,967,296 字节、达到 4,294,967,296 字节、达到 4,831,838,208 字节、达到 5,368,709,120 字节、本次写入预计超过上限、LocalDataRoot 不可写和系统磁盘已满;在各状态下尝试生图、提交参考图、保存最新成品、上传普通贴纸原图、生成缩略图、写入其他受管二进制内容、编辑项目、读取和下载已有内容、只下载本地导出、永久删除项目,以及清理有引用和无引用的历史上传贴纸文件。 + +预期: + +- 低于 80% 且目录可写时 capacity_notice_level 为 normal、storage_status 为 active,正常写入并更新 managed_content_bytes 和 last_measured_at; +- 达到 80% 且低于 90% 时 capacity_notice_level 为 warning,显示非阻断提醒,生图、参考图、成品保存、后台贴纸上传和缩略图生成仍可继续; +- 达到 90% 且低于 5 GB 时 capacity_notice_level 为 critical,持续显示清理提醒,但仍不阻止生图、保存、后台贴纸上传或缩略图生成; +- critical 提示按“下载需要保留的成品、永久删除不需要的项目或由 super_admin 显式清理符合条件的无引用贴纸文件、等待物理清理和容量重新测量、恢复后继续生成”的固定顺序引导; +- warning 和 critical 均不自动删除文件; +- 达到或预计超过 5 GB 时进入 full,不创建新 GenerationJob、不调用 AI 网关、不冻结点数,也不持久化新参考图、latest_exports、后台上传普通贴纸原图、缩略图或其他受管二进制内容; +- full 状态不自动删除任何文件,仍允许编辑已有项目、读取和下载已有内容、只下载但不更新 latest_exports 的客户端导出、永久删除项目,以及显式清理符合条件的无引用历史上传贴纸文件; +- LocalDataRoot 不可写或系统磁盘已满时进入 unavailable,停止新增写操作、后台贴纸上传、缩略图生成和 AI 调用,但保留已有项目及素材的查看、下载和删除入口; +- 仍被任何已发布版本或项目引用的历史原图或缩略图不能清理;无引用文件的显式清理要求确认并形成不可修改审计; +- 物理清理完成前 managed_content_bytes、capacity_notice_level、storage_status 和 last_measured_at 均不因该清理更新;重新计量后只有容量低于硬上限且目录可写才恢复 active; +- 后台上传的普通静态贴纸原图和缩略图计入 managed_content_bytes;产品随安装包提供或通过第 18 节安全配置原地引用的只读规范素材库、应用代码、150 MB 浏览器公开素材缓存、数据库元数据、审计记录和用户下载目录均不计入。 + +### AC-56 P0-A 数据可丢失与不迁移 + +操作:确认系统未配置自动备份;主动下载原始生成图和 JPG/PNG 成品,尝试导出可编辑项目包、数据库、账号、点数、审计日志和素材关系;分别模拟删除 LocalDataRoot 和重新安装 P0-A;再启动 P0-B 公司系统合并环境并尝试自动或手动导入 P0-A 数据。 + +预期: + +- P0-A 不创建或宣称存在本机自动备份; +- 用户可以主动下载原始生成图和 JPG/PNG 成品,但系统不提供可编辑项目包、数据库、账号、点数、审计日志或素材关系的导出与导入入口; +- 删除 LocalDataRoot 或重新安装后,本机测试账号、项目、图片和日志不可由 Dada 自动恢复; +- 用户主动下载到下载目录的成品不随 LocalDataRoot 删除; +- P0-B 不自动或手动导入 P0-A 本机账号、项目、点数、审计日志或素材关系,下载图片也不被识别为正式迁移包; +- 页面或设置区域始终明确显示“测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。” + +## 23. 外部依赖与发布门槛 + +### 23.1 AI 网关 + +网关地址: + +https://oneapi.intelligrow.cn + +已确认三个模型标识在平台模型广场存在,但公开资料不足以确认图片端点、参考图字段和错误格式。 + +AI 相关契约定版前必须取得以下任一信息: + +- 平台提供的图片 API 文档; +- 脱敏 curl 或代码示例; +- 通过平台支持确认的请求与响应格式。 + +不得只根据模型名称假设三个模型使用相同端点。编辑器、素材和认证模块可以并行开发,但三模型 AC-40 未通过前,AI 适配器、ModelConfig 路由和点数结算联调不得宣告完成。 + +AI 网关使用项目方主动配置的既有额度,不得开启自动充值。能确认模型级余额影响时只把对应模型标记为运行时不可用;只能确认共享账户余额不足或无法判断影响范围时,把所有依赖同一 gateway_account_ref 的模型标记为运行时不可用。该运行时状态不得改写后台配置的默认模型、enabled 或 recommendation_priority。余额不足导致的任务失败必须释放对应冻结点数,不能通过后台点数继续制造无法支付的真实上游调用。只有确认真实余额恢复后才能由超级管理员恢复运行时可用状态,检测和恢复均按 GatewayBalanceState 与 AdminOperationLog 记录。 + +### 23.2 邮件服务 + +P0 使用 Resend 发送邮箱验证码。 + +- 使用自有域名或子域名作为发信域名; +- 按 Resend 要求完成 SPF 和 DKIM 验证; +- API 密钥只放在 P0-A 本地后端安全配置;P0-B 再迁移到公司正式安全配置; +- 只使用 Resend 免费档,不配置付费升级、按量超额或收费备用邮件供应商; +- 应用侧发送硬上限为每天 80 封、每个自然月 2,400 封; +- 达到任一硬上限后停止发送,暂停注册和需要新验证码的登录,已存在且仍有效的 30 天会话不受影响; +- 发布前对 QQ、163 和至少一种企业邮箱各发送 20 封测试邮件,每类至少 19 封在 2 分钟内送达; +- Resend 接口不可用、明确退信故障或其他供应商异常时进入 paused_provider,使用 pause_reason 区分非敏感错误类别,暂停需要新验证码的流程,不创建验证码假成功状态,也不切换到付费通道。 + +P0 不建立逐封 EmailVerificationEvent,也不保存或计算运行时“最近 20 封”的滚动送达率。发布前送达测试保留人工结果;未达到每类 19/20 的门槛时阻止 P0-A 发布,但不写入运行时 service_status。运行期只保留 ExternalServiceUsage 定义的额度计数、供应商可用状态和暂停原因,验证码明文不得进入任何日志。 + +为避免邮件联调阻塞编辑器等独立模块开发,DevelopmentPlan 可以定义仅开发环境可用的本地初始化脚本,预置一个普通测试账号。该脚本不得进入正常产品入口,不得在正式 P0-A 验收环境启用,也不能作为 AUTH-01、AUTH-02、AUTH-07、AC-01、AC-33、AC-41 或 AC-49 的通过证据。P0-A 正式认证验收必须真实调用 Resend;域名验证、发送或送达失败继续属于 P0-A 启动门槛失败。 + +Resend 当前公开免费档为每月 3,000 封、每天 100 封,P0 应用侧上限为其保守子集;发布前必须再次核对免费规则。如免费额度低于应用侧上限,可在不扩大能力的前提下直接下调运行 hard_limit,无需升版 PRD,但必须形成配置审计和发布检查记录;提高上限或启用收费服务必须升版 PRD。 + +参考:[Resend 域名要求](https://resend.com/docs/dashboard/domains/introduction)、[Resend Pricing](https://resend.com/pricing)。腾讯云 SES 不作为备用服务,因为其免费额度用完后会转为后付费;参考:[腾讯云邮件推送价格说明](https://cloud.tencent.com/document/product/1288/47930)。 + +### 23.3 地理编码服务 + +P0 使用个人认证的高德 Web 服务 Key 提供中国大陆地点的地理编码和逆地理编码。开放 DYN004 自动定位前必须确认个人 Key 的可用接口、月免费配额、QPS、绑定方式、IP 或域名白名单、安全限制和当前使用场景均符合要求。 + +- P0 应用侧每个自然月最多调用 1,000 次高德 Web 服务; +- 达到硬上限后停止调用,不购买流量包、不使用账户余额继续调用; +- 达到上限、高德不可用或 Key 核验不通过时停用 DYN004 自动定位; +- 其他仅需地点文字的模板继续允许手动输入,不阻塞不需要地点的编辑操作; +- 发布前必须再次核对官方免费配额;如免费额度低于应用侧上限,可在不扩大能力的前提下直接下调运行 hard_limit,无需升版 PRD,但必须形成配置审计和发布检查记录;提高上限或启用收费服务必须升版 PRD。 + +正式公开注册前必须重新评估是否迁移到公司认证主体。 + +参考:[高德地理编码文档](https://lbs.amap.com/api/webservice/guide/api/georegeo/)、[高德基础服务计费说明](https://lbs.amap.com/pages/base_service_price)。 + +### 23.4 P0-A 本机部署与存储 + +- P0-A 由本机网页、本地后端和 LocalDataRoot 组成,只在项目方当前 Windows 电脑运行; +- 本地后端只监听 localhost,不监听局域网地址,不配置公网映射、公司服务器、域名、备案或 HTTPS; +- P0-A 不使用 COS、公司对象存储或其他远程文件存储; +- 规范素材通过本地安全配置引用第 18 节的现有根目录,按 manifest 原地只读复用,不复制全库; +- public_release_asset 由本地后端提供公开只读接口;internal_preview_asset 必须校验登录账号和 AssetPreviewGrant;private_user_asset 只允许所有者或经审计的 super_admin 通过本地鉴权接口读取; +- LocalDataRoot 默认使用当前 Windows 用户的应用数据目录,不放在 Git 仓库或项目目录,不硬编码用户名; +- LocalDataRoot 不做 Dada 应用层加密或自动备份,依赖当前 Windows 用户登录和文件权限;测试数据可丢失且不自动迁移到正式系统; +- 任何 API 密钥不得进入 Git、PRD、前端包、素材 manifest 或本机数据日志。 + +P0-B 的公司系统合并、正式存储后端、远程服务器、域名、HTTPS、数据隔离和移动端访问必须在后续 PRD 升版或 DevelopmentPlan 中重新定版。本版不得默认正式存储一定使用 COS。P0-A 与 P0-B 数据断代是已接受的预期结果:不提供 P0-A 可编辑项目包或业务数据的导出、导入和迁移,P0-B 不自动或手动导入 P0-A 的账号、项目、点数、审计日志或素材关系;用户主动下载的图片仅用于留存。 + +### 23.5 内测告知 + +注册页使用必选的简短《内测使用与隐私告知》,至少覆盖 AI 网关、Resend、高德、P0-A 本机存储、超级管理员访问、DYN004 坐标、账号注销、180 天匿名事件及审计日志规则。告知必须明确 P0-A 数据依赖当前 Windows 用户登录和文件系统权限保护,Dada 不提供应用层加密或云备份,机器损坏、重装或 LocalDataRoot 被删除后不可恢复,重要图片需要用户主动下载。P0-A 本地测试页或设置区域必须同时显示固定提示:“测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。” + +### 23.6 UI 设计 + +页面布局、色彩、图标、滤镜视觉、响应式细节和控件样式由 UIDesign.md 定义。UIDesign.md 不得覆盖或弱化本 PRD 的状态机、权限、异常行为、验收文案和禁用入口要求。UI 设计与 PRD 冲突时以本 PRD 为准;若产品确需改变行为,必须先升版 PRD,再同步更新 UI 设计。 + +## 24. 需求变更规则 + +以下变化必须升版 PRD,不能只在开发任务中临时决定: + +- 增减 P0 模型; +- 改变后台默认模型原子替换、recommendation_priority 唯一排序或运行时推荐不回写配置的规则; +- 改变点数和失败扣点逻辑; +- 改变项目或历史数量上限; +- 改变 25 个普通贴纸 part 的结构; +- 将普通文字、用户上传贴纸或多页图组加入 P0; +- 改变超级管理员查看私有内容的权限; +- 改变私有内容区域提示按 super_admin 身份与告知版本持久确认,或以该确认替代逐次 PrivateContentAccessLog; +- 改变定位坐标保存规则; +- 改变账号注销或项目删除期限; +- 改变 P0-A 白名单、10 个普通账号上限、实际验收账号组合或剩余复杂模板一次性公开规则; +- 改变 P0-B 对普通用户开放门槛; +- 为 P0-A 增加手机、局域网、远程访问、公司服务器或远程存储,或取消 P0-B 手机完整编辑; +- 允许不受支持浏览器绕过 P0-A 浏览器引导页进入产品功能; +- 新增、删除、重命名 GenerationErrorCategory,或改变其任务状态、点数与用户动作映射; +- 改变 150 MB 客户端主动缓存上限或允许持久化用户私有编辑状态; +- 改变 P0-A 的 local_filesystem 存储后端、LocalDataRoot 位置边界、80%/90% 容量预警阈值、5 GB 内容硬上限、无自动备份、无项目归档或不迁移规则; +- 改变后台上传普通贴纸原图和缩略图计入 managed_content_bytes、只读规范素材不计入、引用保护、显式清理或物理清理后重计量规则; +- 增加收费辅助服务、自动充值、自动扩容或提高 Resend/高德应用侧硬上限; +- 改变匿名事件、AdminOperationLog 或 PrivateContentAccessLog 的 180 天保留期; +- 从受控内测改为公开注册。 + +Resend 或高德供应商免费额度下降时,允许在不扩大产品能力的前提下直接下调运行 hard_limit,并记录配置审计和发布检查结果,不要求仅为该下调升版 PRD。任何提高上限、增加收费服务、自动充值或自动扩容仍必须按上述规则升版。 + +## 25. 术语 + +| 术语 | 定义 | +| --- | --- | +| 底图 | 当前项目中作为画布背景的 AI 生成图 | +| 覆盖元素 | 文字模板、普通贴纸、色卡或动态贴纸 | +| 文字模板 | 包含可编辑文字、字体、装饰与样式规则的复合资源 | +| 普通贴纸 | 不依赖动态数据的 PNG/WebP 图像元素 | +| 色卡 | 从底图提取五色并按固定布局生成的参数贴纸 | +| 动态贴纸 | 在编辑时注入时间、地点或身份数据并静态导出的贴纸 | +| 生成历史 | 同一项目中保留的成功 AI 生成图片 | +| 创作署名 | 成品中显示的昵称,不等同于登录邮箱 | +| 社交 ID | 成品中显示的账号文本,不代表 Dada 内部账号标识 | +| 复杂模板 | 文字、色卡和动态贴纸等需要解析或参数渲染的资源 | +| P0-A | 仅在项目方当前 Windows 电脑通过 localhost 运行的单机测试版;由 1 个超级管理员账号和 1 个普通账号人工验收,跨用户隔离由同机测试程序临时账号验证,最多 10 个普通账号,只公开核心复杂模板白名单 | +| P0-B(完整 P0) | 与公司系统合并并完成正式存储、远程部署、数据隔离和移动端验收后,最多 50 个普通账号、全部规定素材一次性公开且支持手机完整编辑的阶段;开发与内部验收可提前进行 | +| 内部测试账号 | 由 super_admin 指定、只可预览授权素材批次的普通账号,不具有管理员权限 | +| 部署人员 | 当前阶段后端安全配置的维护者;P0-A 由项目方承担,P0-B 由公司既有运维流程承接;不是 Dada 用户或后台角色,没有 Dada 登录入口、后台会话或产品权限,配置生效时由 system 记录审计 | +| LocalDataRoot | P0-A 本地后端管理的数据根目录,默认位于当前 Windows 用户应用数据目录,独立于项目、Git 和只读素材目录 | +| LocalBackendStorageState | P0-A 本地后端文件存储的容量、预警与可用状态契约,不是浏览器 localStorage | +| 公开发布素材 | public_release_asset,P0-A 可通过本地后端公开只读接口加载和缓存的模板、字体、缩略图或普通贴纸 | +| 内部预览素材 | internal_preview_asset,不进入公开 manifest;P0-A 只能通过有效 AssetPreviewGrant、本地后端授权 manifest 和登录鉴权资源接口访问 | +| 用户私有资源 | private_user_asset,P0-A 只能由所有者或经审计的 super_admin 通过本地后端鉴权接口访问 | +| 主动持久缓存 | Dada 通过浏览器存储主动维护的公开素材缓存,硬上限 150 MB,不包括用户下载成品 | +| GenerationErrorCategory | 三个模型共用的固定产品错误分类,统一任务状态、点数处理、用户下一步和后台统计口径 | +| 可用点数 | available_balance,可用于新任务且可因超级管理员调点为负数 | +| 冻结点数 | reserved_balance,只能由对应生成任务提交或释放 | +| 受控内测 | 通过邀请码开放并受 P0-A 或完整 P0 人数上限约束的阶段 | diff --git a/UIDesign.md b/UIDesign.md new file mode 100644 index 0000000..2ce7050 --- /dev/null +++ b/UIDesign.md @@ -0,0 +1,1402 @@ +# Dada UI Design + +| 文档项 | 内容 | +| --- | --- | +| 文档版本 | 1.0 | +| 产品范围 | P0-A Windows 单机版 | +| 设计状态 | 低保真交互与界面规范 | +| 主要画布 | Windows 当前稳定版 Chrome / Edge,1920 × 1080 优先验收 | +| 产品需求权威 | PRD.md v1.10 | +| 功能与状态导航 | FeatureSummary.md 1.1 | +| 工程与接口约束 | DevelopmentPlan.md 1.1 | +| 本阶段产出 | 页面、布局、组件、状态、文案、焦点顺序和可访问性规范 | +| 本阶段不产出 | 高保真视觉稿、前端代码、移动端、P0-B、部署人员 CLI | + +输入文件冻结校验: + +| 文件 | SHA-256 | +| --- | --- | +| PRD.md | 31F93674DF1A90B557FEE3AA9E74FB084E246CA8FE09F6BD4B1DC9D56D606565 | +| FeatureSummary.md | 6F80E272AAB08A5525B54501D83F16A4F6A7A170596947BBC25F1DA54F2FE844 | +| DevelopmentPlan.md | 7C579E9DF8D00DA9333F587D05FC966123437EE68575D87D73C903C1487FA9D6 | + +## 文档使用规则 + +本稿只解释上游需求如何落到界面,不创建新的产品角色、状态、接口或错误动作。出现冲突时,PRD.md 是唯一产品需求权威;FeatureSummary.md 只用于导航;DevelopmentPlan.md 只约束已冻结的工程、接口和状态实现。 + +设计交付遵循以下边界: + +- UI 可以决定布局、视觉、图标、控件、焦点顺序、提示层级和未被冻结的具体中文文案。 +- UI 不得改变产品状态机、权限、错误动作、验收条件、API 语义、固定提示或数据范围。 +- 后端返回的稳定 message_key 决定错误语义;前端只把它映射到本稿规定的标题、说明和允许动作,不用字符串猜测错误。 +- 前端不得把已配置默认模型、运行时推荐模型和用户当前选择合并为一个状态。 +- 页面展示不得暴露密钥、完整本机路径、私有正文、私有图片内容或不必要的个人信息。 +- 本稿中的“卡片”仅用于重复项目、素材缩略项和弹层内的独立对象;页面区段本身不做层层嵌套卡片。 + +## 设计目标 + +Dada 是面向小规模内测创作者的本机图像创作工具。普通创作体验应直接、醒目、有作品感;后台和编辑器应安静、紧凑、可扫描。视觉表达不能掩盖本机数据风险、费用、模型状态和保存状态。 + +界面遵循六项原则: + +- **先给状态,再给动作**:生成、保存、容量、服务和冲突状态必须在动作附近可见。 +- **视觉有识别度,操作不过度装饰**:艺术表达集中在登录、注册和无项目工作台顶部。 +- **危险动作明确且可逆时优先可逆**:移入回收站与永久删除分离;不可逆操作使用对象名确认。 +- **不暗换用户选择**:模型失效、版本冲突和未提交导出都要求用户明确确认。 +- **本机边界持续可见**:固定本机数据提示不是首次启动提示,不可被永久关闭。 +- **同一语义同一组件**:相同状态、message_key 和错误动作在普通端、后台与辅助界面中保持一致。 + +## 视觉方向 + +### 主视觉 + +整体使用荧光黄、黑、白、冷灰的高对比系统。荧光黄用于主要动作、当前选择和有限的品牌面积;黑色用于标题、正文和关键轮廓;白与冷灰承担大面积操作背景。错误、成功和信息状态使用独立红、绿、蓝,不依赖黄色表达所有含义。 + +视觉特征: + +- 方角模块、硬边分隔、粗体中文标题、细密数据行。 +- 不使用大面积圆角、渐变、光斑、漂浮装饰球或卡片堆叠。 +- 控件圆角最多 4 px;大区段保持直角。 +- 页面级主标题不超过 28 px;高密度面板标题使用 16 至 20 px。 +- 数字、括号和机能符号只在艺术带中少量出现,不作为导航编号。 +- 所有动态信息预留稳定宽度,状态切换不推挤相邻控件。 + +### 原创机能风艺术带 + +艺术带只用于: + +- 普通用户登录与注册页顶部。 +- 普通用户首次进入且没有任何项目的工作台顶部。 + +艺术带不用于: + +- 已有项目的工作台。 +- 项目列表、项目详情、编辑器。 +- super_admin 登录与后台。 +- 浏览器阻断与启动失败等系统错误页。 + +后续高保真阶段制作原创位图,不复制参考图中的文字、标志或具体构图。视觉由巨大 DADA 字形、银灰材质碎片、细技术线、少量荧光黄切片和低密度标记组成。艺术带不得遮住页面 H1、表单、错误提示或主动作。 + +建议规格: + +- 桌面横幅比例约 3.4:1,高度 180 至 240 px。 +- 内容安全区左右各 48 px;主字形与装饰均不得越过安全区覆盖操作内容。 +- 静态图为默认方案;如后续加入轻微位移,必须响应减少动态效果设置,并提供完全静态替代。 +- 图片加载失败时显示白底、DADA 黑色字标和一条荧光黄分隔,不影响表单和导航。 + +## 设计令牌 + +### 颜色 + +| 令牌 | 色值 | 用途 | +| --- | --- | --- | +| Brand Yellow | #F2F400 | 主按钮、当前标签、关键品牌面 | +| Ink | #111111 | 主标题、正文、主轮廓 | +| Paper | #FFFFFF | 页面与画布操作区 | +| Cool Gray 050 | #F7F7F5 | 次级背景、表格隔行 | +| Cool Gray 100 | #E8E8E5 | 分区、禁用背景 | +| Cool Gray 300 | #B9B9B3 | 边框、占位 | +| Cool Gray 600 | #62625D | 次要文字 | +| Danger | #C92A24 | 错误、破坏性动作 | +| Success | #16794B | 已保存、恢复、完成 | +| Info | #1769AA | 加载、排队、信息提示 | +| Focus | #005FCC | 键盘焦点环 | + +使用约束: + +- Brand Yellow 上只用 Ink,不用白字。 +- Danger、Success、Info 不能只靠颜色表达,必须同时出现图标和文字。 +- 页面正文与背景达到 WCAG AA;大号艺术字不承载唯一业务信息。 +- 禁用态保持文字可读,不通过降低到近乎不可见的透明度表达。 + +### 排版 + +| 层级 | 字体 | 字号 / 行高 | 字重 | +| --- | --- | --- | --- | +| 页面标题 | Microsoft YaHei UI, Segoe UI, sans-serif | 28 / 40 px | 700 | +| 区段标题 | 同上 | 20 / 28 px | 700 | +| 面板标题 | 同上 | 16 / 24 px | 700 | +| 正文与控件 | 同上 | 14 / 22 px | 400 或 600 | +| 表格与辅助信息 | 同上 | 12 / 18 px | 400 | +| 艺术带字形 | 系统粗黑或后续位图 | 72 至 96 px | 800 | + +字间距固定为 0,不随视口宽度缩放字号。金额、点数、日期和版本号使用 Segoe UI 的等宽数字特性;不引入产品包之外的远程字体。 + +### 间距与尺寸 + +- 基础间距:4、8、12、16、24、32、48 px。 +- 顶部导航高 56 px;严重状态条最小高 36 px;固定本机提示条最小高 32 px。 +- 普通按钮高 36 px;主要按钮高 40 px;图标按钮为 36 × 36 px。 +- 表格行高 44 px;密集审计表格可用 40 px。 +- 表单输入最小高 40 px;多行提示词输入最小高 120 px。 +- 页面最大内容宽 1440 px;后台数据区可使用可用宽度,不用居中窄栏。 +- 弹层宽度分为 480、640、800 px;不超过可用视口高度,正文区域内部滚动,标题和动作固定。 + +### 图标 + +实现阶段优先使用项目采用的 Lucide 图标。熟悉的工具只显示图标并提供 tooltip 和无障碍名称;业务命令使用图标加文字。 + +| 动作 | 图标 | +| --- | --- | +| 返回 | ArrowLeft | +| 撤销 / 重做 | Undo2 / Redo2 | +| 保存 | Save | +| 下载 / 导出 | Download | +| 删除 | Trash2 | +| 恢复 | RotateCcw | +| 当前任务 | LoaderCircle 或 CircleCheck | +| 状态警告 | TriangleAlert | +| 冲突 | GitCompareArrows | +| 查看详情 | Eye | +| 审计访问 | ShieldCheck | +| 诊断 | Stethoscope | +| 外部引导 | ExternalLink | + +不手绘通用图标。加载图标旋转但不改变按钮宽度;减少动态效果时改为静态图标加“处理中”文本。 + +## 全局组件 + +### 按钮 + +- **主要按钮**:荧光黄底、黑字,用于页面唯一主动作。 +- **次要按钮**:白底、黑色 1 px 边框,用于返回、取消、筛选。 +- **文字按钮**:无边框,用于表格内轻量动作。 +- **危险按钮**:红色边框或红底,只有最终确认使用实心红底。 +- **图标按钮**:固定 36 × 36 px;必须有 tooltip 和 aria-label。 +- 处理中保持原宽,显示 spinner 与动词进行时,禁止重复提交。 + +### 输入与选择 + +- 输入框标签始终在控件上方;必填标记和错误说明不占用 placeholder。 +- 邮箱与验证码使用原生可识别的 input 类型和自动完成语义。 +- 模型、比例、格式等有限选项使用菜单或分段控件,不使用自由文本。 +- 二元设置使用复选框或开关;危险设置不使用仅图标开关。 +- 数字范围使用输入加步进器;JPG 质量使用滑杆与数值输入同步。 +- 字段错误紧邻字段,页面级错误位于标题下方;二者可同时存在。 + +### 标签与状态徽标 + +状态徽标为方角短标签,固定最小宽,不使用只有颜色的圆点。状态词与后端状态一一映射,不用“差不多完成”等模糊措辞。 + +### 通知 + +| 类型 | 位置 | 行为 | +| --- | --- | --- | +| 字段错误 | 字段下方 | 聚焦后仍保留,字段修正并重新校验后消失 | +| 页面错误 | 页面标题下 | 持续到重试成功或离开页面 | +| 场景状态条 | 受影响区段上方 | 服务恢复或场景退出后消失 | +| 全局容量条 | 普通端导航下 / 后台内容顶部 | critical、full、unavailable 持续显示 | +| Toast | 右上角 | 仅用于低风险完成反馈,不承载唯一错误 | +| 冲突遮罩 | 编辑区或配置区 | 阻断写操作,保留规定的读取、导出或刷新动作 | + +### 表格 + +- 表头固定,第一列可在横向滚动时固定。 +- 支持筛选的列在表头提供明确按钮,不把筛选藏在列名点击中。 +- 行动作统一放在最右侧“更多”菜单;高频唯一动作可直接显示。 +- 空表格保留表头和筛选器,正文显示空状态与下一步动作。 +- 加载时显示稳定行高骨架;失败时不清空上一次已成功数据,并标注其更新时间。 + +### 弹层 + +- 打开后焦点进入标题后的第一个可操作控件。 +- 焦点限制在弹层内;Esc 仅关闭非破坏性弹层。 +- 关闭后焦点返回触发按钮。 +- 破坏性确认显示对象名、影响范围和不可恢复后果。 +- 后端请求期间禁用关闭与重复提交;请求失败后恢复控件,保留用户输入。 + +## 全局状态语言 + +### 加载、空、失败和禁用 + +| 状态 | 视觉 | 默认动作 | +| --- | --- | --- | +| 正常 | 完整内容与可用主动作 | 执行当前流程 | +| 空 | 明确空原因、一个主动作、可选次动作 | 创建、上传或清除筛选 | +| 加载 | 稳定尺寸骨架或行内进度 | 允许取消时显示取消 | +| 失败 | 红色标题、可理解说明、稳定 message_key 映射 | 重试、返回或诊断 | +| 禁用 | 控件保持可读,旁边说明前置条件 | 前往满足条件的入口 | +| 冲突 | 对象版本与最新状态并列 | 按产品规则刷新、重试或仅导出 | +| 容量限制 | 全局或场景状态条加受影响动作说明 | 清理、下载或重试计量 | + +### 容量状态 + +LocalBackendStorageState 的状态与动作必须来自后端;前端不自行用浏览器剩余空间估算。 + +| 状态 | 全局表达 | 生图 / 参考图 / 成品保存 | 上传贴纸 / 生成缩略图 | JSON 项目编辑 | 已有内容查看 / 下载 / 删除 | +| --- | --- | --- | --- | --- | --- | +| normal,低于 80% | 不显示全局条 | 允许 | 允许 | 允许 | 允许 | +| warning,达到 80% | 受影响场景显示黄色提示 | 允许 | 允许 | 允许 | 允许 | +| critical,达到 90% | 持续紧凑状态条 | 允许,但提交前再次显示预计占用 | 允许,但上传前再次确认 | 允许 | 允许 | +| full,已达到 5 GB,或预计本次写入后超过上限 | 持续红色状态条 | 阻断新增受管二进制写入与 AI 调用;客户端只下载按上游规则保留 | 阻断 | 允许可提交的 JSON 编辑 | 允许 | +| unavailable,不可写或系统磁盘满 | 持续红色状态条 | 阻断新增写入与 AI 调用;已有文件可下载 | 阻断 | 后端写入失败,页面进入 failed | 允许查看、下载和删除入口 | + +预计本次写入后恰好等于 5 GB 时,允许本次容量预留和写入继续;写入提交后 storage_status 进入 full,并阻断后续新增受管二进制写入与 AI 调用。 + +容量提示中显示已用量、5 GB 上限、最后计量时间和“管理存储”入口。前端不得在清理排队时预先减少已用量;只有物理清理完成并重新计量后更新。 + +### 服务异常 + +- Worker degraded:生成表单和当前任务入口显示;不影响项目查看、编辑已有 JSON 和本地可完成的导出。 +- 无运行时可用模型:生成区持续显示,生成按钮禁用;不改写用户模型配置显示。 +- Resend 异常:只在登录、注册和后台服务页显示。 +- 高德异常:只在使用 DYN004 定位能力的素材场景和后台服务页显示。 +- AI 网关余额或可用性异常:在模型选择、生成提交、当前任务和后台服务页显示。 +- LocalDataRoot 容量异常:按上表全局表达。 +- 普通用户错误不显示密钥、绝对路径、原始上游响应或私有正文。 + +## 页面与入口地图 + +### 访问前门禁 + +浏览器访问 localhost 后首先进入支持检查。门禁通过后才可加载普通端或后台产品界面;失败只进入浏览器不受支持引导页。 + +### 普通用户 + +普通用户顶部导航: + +- 创作 +- 项目 +- 点数 +- 设置 + +右侧固定区域: + +- 当前生成任务入口:只要存在 queued 或 running 任务就持续显示。 +- 点数余额。 +- 账号菜单。 + +导航下方按需显示严重容量状态条。页面底部或固定底栏持续显示: + +> 测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。 + +普通用户页面: + +- 登录 / 注册 +- 创作工作台 +- 当前生成任务 +- 项目列表与回收站 +- 项目详情 +- 编辑器 +- 导出 +- 点数明细 +- 设置与账号注销 + +内部预览账号沿用普通用户全部页面,只在授权素材批次内多看到允许的 internal_preview 或 passed 内容。它不是新角色,不出现后台入口。 + +### super_admin + +super_admin 使用独立登录和独立会话。后台左侧导航: + +- 总览 +- 用户 +- 邀请码 +- 模型 +- 素材 +- 内部预览 +- 生成记录 +- 服务与存储 +- 审计 + +super_admin 不显示普通创作导航、创作工作台、项目或编辑器入口。 + +### 辅助系统界面 + +Windows 托盘和 Supervisor 提供: + +- 打开 Dada +- 查看运行状态 +- 打开诊断 +- 退出 Dada + +部署人员 CLI 不属于本稿。 + +## 权限矩阵 + +| 能力 | 未登录访问者 | 普通用户 | 内部预览账号 | super_admin | 辅助系统 | +| --- | --- | --- | --- | --- | --- | +| 浏览器不受支持引导 | 可见 | 门禁前可见 | 门禁前可见 | 门禁前可见 | 可打开支持页 | +| 登录 / 注册 | 可见 | 已登录后跳转创作 | 同普通用户 | 仅独立后台登录 | 不处理身份 | +| 创作与生成 | 不可 | 可 | 可 | 不可 | 只显示健康状态 | +| 已发布普通素材 | 不可 | 可 | 可 | 后台管理 | 只显示素材根健康 | +| 授权内部预览素材 | 不可 | 不可 | 可 | 管理授权与批次,不以普通用户身份消费 | 不可 | +| 项目、编辑器、导出 | 不可 | 可 | 可 | 不可 | 不可 | +| 后台运营 | 不可 | 不可 | 不可 | 可 | 不可 | +| 私有内容完整正文 / 图片 | 不可 | 不可 | 不可 | 告知确认后,逐次“打开并记录审计” | 不可 | +| 诊断摘要 | 不可 | 设置中只看用户相关简化状态 | 同普通用户 | 后台可看脱敏运营诊断 | 可看脱敏系统诊断 | + +账号被停用或注销后,服务端权限优先于已打开页面。页面收到拒绝时立即退出受保护内容并返回相应身份入口,不保留可交互的旧数据。 + +## 浏览器不受支持引导 + +**入口与权限** + +支持检查返回 BROWSER_UNSUPPORTED,或任何产品路由在门禁前被拒绝时进入。所有身份均只能看引导,不能继续使用产品功能。 + +**布局** + +- 白底全页,顶部 8 px 荧光黄规则线。 +- 中央 640 px 文字列,显示 DADA 字标、标题“当前浏览器无法使用 Dada”、原因、受支持品牌和版本。 +- 底部显示当前检测到的浏览器品牌 / major;识别不可用时只显示“无法可靠识别”。 +- 不加载产品主导航、项目缩略图或后台框架。 + +**控件** + +- “查看如何打开 Chrome / Edge”折叠说明。 +- “重新检测”只重新执行门禁,不提供绕过。 +- 若系统能力允许,提供“复制本机地址”;它不是继续使用入口。 + +**状态与动作** + +| reason | 文案重点 | 允许动作 | +| --- | --- | --- | +| platform_unsupported | 仅支持当前 Windows 电脑 | 查看引导、复制地址、重新检测 | +| brand_unsupported | 请使用已验收的 Chrome 或 Edge | 查看引导、重新检测 | +| version_unsupported | 当前版本不在本次发布支持范围 | 查看支持 major、重新检测 | +| identity_unavailable | 无法可靠识别浏览器 | 检查浏览器设置、重新检测 | + +焦点顺序:页面标题 → 折叠说明 → 重新检测 → 复制地址。错误摘要使用 assertive live region。页面没有“仍然继续”。 + +## 普通用户认证 + +### 登录 / 注册框架 + +页面顶部为原创机能风艺术带,下方为左对齐 480 px 表单列。艺术带不随字段展开改变高度。页面右上角只显示“管理员登录”文字入口,明确进入独立后台身份域。 + +登录与注册使用标签切换。切换时清除不属于目标模式的敏感字段,不把注册资料带到登录提交。 + +### 登录 + +**字段与动作** + +- 邮箱 +- 验证码 +- 获取验证码 / 倒计时后重新获取 +- 登录 + +登录模式不显示邀请码、创作署名、社交 ID 和内测告知。 + +焦点顺序:登录标签 → 邮箱 → 获取验证码 → 验证码 → 登录 → 注册标签 → 管理员登录。 + +**状态** + +| 状态 | 表达 | 允许动作 | +| --- | --- | --- | +| 初始 | 邮箱空,获取验证码禁用 | 输入邮箱 | +| 邮箱格式无效 | 字段错误 | 修正邮箱 | +| 发码中 | 按钮保持宽度并显示“发送中” | 等待 | +| 已发码 | 显示倒计时和发送目标的脱敏邮箱 | 输入验证码、倒计时后重发 | +| Resend 失败 | 页面错误,不清空邮箱 | 重试 | +| 验证码错误 / 过期 | 验证码字段错误 | 修正或重发 | +| 账号停用 | 页面错误 | 返回、联系管理员 | +| 登录成功 | 跳转创作 | 无重复提交 | + +### 注册 + +注册分为两个可见阶段,但仍是一个页面和一条注册流程。 + +**第一阶段** + +字段顺序固定为: + +- 邀请码 +- 邮箱 +- 获取验证码 + +获取验证码只有在邀请码和邮箱均通过本地完整性检查后可用。点击后使用既有发码请求,由后端校验邀请码有效性和名额;前端不新增邀请码预检 API。 + +后端确认邀请码有效、名额未满并成功发码后,才展开第二阶段: + +- 验证码 +- 创作署名 +- 社交 ID +- 《内测使用与隐私告知》阅读入口和必选同意框 +- 注册 + +第二阶段展开后,邀请码和邮箱保持只读摘要,并提供“修改”动作。修改会收起第二阶段并使已发挑战按后端规则失效或重新申请。 + +焦点顺序:注册标签 → 邀请码 → 邮箱 → 获取验证码 → 验证码 → 创作署名 → 社交 ID → 告知阅读 → 同意复选框 → 注册 → 登录标签。 + +**状态** + +| 状态 | 表达 | 允许动作 | +| --- | --- | --- | +| 邀请码未填 / 邮箱未填 | 获取验证码禁用,并说明缺少字段 | 补充字段 | +| 邀请码无效 | 邀请码字段错误,第二阶段不展开 | 修正邀请码 | +| 邀请码已用 / 过期 | 显示对应稳定错误语义 | 更换邀请码 | +| 名额已满 | 页面级阻断,不发送验证码 | 返回登录 | +| 发码成功 | 展开第二阶段 | 完成资料 | +| 验证码错误 / 过期 | 保留资料字段 | 修正或重发 | +| 告知未同意 | 注册按钮禁用,说明必选 | 阅读并勾选 | +| 最终复核失败 | 保留非敏感资料,显示具体稳定错误 | 按错误动作修正 | +| 注册成功 | 建立普通用户会话并进入创作 | 无重复提交 | + +告知正文必须覆盖 PRD 固定范围;界面不把长文塞入复选框标签。阅读弹层底部固定显示“我已阅读”,但只有返回表单后的复选框代表同意。 + +## 普通用户主框架 + +### 顶部导航 + +左侧为 DADA 字标和四个导航入口。当前入口使用荧光黄底与 3 px 黑色下边线,不能只靠颜色。右侧任务入口在 queued 或 running 时显示状态文字和进度;进入 succeeded、failed 或 rejected 后保留一次可查看结果提示,用户查看后恢复为隐藏。 + +顶部导航在页面滚动时保持可见。容量 critical/full/unavailable 状态条固定在导航下,不盖住页面内容。 + +### 本机数据提示 + +普通用户主框架底部持续显示固定文案: + +> 测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。 + +该条不可永久关闭。设置页重复显示更完整的数据风险说明和下载建议。屏幕阅读器首次进入页面时读出,站内导航时不重复打断。 + +## 创作工作台 + +### 无项目状态 + +**布局** + +- 顶部原创机能风艺术带,标题为“开始一张新作品”。 +- 艺术带下方直接进入生成表单,不把表单放进装饰卡。 +- 右侧或下方显示“当前任务”;无任务时显示简洁空状态。 + +**空状态动作** + +- 输入提示词。 +- 选择模型和比例。 +- 添加参考图(提交生成时上传)。 +- 查看预计点数。 +- 提交生成。 + +没有“浏览示例模板”之类未定义入口。 + +### 有项目状态 + +不显示艺术带。页面顶部为紧凑生成区,下方为最近项目与当前任务摘要。最近项目只展示真实项目数据;最多显示 6 个,之后使用“查看全部项目”。 + +### 生成表单 + +**布局与控件** + +- 提示词多行输入。 +- 模型选择菜单。 +- 比例分段控件:3:4、1:1、4:3、9:16。 +- 添加参考图区域,包含选择本地文件、标注“尚未提交,仅保留在当前页面”的缩略预览和移除;只有点击提交生成时才上传并绑定本次 GenerationJob。 +- 已确认点数成本。 +- 生成按钮。 + +首次新建创作时预选 recommended_model_id。界面同时区分: + +- “系统配置默认”:只在模型详情说明中展示 configured_default_model_id。 +- “当前推荐”:在推荐模型选项旁显示“推荐”。 +- “你的选择”:菜单当前值。 + +如果 recommended_model_id 为空,模型不自动选中,生成按钮禁用并显示“当前没有可用于新任务的模型”。 + +若用户已选模型后,该模型变为不可用于新任务: + +- 保留原选择并标红“当前不可用”。 +- 不切换到推荐模型。 +- 阻断提交。 +- 若后端返回新推荐,显示“改用推荐模型”按钮;用户点击后形成新的显式选择。 +- 重新显示成本和能力约束,用户再次确认后才可提交。 + +**提交前状态** + +| 条件 | 生成按钮 | 邻近说明 | +| --- | --- | --- | +| 提示词为空 | 禁用 | 请输入创作描述 | +| 模型未选 | 禁用 | 请选择当前可用模型 | +| 模型运行时不可用 | 禁用 | 保留原选择并显示原因、推荐替代 | +| 比例未选 | 禁用 | 请选择画面比例 | +| 参考图处理中 | 禁用 | 正在处理参考图 | +| 点数不足 | 禁用 | 显示所需与现有点数,入口到点数页 | +| 已有 queued / running 任务 | 不创建第二个任务 | 变为“查看当前任务” | +| Worker degraded | 禁用或按后端能力阻断 | 显示生成服务暂不可用 | +| storage full / unavailable | 禁用 | 显示容量动作 | +| 条件均满足 | 可用 | 显示确认成本与模型 | + +提交后立即进入当前任务视图,不乐观创建成功图片。 + +### 当前生成任务 + +当前任务既是顶部持续入口,也有独立详情抽屉或页面。抽屉宽 420 px,从右侧打开,不改变主页面状态。 + +| 状态 | 显示 | 允许动作 | +| --- | --- | --- | +| queued | 排队时间、模型、比例、冻结点数 | 关闭抽屉、返回项目 | +| running | 运行状态、开始时间、模型 | 关闭抽屉、查看项目 | +| succeeded | 结果缩略图、实际点数、项目入口 | 打开项目、下载原图 | +| failed | 错误标题、是否释放点数、允许动作 | 按错误映射重试或修改 | +| rejected | 拒绝原因、点数释放状态和允许动作 | 按错误映射修改提示词或参考图 | + +同一账号再次提交时若后端返回现有 queued / running 任务,界面打开该任务,不显示第二次冻结成功。 + +### 生成错误与提交阻断动作矩阵 + +具体 message_key 由后端返回。固定 GenerationErrorCategory 只有以下九类,前端不得新增、重命名或归并: + +| GenerationErrorCategory | 用户说明重点 | 主动作 | 任务与点数 | +| --- | --- | --- | --- | +| upstream_timeout | 上游响应超时 | 使用原输入重试 | failed,释放冻结点 | +| upstream_failed | 上游明确失败 | 使用原输入重试 | failed,释放冻结点 | +| safety_rejected | 内容未通过安全检查 | 修改提示词或参考图 | rejected,不保存输出并释放冻结点 | +| model_disabled | 模型因普通启停规则不可用 | 选择其他模型或等待 | 不创建任务、不冻结点 | +| gateway_balance_insufficient | AI 网关余额不足 | 选择未受影响模型或联系管理员 | 未创建则不冻结;已创建则 failed 并释放 | +| gateway_contract_invalid | 网关契约未验证或失效 | 选择其他模型或联系管理员 | 未创建则不冻结;已创建则 failed 并释放 | +| reference_invalid | 参考图格式、大小、数量或内容无效 | 更换或移除参考图 | 未创建则不冻结;已创建则 failed 并释放 | +| unknown_retryable | 未知但判断为临时错误 | 稍后重试 | failed,释放冻结点 | +| unknown_non_retryable | 未知且不应反复重试 | 联系管理员 | failed,释放冻结点 | + +以下情况是确定性业务阻断,不属于 GenerationErrorCategory: + +| 阻断条件 | 用户说明重点 | 主动作 | 任务与点数 | +| --- | --- | --- | --- | +| 点数不足 | 显示所需点数与当前可用点数 | 查看点数明细 | 不创建任务、不冻结点 | +| ModelConfig 版本变化 | 显示最新模型配置和成本 | 重新确认 | 不创建任务、不冻结点 | +| 已有 queued / running 任务 | 当前已有生成任务 | 查看当前任务 | 不创建第二个任务、不重复冻结 | +| 项目或生成历史达到上限 | 显示对应上限和清理要求 | 管理项目或删除旧历史图 | 不创建任务、不冻结点 | +| storage full / unavailable | 显示容量或可写性阻断原因 | 管理存储或打开诊断 | 不创建任务、不调用上游、不冻结点 | + +## 项目 + +### 项目列表 + +**入口与权限** + +普通用户及内部预览账号从顶部“项目”进入,只能看到自己的项目。 + +**布局** + +- 页面标题、active 项目计数和上限。 +- “项目”与“回收站”标签。 +- 搜索、排序和状态筛选。 +- 项目缩略图网格;卡片比例稳定,不因名称或状态变化改变尺寸。 +- failed_empty 快捷清理区只在存在候选时出现。 + +**项目卡片** + +- 当前底图或占位图。 +- 项目名、比例、更新时间。 +- 成功图数量。 +- 项目状态。 +- 打开主动作。 +- 更多菜单:重命名、移入回收站;只有允许的对象显示对应动作。 + +项目名最多显示两行,之后省略;完整名称通过 tooltip 和无障碍名称可读。 + +**状态** + +| 状态 | 表达 | 允许动作 | +| --- | --- | --- | +| 正常 | 网格与计数 | 打开、重命名、按规则删除 | +| 空 | “还没有项目” | 前往创作 | +| 筛选为空 | “没有符合条件的项目” | 清除筛选 | +| 加载 | 固定比例骨架 | 等待 | +| 失败 | 保留上次列表并标注旧数据 | 重试 | +| 达到 20 个 active 上限 | 顶部阻断提示 | 清理 failed_empty 或移入回收站 | +| 批量 failed_empty | 仅选择无成功图草稿 | 批量移入回收站 | + +含成功图项目不得进入 failed_empty 快捷批量操作。前端复核展示条件,后端仍做最终校验。 + +焦点顺序:页面标题 → 标签 → 搜索 → 筛选 → 排序 → 项目卡片 → 分页或加载更多 → failed_empty 清理。 + +### 回收站 + +- 显示删除时间和剩余保留时间。 +- 提供恢复和永久删除。 +- 恢复若触发 active 项目上限,显示阻断并指向现有项目管理。 +- 永久删除使用项目名确认;提交后显示清理进度。 +- 永久删除完成前不乐观减少容量。 + +### 项目详情 + +**布局** + +- 顶部:返回、可编辑项目名、项目状态、比例、更多菜单。 +- 主区:当前底图大预览。 +- 历史区:按时间展示最多 10 张成功图。 +- 操作区:继续生成、进入编辑器、下载原始图。 +- 最新导出区:每种格式最多展示最新一份;后端保存失败的本地下载不进入此区。 + +**状态与动作** + +| 状态 | 表达 | 允许动作 | +| --- | --- | --- | +| active 且有成功图 | 正常详情 | 满足生成前置条件时继续生成;编辑、下载 | +| failed_empty | 无成功图与最后错误摘要 | 修改并重试、移入回收站 | +| 已达 10 张成功图 | 历史上限提示 | 编辑、下载;不再追加生成 | +| trashed | 回收站标识 | 恢复、永久删除;不编辑 | +| state_version 冲突 | 版本冲突条 | 刷新后继续 | +| 加载失败 | 不展示部分可编辑数据 | 重试、返回列表 | + +项目比例创建后固定。继续生成不提供改变比例的控件。继续生成入口始终保留,但受项目 10 张成功图上限、模型运行时可用性、点数、同账号单一 queued / running 任务和 storage full / unavailable 约束;条件不满足时禁用入口,并在入口旁说明具体原因和允许动作。 + +## 编辑器 + +### 总体布局 + +编辑器使用固定三栏框架: + +- 顶部工具栏:56 px。 +- 左栏:280 px,素材与底图来源。 +- 中央:自适应画布工作区。 +- 右栏:320 px,当前对象或底图参数。 +- 底部状态行:32 px,缩放、对象计数和键盘状态。 + +1920 × 1080 下,画布完整可见且工具栏不换行。可用宽度缩小时左右栏各自内部滚动,不挤压画布到不可操作尺寸。 + +### 顶部工具栏 + +从左到右: + +- 返回项目。 +- 项目名与比例。 +- 撤销、重做。 +- 保存状态。 +- 预览。 +- 导出。 + +保存状态固定占用至少 128 px,覆盖: + +| 状态 | 显示文案 | 图标 / 色彩 | 行为 | +| --- | --- | --- | --- | +| dirty | 有未保存修改 | Circle / Ink | 允许继续编辑,离开需确认 | +| saving | 正在保存 | LoaderCircle / Info | 保持布局,禁止重复手动保存 | +| saved | 已保存 | CircleCheck / Success | 显示最近保存时间 | +| failed | 保存失败 | CircleX / Danger | 显示重试;离开与刷新按失败规则提示 | +| conflicted | 版本冲突 | GitCompareArrows / Danger | 编辑区转只读,进入冲突处理 | + +### 左栏 + +左栏使用文本标签,不使用数字编号: + +- 底图 +- 历史 +- 文字模板 +- 普通贴纸 +- 色卡 +- 动态贴纸 + +底图显示当前生成图和可用历史图。切换底图前显示说明:“覆盖元素会保留,底图编辑参数将重置。”用户确认后执行。 + +历史区按项目历史顺序显示,不能绕过项目 10 张成功图上限。素材列表使用虚拟滚动、懒加载和稳定缩略尺寸;内部预览账号只在授权素材上看到“预览”标识。 + +素材加载失败时: + +- 已加载素材继续可用。 +- 失败分区显示重试。 +- 只读素材根异常时显示“素材暂不可用”,不显示绝对路径。 +- 下架素材不得用于新添加;项目已有引用仍按保存版本渲染。 + +### 中央画布 + +- 画布背景为 Cool Gray 100,真实输出区域为白色或当前底图。 +- 固定宽高比容器避免图片加载时跳动。 +- 支持选择、移动、缩放、旋转、翻转、透明度、复制、层级、对齐吸附、循环选择、长按候选、多选和框选。 +- 对齐参考线使用 Focus 蓝,吸附结果同时有视觉和短暂文字提示。 +- 长按候选在指针附近显示对象列表,键盘用户可通过“循环选择”命令打开同一列表。 +- 覆盖元素达到 50 个时,新增相关动作禁用并说明上限。 + +明确不提供: + +- 图层面板。 +- 隐藏。 +- 锁定。 +- 编组。 + +层级调整只作用于当前选中对象,通过置顶、上移、下移、置底命令完成。 + +### 右栏 + +右栏标题随选择变化,但宽度不变: + +- 未选择对象:画布摘要和底图参数。 +- 选择底图:裁剪、适配、亮度、对比度、饱和度、色温、固定滤镜。 +- 选择文字:内容、模板允许的文字样式和对象变换。 +- 选择贴纸 / 色卡 / 动态贴纸:对象变换、透明度和素材允许参数。 +- 多选:对齐、分布、共同变换和删除。 + +数值控件使用滑杆与数值输入同步。拖动时画布即时预览,松开形成一个撤销记录;键盘步进结束后同样合并为合理的撤销单元。 + +### 编辑器状态 + +| 状态 | 中央区 | 顶部动作 | 允许动作 | +| --- | --- | --- | --- | +| 正常 | 可编辑 | 保存、导出可用 | 全部编辑 | +| 初次加载 | 固定画布骨架 | 导出禁用 | 返回项目 | +| 素材分区加载失败 | 画布保持可编辑 | 保存、导出可用 | 重试素材,编辑已有对象 | +| dirty | 可编辑 | 显示有未保存修改 | 保存、导出前确认 | +| saving | 可编辑但保存动作锁定 | 显示正在保存 | 继续本地编辑,按队列保存 | +| failed | 保留本地当前状态 | 显示保存失败 | 重试、按规则本地导出、返回需确认 | +| conflicted | 只读遮罩,显示本页版本和后端新版本 | 仅一次本地导出与刷新可用 | 本地导出一次、刷新最新版本 | +| storage full | JSON 保存仍按上游允许,二进制写入提示 | 导出可客户端下载 | 编辑、保存 JSON、客户端下载 | +| storage unavailable | 保留当前内存状态,保存 failed | 本地导出按上游可行性提示 | 查看、尝试本地下载、诊断 | + +同机多标签发生 state_version 冲突时,不提供合并、覆盖后端或继续编辑。旧页只读,允许一次本地导出当前内存版本,然后必须刷新本地后端最新版本。关闭冲突提示不能恢复编辑。 + +### 离开与崩溃边界 + +- dirty:离开弹层提供“保存并离开”“不保存离开”“继续编辑”。 +- saving:等待当前保存结果后再决定离开。 +- failed:明确未写入本地后端;提供重试、按规则本地导出和继续编辑。 +- conflicted:只允许一次本地导出和刷新最新版本,不提供覆盖。 +- 强制刷新、关闭页面或浏览器崩溃时,不承诺恢复未提交私有草稿。 + +## 导出 + +导出使用 640 px 弹层。 + +**控件顺序** + +- 格式分段控件:JPG / PNG。 +- JPG 质量:滑杆和数值输入;选择 PNG 时隐藏且不保留为可聚焦控件。 +- 输出尺寸与预计文件信息。 +- 未提交修改确认区。 +- “导出并下载”主按钮。 +- 取消。 + +如果存在未提交文字或样式修改: + +- 弹层显示“导出前需要提交当前修改”。 +- 用户确认后形成一次撤销记录,再用提交后的同一画布状态合成。 +- 用户取消时不提交,也不导出。 + +**结果矩阵** + +| 客户端合成 | 浏览器下载 | 后端最新成品保存 | 结果表达 | +| --- | --- | --- | --- | +| 成功 | 成功 | 成功 | “已下载并保存为最新成品” | +| 成功 | 成功 | 失败 | 明确“文件已下载,但未保存为最新成品”;latest_exports 不更新 | +| 成功 | 失败 | 未开始或失败 | 显示浏览器下载失败,允许重新下载同一次合成结果 | +| 失败 | 未开始 | 未开始 | 显示合成失败,返回编辑器检查 | +| 冲突页允许的一次导出 | 成功或失败 | 不覆盖后端 | 明确“仅下载本页版本,未写入项目” | + +下载与后端持久化必须来自同一次合成。后端保存失败不能撤回已成功的客户端下载,也不能假装 latest_exports 已更新。每种格式只保留最新一份后端记录。 + +焦点顺序:格式 → JPG 质量 → 修改确认 → 导出并下载 → 取消。结果消息通过 polite live region 宣读;失败通过 assertive。 + +## 点数 + +### 点数明细 + +**布局** + +- 当前可用点数。 +- 冻结点数说明。 +- 明细表:时间、事件、变动、任务 / 管理操作引用、余额。 +- 筛选:日期、事件类型。 + +**状态** + +- 空:显示“暂无点数变动”,不提供购买入口。 +- queued / running 冻结:用“已冻结”状态,不算作已扣除。 +- succeeded:显示实际结算。 +- failed / rejected:显示对应释放,避免看起来重复加点。 +- 加载失败:保留上次余额并标明更新时间,涉及新提交时仍以服务端实时校验为准。 + +upstream_cost_reconciliation 只用于后台诊断与本地监控,不改变 Dada 点数处理,也不在普通用户点数页显示为任务状态或点数状态。 + +普通用户不能调整点数。 + +## 设置与账号注销 + +### 设置 + +区段: + +- 个人资料:创作署名、社交 ID。 +- 账号:邮箱只读,登录与状态摘要。 +- 本机数据:固定提示、容量状态、主动下载建议、诊断摘要入口。 +- 注销账号。 + +本机数据区必须持续显示原文: + +> 测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。 + +同时说明数据依赖当前 Windows 用户登录和文件系统权限,不提供 Dada 应用层加密或云备份;机器损坏、重装或删除 LocalDataRoot 后不可恢复。界面只显示逻辑位置说明,不显示绝对路径。 + +### 注销 + +注销入口放在设置末尾危险区,不与退出登录相邻。流程: + +- 打开 640 px 确认弹层。 +- 展示影响范围、不可恢复内容和匿名保留规则。 +- 输入指定确认词或账号邮箱。 +- 再次获取验证码并验证。 +- 提交后显示处理中,不允许关闭重复提交。 +- 成功后结束普通用户会话并返回登录。 + +失败保留确认弹层和非敏感输入,按稳定错误显示重试动作。注销不提供将可编辑项目导入未来正式系统的承诺。 + +## super_admin 登录与框架 + +### 管理员登录 + +独立 URL、独立会话和独立 audience。页面使用白底、黑色字标和窄荧光黄顶条,不使用创作艺术带。 + +字段: + +- 管理员邮箱。 +- 验证码。 +- 获取验证码。 +- 登录。 + +邮箱不在管理员白名单时,发码前按服务端结果阻断。错误文案不暴露某邮箱是否属于普通用户。普通用户登录成功不能跳入后台。 + +焦点顺序:邮箱 → 获取验证码 → 验证码 → 登录 → 返回普通用户登录。 + +### 后台框架 + +- 左侧导航 216 px,固定在视口。 +- 顶部 52 px,显示页面标题、系统总体状态、管理员账号菜单。 +- 主内容区优先使用表格和无框分区。 +- critical/full/unavailable 容量条固定在主内容顶部。 +- 服务 degraded 可聚合为顶部“有异常”入口,但详细影响仍在对应页面。 +- 后台不显示创作、项目和编辑器入口。 +- 后台身份域不能把当前 super_admin 会话切换为普通用户。若同一自然人另有独立普通账号,必须退出后台并从普通用户登录入口进入普通端;普通账号与 super_admin 仍是独立身份,不能原地提升或共用会话。 + +## 后台总览 + +总览是运营状态摘要,不做营销式仪表盘。使用一列关键状态带和两列紧凑数据区: + +- 当前普通用户数与名额。 +- queued / running 任务。 +- 上游成本核对待人工核对数量和最早等待时间;该项来自 upstream_cost_reconciliation = pending_manual_review,不作为 GenerationJob 状态或点数状态显示。 +- 三模型配置默认、运行时可用数量和当前推荐。 +- LocalDataRoot 容量。 +- Resend、高德、AI 网关、Worker、素材根状态。 +- 最近后台操作。 +- 需要处理的贴纸清理任务。 + +每个摘要都链接到唯一负责页面。空状态代表“当前无待处理项”,不能与加载失败混淆。 + +## 用户管理 + +**布局** + +- 搜索与账号状态筛选。 +- 用户表:脱敏邮箱、创作署名、社交 ID、状态、点数、注册时间、最近活动。 +- 行动作:查看、停用 / 恢复、调整点数。 + +**用户详情抽屉** + +- 账号资料。 +- 项目与任务计数,不直接显示私有图片。 +- 点数摘要与最近流水。 +- 管理操作历史。 + +调整点数弹层要求: + +- 正负方向明确。 +- 数值、原因必填。 +- 提交前显示调整前后余额。 +- 处理中禁止重复提交。 +- 成功后更新余额和审计摘要。 + +普通后台查看不自动打开完整提示词或私有图片。需要私有内容时只能进入受保护的生成记录流程。 + +## 邀请码 + +页面含邀请统计、筛选和表格: + +- 邀请码脱敏显示。 +- 状态。 +- 创建时间、过期时间。 +- 使用账号和使用时间。 +- 创建人。 + +创建弹层只显示 PRD 允许字段。复制邀请码为低风险 Toast;禁用、过期或已用状态不能复制成“可用”。名额已满时创建或使用相关动作按后端规则禁用并说明。 + +## 模型 + +### 模型列表 + +每个模型一行,分别显示: + +- 模型 ID 与显示名。 +- configured enabled。 +- configured default。 +- recommendation_priority。 +- contract_validation_status。 +- runtime availability 及 reason、checked_at。 +- 当前是否为 recommended_model_id。 +- 成本、比例和参考图能力摘要。 +- config_version。 + +“默认”“推荐”“运行时可用”必须是三个独立列,不用一个徽标覆盖。 + +### 完整配置集合编辑 + +模型配置以完整集合弹层或页面编辑,不提供逐行立即保存。顶部显示 config_set_version。 + +规则: + +- 始终恰好一个已启用默认模型。 +- recommendation_priority 为唯一正整数,不能重复。 +- 停用非默认模型可直接纳入候选集合。 +- 停用当前默认模型时,同一操作必须先指定另一个已启用、合法的默认模型。 +- 保存以完整配置集合原子提交;任何字段失败整次不写入。 +- 保存时版本冲突映射 MODEL_CONFIG_VERSION_CONFLICT,用户刷新最新集合后重新编辑。 + +固定错误动作: + +| message_key | 界面动作 | +| --- | --- | +| MODEL_DEFAULT_REPLACEMENT_REQUIRED | 聚焦“替代默认模型”,不允许提交 | +| MODEL_DEFAULT_REPLACEMENT_INVALID | 标出替代模型不可作为默认的原因 | +| MODEL_RECOMMENDATION_PRIORITY_INVALID | 聚焦首个非正整数或缺失优先级 | +| MODEL_RECOMMENDATION_PRIORITY_CONFLICT | 同时标出重复优先级行 | +| MODEL_CONFIG_VERSION_CONFLICT | 整页阻断保存,提供刷新最新配置 | + +外部服务临时异常只更新运行时可用显示,不自动修改 enabled、is_default 或 recommendation_priority。恢复后 recommended_model_id 可重新派生,但界面不把结果写回配置。 + +## 素材 + +素材页分为: + +- 普通贴纸。 +- 素材版本与发布。 +- 历史文件清理。 + +### 普通贴纸 + +表格或缩略网格支持 part、状态、来源和稳定 ID 筛选。管理员上传流程: + +- 选择 PNG / WebP。 +- 填写稳定 ID、既有 part、顺序、启停和可选内部名称。 +- 上传前显示原图将写入 LocalDataRoot,缩略图由 Dada 生成。 +- 原图和缩略图都计入 managed_content_bytes。 +- 只读规范素材库明确显示“不计入本机 5 GB 内容额度”。 + +storage full / unavailable 时,选择文件和提交上传均禁用,缩略图生成不启动。已有素材仍可查看和按规则下架。 + +下架只阻止新添加;已有项目引用保持可渲染。页面不能提供“下架并立即删除文件”的组合动作。 + +### 素材版本与发布 + +- 版本表显示稳定 ID、版本、状态、白名单范围、引用计数和发布时间。 +- passed、internal_preview 与公开可见性分列展示。 +- 发布、撤回和启停使用后端合法状态;UI 不创建额外“半发布”状态。 +- 发布失败保留候选配置并显示具体 message_key。 +- 只读素材根校验失败时暂停依赖动作,提供重新配置指引或诊断入口,不自动复制素材。 + +### 历史贴纸文件清理 + +清理是独立流程,不能藏在下架动作中。 + +| 阶段 | 页面表达 | 允许动作 | 容量显示 | +| --- | --- | --- | --- | +| 候选查询 | 列出历史原图、缩略图、预计字节和引用摘要 | 选择候选、刷新 | 不变 | +| 确认 | 显示文件数量、总字节、不可恢复说明 | 确认并提交、取消 | 不变 | +| 引用复核冲突 | 整批拒绝,列出引用类型与对象 ID 的安全摘要 | 打开引用对象、刷新候选 | 不变 | +| 已排队 | 显示 cleanup job 和排队时间 | 查看任务 | 不变 | +| 物理清理中 | 显示处理进度,不允许重复提交 | 查看任务 | 不变 | +| 物理清理失败 | 显示已处理 / 未处理摘要和重试条件 | 按后端结果重试或诊断 | 重新计量前不乐观减少 | +| 重新计量 | 显示“正在重新计量本机内容” | 等待 | 使用旧值并标注 | +| 完成 | 显示实际释放与新容量状态 | 返回列表 | 以后端新计量为准 | + +固定错误动作: + +| message_key | 界面动作 | +| --- | --- | +| ASSET_HISTORY_REFERENCE_CONFLICT | 阻断整批清理,展示安全引用摘要 | +| ASSET_CLEANUP_CANDIDATE_STALE | 放弃旧候选,要求重新查询与确认 | +| STORAGE_CAPACITY_EXCEEDED | 阻断会新增受管二进制的动作,打开存储管理 | + +每个阶段在后台操作审计中有记录。无引用只是候选条件,不代表系统可自动清理;必须由 super_admin 显式确认。 + +## 内部预览 + +页面管理: + +- 预览批次。 +- 批次内素材版本。 +- 授权普通用户账号。 +- 生效时间与状态。 + +授权对象仍是普通用户账号。界面不得创建“内部预览管理员”或单独角色。普通用户端仅在已授权批次范围内多显示素材,并在缩略项上加“预览”标识;不出现管理入口。 + +取消授权后,用户不再能新添加预览素材;已有项目引用按上游版本规则处理。后台变更必须显示影响范围并写入后台操作审计。 + +## 生成记录与私有内容 + +### 默认列表 + +生成记录表默认显示: + +- 任务 ID。 +- 脱敏账号。 +- 模型。 +- 比例。 +- 状态。 +- 上游成本核对状态,与任务状态分列;pending_manual_review 显示为“待人工核对”。 +- 点数结算状态。 +- 创建与完成时间。 +- 错误类别。 + +默认隐藏: + +- 完整提示词。 +- 参考图。 +- 生成图片。 +- 其他私有正文。 + +列表筛选和普通详情摘要不触发私有内容访问。 + +### 私有内容告知 + +管理员首次进入私有内容区域时,后端按 super_admin 身份与当前告知版本校验。未确认时显示阻断弹层: + +- 标题“查看私有内容前请确认”。 +- 告知版本和生效时间。 +- 可查看范围、自动审计、最小化查看和禁止外传说明。 +- “确认并进入”主按钮。 +- “返回生成记录”次按钮。 + +确认成功后由后端持久记录。相同管理员、相同版本不因新标签页、重启、重登或换浏览器再次提示;告知版本升级后重新提示。前端 session 或 localStorage 不能作为确认权威。 + +若后端返回 PRIVATE_CONTENT_NOTICE_ACK_REQUIRED,立即退出私有区域并打开告知弹层。 + +### 逐次访问 + +告知确认不替代逐次访问审计。每个完整提示词、参考图或生成图片入口统一显示: + +> 打开并记录审计 + +动作流程: + +- 入口附近只显示对象类型、自动审计提示和最小化查看说明;不要求填写原因,也不增加逐次确认。 +- 用户点击。 +- 后端先写 PrivateContentAccessLog。 +- 审计成功后返回内容。 +- 审计失败则不打开内容。 + +图片默认使用低信息占位,不在 hover、列表预取、键盘聚焦或浏览器缓存预览时自动加载。完整提示词不进入页面初始 HTML。关闭内容后回到安全摘要,页面不把正文留在其他列表行。 + +## 服务与存储 + +页面分为五个无框区段: + +- Resend。 +- 高德。 +- AI 网关。 +- Worker / API。 +- LocalDataRoot 容量。 + +### 服务区段 + +每个服务显示: + +- configured / paused 等后台允许状态。 +- 最近健康检查时间。 +- 影响范围。 +- 当前错误安全摘要。 +- 允许的暂停、恢复或重新检查动作。 + +密钥只显示是否已配置和安全引用版本,不显示值。上游响应脱敏,不显示完整请求正文。 + +AI 网关按模型级、账户级或 unknown 影响展示。任何临时停用都只影响 runtime availability;页面显式提醒“不修改配置默认与推荐优先级”。管理员确认真实余额恢复后,按后端允许动作恢复运行时状态并审计。 + +### LocalDataRoot + +显示: + +- storage_status。 +- managed_content_bytes / 5 GB。 +- 80% 和 90% 阈值刻度。 +- last_measured_at。 +- 受影响动作清单。 +- 项目清理与历史贴纸清理入口。 +- 重新计量状态。 + +不显示绝对路径;只显示“当前 Windows 用户的 Dada 本机数据目录”等逻辑说明。只读规范素材库容量单独显示为参考信息,并标注“不计入 5 GB”。 + +full / unavailable 时,页面顶部和该区段同时显示阻断原因。恢复按钮只有在后端允许且已完成物理清理、可写检查和重新计量后出现;前端不能手工把状态改成 active。 + +## 审计 + +审计拆成两个同级标签,不混在一张表: + +- 后台操作审计。 +- 私有内容访问审计。 + +### 后台操作审计 + +覆盖用户状态、点数、邀请码、模型完整配置集合、运行时恢复、素材发布、贴纸清理各阶段、内部预览、服务操作等。列: + +- 时间。 +- 管理员。 +- 操作类型。 +- 对象安全摘要。 +- 结果。 +- request / operation ID。 + +### 私有内容访问审计 + +列: + +- 时间。 +- 管理员。 +- 被查看任务或项目的安全目标标识。 +- 查看内容类型。 +- expires_at。 + +两类表均不显示被访问的完整提示词、图片或密钥。180 天内不可编辑或删除;UI 不提供行内修改、批量删除或清空审计按钮。 + +加载失败时保留上次结果并标注时间;筛选导出若上游未定义则不提供。搜索只针对允许的标识与摘要,不对私有正文建前端搜索。 + +## Windows 辅助系统界面 + +辅助界面属于产品支持面,不属于运营后台或部署 CLI。 + +### 托盘菜单 + +状态图标和 tooltip 同时表达: + +- 正常运行。 +- 启动中。 +- API degraded。 +- Worker degraded。 +- 存储 full / unavailable。 +- 启动失败。 + +菜单顺序: + +- 打开 Dada。 +- 运行状态。 +- 打开诊断。 +- 重新启动服务,仅在 Supervisor 允许时显示。 +- 退出 Dada。 + +退出时按工程约束执行优雅关闭。托盘不显示账号私有内容、提示词或完整错误堆栈。 + +### 启动中 + +小型 480 px 系统窗口: + +- DADA 字标。 +- “正在启动本机服务”。 +- API、Worker、数据目录三个步骤状态。 +- “打开诊断”仅在超过正常等待或发生异常时出现。 +- 关闭窗口不等于退出服务;使用明确最小化到托盘行为。 + +### 启动失败 + +显示稳定标题、发生时间、安全错误摘要和 correlation ID。允许: + +- 重试启动。 +- 打开诊断。 +- 退出 Dada。 + +不显示密钥、绝对路径、私有正文或完整堆栈。 + +### 端口占用 + +标题“Dada 无法使用固定端口启动”。说明另一个程序或残留实例占用了端口。允许: + +- 检查是否已有 Dada 正在运行。 +- 重试。 +- 打开诊断。 +- 退出。 + +不提供在 UI 中修改端口,不暗切随机端口。 + +### API / Worker degraded + +当 API 可用但 Worker degraded: + +- 托盘显示警告。 +- 浏览器可进入项目、编辑器和已有内容下载。 +- 生成区显示服务异常并禁用受影响动作。 +- 诊断页显示 Worker 最近健康检查和有限重启结果。 + +当 API degraded: + +- 浏览器产品页显示全页连接状态,不继续展示可编辑旧数据。 +- 提供重试连接和打开诊断。 +- 托盘保持可操作。 + +### 诊断 + +诊断使用只读窗口或本地支持页,包含: + +- 发布版本、支持的 Chrome / Edge major。 +- API / Worker / Supervisor 状态与最近检查时间。 +- storage_status、容量比例和 last_measured_at。 +- 只读素材根校验状态。 +- 固定端口状态。 +- 最近有限数量的脱敏错误事件。 +- correlation ID。 +- “复制脱敏诊断”动作。 + +复制内容必须经过同一脱敏契约,不含: + +- 密钥或安全配置值。 +- Windows 用户名和绝对路径。 +- 邮箱全值。 +- 提示词、参考图或生成图片。 +- 原始上游请求 / 响应正文。 + +## 焦点与键盘规范 + +### 全局 + +- 每页第一个 Tab 目标为“跳到主要内容”。 +- 键盘焦点使用 2 px Focus 蓝外环和 2 px 间隔,在黄色、白色和灰色背景上均清晰。 +- 页面导航顺序与视觉顺序一致,不使用正 tabindex。 +- 图标按钮提供 aria-label;状态图标提供可读文字。 +- Toast 不是焦点目标;其中如有动作,动作进入正常焦点顺序。 +- 列表和表格不把整行及内部所有控件同时设为重复焦点。 + +### 编辑器 + +焦点区域顺序: + +- 跳到主要内容。 +- 顶部工具栏。 +- 左栏标签与素材。 +- 画布。 +- 右栏属性。 +- 底部状态。 + +画布获得焦点后,方向键执行已定义的对象微移;Esc 退出当前模式或选择;Delete 删除当前选中对象并保留撤销能力。所有快捷键必须能通过可见菜单完成,不在页面中放“使用说明”式常驻文字。 + +### 异步状态 + +- saving、queued、running、重新计量使用 polite live region,仅在状态变化时朗读。 +- 保存失败、冲突、浏览器阻断、容量 full / unavailable 使用 assertive live region。 +- 进度未知时不用虚假百分比,显示不定进度和开始时间。 + +## 文案与 message_key 绑定 + +以下文案固定,不得改写: + +| 场景 | 固定文案 | +| --- | --- | +| 本机测试数据 | 测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。 | +| 私有内容入口 | 打开并记录审计 | + +稳定 message_key 至少覆盖以下 UI 动作: + +| code / message_key | 展示位置 | UI 动作 | +| --- | --- | --- | +| BROWSER_UNSUPPORTED / browser.unsupported | 浏览器引导 | 硬阻断,无继续入口 | +| MODEL_CONFIG_VERSION_CONFLICT | 模型配置 | 刷新完整配置集合 | +| MODEL_DEFAULT_REPLACEMENT_REQUIRED | 模型配置 | 要求同一操作选择替代默认 | +| MODEL_DEFAULT_REPLACEMENT_INVALID | 模型配置 | 修正替代默认 | +| MODEL_RECOMMENDATION_PRIORITY_INVALID | 模型配置 | 修正优先级 | +| MODEL_RECOMMENDATION_PRIORITY_CONFLICT | 模型配置 | 修正重复优先级 | +| PRIVATE_CONTENT_NOTICE_ACK_REQUIRED | 私有内容区域 | 退出内容并要求确认当前版本告知 | +| ASSET_HISTORY_REFERENCE_CONFLICT | 贴纸清理 | 阻断整批清理 | +| ASSET_CLEANUP_CANDIDATE_STALE | 贴纸清理 | 重新查询并确认候选 | +| STORAGE_CAPACITY_EXCEEDED | 所有受管二进制写入 | 阻断写入并打开存储管理 | + +后端返回未知 message_key 时,使用安全兜底: + +- 标题“操作未完成”。 +- 显示 correlation ID。 +- 提供重试、返回或诊断中由接口允许的动作。 +- 不把未知错误映射成成功、点数已释放或可继续覆盖。 + +## 关键流程 + +### 普通用户注册 + +邀请码与邮箱完整 → 点击获取验证码 → 后端校验邀请码和名额 → 成功发码 → 展开验证码与资料 → 阅读并同意告知 → 最终注册复核 → 进入创作。 + +任何前置失败都不展开第二阶段。最终复核仍由后端完成,前端展开状态不代表邀请码已占用或注册必然成功。 + +### 新建创作 + +进入创作 → 读取模型列表与 recommended_model_id → 首次预选推荐模型 → 输入提示词与比例 → 可选参考图 → 确认模型配置版本和点数 → 提交 → 进入 queued / running 任务 → 成功进入项目,失败按错误动作返回输入。 + +模型在提交前失效时保留旧选择、阻断提交;用户主动改选并重新确认后才能继续。 + +### 编辑与导出 + +打开项目 → 加载画布和素材版本 → 编辑形成 dirty → 保存进入 saving → saved 或 failed / conflicted → 打开导出 → 如有未提交修改则明确确认 → 同一次客户端合成用于下载和后端最新成品保存 → 分别反馈下载和持久化结果。 + +### 默认模型替换 + +进入模型配置 → 编辑完整集合 → 尝试停用当前默认 → 必须选择新的已启用合法默认 → 校验唯一正整数 recommendation_priority → 提交带 config_set_version 的完整集合 → 原子成功或整次失败。 + +外部临时不可用不走此流程,也不修改配置集合。 + +### 私有内容访问 + +进入生成记录 → 默认只看安全摘要 → 打开私有区域 → 后端检查管理员身份与告知版本 → 必要时确认告知 → 点击具体对象“打开并记录审计” → 后端先写逐次访问审计 → 成功后才返回正文或图片。 + +### 历史贴纸清理 + +查询候选 → 选择与确认 → 后端复核所有有效引用 → 有引用整批拒绝 / 无引用创建清理任务 → 排队 → 物理清理 → 重新计量 → 更新容量状态 → 展示真实释放结果。 + +## 综合状态矩阵 + +| 页面 / 区域 | 正常 | 空 | 加载 | 失败 | 禁用 | 冲突 | 容量 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| 登录 / 注册 | 可发码与提交 | 字段初始空 | 发码 / 登录中 | Resend、验证码、邀请错误 | 前置字段或告知未完成 | 不适用 | 非存储相关 | +| 创作工作台 | 可生成 | 无项目艺术带 | 模型 / 任务加载 | 服务、参考图、生成失败 | 模型、点数、单任务等前置不满足 | 模型配置变化需重确认 | critical 提示;full / unavailable 阻断 | +| 当前任务 | 状态与结果 | 无活动任务 | queued / running | failed / rejected 按稳定错误动作 | 不允许第二任务 | 不适用 | storage 错误按任务结果显示 | +| 项目列表 | active 项目 | 无项目或筛选空 | 卡片骨架 | 保留旧列表重试 | 20 项目上限 | state_version 刷新 | 删除后重计量,不乐观减少 | +| 编辑器 | 三栏可编辑 | 无成功图不能进入正常编辑 | 画布 / 素材加载 | 保存失败或素材失败 | 50 元素等上限 | 旧页只读、一次导出、刷新 | full 可按规则编辑;unavailable 保存失败 | +| 导出 | 下载并保存 | 不适用 | 合成 / 持久化中 | 下载与后端保存分别反馈 | 无画布或冲突次数用尽 | 冲突页只本地导出 | 后端失败不影响已下载文件 | +| 后台表格 | 数据与动作 | 无记录 | 稳定行骨架 | 保留旧数据 | 权限、状态前置 | 配置 CAS 冲突 | 顶部持续状态条 | +| 素材上传 | 上传并生成缩略 | 无上传素材 | 上传 / 处理 | 文件或编译失败 | 类型、状态、权限 | 稳定 ID / 版本冲突 | full / unavailable 阻断 | +| 私有内容 | 告知已确认且逐次审计 | 无记录 | 审计写入中 | 审计失败不打开 | 未确认当前版本 | 版本升级重新确认 | 不适用 | +| 贴纸清理 | 候选到完成 | 无可清理文件 | 排队 / 清理 / 重计量 | 失败按任务结果 | 无选择或无权限 | 引用或候选过期 | 完成重计量后更新 | +| 辅助系统 | 正常托盘 | 不适用 | 启动中 | 启动失败 | 不允许的重启动作隐藏 | 端口占用 | full / unavailable 告警 | + +## AC 界面追踪 + +| AC | 主要界面落点 | 必验 UI 行为 | +| --- | --- | --- | +| AC-24 | 浏览器不受支持引导、产品路由门禁、诊断 | 非支持品牌 / major / 识别失败均硬阻断,无继续入口 | +| AC-25 | 私有内容告知、逐次访问、私有内容访问审计 | 身份+版本持久确认;升版重提示;每次打开独立审计 | +| AC-30 | 模型完整配置集合、创作模型选择 | 唯一默认、优先级、原子替换、运行时推荐分层 | +| AC-31 | 普通贴纸上传、历史文件清理、容量条 | 原图 / 缩略图计量;full / unavailable 阻断;显式清理 | +| AC-35 | 项目详情、编辑器保存、导出 | 项目与成品保存失败动作清晰,不假成功 | +| AC-36 P0-A 子集 | 编辑器冲突 | 同机多标签旧页只读、一次本地导出、刷新最新版本 | +| AC-50 | 后台操作审计、私有内容访问审计 | 两类审计分离;清理全阶段有记录;正文不进入审计列表 | +| AC-51 | 模型运行时状态、服务与存储、当前任务 | 临时不可用不回写默认 / 启停 / 优先级;推荐重新派生 | +| AC-55 | 全局容量条、存储页、上传、生成、导出、清理 | 80% / 90% / 等于 5 GB / 超限 / unavailable 动作一致 | +| AC-56 | 本机数据提示、设置、诊断、导出 | 无备份、不迁移持续可见;主动下载保留在下载目录 | + +## 明确不做 + +本阶段不设计或暗示以下能力: + +- 手机、平板或移动端布局。 +- 远程访问、局域网访问、其他设备访问。 +- 跨设备同步、账号云端同步、云备份。 +- P0-B 公司系统、正式账号合并或数据迁移。 +- 可编辑项目归档、项目包导入导出。 +- 部署人员 CLI 或端口配置 UI。 +- super_admin 普通创作入口。 +- 内部预览独立角色或后台权限。 +- 图层面板、隐藏、锁定、编组。 +- 自动清理历史上传贴纸文件。 +- 模型失效后的静默替换。 +- 在浏览器不支持页继续进入产品。 +- 对只读规范素材库计入 managed_content_bytes。 +- 高保真视觉稿、艺术带最终图片和前端实现。 + +## 1080p 验收清单 + +高保真与实现阶段必须在真实 Windows 当前支持 Chrome / Edge 上逐页检查: + +- 1920 × 1080 下顶部导航、容量条、页面内容和固定本机提示不重叠。 +- 登录注册第二阶段完整展开后,主动作可通过滚动到达,艺术带不挤压表单。 +- 编辑器三栏、顶部保存状态和底部状态行不遮挡画布。 +- 最长中文状态、模型 ID、项目名和 message_key 映射不撑破控件。 +- 表格横向内容有明确滚动与固定关键列,不产生不可见行动作。 +- 弹层在可用视口内,标题与底部动作固定,正文可滚动。 +- 当前任务、容量条和服务异常同时出现时仍保持清晰层级。 +- 键盘可到达全部动作,弹层焦点不会逃逸,关闭后焦点正确返回。 +- 保存 failed / conflicted、storage full / unavailable、模型失效时没有隐藏可写入口。 +- 图片骨架使用稳定宽高比,加载、错误和实际图片切换不引起布局跳动。 +- 200% 浏览器缩放下不出现文字覆盖、不可关闭弹层或不可达主动作;允许页面滚动,不缩小字体规避问题。 +- Chrome 与 Edge 的焦点、下载和文件选择行为均按同一流程验收。 + +## 文档确认后的下一阶段 + +本稿确认后再进入低保真画布文件或可交互原型制作,并以本稿为页面与状态依据。高保真阶段补充原创机能风艺术带、真实素材缩略和像素级视觉 QA,但不得借视觉深化改变本稿绑定的产品状态、权限、错误动作、固定文案、API 语义或 AC。 diff --git a/tasks.manifest.json b/tasks.manifest.json new file mode 100644 index 0000000..38cc288 --- /dev/null +++ b/tasks.manifest.json @@ -0,0 +1,9361 @@ +{ + "schema_version": 1, + "document_version": "1.1", + "scope": "Dada P0-A Windows localhost only", + "generated_date": "2026-07-27", + "authority": { + "product": "PRD.md v1.10", + "engineering": "DevelopmentPlan.md v1.1", + "ui": "UIDesign.md v1.0", + "tdd": "tdd.md hash-locked file, internal version 1.4" + }, + "source_hashes": { + "PRD.md": "31F93674DF1A90B557FEE3AA9E74FB084E246CA8FE09F6BD4B1DC9D56D606565", + "FeatureSummary.md": "6F80E272AAB08A5525B54501D83F16A4F6A7A170596947BBC25F1DA54F2FE844", + "DevelopmentPlan.md": "7C579E9DF8D00DA9333F587D05FC966123437EE68575D87D73C903C1487FA9D6", + "UIDesign.md": "0C449DF833E5471843E17EB74F5B470EBC955F117CAF1D79AC9C0EF90DE763F0", + "tdd.md": "41EABEE330122FFB44752F834A97EAAE5C1CF35B99CB33B61AE6889077F96BFD", + "Dada-P0A-LowFi.pen": "A352C8F205E9399EB2E6306176253AF6FF65DDDBB9FDCEA2E2FE13E3C3459975", + "tasks.md": "A8DC1B0CA98D0ACB9F3186F15219839A753A69B2D4CEA9F9B4D92EFE1444A568" + }, + "module_boundary_policy": "modules are frozen DevelopmentPlan components; exact repository paths are intentionally not invented before WP-0 creates the monorepo layout", + "evidence_root": "artifacts/tdd/\u003crun_id\u003e/", + "task_count": 52, + "parent_family_count": 89, + "normative_case_count": 117, + "tasks": [ + { + "task_id": "TASK-WP0-01", + "work_package": "WP-0", + "title": "工程骨架与冻结依赖", + "dependencies": { + "source_text": "无", + "task_ids": [ + + ], + "work_packages": [ + + ] + }, + "requirements": [ + "NFR-09" + ], + "acceptance_criteria": [ + "AC-24", + "AC-46", + "AC-55", + "AC-56" + ], + "acceptance_criteria_role": "supporting", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "NFR-09、DevelopmentPlan 2.1、13.1", + "DevelopmentPlan WP-0 工程前置,supporting AC-24、46、55、56;不取得 AC 唯一主责" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "1.5 工程基础设施前置条件", + "2.1 固定技术基线", + "2.2 组件边界", + "3.4 环境关系", + "14.1 测试层级", + "15 WP-0" + ], + "modules": [ + "release-ci", + "web", + "api", + "worker", + "supervisor", + "shared-contracts" + ], + "implementation_boundary": "建立 pnpm monorepo、唯一 lockfile、React/Vite/TypeScript、Fabric、Fastify、TypeBox、Drizzle/better-sqlite3、Node Worker 和 .NET 8 Supervisor 最小可运行骨架;接通第 2.4 节脚本入口", + "parent_families": [ + "TDD-WP0-DEP-001" + ], + "case_ids": [ + "TDD-WP0-DEP-001-frozen-toolchain" + ], + "first_red": [ + { + "family_id": "TDD-WP0-DEP-001", + "assertion": "冻结依赖任一无法安装、加载或最小运行" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP0-DEP-001", + "assertion": "精确版本、TypeScript、React/Fabric、Fastify、better-sqlite3 native 和随包 Node 全通过;不私自替换技术栈" + } + ], + "task_green_gate": "精确版本安装、类型检查、React/Fabric 渲染、Fastify、native 模块和随包 Node 预检通过;失败时先修订 DevelopmentPlan,不得私自换栈", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: release-ci, web, api, worker, supervisor, shared-contracts.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "credential, path, log, package and diagnostic redaction boundaries" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "UNIT", + "PKG-SEC" + ], + "validation_commands": [ + "pnpm test:unit", + "pnpm test:security", + "pnpm test:package", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-DEP-001-frozen-toolchain/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-0", + "release:P0-A" + ], + "ui_scope": [ + + ], + "ui_scope_reason": "No direct UI coverage-unit ownership; validate only the listed module and case boundaries." + }, + { + "task_id": "TASK-WP0-02", + "work_package": "WP-0", + "title": "Schema、OpenAPI 与事件基线", + "dependencies": { + "source_text": "TASK-WP0-01", + "task_ids": [ + "TASK-WP0-01" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "GEN-14", + "NFR-05", + "PROJECT-04" + ], + "acceptance_criteria": [ + "AC-20", + "AC-30" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "NFR-05、DevelopmentPlan 6.1、6.6", + "PROJECT-04、GEN-14、NFR-05、DevelopmentPlan 6.2、AC-20、30" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "6.1 通用协议", + "6.2 API 分组", + "6.6 新增稳定错误码", + "14.1 测试层级" + ], + "modules": [ + "shared-contracts", + "api", + "web" + ], + "implementation_boundary": "建立 TypeBox 单一 Schema 来源、OpenAPI 3.1、生成客户端、统一错误信封、correlation ID、SSE 非敏感事件和 REST refetch/bootstrap", + "parent_families": [ + "TDD-WP0-API-001", + "TDD-WP0-EVT-001" + ], + "case_ids": [ + "TDD-WP0-API-001-schema-envelope", + "TDD-WP0-EVT-001-rest-refetch" + ], + "first_red": [ + { + "family_id": "TDD-WP0-API-001", + "assertion": "TypeBox、OpenAPI、生成客户端或错误信封漂移" + }, + { + "family_id": "TDD-WP0-EVT-001", + "assertion": "SSE 携带私有正文、被客户端当作业务真相或事件缺号后不恢复" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP0-API-001", + "assertion": "OpenAPI 3.1 snapshot 与运行验证一致;响应有 correlation ID;details 只含白名单字段且不泄露内部信息" + }, + { + "family_id": "TDD-WP0-EVT-001", + "assertion": "事件只含固定非敏感字段;客户端收到后 REST refetch;断线/缺号 bootstrap;配置和 runtime 版本分离" + } + ], + "task_green_gate": "OpenAPI snapshot 与运行校验一致;事件不承载业务真相或私有正文;断线/缺号恢复通过", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: shared-contracts, api, web.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "UNIT", + "API", + "E2E" + ], + "validation_commands": [ + "pnpm test:unit", + "pnpm test:api", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-API-001-schema-envelope/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-EVT-001-rest-refetch/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-0", + "release:P0-A" + ], + "ui_scope": [ + + ], + "ui_scope_reason": "No direct UI coverage-unit ownership; validate only the listed module and case boundaries." + }, + { + "task_id": "TASK-WP0-03", + "work_package": "WP-0", + "title": "回环访问与浏览器硬门禁", + "dependencies": { + "source_text": "TASK-WP0-02", + "task_ids": [ + "TASK-WP0-02" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "NFR-01", + "NFR-09" + ], + "acceptance_criteria": [ + "AC-24", + "AC-41" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "NFR-01、AC-24", + "NFR-01、AC-24、41", + "NFR-09、AC-24" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "3.6 浏览器支持硬门禁", + "6.4 HTTP 语义", + "12.1 本机安全边界", + "13.3 可访问性基础", + "14.7 AC-24" + ], + "modules": [ + "api", + "web-support-gate", + "supervisor" + ], + "implementation_boundary": "固定 127.0.0.1:43121、Host/Origin/CORS 防护、最小 gate shell、UA-CH 交叉校验、24 小时短期支持 Cookie、全产品路由前置 426 门禁", + "parent_families": [ + "TDD-WP0-BND-001", + "TDD-WP0-BRW-001", + "TDD-WP0-BRW-002" + ], + "case_ids": [ + "TDD-WP0-BND-001-loopback-origin", + "TDD-WP0-BRW-001-real-supported", + "TDD-WP0-BRW-002-hard-block" + ], + "first_red": [ + { + "family_id": "TDD-WP0-BND-001", + "assertion": "API 接受非回环绑定、错误 Host/Origin 或 CORS" + }, + { + "family_id": "TDD-WP0-BRW-001", + "assertion": "真实支持 Chrome/Edge 无法通过门禁" + }, + { + "family_id": "TDD-WP0-BRW-002", + "assertion": "其他品牌、错误 major、UA-CH 缺失/冲突或直调 API 可进入产品" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP0-BND-001", + "assertion": "只绑定 127.0.0.1:43121;拒绝局域网、其他 Host/Origin,不创建防火墙入站规则" + }, + { + "family_id": "TDD-WP0-BRW-001", + "assertion": "RELEASE.json 记录的两个真实 full version 通过并建立短期支持 Cookie,产品 API 每次复核品牌/major" + }, + { + "family_id": "TDD-WP0-BRW-002", + "assertion": "全部返回 426 BROWSER_UNSUPPORTED,只有最小引导,无登录、资源、DB 业务读取或外部调用,无绕过令牌" + } + ], + "task_green_gate": "局域网/其他 Host/Origin、非 Windows、其他品牌、错误 major、UA-CH 缺失/冲突和直调 API 均不可进入;支持分支最终 passed 等待 WP-7 真实记录", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, web-support-gate, supervisor.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds", + "credential, path, log, package and diagnostic redaction boundaries" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "API", + "PKG-SEC", + "E2E", + "MANUAL" + ], + "validation_commands": [ + "pnpm test:api", + "pnpm test:security", + "pnpm test:package", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-BND-001-loopback-origin/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-BRW-001-real-supported/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-BRW-002-hard-block/" + ], + "automation": [ + "automated", + "manual_review" + ], + "release_gate": [ + "work_package:WP-0", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "support-gate", + "role": "implementation", + "frames": { + "frame_id": "u1adni", + "frame_name": "07A 浏览器硬阻断", + "primary_task": "TASK-WP0-03", + "mapped_state_scope": "四种阻断 reason、支持品牌/major、最小诊断;bundle/API 无绕过;无业务空态、身份或容量读取" + }, + "applicable_states": { + "page_id": "support-gate", + "actor_entry": "所有主体,产品门禁前", + "normal": "四种阻断 reason、支持品牌/major、无继续入口", + "empty_loading": "N/A:引导无业务空态;身份不可判定属于阻断", + "failure_disabled": "bundle/API 均无法绕过;诊断仅最小字段", + "conflict_capacity_special": "N/A:不读取业务状态或容量" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/support-gate/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP0-04", + "work_package": "WP-0", + "title": "LocalDataRoot 与本机数据边界", + "dependencies": { + "source_text": "TASK-WP0-01", + "task_ids": [ + "TASK-WP0-01" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "AUTH-06", + "NFR-09" + ], + "acceptance_criteria": [ + "AC-24", + "AC-41", + "AC-55", + "AC-56" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.19" + ], + "requirement_ac_sources": [ + "AUTH-06、NFR-09、AC-24、56", + "NFR-09、17.19、AC-41、55、56" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "3.2 Supervisor 生命周期", + "3.3 离线配置命令", + "4.1 固定目录布局", + "4.2 文件标识与路径隔离", + "9.2 项目、历史、失败草稿和回收站", + "12.1 本机安全边界" + ], + "modules": [ + "api", + "sqlite", + "local-data-root", + "web" + ], + "implementation_boundary": "建立目录布局、路径规范化、资源 ID 隔离、data_missing、只读素材根校验、无备份/无归档/无迁移边界和固定本机风险提示接线", + "parent_families": [ + "TDD-WP0-DATA-001", + "TDD-WP0-DATA-002" + ], + "case_ids": [ + "TDD-WP0-DATA-001-root-validation", + "TDD-WP0-DATA-002-no-backup-migration" + ], + "first_red": [ + { + "family_id": "TDD-WP0-DATA-001", + "assertion": "LocalDataRoot 位于仓库/项目/下载/素材根,或丢失后自动重建" + }, + { + "family_id": "TDD-WP0-DATA-002", + "assertion": "产品出现自动备份、项目包、业务导入或 P0-B 迁移" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP0-DATA-001", + "assertion": "路径校验拒绝违规目录;已初始化根缺失进入 data_missing;浏览器只见资源 ID" + }, + { + "family_id": "TDD-WP0-DATA-002", + "assertion": "只允许下载原始生成图和 JPG/PNG;删除根或重装不可恢复;固定本机风险文案持续显示" + } + ], + "task_green_gate": "违规目录、符号链接和路径逃逸拒绝;已初始化根缺失不自动重建;浏览器不见绝对路径;产品无业务导入/项目包/恢复入口", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, sqlite, local-data-root, web.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds", + "credential, path, log, package and diagnostic redaction boundaries" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "PKG-SEC", + "E2E", + "MANUAL" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:security", + "pnpm test:package", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-DATA-001-root-validation/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-DATA-002-no-backup-migration/" + ], + "automation": [ + "automated", + "manual_review" + ], + "release_gate": [ + "work_package:WP-0", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "settings", + "role": "implementation", + "frames": { + "frame_id": "Ws5E0", + "frame_name": "05B 设置与本机数据", + "primary_task": "TASK-WP1-05", + "mapped_state_scope": "资料、本机数据、容量摘要和固定文案;加载/保存失败;full/unavailable;注销确认、处理中和返回登录" + }, + "applicable_states": { + "page_id": "settings", + "actor_entry": "active 普通/内部预览账号", + "normal": "资料、本机数据、容量摘要、固定文案、注销", + "empty_loading": "资料/状态加载", + "failure_disabled": "保存失败;注销确认/处理中禁用重复提交", + "conflict_capacity_special": "full/unavailable 状态与允许动作;注销后返回登录" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/settings/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP0-05", + "work_package": "WP-0", + "title": "容量状态、预留与文件一致性", + "dependencies": { + "source_text": "TASK-WP0-02、TASK-WP0-04", + "task_ids": [ + "TASK-WP0-02", + "TASK-WP0-04" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "ADMIN-06", + "EXPORT-06", + "NFR-05", + "PROJECT-04" + ], + "acceptance_criteria": [ + "AC-31", + "AC-35", + "AC-44", + "AC-55" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.19" + ], + "requirement_ac_sources": [ + "17.19、AC-55", + "17.19、NFR-05、AC-35、55", + "17.19、NFR-05、AC-55", + "17.19、PROJECT-04、EXPORT-06、AC-55", + "ADMIN-06、17.19、AC-31、55", + "NFR-05、17.19、AC-44、55" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "4.3 文件与数据库一致性", + "4.4 LocalBackendStorageState 实现", + "5.3 支撑表", + "14.7 AC-55" + ], + "modules": [ + "api", + "worker", + "sqlite", + "local-data-root" + ], + "implementation_boundary": "实现 LocalBackendStorageState、精确阈值、storage reservation、staging 流式校验、同卷原子改名、managed file、补偿队列、启动对账和物理删除后重测", + "parent_families": [ + "TDD-WP0-FILE-001", + "TDD-WP0-STO-001", + "TDD-WP0-STO-002", + "TDD-WP0-STO-003" + ], + "case_ids": [ + "TDD-WP0-FILE-001-atomic-commit", + "TDD-WP0-STO-001-byte-thresholds", + "TDD-WP0-STO-002-equal-limit", + "TDD-WP0-STO-002-over-limit", + "TDD-WP0-STO-003-cleanup-remeasure", + "TDD-WP0-STO-003-full-matrix", + "TDD-WP0-STO-003-unavailable-matrix" + ], + "first_red": [ + { + "family_id": "TDD-WP0-FILE-001", + "assertion": "文件流、数据库事务或进程崩溃产生可读半文件、孤儿引用或计量漂移" + }, + { + "family_id": "TDD-WP0-STO-001", + "assertion": "任一阈值使用模糊比例或边界错一字节" + }, + { + "family_id": "TDD-WP0-STO-002", + "assertion": "写入预计量用 \u003e= 拒绝等号,或超限后仍有副作用" + }, + { + "family_id": "TDD-WP0-STO-003", + "assertion": "full/unavailable 动作混淆或清理排队即减字节" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP0-FILE-001", + "assertion": "预检、staging 流式哈希/MIME、同卷原子改名、SQLite 提交、补偿队列和启动对账全覆盖;路径规范化拒绝 ..、符号链接逃逸和 manifest 外对象" + }, + { + "family_id": "TDD-WP0-STO-001", + "assertion": "第 5.5 节七个精确字节值产生固定 notice/status" + }, + { + "family_id": "TDD-WP0-STO-002", + "assertion": "\u003e 才拒绝;等于上限提交成功后 full;超限不创建任务、冻结、文件关系或上游调用" + }, + { + "family_id": "TDD-WP0-STO-003", + "assertion": "full 允许 JSON 保存与客户端仅下载;unavailable 拒绝新增后端写;物理删除和重测前计量不变" + } + ], + "task_green_gate": "写前只用 \u003e 拒绝,恰好 5 GB 写入成功后 full;超限零副作用;full/unavailable 动作不同;未物理删除前不减字节", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, worker, sqlite, local-data-root.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "WRK", + "UNIT", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:worker", + "pnpm test:unit", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-FILE-001-atomic-commit/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-STO-001-byte-thresholds/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-STO-002-equal-limit/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-STO-002-over-limit/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-STO-003-cleanup-remeasure/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-STO-003-full-matrix/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-STO-003-unavailable-matrix/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-0", + "release:P0-A" + ], + "ui_scope": [ + + ], + "ui_scope_reason": "No direct UI coverage-unit ownership; validate only the listed module and case boundaries." + }, + { + "task_id": "TASK-WP0-06", + "work_package": "WP-0", + "title": "公开客户端缓存", + "dependencies": { + "source_text": "TASK-WP0-02、TASK-WP0-04", + "task_ids": [ + "TASK-WP0-02", + "TASK-WP0-04" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "NFR-07" + ], + "acceptance_criteria": [ + "AC-46", + "AC-48" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.14" + ], + "requirement_ac_sources": [ + "NFR-07、17.14、AC-46、48" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "9.4 素材面板与公开缓存", + "10.6 三类资源隔离", + "12.1 本机安全边界" + ], + "modules": [ + "web", + "api", + "client-cache" + ], + "implementation_boundary": "建立 150 MiB public allowlist LRU、Cache Storage/IndexedDB 元数据、写前淘汰和 Service Worker 路由边界", + "parent_families": [ + "TDD-WP0-CACHE-001" + ], + "case_ids": [ + "TDD-WP0-CACHE-001-public-lru" + ], + "first_red": [ + { + "family_id": "TDD-WP0-CACHE-001", + "assertion": "应用缓存超过 157,286,400 字节或含私有/内部内容" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP0-CACHE-001", + "assertion": "LRU 在写前淘汰;只含 allowlist 公开资源;逐场景枚举 SW、Cache Storage、IndexedDB" + } + ], + "task_green_gate": "逐场景枚举实际浏览器存储;internal/private/项目/提示词/未保存草稿均不进入持久缓存", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: web, api, client-cache.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "UNIT", + "E2E" + ], + "validation_commands": [ + "pnpm test:unit", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-CACHE-001-public-lru/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-0", + "release:P0-A" + ], + "ui_scope": [ + + ], + "ui_scope_reason": "No direct UI coverage-unit ownership; validate only the listed module and case boundaries." + }, + { + "task_id": "TASK-WP0-07", + "work_package": "WP-0", + "title": "Supervisor、凭据和运行诊断", + "dependencies": { + "source_text": "TASK-WP0-01、TASK-WP0-04、TASK-WP0-05", + "task_ids": [ + "TASK-WP0-01", + "TASK-WP0-04", + "TASK-WP0-05" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "NFR-09", + "PRIV-01" + ], + "acceptance_criteria": [ + "AC-24", + "AC-41" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "NFR-09、AC-24、41", + "PRIV-01、AC-41" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "3.1 便携包布局", + "3.2 Supervisor 生命周期", + "3.3 离线配置命令", + "3.7 辅助系统界面契约", + "12.3 审计与敏感信息" + ], + "modules": [ + "supervisor", + "api", + "worker", + "windows-credential-manager" + ], + "implementation_boundary": "实现单实例 mutex、固定端口检查、API/Worker 启停与有限重启、15 秒退出、Credential Manager 匿名管道注入、托盘状态、离线配置命令和脱敏诊断", + "parent_families": [ + "TDD-WP0-SEC-001", + "TDD-WP0-SUP-001" + ], + "case_ids": [ + "TDD-WP0-SEC-001-credential-channel", + "TDD-WP0-SUP-001-lifecycle" + ], + "first_red": [ + { + "family_id": "TDD-WP0-SEC-001", + "assertion": "凭据进入参数、环境、文件、日志或错误" + }, + { + "family_id": "TDD-WP0-SUP-001", + "assertion": "第二实例、端口占用、API/Worker 崩溃或退出留下残留进程" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP0-SEC-001", + "assertion": "Supervisor 通过继承匿名管道最小传递;API/Worker 分离;缺失、清除、重启和扫描全通过" + }, + { + "family_id": "TDD-WP0-SUP-001", + "assertion": "mutex、固定端口、有限重启、degraded 状态、15 秒优雅退出和托盘允许动作符合 DevelopmentPlan" + } + ], + "task_green_gate": "第二实例、端口占用、startup/api/worker degraded、凭据缺失/清除/重启和子进程残留均有确定行为;不动态换端口、不泄露凭据", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: supervisor, api, worker, windows-credential-manager.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "credential, path, log, package and diagnostic redaction boundaries" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "PKG-SEC", + "MANUAL" + ], + "validation_commands": [ + "pnpm test:security", + "pnpm test:package", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-SEC-001-credential-channel/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-SUP-001-lifecycle/" + ], + "automation": [ + "automated", + "manual_review" + ], + "release_gate": [ + "work_package:WP-0", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "system-ui", + "role": "implementation", + "frames": { + "frame_id": "awt96", + "frame_name": "07B Windows 辅助系统界面", + "primary_task": "TASK-WP0-07", + "mapped_state_scope": "托盘/启动中/ready;启动失败、端口占用、API/Worker degraded;脱敏诊断;full/unavailable 告警与受限动作" + }, + "applicable_states": { + "page_id": "system-ui", + "actor_entry": "本机托盘/Supervisor,无产品角色", + "normal": "托盘、运行状态、打开 Dada、诊断、退出", + "empty_loading": "启动中;N/A 业务空态", + "failure_disabled": "启动失败、端口占用、API/Worker degraded,动作严格受限", + "conflict_capacity_special": "full/unavailable 只作脱敏告警;固定端口不动态切换" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/system-ui/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP0-08", + "work_package": "WP-0", + "title": "日志、轮转和不可写联动", + "dependencies": { + "source_text": "TASK-WP0-05、TASK-WP0-07", + "task_ids": [ + "TASK-WP0-05", + "TASK-WP0-07" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "NFR-09", + "PRIV-01", + "PRIV-02" + ], + "acceptance_criteria": [ + "AC-41", + "AC-56" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "PRIV-01、02、NFR-09、AC-41、56" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "4.5 日志与数据库维护", + "12.3 审计与敏感信息" + ], + "modules": [ + "api", + "worker", + "supervisor", + "local-data-root" + ], + "implementation_boundary": "建立 API/Worker/Supervisor JSONL 白名单日志、10 MiB/10 文件/30 天轮转、诊断复用脱敏器和日志不可写状态联动", + "parent_families": [ + "TDD-WP0-LOG-001" + ], + "case_ids": [ + "TDD-WP0-LOG-001-rotation-redaction" + ], + "first_red": [ + { + "family_id": "TDD-WP0-LOG-001", + "assertion": "日志无限增长、含敏感数据或目录不可写后仍调用 AI" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP0-LOG-001", + "assertion": "10 MiB/10 文件/30 天轮转;白名单字段;写失败进入 unavailable 并阻断 AI" + } + ], + "task_green_gate": "日志不含密钥、邮箱、提示词、图片、绝对路径或供应商原文;日志不可写进入 unavailable 并阻断 AI", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, worker, supervisor, local-data-root.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "credential, path, log, package and diagnostic redaction boundaries" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "WRK", + "PKG-SEC" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:worker", + "pnpm test:security", + "pnpm test:package", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-LOG-001-rotation-redaction/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-0", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "system-ui", + "role": "implementation", + "frames": { + "frame_id": "awt96", + "frame_name": "07B Windows 辅助系统界面", + "primary_task": "TASK-WP0-07", + "mapped_state_scope": "托盘/启动中/ready;启动失败、端口占用、API/Worker degraded;脱敏诊断;full/unavailable 告警与受限动作" + }, + "applicable_states": { + "page_id": "system-ui", + "actor_entry": "本机托盘/Supervisor,无产品角色", + "normal": "托盘、运行状态、打开 Dada、诊断、退出", + "empty_loading": "启动中;N/A 业务空态", + "failure_disabled": "启动失败、端口占用、API/Worker degraded,动作严格受限", + "conflict_capacity_special": "full/unavailable 只作脱敏告警;固定端口不动态切换" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/system-ui/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP0-09", + "work_package": "WP-0", + "title": "隔离 CI 与便携包", + "dependencies": { + "source_text": "TASK-WP0-01 至 TASK-WP0-08", + "task_ids": [ + "TASK-WP0-01", + "TASK-WP0-08" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "NFR-01", + "NFR-09" + ], + "acceptance_criteria": [ + "AC-24", + "AC-41", + "AC-56" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "NFR-01、09、AC-24、41、56" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "3.1 便携包布局", + "3.4 环境关系", + "14.1 测试层级", + "15 WP-0" + ], + "modules": [ + "release-ci", + "supervisor", + "api", + "worker", + "web" + ], + "implementation_boundary": "配置 Windows Gitea Runner 隔离流水线;生成 Dada.exe、随包 Node、API/Worker、迁移、资源元数据、RELEASE.json 占位规则、START-HERE.txt、ZIP 和 SHA-256", + "parent_families": [ + "TDD-WP0-PKG-001" + ], + "case_ids": [ + "TDD-WP0-PKG-001-portable-zip" + ], + "first_red": [ + { + "family_id": "TDD-WP0-PKG-001", + "assertion": "ZIP 缺组件、包含真实配置或动态换端口" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP0-PKG-001", + "assertion": "便携布局、SHA-256、START-HERE、RELEASE 记录和固定端口全部正确,制品零凭据" + } + ], + "task_green_gate": "CI 不读真实凭据、LocalDataRoot 或 3.57 GB 归档;包固定 43121、零真实配置/路径;正式 RELEASE 记录在 WP-7 冻结", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: release-ci, supervisor, api, worker, web.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "credential, path, log, package and diagnostic redaction boundaries" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "PKG-SEC" + ], + "validation_commands": [ + "pnpm test:security", + "pnpm test:package", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-PKG-001-portable-zip/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-0", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "system-ui", + "role": "implementation", + "frames": { + "frame_id": "awt96", + "frame_name": "07B Windows 辅助系统界面", + "primary_task": "TASK-WP0-07", + "mapped_state_scope": "托盘/启动中/ready;启动失败、端口占用、API/Worker degraded;脱敏诊断;full/unavailable 告警与受限动作" + }, + "applicable_states": { + "page_id": "system-ui", + "actor_entry": "本机托盘/Supervisor,无产品角色", + "normal": "托盘、运行状态、打开 Dada、诊断、退出", + "empty_loading": "启动中;N/A 业务空态", + "failure_disabled": "启动失败、端口占用、API/Worker degraded,动作严格受限", + "conflict_capacity_special": "full/unavailable 只作脱敏告警;固定端口不动态切换" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/system-ui/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP1-01", + "work_package": "WP-1", + "title": "认证数据与邀请注册事务", + "dependencies": { + "source_text": "WP-0", + "task_ids": [ + + ], + "work_packages": [ + "WP-0" + ] + }, + "requirements": [ + "AUTH-01", + "AUTH-02", + "AUTH-03", + "AUTH-04", + "NFR-04" + ], + "acceptance_criteria": [ + "AC-01", + "AC-02", + "AC-45" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "AUTH-01 至 04、AC-01", + "AUTH-01、02、AC-02", + "AUTH-01、NFR-04、AC-01、02、45" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + "FX-CHALLENGE", + "FX-INVITE-EXPIRED", + "FX-INVITE-VALID" + ], + "development_plan_sections": [ + "5.2 十九个产品数据契约映射", + "6.2 API 分组", + "7.3 生成提交事务", + "9.1 邀请注册、验证码、会话和管理员" + ], + "modules": [ + "api", + "sqlite", + "resend-adapter", + "shared-contracts" + ], + "implementation_boundary": "建立 UserProfile、邀请码、验证码挑战、普通账号初始点数/registration_grant、幂等键与事务;接入 Resend mock", + "parent_families": [ + "TDD-WP1-AUTH-001", + "TDD-WP1-AUTH-002" + ], + "case_ids": [ + "TDD-WP1-AUTH-001-final-recheck-race", + "TDD-WP1-AUTH-001-valid-register", + "TDD-WP1-AUTH-002-invalid-invite" + ], + "first_red": [ + { + "family_id": "TDD-WP1-AUTH-001", + "assertion": "有效邀请注册任一步部分成功" + }, + { + "family_id": "TDD-WP1-AUTH-002", + "assertion": "无效/过期/停用/耗尽邀请码仍发码或占用次数" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP1-AUTH-001", + "assertion": "发码前和建号前复核;账号、初始 10 点、registration_grant、告知版本和邀请码次数同事务一次提交" + }, + { + "family_id": "TDD-WP1-AUTH-002", + "assertion": "不发码、不建号、不赠点,返回稳定原因且无副作用" + } + ], + "task_green_gate": "发码前/建号前复核;有效注册一次提交;无效、过期、停用、耗尽邀请零副作用", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, sqlite, resend-adapter, shared-contracts.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-AUTH-001-final-recheck-race/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-AUTH-001-valid-register/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-AUTH-002-invalid-invite/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-1", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "admin-invites", + "role": "implementation", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP6-01", + "mapped_state_scope": "创建/停用/期限/次数/脱敏复制、空/骨架、名额满、过期/耗尽、请求失败和幂等/CAS 结果" + }, + "applicable_states": { + "page_id": "admin-invites", + "actor_entry": "active super_admin", + "normal": "创建、停用、期限/次数、脱敏复制", + "empty_loading": "无邀请码;表格骨架", + "failure_disabled": "名额满、停用/过期/耗尽不可当可用;请求失败", + "conflict_capacity_special": "CAS/幂等结果;页面操作不消费容量但仍继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-invites/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP1-02", + "work_package": "WP-1", + "title": "登录状态机、会话与登录画面", + "dependencies": { + "source_text": "TASK-WP1-01", + "task_ids": [ + "TASK-WP1-01" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "AUTH-01", + "AUTH-02", + "AUTH-04", + "AUTH-05", + "AUTH-06", + "AUTH-07" + ], + "acceptance_criteria": [ + "AC-22", + "AC-33", + "AC-49" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "AUTH-01、02、05、06、AC-33", + "AUTH-02、04、AC-33", + "AUTH-04 至 07、AC-22、33、49" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + "FX-CHALLENGE" + ], + "development_plan_sections": [ + "6.2 API 分组", + "6.3 鉴权与会话", + "9.1 邀请注册、验证码、会话和管理员" + ], + "modules": [ + "api", + "sqlite", + "web" + ], + "implementation_boundary": "实现注册/登录分离入口、未注册/已注册/已注销/suspended 状态、10 分钟验证码、60 秒重发、30 天 opaque session、CSRF 和退出/暂停/注销撤销;按 Z0pf8 落实普通用户登录布局、艺术带、管理员文字入口、固定本机提示和焦点", + "parent_families": [ + "TDD-WP1-AUTH-003", + "TDD-WP1-AUTH-004" + ], + "case_ids": [ + "TDD-WP1-AUTH-003-entry-state-matrix", + "TDD-WP1-AUTH-004-challenge-guards", + "TDD-WP1-AUTH-004-session-revocation" + ], + "first_red": [ + { + "family_id": "TDD-WP1-AUTH-003", + "assertion": "注册/登录对未注册、已注册、已注销、suspended 邮箱静默切换流程" + }, + { + "family_id": "TDD-WP1-AUTH-004", + "assertion": "验证码重用、过期仍有效或会话未及时撤销" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP1-AUTH-003", + "assertion": "六种状态严格按 PRD 分离入口;已注销邮箱只能新邀请重建且旧数据不恢复" + }, + { + "family_id": "TDD-WP1-AUTH-004", + "assertion": "10 分钟一次性、60 秒重发、30 天会话;退出/暂停/注销/白名单移除立即撤销" + } + ], + "task_green_gate": "六类身份状态不静默换流程;验证码不可复用;会话撤销即时生效;普通与管理员 audience 分离;登录页状态与布局证据齐全", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, sqlite, web.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "API", + "E2E", + "DB" + ], + "validation_commands": [ + "pnpm test:api", + "pnpm test:e2e", + "pnpm test:integration", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-AUTH-003-entry-state-matrix/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-AUTH-004-challenge-guards/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-AUTH-004-session-revocation/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-1", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "user-auth", + "role": "implementation", + "frames": [ + { + "frame_id": "Z0pf8", + "frame_name": "01A 普通用户登录", + "primary_task": "TASK-WP1-02", + "mapped_state_scope": "登录正常;字段初始空;发码/登录加载;验证码、Resend 和身份状态失败;管理员入口、固定本机提示、艺术带与焦点" + }, + { + "frame_id": "DVPM8", + "frame_name": "01B 注册展开态", + "primary_task": "TASK-WP1-03", + "mapped_state_scope": "邀请与邮箱已验证摘要;资料和告知未完成/完成;注册中;名额、邀请、验证码和提交失败;主动作禁用" + } + ], + "applicable_states": { + "page_id": "user-auth", + "actor_entry": "未登录普通入口", + "normal": "登录、分阶段注册、管理员文字入口、固定本机提示", + "empty_loading": "字段初始空;发码/验证/注册加载", + "failure_disabled": "Resend、验证码、邀请、名额、告知未完成;按钮禁用", + "conflict_capacity_special": "N/A:认证不消费存储容量" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/user-auth/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP1-03", + "work_package": "WP-1", + "title": "注册展开态、内测告知与账号名额", + "dependencies": { + "source_text": "TASK-WP1-01、TASK-WP1-02", + "task_ids": [ + "TASK-WP1-01", + "TASK-WP1-02" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "AUTH-01", + "AUTH-03", + "NFR-04", + "PRIV-04", + "PRIV-06" + ], + "acceptance_criteria": [ + "AC-01", + "AC-32", + "AC-41", + "AC-45", + "AC-56" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "AUTH-01、NFR-04、AC-32、45", + "AUTH-03、PRIV-04、06、AC-01、41、56" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "6.3 鉴权与会话", + "9.1 邀请注册、验证码、会话和管理员", + "12.1 本机安全边界" + ], + "modules": [ + "api", + "sqlite", + "web" + ], + "implementation_boundary": "实现版本化内测告知、必选确认、资料字段、active+suspended 普通账号 10 人上限、deleted 释放和 super_admin 不占名额;按 DVPM8 落实邀请/邮箱只读摘要、资料、告知和注册主动作", + "parent_families": [ + "TDD-WP1-NOTICE-001", + "TDD-WP1-SLOT-001" + ], + "case_ids": [ + "TDD-WP1-NOTICE-001-registration-consent", + "TDD-WP1-SLOT-001-stage-limit" + ], + "first_red": [ + { + "family_id": "TDD-WP1-NOTICE-001", + "assertion": "未勾选、版本缺失或告知遗漏第三方/本机数据处理仍可注册" + }, + { + "family_id": "TDD-WP1-SLOT-001", + "assertion": "suspended 不占名额、super_admin 占名额或第 11 人可注册" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP1-NOTICE-001", + "assertion": "告知含版本和生效日期,覆盖 AI 网关、Resend、高德、本机存储与无备份、管理员访问、DYN004、注销和 180 天规则;未同意不建号,成功时记录版本/时间" + }, + { + "family_id": "TDD-WP1-SLOT-001", + "assertion": "active+suspended 普通账号最多 10;deleted 释放;super_admin 不占且不用邀请码" + } + ], + "task_green_gate": "告知覆盖 PRD 固定事项;未同意不建号;第 11 个普通账号被阻断;多个同权限 super_admin 合法;注册展开态状态与布局证据齐全", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, sqlite, web.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "UNIT", + "API", + "E2E", + "MANUAL", + "DB" + ], + "validation_commands": [ + "pnpm test:unit", + "pnpm test:api", + "pnpm test:e2e", + "pnpm test:integration", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-NOTICE-001-registration-consent/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-SLOT-001-stage-limit/" + ], + "automation": [ + "automated", + "manual_review" + ], + "release_gate": [ + "work_package:WP-1", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "user-auth", + "role": "implementation", + "frames": [ + { + "frame_id": "Z0pf8", + "frame_name": "01A 普通用户登录", + "primary_task": "TASK-WP1-02", + "mapped_state_scope": "登录正常;字段初始空;发码/登录加载;验证码、Resend 和身份状态失败;管理员入口、固定本机提示、艺术带与焦点" + }, + { + "frame_id": "DVPM8", + "frame_name": "01B 注册展开态", + "primary_task": "TASK-WP1-03", + "mapped_state_scope": "邀请与邮箱已验证摘要;资料和告知未完成/完成;注册中;名额、邀请、验证码和提交失败;主动作禁用" + } + ], + "applicable_states": { + "page_id": "user-auth", + "actor_entry": "未登录普通入口", + "normal": "登录、分阶段注册、管理员文字入口、固定本机提示", + "empty_loading": "字段初始空;发码/验证/注册加载", + "failure_disabled": "Resend、验证码、邀请、名额、告知未完成;按钮禁用", + "conflict_capacity_special": "N/A:认证不消费存储容量" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/user-auth/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP1-04", + "work_package": "WP-1", + "title": "管理员白名单与安全配置生效", + "dependencies": { + "source_text": "WP-0、TASK-WP1-01、TASK-WP1-02", + "task_ids": [ + "TASK-WP1-01", + "TASK-WP1-02" + ], + "work_packages": [ + "WP-0" + ] + }, + "requirements": [ + "ADMIN-09", + "AUTH-07" + ], + "acceptance_criteria": [ + "AC-49", + "AC-50" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "AUTH-07、AC-49", + "AUTH-07、ADMIN-09、AC-49、50" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "3.3 离线配置命令", + "6.3 鉴权与会话", + "9.1 邀请注册、验证码、会话和管理员" + ], + "modules": [ + "supervisor", + "api", + "sqlite", + "windows-credential-manager", + "web-admin-auth" + ], + "implementation_boundary": "实现 HMAC 管理员白名单、独立管理员认证、多管理员、安全配置 revision、原子应用/回滚、system 审计和离线恢复边界", + "parent_families": [ + "TDD-WP1-ADM-001", + "TDD-WP1-CFG-001" + ], + "case_ids": [ + "TDD-WP1-ADM-001-admin-auth-boundary", + "TDD-WP1-CFG-001-secure-revision" + ], + "first_red": [ + { + "family_id": "TDD-WP1-ADM-001", + "assertion": "白名单外发码、普通账号提升或全部管理员停用后自助恢复" + }, + { + "family_id": "TDD-WP1-CFG-001", + "assertion": "安全配置修订部分生效或泄露白名单/HMAC" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP1-ADM-001", + "assertion": "后台独立 audience;多管理员可用;恢复仅安全配置;部署人员无产品身份" + }, + { + "family_id": "TDD-WP1-CFG-001", + "assertion": "完整验证后单一事务生效、撤销会话、system 审计和 revision 推进;失败整体回滚" + } + ], + "task_green_gate": "非白名单发码前拒绝;普通账号不能原地提升;配置失败不部分生效;部署人员不成为产品角色或审计 actor", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: supervisor, api, sqlite, windows-credential-manager, web-admin-auth.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds", + "credential, path, log, package and diagnostic redaction boundaries" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "E2E", + "PKG-SEC" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:e2e", + "pnpm test:security", + "pnpm test:package", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-ADM-001-admin-auth-boundary/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-CFG-001-secure-revision/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-1", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "admin-auth", + "role": "implementation", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP1-04", + "mapped_state_scope": "白名单邮箱验证码、字段空/加载、非白名单、停用/移除、Resend 失败;独立 audience 与返回普通登录" + }, + "applicable_states": { + "page_id": "admin-auth", + "actor_entry": "未登录后台入口", + "normal": "白名单邮箱验证码、独立 audience、返回普通登录", + "empty_loading": "字段空;发码/登录中", + "failure_disabled": "非白名单发码前阻断、停用/移除白名单、Resend 错误", + "conflict_capacity_special": "N/A:不显示普通创作或容量业务" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-auth/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP1-05", + "work_package": "WP-1", + "title": "注销、匿名保留与物理清理", + "dependencies": { + "source_text": "TASK-WP1-01 至 TASK-WP1-04", + "task_ids": [ + "TASK-WP1-01", + "TASK-WP1-04" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "AUTH-06" + ], + "acceptance_criteria": [ + "AC-22", + "AC-39", + "AC-56" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.10", + "17.11" + ], + "requirement_ac_sources": [ + "AUTH-06、17.10、17.11、AC-22、39", + "AUTH-06、AC-22、39、56" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "9.2 项目、历史、失败草稿和回收站", + "12.2 账号注销" + ], + "modules": [ + "api", + "worker", + "sqlite", + "local-data-root", + "web" + ], + "implementation_boundary": "实现注销事务、立即撤权与断链、邮箱释放、匿名事件、物理清理队列和最长 180 天保留", + "parent_families": [ + "TDD-WP1-DEL-001", + "TDD-WP1-DEL-002" + ], + "case_ids": [ + "TDD-WP1-DEL-001-account-delete", + "TDD-WP1-DEL-002-anonymous-retention" + ], + "first_red": [ + { + "family_id": "TDD-WP1-DEL-001", + "assertion": "注销后仍可访问账号、项目、资源、坐标或会话" + }, + { + "family_id": "TDD-WP1-DEL-002", + "assertion": "匿名事件可回溯或注销延长访问审计期限" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP1-DEL-001", + "assertion": "注销事务立即撤权和断链,物理内容异步清理,邮箱可作为全新账号重新注册" + }, + { + "family_id": "TDD-WP1-DEL-002", + "assertion": "只保留允许字段和随机主体;匿名事件不晚于注销后 180 天;访问审计沿原 expires_at" + } + ], + "task_green_gate": "旧数据不可恢复;原邮箱只能新邀请新建;匿名事件不可反查;注销不延长私有访问审计期限", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, worker, sqlite, local-data-root, web.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "WRK", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:worker", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-DEL-001-account-delete/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-DEL-002-anonymous-retention/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-1", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "settings", + "role": "implementation", + "frames": { + "frame_id": "Ws5E0", + "frame_name": "05B 设置与本机数据", + "primary_task": "TASK-WP1-05", + "mapped_state_scope": "资料、本机数据、容量摘要和固定文案;加载/保存失败;full/unavailable;注销确认、处理中和返回登录" + }, + "applicable_states": { + "page_id": "settings", + "actor_entry": "active 普通/内部预览账号", + "normal": "资料、本机数据、容量摘要、固定文案、注销", + "empty_loading": "资料/状态加载", + "failure_disabled": "保存失败;注销确认/处理中禁用重复提交", + "conflict_capacity_special": "full/unavailable 状态与允许动作;注销后返回登录" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/settings/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP1-06", + "work_package": "WP-1", + "title": "两类审计基础不可变性", + "dependencies": { + "source_text": "WP-0、TASK-WP1-04、TASK-WP1-05", + "task_ids": [ + "TASK-WP1-04", + "TASK-WP1-05" + ], + "work_packages": [ + "WP-0" + ] + }, + "requirements": [ + "ADMIN-05", + "ADMIN-09" + ], + "acceptance_criteria": [ + "AC-50" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.10", + "17.16" + ], + "requirement_ac_sources": [ + "ADMIN-05、09、17.10、17.16、AC-50" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "5.2 十九个产品数据契约映射", + "5.3 支撑表", + "9.6 运营后台与两类审计", + "12.3 审计与敏感信息" + ], + "modules": [ + "api", + "worker", + "sqlite" + ], + "implementation_boundary": "建立 AdminOperationLog 与 PrivateContentAccessLog 表、append-only trigger、合法 retention/privacy purge 作用域和非敏感摘要", + "parent_families": [ + "TDD-WP1-AUD-001" + ], + "case_ids": [ + "TDD-WP1-AUD-001-immutable-triggers" + ], + "first_red": [ + { + "family_id": "TDD-WP1-AUD-001", + "assertion": "普通连接可改删两类审计" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP1-AUD-001", + "assertion": "trigger 阻断 UPDATE/DELETE;仅保留期/隐私清理作用域可执行规定删除" + } + ], + "task_green_gate": "普通连接不能改删;两类日志不混用;正文、图片、密钥和路径不进入审计", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, worker, sqlite.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "SQLite constraints, transactions, idempotency and side-effect assertions" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-AUD-001-immutable-triggers/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-1", + "release:P0-A" + ], + "ui_scope": [ + + ], + "ui_scope_reason": "No direct UI coverage-unit ownership; validate only the listed module and case boundaries." + }, + { + "task_id": "TASK-WP2-01", + "work_package": "WP-2", + "title": "项目、历史、失败草稿与空工作台", + "dependencies": { + "source_text": "WP-0、WP-1", + "task_ids": [ + + ], + "work_packages": [ + "WP-0", + "WP-1" + ] + }, + "requirements": [ + "GEN-04", + "GEN-09", + "GEN-11", + "PROJECT-01", + "PROJECT-02", + "PROJECT-03" + ], + "acceptance_criteria": [ + "AC-03", + "AC-04", + "AC-06", + "AC-34", + "AC-43" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "PROJECT-01 至 03、GEN-04、11、AC-03、06、34", + "PROJECT-01、GEN-09、AC-04、43" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + "FX-PROJECT-ACTIVE-19", + "FX-PROJECT-EMPTY" + ], + "development_plan_sections": [ + "6.2 API 分组", + "9.2 项目、历史、失败草稿和回收站" + ], + "modules": [ + "api", + "sqlite", + "web" + ], + "implementation_boundary": "实现新建项目、项目内追加、固定比例、20 active、10 成功图、默认命名/重命名、failed_empty 重试和批量入回收站;按 WbDYT 落实无项目工作台艺术带、生成表单和空任务区", + "parent_families": [ + "TDD-WP2-PROJ-001", + "TDD-WP2-PROJ-005" + ], + "case_ids": [ + "TDD-WP2-PROJ-001-new-versus-continue", + "TDD-WP2-PROJ-005-failed-draft-retry" + ], + "first_red": [ + { + "family_id": "TDD-WP2-PROJ-001", + "assertion": "新建/继续生成/历史上限混淆项目数量或比例" + }, + { + "family_id": "TDD-WP2-PROJ-005", + "assertion": "重试新建项目或成功项目混入 failed_empty 批量删除" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP2-PROJ-001", + "assertion": "每次“新建创作”新项目;继续生成只追加;比例固定;10 张历史阻断追加但不阻断新项目" + }, + { + "family_id": "TDD-WP2-PROJ-005", + "assertion": "同一草稿每次重试只新增任务;仅无成功图草稿可批量入回收站" + } + ], + "task_green_gate": "新建/追加/上限不混淆;重试只新建任务;有成功图项目不能进入 failed_empty 批量操作;艺术带仅在无项目工作台出现", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, sqlite, web.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-001-new-versus-continue/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-005-failed-draft-retry/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-2", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "workspace", + "role": "implementation", + "frames": [ + { + "frame_id": "WbDYT", + "frame_name": "02A 空工作台", + "primary_task": "TASK-WP2-01", + "mapped_state_scope": "无项目艺术带;生成表单、推荐模型、四比例与空任务;模型/项目加载;模型、点数、参考图和容量禁用" + }, + { + "frame_id": "d99Lo", + "frame_name": "02B 生成中工作台", + "primary_task": "TASK-WP2-05", + "mapped_state_scope": "queued/running 无假百分比;冻结点数;critical 容量条;第二次提交禁用;失败/rejected 动作和配置变化重确认" + } + ], + "applicable_states": { + "page_id": "workspace", + "actor_entry": "active 普通/内部预览账号", + "normal": "生成表单、模型/点数/比例、最近项目", + "empty_loading": "无项目艺术带;模型/项目加载", + "failure_disabled": "服务/参考图/生成错误;模型、点数、单任务、历史/项目上限禁用", + "conflict_capacity_special": "model config 变化重确认;warning/critical 提示;full/unavailable 阻断新增" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/workspace/\u003cstate\u003e/" + }, + { + "page_id": "projects", + "role": "implementation", + "frames": { + "frame_id": "zXyG9", + "frame_name": "03A 项目列表", + "primary_task": "TASK-WP2-01", + "mapped_state_scope": "active/trashed、筛选、多选 failed_empty;空/骨架;20 active、恢复/批量禁用;多标签和容量提示" + }, + "applicable_states": { + "page_id": "projects", + "actor_entry": "active 普通/内部预览账号", + "normal": "active/trashed 列表、筛选、多选 failed_empty", + "empty_loading": "无项目/筛选空;稳定卡片骨架", + "failure_disabled": "列表失败保留旧数据;20 active、恢复/批量条件禁用", + "conflict_capacity_special": "多标签版本提示;删除排队不乐观减容量;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/projects/\u003cstate\u003e/" + }, + { + "page_id": "project-detail", + "role": "implementation", + "frames": { + "frame_id": "v2Qbu", + "frame_name": "03B 项目详情", + "primary_task": "TASK-WP2-01", + "mapped_state_scope": "历史、固定比例、继续生成、编辑、原图/latest;无成功图/无成品;10 图上限、资源失败和容量状态" + }, + "applicable_states": { + "page_id": "project-detail", + "actor_entry": "项目所有者", + "normal": "历史、固定比例、继续生成、编辑、原图/latest 下载", + "empty_loading": "无成功图草稿;历史/成品加载", + "failure_disabled": "10 图上限、当前底图不可删、无 latest、资源读取失败", + "conflict_capacity_special": "比例不可改;清理/容量状态不伪造资源可用性;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/project-detail/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP2-02", + "work_package": "WP-2", + "title": "自动保存与多标签冲突", + "dependencies": { + "source_text": "TASK-WP2-01", + "task_ids": [ + "TASK-WP2-01" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "EXPORT-05", + "EXPORT-06", + "PROJECT-04", + "PROJECT-05", + "PROJECT-06", + "PROJECT-07" + ], + "acceptance_criteria": [ + "AC-20", + "AC-35", + "AC-36" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.3" + ], + "requirement_ac_sources": [ + "PROJECT-04、05、EXPORT-06、AC-20、35", + "PROJECT-04、06、AC-20", + "PROJECT-04、17.3、AC-20", + "PROJECT-07、AC-36 P0-A 子集", + "PROJECT-07、EXPORT-05、AC-36 P0-A 子集" + ], + "acceptance_scope_notes": [ + "PROJECT-07、AC-36 P0-A 子集", + "PROJECT-07、EXPORT-05、AC-36 P0-A 子集" + ], + "fixture_ids": [ + "FX-PROJECT-CONFLICT" + ], + "development_plan_sections": [ + "7.5 项目保存并发", + "9.2 项目、历史、失败草稿和回收站" + ], + "modules": [ + "web", + "api", + "sqlite", + "shared-contracts" + ], + "implementation_boundary": "实现 Dada Canvas Schema、1 秒 debounce、单请求在途、最新快照合并、If-Match CAS、dirty/saving/saved/failed/conflicted、离开守卫和一次冲突本地导出", + "parent_families": [ + "TDD-WP2-PROJ-002", + "TDD-WP2-PROJ-004" + ], + "case_ids": [ + "TDD-WP2-PROJ-002-cas-success", + "TDD-WP2-PROJ-002-debounce", + "TDD-WP2-PROJ-002-save-failure-recovery", + "TDD-WP2-PROJ-004-conflict-export-once", + "TDD-WP2-PROJ-004-stale-tab" + ], + "first_red": [ + { + "family_id": "TDD-WP2-PROJ-002", + "assertion": "连续编辑并发保存、失败显示已保存或刷新恢复私有草稿" + }, + { + "family_id": "TDD-WP2-PROJ-004", + "assertion": "旧标签覆盖、另存副本或多次冲突导出" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP2-PROJ-002", + "assertion": "1 秒 debounce、单请求在途、最新快照合并;失败重试;强制退出只恢复 saved,撤销栈为空" + }, + { + "family_id": "TDD-WP2-PROJ-004", + "assertion": "CAS 返回 412;旧页只读;仅一次本地导出且不写 latest;刷新后端最新状态" + } + ], + "task_green_gate": "旧标签不能覆盖或另存副本;冲突页只读且仅一次本地导出,不写 latest;刷新只恢复 saved", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: web, api, sqlite, shared-contracts.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "UNIT", + "API", + "E2E" + ], + "validation_commands": [ + "pnpm test:unit", + "pnpm test:api", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-002-cas-success/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-002-debounce/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-002-save-failure-recovery/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-004-conflict-export-once/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-004-stale-tab/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-2", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "projects", + "role": "implementation", + "frames": { + "frame_id": "zXyG9", + "frame_name": "03A 项目列表", + "primary_task": "TASK-WP2-01", + "mapped_state_scope": "active/trashed、筛选、多选 failed_empty;空/骨架;20 active、恢复/批量禁用;多标签和容量提示" + }, + "applicable_states": { + "page_id": "projects", + "actor_entry": "active 普通/内部预览账号", + "normal": "active/trashed 列表、筛选、多选 failed_empty", + "empty_loading": "无项目/筛选空;稳定卡片骨架", + "failure_disabled": "列表失败保留旧数据;20 active、恢复/批量条件禁用", + "conflict_capacity_special": "多标签版本提示;删除排队不乐观减容量;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/projects/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP2-03", + "work_package": "WP-2", + "title": "回收站、恢复与 purge", + "dependencies": { + "source_text": "TASK-WP2-01、WP-0 文件清理", + "task_ids": [ + "TASK-WP2-01" + ], + "work_packages": [ + "WP-0" + ] + }, + "requirements": [ + "PROJECT-03", + "PROJECT-08" + ], + "acceptance_criteria": [ + "AC-21" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "PROJECT-03、08、AC-21" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + "FX-PROJECT-ACTIVE-20" + ], + "development_plan_sections": [ + "9.2 项目、历史、失败草稿和回收站", + "12.2 账号注销" + ], + "modules": [ + "api", + "worker", + "sqlite", + "local-data-root", + "web" + ], + "implementation_boundary": "实现 trashed、精确 +720h purge_at、20 active 恢复限制、立即撤权和异步物理清理", + "parent_families": [ + "TDD-WP2-PROJ-003" + ], + "case_ids": [ + "TDD-WP2-PROJ-003-trash-restore-purge" + ], + "first_red": [ + { + "family_id": "TDD-WP2-PROJ-003", + "assertion": "回收站计时、20 项目恢复或 purge 可恢复边界错误" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP2-PROJ-003", + "assertion": "purge_at 精确 +720 小时;满 20 保持 trashed;purged 立即不可访问并异步清理" + } + ], + "task_green_gate": "满 20 时保持 trashed;purged 后立即不可读;删除排队不伪造容量下降", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, worker, sqlite, local-data-root, web.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "WRK", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:worker", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-003-trash-restore-purge/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-2", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "projects", + "role": "implementation", + "frames": { + "frame_id": "zXyG9", + "frame_name": "03A 项目列表", + "primary_task": "TASK-WP2-01", + "mapped_state_scope": "active/trashed、筛选、多选 failed_empty;空/骨架;20 active、恢复/批量禁用;多标签和容量提示" + }, + "applicable_states": { + "page_id": "projects", + "actor_entry": "active 普通/内部预览账号", + "normal": "active/trashed 列表、筛选、多选 failed_empty", + "empty_loading": "无项目/筛选空;稳定卡片骨架", + "failure_disabled": "列表失败保留旧数据;20 active、恢复/批量条件禁用", + "conflict_capacity_special": "多标签版本提示;删除排队不乐观减容量;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/projects/\u003cstate\u003e/" + }, + { + "page_id": "project-detail", + "role": "implementation", + "frames": { + "frame_id": "v2Qbu", + "frame_name": "03B 项目详情", + "primary_task": "TASK-WP2-01", + "mapped_state_scope": "历史、固定比例、继续生成、编辑、原图/latest;无成功图/无成品;10 图上限、资源失败和容量状态" + }, + "applicable_states": { + "page_id": "project-detail", + "actor_entry": "项目所有者", + "normal": "历史、固定比例、继续生成、编辑、原图/latest 下载", + "empty_loading": "无成功图草稿;历史/成品加载", + "failure_disabled": "10 图上限、当前底图不可删、无 latest、资源读取失败", + "conflict_capacity_special": "比例不可改;清理/容量状态不伪造资源可用性;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/project-detail/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP2-04", + "work_package": "WP-2", + "title": "点数账户、流水与管理员调点", + "dependencies": { + "source_text": "WP-1、WP-0 SQLite", + "task_ids": [ + + ], + "work_packages": [ + "WP-0", + "WP-1" + ] + }, + "requirements": [ + "ADMIN-01", + "ADMIN-09", + "CREDIT-01", + "CREDIT-02", + "CREDIT-03", + "CREDIT-04", + "CREDIT-05", + "CREDIT-06", + "GEN-09", + "GEN-10" + ], + "acceptance_criteria": [ + "AC-03", + "AC-04", + "AC-28", + "AC-29", + "AC-50" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "CREDIT-01 至 05、AC-03", + "CREDIT-03、05、GEN-09、10、AC-03、04、29", + "CREDIT-04、AC-28", + "CREDIT-05、06、ADMIN-01、09、AC-29、50" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + "FX-ACTOR-ADMIN-A", + "FX-CREDIT-ENOUGH", + "FX-CREDIT-INSUFFICIENT", + "FX-JOB-ACTIVE", + "FX-MODEL-VERIFIED" + ], + "development_plan_sections": [ + "7.3 生成提交事务", + "7.4 结算事务", + "9.6 运营后台与两类审计" + ], + "modules": [ + "api", + "sqlite", + "web-admin" + ], + "implementation_boundary": "实现 available/reserved、reserve/commit/release、不可变 ledger、operation_key、余额不足和带原因的 admin adjustment", + "parent_families": [ + "TDD-WP2-CRED-001", + "TDD-WP2-CRED-002" + ], + "case_ids": [ + "TDD-WP2-CRED-001-finalize-once", + "TDD-WP2-CRED-001-insufficient", + "TDD-WP2-CRED-001-reserve", + "TDD-WP2-CRED-002-admin-adjustment" + ], + "first_red": [ + { + "family_id": "TDD-WP2-CRED-001", + "assertion": "点数不足、重复结算或生成流程制造负数" + }, + { + "family_id": "TDD-WP2-CRED-002", + "assertion": "管理员调点修改 reserved 或缺原因/审计" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP2-CRED-001", + "assertion": "不足不建任务/流水/上游;reserve/commit/release 各一次;生成流程 available 不为负" + }, + { + "family_id": "TDD-WP2-CRED-002", + "assertion": "只改 available,可为负;原因、流水和 AdminOperationLog 同事务" + } + ], + "task_green_gate": "生成流程 available 不为负;结算一次;调点只改 available、可为负,reserved 不变,流水和审计同事务", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, sqlite, web-admin.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "WRK", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:worker", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-CRED-001-finalize-once/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-CRED-001-insufficient/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-CRED-001-reserve/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-CRED-002-admin-adjustment/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-2", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "credits", + "role": "implementation", + "frames": { + "frame_id": "YlKzE", + "frame_name": "05A 点数明细", + "primary_task": "TASK-WP2-04", + "mapped_state_scope": "available/reserved、流水和分页;无流水/加载;失败保留安全摘要;负 available 如实显示且无购买入口" + }, + "applicable_states": { + "page_id": "credits", + "actor_entry": "active 普通/内部预览账号", + "normal": "available/reserved、流水、关联与时间", + "empty_loading": "无流水;分页加载", + "failure_disabled": "加载失败保留安全余额摘要", + "conflict_capacity_special": "负 available 如实显示;无购买/充值入口;页面操作不消费容量但仍继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/credits/\u003cstate\u003e/" + }, + { + "page_id": "admin-users", + "role": "implementation", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP6-01", + "mapped_state_scope": "脱敏列表/详情、暂停恢复/调点、空/筛选空/骨架、原因缺失和状态禁用、负 available" + }, + "applicable_states": { + "page_id": "admin-users", + "actor_entry": "active super_admin", + "normal": "脱敏列表/详情、暂停恢复、调点", + "empty_loading": "无用户/筛选空;表格骨架", + "failure_disabled": "操作失败、原因缺失、状态前置禁用", + "conflict_capacity_special": "调点可使 available 为负但 reserved 不变;页面操作不消费容量但仍继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-users/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP2-05", + "work_package": "WP-2", + "title": "生成提交、单任务、参考图与生成中工作台", + "dependencies": { + "source_text": "TASK-WP2-01、TASK-WP2-04、WP-0 存储", + "task_ids": [ + "TASK-WP2-01", + "TASK-WP2-04" + ], + "work_packages": [ + "WP-0" + ] + }, + "requirements": [ + "ADMIN-03", + "CREDIT-03", + "GEN-01", + "GEN-02", + "GEN-03", + "GEN-04", + "GEN-05", + "GEN-06", + "GEN-07", + "GEN-08", + "GEN-15", + "PROJECT-01", + "PROJECT-09" + ], + "acceptance_criteria": [ + "AC-03", + "AC-05", + "AC-29", + "AC-30", + "AC-34", + "AC-44", + "AC-48" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "CREDIT-03、GEN-07、AC-05、29", + "GEN-01 至 08、PROJECT-01、AC-03、34、44", + "GEN-05、PROJECT-09、AC-44、48", + "GEN-15、ADMIN-03、AC-30" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + "FX-CREDIT-ENOUGH", + "FX-MODEL-VERIFIED", + "FX-REF-VALID" + ], + "development_plan_sections": [ + "6.2 API 分组", + "7.1 幂等规则", + "7.2 单任务约束", + "7.3 生成提交事务", + "9.2 项目、历史、失败草稿和回收站" + ], + "modules": [ + "api", + "sqlite", + "local-data-root", + "web", + "worker" + ], + "implementation_boundary": "实现 multipart 提交、config/cost 复核、BEGIN IMMEDIATE、活动任务部分唯一索引、参考图内存态/流式提交/关系快照、幂等和 412 重确认;按 d99Lo 落实生成中工作台、当前任务、冻结点数、critical 容量条和禁用提交", + "parent_families": [ + "TDD-WP2-GEN-001", + "TDD-WP2-GEN-003", + "TDD-WP2-REF-001" + ], + "case_ids": [ + "TDD-WP2-GEN-001-concurrent-reserve", + "TDD-WP2-GEN-001-submit-snapshot", + "TDD-WP2-GEN-003-stale-config", + "TDD-WP2-REF-001-reference-lifecycle" + ], + "first_red": [ + { + "family_id": "TDD-WP2-GEN-001", + "assertion": "并发提交创建两个任务、项目、参考关系或冻结" + }, + { + "family_id": "TDD-WP2-GEN-003", + "assertion": "旧 model_config_version 静默按新成本或限制提交" + }, + { + "family_id": "TDD-WP2-REF-001", + "assertion": "未提交参考图被持久化或重试覆盖旧关系" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP2-GEN-001", + "assertion": "BEGIN IMMEDIATE+部分唯一索引只保留一个 queued/running;后续返回当前任务" + }, + { + "family_id": "TDD-WP2-GEN-003", + "assertion": "返回 412、最新摘要;不建任务、不上传引用、不冻结、不调用上游;重新确认后才提交" + }, + { + "family_id": "TDD-WP2-REF-001", + "assertion": "提交前只在内存;每个任务保存独立关系快照;purged 后立即不可读并异步删除" + } + ], + "task_green_gate": "同账号只建一个活动任务;第二提交返回当前任务且不建项目/关系/冻结;过期配置和无效参考图零持久副作用;生成中页面不显示假进度且提交动作按状态禁用", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, sqlite, local-data-root, web, worker.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-GEN-001-concurrent-reserve/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-GEN-001-submit-snapshot/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-GEN-003-stale-config/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-REF-001-reference-lifecycle/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-2", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "workspace", + "role": "implementation", + "frames": [ + { + "frame_id": "WbDYT", + "frame_name": "02A 空工作台", + "primary_task": "TASK-WP2-01", + "mapped_state_scope": "无项目艺术带;生成表单、推荐模型、四比例与空任务;模型/项目加载;模型、点数、参考图和容量禁用" + }, + { + "frame_id": "d99Lo", + "frame_name": "02B 生成中工作台", + "primary_task": "TASK-WP2-05", + "mapped_state_scope": "queued/running 无假百分比;冻结点数;critical 容量条;第二次提交禁用;失败/rejected 动作和配置变化重确认" + } + ], + "applicable_states": { + "page_id": "workspace", + "actor_entry": "active 普通/内部预览账号", + "normal": "生成表单、模型/点数/比例、最近项目", + "empty_loading": "无项目艺术带;模型/项目加载", + "failure_disabled": "服务/参考图/生成错误;模型、点数、单任务、历史/项目上限禁用", + "conflict_capacity_special": "model config 变化重确认;warning/critical 提示;full/unavailable 阻断新增" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/workspace/\u003cstate\u003e/" + }, + { + "page_id": "current-task", + "role": "implementation", + "frames": { + "frame_id": "d99Lo", + "frame_name": "02B 生成中工作台", + "primary_task": "TASK-WP2-05", + "mapped_state_scope": "queued/running 无假百分比;冻结点数;critical 容量条;第二次提交禁用;失败/rejected 动作和配置变化重确认" + }, + "applicable_states": { + "page_id": "current-task", + "actor_entry": "active 普通/内部预览账号", + "normal": "真实状态、结果入口", + "empty_loading": "无活动任务;queued/running 无假百分比", + "failure_disabled": "failed/rejected 与九类固定动作;第二任务禁用", + "conflict_capacity_special": "storage 错误按任务真相;pending_manual_review 不作为用户任务状态;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/current-task/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP2-06", + "work_package": "WP-2", + "title": "任务终态、九类错误与网关余额影响", + "dependencies": { + "source_text": "TASK-WP2-04、TASK-WP2-05;WP-3 Adapter 接口 mock", + "task_ids": [ + "TASK-WP2-04", + "TASK-WP2-05" + ], + "work_packages": [ + "WP-3" + ] + }, + "requirements": [ + "CREDIT-03", + "GEN-05", + "GEN-06", + "GEN-07", + "GEN-08", + "GEN-09", + "GEN-10", + "GEN-11", + "GEN-13", + "GEN-14", + "GEN-15", + "GEN-16" + ], + "acceptance_criteria": [ + "AC-03", + "AC-04", + "AC-30", + "AC-40", + "AC-44", + "AC-51", + "AC-53" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.17", + "17.18" + ], + "requirement_ac_sources": [ + "GEN-05、16、17.18、AC-04、44、53", + "GEN-06、08、11、CREDIT-03、AC-03", + "GEN-07、16、17.18、AC-30、53", + "GEN-09、16、17.18、AC-04、53", + "GEN-10、16、17.18、AC-04、53", + "GEN-13、16、17.18、AC-40、53", + "GEN-14、15、17.17、AC-04、51", + "GEN-15、16、17.17、17.18、AC-40、51、53" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + "FX-GATEWAY-SYNC" + ], + "development_plan_sections": [ + "7.4 结算事务", + "8.5 九类错误统一路径", + "11.3 AI 网关余额" + ], + "modules": [ + "api", + "worker", + "sqlite", + "ai-adapter-contract", + "web" + ], + "implementation_boundary": "实现成功/失败/rejected、输出落盘与一次结算、固定九类错误、用户动作、GatewayBalanceState model/account/unknown 影响和 pending_manual_review", + "parent_families": [ + "TDD-WP2-BAL-001", + "TDD-WP2-ERR-001", + "TDD-WP2-GEN-002" + ], + "case_ids": [ + "TDD-WP2-BAL-001-balance-impact", + "TDD-WP2-ERR-001-gateway-balance", + "TDD-WP2-ERR-001-gateway-contract", + "TDD-WP2-ERR-001-model-disabled", + "TDD-WP2-ERR-001-reference-invalid", + "TDD-WP2-ERR-001-safety-rejected", + "TDD-WP2-ERR-001-unknown-non-retryable", + "TDD-WP2-ERR-001-unknown-retryable", + "TDD-WP2-ERR-001-upstream-failed", + "TDD-WP2-ERR-001-upstream-timeout", + "TDD-WP2-GEN-002-success" + ], + "first_red": [ + { + "family_id": "TDD-WP2-BAL-001", + "assertion": "模型/账户/未知余额影响改写配置或重复释放" + }, + { + "family_id": "TDD-WP2-ERR-001", + "assertion": "九类错误被新增、归并、泄露原文或错误处理点数" + }, + { + "family_id": "TDD-WP2-GEN-002", + "assertion": "成功/失败/拒绝与点数、项目历史或重试不一致" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP2-BAL-001", + "assertion": "按影响范围只改 runtime;只 release 一次;未确认恢复前不可恢复" + }, + { + "family_id": "TDD-WP2-ERR-001", + "assertion": "三模型统一固定 category;提交前无任务,提交后只 release 一次;状态和用户动作符合第 9 节" + }, + { + "family_id": "TDD-WP2-GEN-002", + "assertion": "成功一图并 commit;失败/rejected 无输出并 release;重试同项目新任务" + } + ], + "task_green_gate": "reference_invalid 与 safety_rejected 分离;供应商原文不泄露;runtime 变化不回写 ModelConfig;用户点数只释放一次", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, worker, sqlite, ai-adapter-contract, web.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "WRK", + "UNIT", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:worker", + "pnpm test:unit", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-BAL-001-balance-impact/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-gateway-balance/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-gateway-contract/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-model-disabled/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-reference-invalid/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-safety-rejected/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-unknown-non-retryable/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-unknown-retryable/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-upstream-failed/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-upstream-timeout/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-GEN-002-success/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-2", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "current-task", + "role": "implementation", + "frames": { + "frame_id": "d99Lo", + "frame_name": "02B 生成中工作台", + "primary_task": "TASK-WP2-05", + "mapped_state_scope": "queued/running 无假百分比;冻结点数;critical 容量条;第二次提交禁用;失败/rejected 动作和配置变化重确认" + }, + "applicable_states": { + "page_id": "current-task", + "actor_entry": "active 普通/内部预览账号", + "normal": "真实状态、结果入口", + "empty_loading": "无活动任务;queued/running 无假百分比", + "failure_disabled": "failed/rejected 与九类固定动作;第二任务禁用", + "conflict_capacity_special": "storage 错误按任务真相;pending_manual_review 不作为用户任务状态;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/current-task/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP2-07", + "work_package": "WP-2", + "title": "原图与 latest export 服务", + "dependencies": { + "source_text": "TASK-WP2-01、TASK-WP2-02、WP-0 存储", + "task_ids": [ + "TASK-WP2-01", + "TASK-WP2-02" + ], + "work_packages": [ + "WP-0" + ] + }, + "requirements": [ + "EXPORT-04", + "EXPORT-05", + "EXPORT-06" + ], + "acceptance_criteria": [ + "AC-23", + "AC-35", + "AC-38", + "AC-55" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "EXPORT-04、AC-23、35", + "EXPORT-04、AC-23、38 P0-A 子集", + "EXPORT-05、06、AC-35、55" + ], + "acceptance_scope_notes": [ + "EXPORT-04、AC-23、38 P0-A 子集" + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "6.2 API 分组", + "9.5 客户端导出与 latest exports" + ], + "modules": [ + "api", + "sqlite", + "local-data-root", + "web" + ], + "implementation_boundary": "实现历史原图下载、latest JPG/PNG 资源关系、同 Blob 上传、后端失败矩阵和无导出成品空态", + "parent_families": [ + "TDD-WP2-EXP-001", + "TDD-WP2-EXP-002" + ], + "case_ids": [ + "TDD-WP2-EXP-001-result-matrix", + "TDD-WP2-EXP-001-same-blob-success", + "TDD-WP2-EXP-002-empty-latest" + ], + "first_red": [ + { + "family_id": "TDD-WP2-EXP-001", + "assertion": "项目/成品保存失败撤回下载或覆盖旧 latest" + }, + { + "family_id": "TDD-WP2-EXP-002", + "assertion": "从未导出项目自动生成默认成品" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP2-EXP-001", + "assertion": "同一次 Blob 用于下载和上传;下载可成功、latest 保持旧值;刷新只恢复 saved" + }, + { + "family_id": "TDD-WP2-EXP-002", + "assertion": "显示“暂无导出成品”,只提供进入编辑导出和下载原图" + } + ], + "task_green_gate": "客户端下载与后端保存结果独立;失败保留旧 latest;从未导出不自动合成;不承诺跨设备下载", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, sqlite, local-data-root, web.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "API", + "E2E" + ], + "validation_commands": [ + "pnpm test:api", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-EXP-001-result-matrix/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-EXP-001-same-blob-success/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-EXP-002-empty-latest/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-2", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "project-detail", + "role": "implementation", + "frames": { + "frame_id": "v2Qbu", + "frame_name": "03B 项目详情", + "primary_task": "TASK-WP2-01", + "mapped_state_scope": "历史、固定比例、继续生成、编辑、原图/latest;无成功图/无成品;10 图上限、资源失败和容量状态" + }, + "applicable_states": { + "page_id": "project-detail", + "actor_entry": "项目所有者", + "normal": "历史、固定比例、继续生成、编辑、原图/latest 下载", + "empty_loading": "无成功图草稿;历史/成品加载", + "failure_disabled": "10 图上限、当前底图不可删、无 latest、资源读取失败", + "conflict_capacity_special": "比例不可改;清理/容量状态不伪造资源可用性;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/project-detail/\u003cstate\u003e/" + }, + { + "page_id": "export", + "role": "implementation", + "frames": { + "frame_id": "i9upg7", + "frame_name": "04B 导出弹层", + "primary_task": "TASK-WP4-05", + "mapped_state_scope": "JPG/PNG、质量、尺寸;合成/持久化加载;未提交确认;四类失败结果;冲突一次下载和 full/unavailable" + }, + "applicable_states": { + "page_id": "export", + "actor_entry": "编辑器内项目所有者", + "normal": "JPG/PNG、质量、尺寸、下载/latest 分结果", + "empty_loading": "合成/持久化加载;无业务空态", + "failure_disabled": "合成、下载、项目保存、latest 保存分别失败;无画布/冲突次数用尽禁用", + "conflict_capacity_special": "未提交确认;conflicted 仅一次本地导出;full/unavailable 后端失败不撤回下载" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/export/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP3-01", + "work_package": "WP-3", + "title": "ModelConfig 集合与原子替换", + "dependencies": { + "source_text": "WP-2", + "task_ids": [ + + ], + "work_packages": [ + "WP-2" + ] + }, + "requirements": [ + "ADMIN-03", + "GEN-01", + "GEN-13", + "GEN-15" + ], + "acceptance_criteria": [ + "AC-30", + "AC-40" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.2" + ], + "requirement_ac_sources": [ + "ADMIN-03、17.2、AC-30", + "ADMIN-03、AC-30", + "GEN-01、ADMIN-03、17.2、AC-30", + "GEN-13、15、ADMIN-03、AC-30、40" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + "FX-MODEL-SEED", + "FX-MODEL-VERIFIED" + ], + "development_plan_sections": [ + "7.6 ModelConfig 原子配置与运行时推荐" + ], + "modules": [ + "api", + "sqlite", + "web-admin", + "shared-contracts" + ], + "implementation_boundary": "实现三模型固定 seed、immutable config_version/config_set、恰好一个 enabled default、唯一正整数 priority、完整集合 CAS、替代默认错误和审计", + "parent_families": [ + "TDD-WP3-MDL-001", + "TDD-WP3-MDL-002" + ], + "case_ids": [ + "TDD-WP3-MDL-001-seed-read", + "TDD-WP3-MDL-002-cas-conflict", + "TDD-WP3-MDL-002-contract-change", + "TDD-WP3-MDL-002-invalid-set", + "TDD-WP3-MDL-002-replace-default" + ], + "first_red": [ + { + "family_id": "TDD-WP3-MDL-001", + "assertion": "初始集合零/多默认、优先级非法或 runtime 假装 verified" + }, + { + "family_id": "TDD-WP3-MDL-002", + "assertion": "停用默认、重复优先级或 CAS 冲突产生部分配置" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP3-MDL-001", + "assertion": "三模型固定 seed;一个 enabled default;priority 1/2/3;contract unverified 时 runtime 不可用" + }, + { + "family_id": "TDD-WP3-MDL-002", + "assertion": "完整三模型集合原子校验和切换;失败原集合、runtime 和审计结果符合协议" + } + ], + "task_green_gate": "初始 1/2/3 优先级;缺失/非正/重复/零或多默认整批拒绝;切换无可见中间态;失败原集合不变", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, sqlite, web-admin, shared-contracts.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "UNIT", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:unit", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-MDL-001-seed-read/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-MDL-002-cas-conflict/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-MDL-002-contract-change/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-MDL-002-invalid-set/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-MDL-002-replace-default/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-3", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "admin-models", + "role": "implementation", + "frames": { + "frame_id": "YVfVG", + "frame_name": "06B 模型配置", + "primary_task": "TASK-WP6-05", + "mapped_state_scope": "完整三模型集合、default/runtime/recommended;加载;空推荐;替代/priority 禁用;CAS 冲突和整套回滚" + }, + "applicable_states": { + "page_id": "admin-models", + "actor_entry": "active super_admin", + "normal": "完整三模型集合、default/runtime/recommended 三层", + "empty_loading": "初始加载骨架;无 recommended 是合法状态", + "failure_disabled": "合法替代/priority 前置禁用;契约未验证/运行时不可用", + "conflict_capacity_special": "config_set CAS 冲突、完整集合原子回滚;仍继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-models/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP3-02", + "work_package": "WP-3", + "title": "独立 runtime 与推荐模型", + "dependencies": { + "source_text": "TASK-WP3-01、WP-2 余额状态", + "task_ids": [ + "TASK-WP3-01" + ], + "work_packages": [ + "WP-2" + ] + }, + "requirements": [ + "ADMIN-03", + "ADMIN-09", + "GEN-14", + "GEN-15" + ], + "acceptance_criteria": [ + "AC-30", + "AC-51" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.2" + ], + "requirement_ac_sources": [ + "GEN-14、15、ADMIN-09、AC-51", + "GEN-15、ADMIN-03、17.2、AC-30、51" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "7.6 ModelConfig 原子配置与运行时推荐", + "11.3 AI 网关余额" + ], + "modules": [ + "api", + "sqlite", + "web", + "web-admin" + ], + "implementation_boundary": "实现 runtime reason/version、configured default/runtime/recommended 三层读取、空推荐、人工恢复和余额影响审计", + "parent_families": [ + "TDD-WP3-BAL-001", + "TDD-WP3-MDL-003" + ], + "case_ids": [ + "TDD-WP3-BAL-001-confirmed-recovery", + "TDD-WP3-MDL-003-runtime-recommendation" + ], + "first_red": [ + { + "family_id": "TDD-WP3-BAL-001", + "assertion": "余额恢复自动执行或成本核对补扣用户点数" + }, + { + "family_id": "TDD-WP3-MDL-003", + "assertion": "runtime 降级改变 enabled/default/priority 或推荐为空时写回配置" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP3-BAL-001", + "assertion": "model/account/unknown 影响正确;人工确认恢复并审计;成本核对不改任务终态或用户点数" + }, + { + "family_id": "TDD-WP3-MDL-003", + "assertion": "配置字段不变;推荐只从可用候选按 priority 派生,可为 null" + } + ], + "task_green_gate": "降级/恢复不改 enabled/default/priority;推荐只从可用候选派生;成本核对不补扣用户点数", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, sqlite, web, web-admin.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "WRK", + "E2E", + "UNIT", + "API" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:worker", + "pnpm test:e2e", + "pnpm test:unit", + "pnpm test:api", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-BAL-001-confirmed-recovery/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-MDL-003-runtime-recommendation/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-3", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "admin-models", + "role": "implementation", + "frames": { + "frame_id": "YVfVG", + "frame_name": "06B 模型配置", + "primary_task": "TASK-WP6-05", + "mapped_state_scope": "完整三模型集合、default/runtime/recommended;加载;空推荐;替代/priority 禁用;CAS 冲突和整套回滚" + }, + "applicable_states": { + "page_id": "admin-models", + "actor_entry": "active super_admin", + "normal": "完整三模型集合、default/runtime/recommended 三层", + "empty_loading": "初始加载骨架;无 recommended 是合法状态", + "failure_disabled": "合法替代/priority 前置禁用;契约未验证/运行时不可用", + "conflict_capacity_special": "config_set CAS 冲突、完整集合原子回滚;仍继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-models/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP3-03", + "work_package": "WP-3", + "title": "三个独立 Adapter 与契约证据", + "dependencies": { + "source_text": "TASK-WP3-01、WP-2 Generation 接口", + "task_ids": [ + "TASK-WP3-01" + ], + "work_packages": [ + "WP-2" + ] + }, + "requirements": [ + "ADMIN-03", + "GEN-01", + "GEN-02", + "GEN-05", + "GEN-06", + "GEN-13", + "GEN-15", + "GEN-16" + ], + "acceptance_criteria": [ + "AC-30", + "AC-40" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "GEN-01、02、05、06、13、16、AC-40", + "GEN-13、15、ADMIN-03、AC-30、40" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "8.2 固定 Adapter 接口", + "8.3 契约验证证据", + "8.5 九类错误统一路径" + ], + "modules": [ + "worker", + "ai-adapter-gemini-flash", + "ai-adapter-gemini-pro", + "ai-adapter-gpt-image", + "shared-contracts" + ], + "implementation_boundary": "分别实现三个 Adapter、纯文字/参考图/四比例、同步/异步、响应、一图、错误映射;配置字段变化令对应模型 unverified;提供 mock 和受控真实验证", + "parent_families": [ + "TDD-WP3-ADP-001", + "TDD-WP3-ADP-002" + ], + "case_ids": [ + "TDD-WP3-ADP-001-per-model-contract", + "TDD-WP3-ADP-002-invalidate-revalidate" + ], + "first_red": [ + { + "family_id": "TDD-WP3-ADP-001", + "assertion": "一个模型 fixture 被复用于另两个模型或静默接受多图" + }, + { + "family_id": "TDD-WP3-ADP-002", + "assertion": "契约字段变化后仍为 verified" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP3-ADP-001", + "assertion": "三个独立 Adapter 分别验证纯文字、参考图、四比例、同步/异步、响应和一图约束" + }, + { + "family_id": "TDD-WP3-ADP-002", + "assertion": "端点、字段、参考图、响应、异步查询或错误协议任一变化立即 unverified,完整重验后才恢复" + } + ], + "task_green_gate": "三模型 fixture/证据不得共用;完整重验前不可恢复 verified;真实证据未齐时任务保持 externally_blocked", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: worker, ai-adapter-gemini-flash, ai-adapter-gemini-pro, ai-adapter-gpt-image, shared-contracts.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "SQLite constraints, transactions, idempotency and side-effect assertions" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "EXT-MOCK", + "EXT-REAL", + "DB" + ], + "validation_commands": [ + "pnpm test:all", + "pnpm test:integration", + "pnpm validate:external -- --service \u003cai-gateway-service-id\u003e --model gemini-3.1-flash-image-preview", + "pnpm validate:external -- --service \u003cai-gateway-service-id\u003e --model gemini-3-pro-image-preview", + "pnpm validate:external -- --service \u003cai-gateway-service-id\u003e --model gpt-image-2", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-ADP-001-per-model-contract/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-ADP-002-invalidate-revalidate/" + ], + "automation": [ + "automated", + "controlled_real" + ], + "release_gate": [ + "work_package:WP-3", + "release:P0-A" + ], + "ui_scope": [ + + ], + "ui_scope_reason": "No direct UI coverage-unit ownership; validate only the listed module and case boundaries." + }, + { + "task_id": "TASK-WP3-04", + "work_package": "WP-3", + "title": "Worker 租约、崩溃恢复与结算接线", + "dependencies": { + "source_text": "TASK-WP3-03、TASK-WP2-06", + "task_ids": [ + "TASK-WP2-06", + "TASK-WP3-03" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "CREDIT-03", + "GEN-08", + "GEN-09" + ], + "acceptance_criteria": [ + "AC-04", + "AC-51" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "GEN-08、09、CREDIT-03、AC-04、51" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + "FX-GATEWAY-ASYNC", + "FX-GATEWAY-UNKNOWN" + ], + "development_plan_sections": [ + "8.1 持久队列", + "8.4 崩溃恢复" + ], + "modules": [ + "worker", + "sqlite", + "api" + ], + "implementation_boundary": "实现领取、租约、心跳、poll、崩溃恢复、无安全引用的 unknown_retryable、一次 release 和人工成本核对", + "parent_families": [ + "TDD-WP3-WRK-001" + ], + "case_ids": [ + "TDD-WP3-WRK-001-recovery" + ], + "first_red": [ + { + "family_id": "TDD-WP3-WRK-001", + "assertion": "Worker 崩溃后重新 submit、重复结算或丢任务" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP3-WRK-001", + "assertion": "租约/心跳;有引用只 poll;无安全引用则 unknown_retryable+release+pending_manual_review" + } + ], + "task_green_gate": "有上游引用只 poll、不重新 submit;未知结果终止用户任务且不双结算;Worker degraded 禁止新任务", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: worker, sqlite, api.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "SQLite constraints, transactions, idempotency and side-effect assertions" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "WRK" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:worker", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-WRK-001-recovery/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-3", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "current-task", + "role": "implementation", + "frames": { + "frame_id": "d99Lo", + "frame_name": "02B 生成中工作台", + "primary_task": "TASK-WP2-05", + "mapped_state_scope": "queued/running 无假百分比;冻结点数;critical 容量条;第二次提交禁用;失败/rejected 动作和配置变化重确认" + }, + "applicable_states": { + "page_id": "current-task", + "actor_entry": "active 普通/内部预览账号", + "normal": "真实状态、结果入口", + "empty_loading": "无活动任务;queued/running 无假百分比", + "failure_disabled": "failed/rejected 与九类固定动作;第二任务禁用", + "conflict_capacity_special": "storage 错误按任务真相;pending_manual_review 不作为用户任务状态;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/current-task/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP4-01", + "work_package": "WP-4", + "title": "编辑器壳、Canvas Schema 与底图", + "dependencies": { + "source_text": "WP-2;使用 WP-5 稳定 fixture", + "task_ids": [ + + ], + "work_packages": [ + "WP-2", + "WP-5" + ] + }, + "requirements": [ + "EDITOR-01", + "EDITOR-02", + "EDITOR-03", + "EXPORT-03", + "GEN-12", + "PROJECT-04" + ], + "acceptance_criteria": [ + "AC-07", + "AC-20", + "AC-23" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "EDITOR-01 至 03、PROJECT-04、EXPORT-03、AC-07、20、23", + "GEN-12、EDITOR-01、PROJECT-04、AC-07" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "9.3 画布状态与渲染", + "13.1 P0-A 性能预算", + "13.2 视觉一致性" + ], + "modules": [ + "web-editor", + "canvas-schema", + "api" + ], + "implementation_boundary": "按 UIDesign/低保真实现三栏编辑器、顶部/底部状态、Fabric 转换边界、底图填充/适配/裁剪/调色/滤镜/恢复原图和换底图", + "parent_families": [ + "TDD-WP4-BG-001", + "TDD-WP4-BG-002" + ], + "case_ids": [ + "TDD-WP4-BG-001-switch-background", + "TDD-WP4-BG-002-processing-controls" + ], + "first_red": [ + { + "family_id": "TDD-WP4-BG-001", + "assertion": "换底图丢覆盖层、保留旧调色或色卡不刷新" + }, + { + "family_id": "TDD-WP4-BG-002", + "assertion": "填充/适配/裁剪/缩放/定位或亮度、对比度、饱和度、色温、锐度、预设滤镜、恢复原图未保存、不可撤销或未进入导出" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP4-BG-001", + "assertion": "覆盖层位置/尺寸保留;底图参数重置;色卡重提;一次撤销和保存" + }, + { + "family_id": "TDD-WP4-BG-002", + "assertion": "每项参数可预览、提交、撤销、自动保存并在重开与导出中一致;恢复原图只重置底图处理,不改变覆盖元素" + } + ], + "task_green_gate": "底图参数可预览、提交、撤销、保存、重开和导出一致;换图保留覆盖层、重置底图处理并刷新色卡", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: web-editor, canvas-schema, api.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "UNIT", + "E2E", + "VIS-PERF" + ], + "validation_commands": [ + "pnpm test:unit", + "pnpm test:e2e", + "pnpm test:visual", + "pnpm test:performance", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-BG-001-switch-background/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-BG-002-processing-controls/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-4", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "editor", + "role": "implementation", + "frames": { + "frame_id": "bHQnJ", + "frame_name": "04A 三栏编辑器", + "primary_task": "TASK-WP4-01", + "mapped_state_scope": "三栏、保存状态、画布、对象属性与固定底栏;画布/素材加载;保存/素材失败;第 51 元素;conflicted/full/unavailable" + }, + "applicable_states": { + "page_id": "editor", + "actor_entry": "有成功底图的项目所有者", + "normal": "三栏、保存状态、画布、属性与素材", + "empty_loading": "画布/素材加载;无成功图不能正常进入", + "failure_disabled": "保存/素材失败;第 51 元素、不可用模板禁用", + "conflict_capacity_special": "dirty/saving/saved/failed;conflicted 只读;full 可存 JSON,unavailable 保存失败" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP4-02", + "work_package": "WP-4", + "title": "画布选择、变换与普通贴纸", + "dependencies": { + "source_text": "TASK-WP4-01", + "task_ids": [ + "TASK-WP4-01" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "EDITOR-04", + "EDITOR-05", + "EDITOR-06", + "EDITOR-07", + "EDITOR-08", + "EDITOR-09", + "PROJECT-04" + ], + "acceptance_criteria": [ + "AC-13", + "AC-27" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.5" + ], + "requirement_ac_sources": [ + "EDITOR-04 至 09、17.5、AC-27", + "EDITOR-04 至 09、PROJECT-04、AC-13、27" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + "FX-CANVAS-50" + ], + "development_plan_sections": [ + "9.3 画布状态与渲染" + ], + "modules": [ + "web-editor", + "canvas-schema" + ], + "implementation_boundary": "实现循环选择、长按候选、多选/框选、移动/缩放/旋转/翻转/透明度/复制/层级/吸附、撤销重做和 50 元素双端限制", + "parent_families": [ + "TDD-WP4-CAN-001", + "TDD-WP4-STK-001" + ], + "case_ids": [ + "TDD-WP4-CAN-001-fifty-elements", + "TDD-WP4-STK-001-transform-sticker" + ], + "first_red": [ + { + "family_id": "TDD-WP4-CAN-001", + "assertion": "选择循环、多选、层级、吸附或第 51 元素错误" + }, + { + "family_id": "TDD-WP4-STK-001", + "assertion": "普通贴纸变换不进入保存/撤销/导出" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP4-CAN-001", + "assertion": "50 元素可编辑保存导出;第 51 个阻断;无图层面板/隐藏/锁定/编组" + }, + { + "family_id": "TDD-WP4-STK-001", + "assertion": "移动、缩放、旋转、翻转、透明度、复制、层级和多选一致" + } + ], + "task_green_gate": "50 元素可编辑保存导出,第 51 个被阻断;无图层面板、隐藏、锁定、编组;动态 UI 不改变工具尺寸", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: web-editor, canvas-schema.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "UNIT", + "E2E", + "VIS-PERF" + ], + "validation_commands": [ + "pnpm test:unit", + "pnpm test:e2e", + "pnpm test:visual", + "pnpm test:performance", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-CAN-001-fifty-elements/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-STK-001-transform-sticker/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-4", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "editor", + "role": "implementation", + "frames": { + "frame_id": "bHQnJ", + "frame_name": "04A 三栏编辑器", + "primary_task": "TASK-WP4-01", + "mapped_state_scope": "三栏、保存状态、画布、对象属性与固定底栏;画布/素材加载;保存/素材失败;第 51 元素;conflicted/full/unavailable" + }, + "applicable_states": { + "page_id": "editor", + "actor_entry": "有成功底图的项目所有者", + "normal": "三栏、保存状态、画布、属性与素材", + "empty_loading": "画布/素材加载;无成功图不能正常进入", + "failure_disabled": "保存/素材失败;第 51 元素、不可用模板禁用", + "conflict_capacity_special": "dirty/saving/saved/failed;conflicted 只读;full 可存 JSON,unavailable 保存失败" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP4-03", + "work_package": "WP-4", + "title": "文字模板、字体与属性", + "dependencies": { + "source_text": "TASK-WP4-01;WP-5 模板/字体 fixture", + "task_ids": [ + "TASK-WP4-01" + ], + "work_packages": [ + "WP-5" + ] + }, + "requirements": [ + "NFR-02", + "PROJECT-04", + "TEXT-01", + "TEXT-02", + "TEXT-03", + "TEXT-04", + "TEXT-05", + "TEXT-06", + "TEXT-07", + "TEXT-08", + "TEXT-09", + "TEXT-10", + "TEXT-11", + "TEXT-12", + "TEXT-13", + "TEXT-14" + ], + "acceptance_criteria": [ + "AC-09", + "AC-10", + "AC-11", + "AC-12", + "AC-32" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.6" + ], + "requirement_ac_sources": [ + "TEXT-01 至 06、PROJECT-04、AC-09、10", + "TEXT-01、17.6、AC-09、32", + "TEXT-07 至 14、NFR-02、AC-11、12" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "9.3 画布状态与渲染", + "9.4 素材面板与公开缓存" + ], + "modules": [ + "web-editor", + "asset-renderer", + "font-loader" + ], + "implementation_boundary": "实现必须先选模板、四类/显示名搜索/catalog 顺序/账号最近使用、多行内容、模板切换、FontFace ready、字号/缩放、填充/描边/背景/对齐/行距/字距和一次提交撤销", + "parent_families": [ + "TDD-WP4-TXT-001", + "TDD-WP4-TXT-002", + "TDD-WP4-TXT-003" + ], + "case_ids": [ + "TDD-WP4-TXT-001-multiline-template-switch", + "TDD-WP4-TXT-002-font-metrics-ranges", + "TDD-WP4-TXT-003-catalog-search-recent" + ], + "first_red": [ + { + "family_id": "TDD-WP4-TXT-001", + "assertion": "多行丢换行、空内容提交或切模板改变变换" + }, + { + "family_id": "TDD-WP4-TXT-002", + "assertion": "字体静默回退、字号与控制柄不同步、文字裁切、范围步长错误或背景透明度影响文字" + }, + { + "family_id": "TDD-WP4-TXT-003", + "assertion": "未选模板即可添加普通文字,或模板分类、显示名称搜索、catalog 顺序、账号最近使用漂移" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP4-TXT-001", + "assertion": "内容/换行持久;模板切换重置默认样式但保留位置/旋转/整体尺寸,可撤销" + }, + { + "family_id": "TDD-WP4-TXT-002", + "assertion": "真实归档字体;字号与缩放同步且内容重新测量不裁切;行距/字距/描边等精确范围;完成为一次撤销;重新打开和导出一致" + }, + { + "family_id": "TDD-WP4-TXT-003", + "assertion": "只能从模板添加;四类、显示名称搜索、稳定顺序和账号级最近使用符合 PRD;普通贴纸不复用该搜索" + } + ], + "task_green_gate": "文本/换行/变换按规则保留;真实字体缺失使模板 unavailable;不提供普通文字或普通贴纸关键词搜索;不静默回退", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: web-editor, asset-renderer, font-loader.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "UNIT", + "E2E", + "VIS-PERF" + ], + "validation_commands": [ + "pnpm test:unit", + "pnpm test:e2e", + "pnpm test:visual", + "pnpm test:performance", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-TXT-001-multiline-template-switch/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-TXT-002-font-metrics-ranges/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-TXT-003-catalog-search-recent/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-4", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "editor", + "role": "implementation", + "frames": { + "frame_id": "bHQnJ", + "frame_name": "04A 三栏编辑器", + "primary_task": "TASK-WP4-01", + "mapped_state_scope": "三栏、保存状态、画布、对象属性与固定底栏;画布/素材加载;保存/素材失败;第 51 元素;conflicted/full/unavailable" + }, + "applicable_states": { + "page_id": "editor", + "actor_entry": "有成功底图的项目所有者", + "normal": "三栏、保存状态、画布、属性与素材", + "empty_loading": "画布/素材加载;无成功图不能正常进入", + "failure_disabled": "保存/素材失败;第 51 元素、不可用模板禁用", + "conflict_capacity_special": "dirty/saving/saved/failed;conflicted 只读;full 可存 JSON,unavailable 保存失败" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP4-04", + "work_package": "WP-4", + "title": "色卡与动态贴纸 provider", + "dependencies": { + "source_text": "TASK-WP4-01;WP-5 声明式资源", + "task_ids": [ + "TASK-WP4-01" + ], + "work_packages": [ + "WP-5" + ] + }, + "requirements": [ + "COL-01", + "COL-02", + "COL-03", + "COL-04", + "COL-05", + "DYN-01", + "DYN-02", + "DYN-03", + "DYN-04", + "DYN-05", + "DYN-06", + "DYN-07", + "DYN-08", + "DYN-09", + "PRIV-03" + ], + "acceptance_criteria": [ + "AC-14", + "AC-15", + "AC-16", + "AC-17", + "AC-18", + "AC-19", + "AC-47" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "COL-01 至 05、AC-15 P0-A 子集、16", + "DYN-01 至 03、AC-14", + "DYN-04、PRIV-03、AC-17、47", + "DYN-05 至 09、AC-18、19" + ], + "acceptance_scope_notes": [ + "COL-01 至 05、AC-15 P0-A 子集、16" + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "9.3 画布状态与渲染", + "11.2 高德" + ], + "modules": [ + "web-editor", + "palette-provider", + "dynamic-provider", + "amap-adapter" + ], + "implementation_boundary": "实现 mmcq-v1 确定五色、四个色卡 renderer、时间/地点/身份 provider、DYN004 先确认后定位、坐标保存/清理、DYN012 FONT081 标记", + "parent_families": [ + "TDD-WP4-COL-001", + "TDD-WP4-DYN-001", + "TDD-WP4-DYN-002", + "TDD-WP4-DYN-003" + ], + "case_ids": [ + "TDD-WP4-COL-001-deterministic-palette", + "TDD-WP4-DYN-001-fixed-time", + "TDD-WP4-DYN-002-location-consent", + "TDD-WP4-DYN-003-identity-font" + ], + "first_red": [ + { + "family_id": "TDD-WP4-COL-001", + "assertion": "色卡随机、读取处理后底图或额外上传图片" + }, + { + "family_id": "TDD-WP4-DYN-001", + "assertion": "时间贴纸重开后变成新时间" + }, + { + "family_id": "TDD-WP4-DYN-002", + "assertion": "DYN004 提示前调用定位、拒绝后插入或删除后留坐标" + }, + { + "family_id": "TDD-WP4-DYN-003", + "assertion": "身份贴纸重复 @@、覆盖修改账号或 DYN012 静默换字体" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP4-COL-001", + "assertion": "同图 mmcq-v1 五色确定;裁剪/调色/滤镜不刷新;换底图刷新;网络上传为 0" + }, + { + "family_id": "TDD-WP4-DYN-001", + "assertion": "使用插入/确认值并持久化,导出静态不可点击内容" + }, + { + "family_id": "TDD-WP4-DYN-002", + "assertion": "同意后才定位并保存坐标;拒绝调用为 0;手动地点回退;删除/注销清理" + }, + { + "family_id": "TDD-WP4-DYN-003", + "assertion": "前缀一个;实例覆盖独立;DYN012 固定 FONT081 且证据标记替代" + } + ], + "task_green_gate": "色卡只读原始底图且网络上传为 0;时间值重开不漂移;拒绝定位调用为 0;身份前缀一个 @;DYN012 不静默换字体", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: web-editor, palette-provider, dynamic-provider, amap-adapter.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "UNIT", + "E2E", + "VIS-PERF", + "MANUAL" + ], + "validation_commands": [ + "pnpm test:unit", + "pnpm test:e2e", + "pnpm test:visual", + "pnpm test:performance", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-COL-001-deterministic-palette/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-DYN-001-fixed-time/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-DYN-002-location-consent/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-DYN-003-identity-font/" + ], + "automation": [ + "automated", + "manual_review" + ], + "release_gate": [ + "work_package:WP-4", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "editor", + "role": "implementation", + "frames": { + "frame_id": "bHQnJ", + "frame_name": "04A 三栏编辑器", + "primary_task": "TASK-WP4-01", + "mapped_state_scope": "三栏、保存状态、画布、对象属性与固定底栏;画布/素材加载;保存/素材失败;第 51 元素;conflicted/full/unavailable" + }, + "applicable_states": { + "page_id": "editor", + "actor_entry": "有成功底图的项目所有者", + "normal": "三栏、保存状态、画布、属性与素材", + "empty_loading": "画布/素材加载;无成功图不能正常进入", + "failure_disabled": "保存/素材失败;第 51 元素、不可用模板禁用", + "conflict_capacity_special": "dirty/saving/saved/failed;conflicted 只读;full 可存 JSON,unavailable 保存失败" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP4-05", + "work_package": "WP-4", + "title": "客户端导出与结果弹层", + "dependencies": { + "source_text": "TASK-WP4-01 至 TASK-WP4-04、TASK-WP2-07", + "task_ids": [ + "TASK-WP2-07", + "TASK-WP4-01", + "TASK-WP4-04" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "EXPORT-01", + "EXPORT-02", + "EXPORT-03", + "PROJECT-04", + "PROJECT-06" + ], + "acceptance_criteria": [ + "AC-23" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "EXPORT-01 至 03、AC-23", + "EXPORT-03、AC-23", + "PROJECT-04、06、EXPORT-03、AC-23" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + "FX-CANVAS-RATIOS" + ], + "development_plan_sections": [ + "9.5 客户端导出与 latest exports" + ], + "modules": [ + "web-editor", + "export-compositor", + "api", + "local-data-root" + ], + "implementation_boundary": "实现四比例真实像素、sRGB、JPG 80-100/默认 92、PNG 无损、无水印、未提交修改确认、同一 Blob 下载/上传和四结果组合 UI", + "parent_families": [ + "TDD-WP4-EXP-001" + ], + "case_ids": [ + "TDD-WP4-EXP-001-cancel-pending-edit", + "TDD-WP4-EXP-001-confirm-pending-edit", + "TDD-WP4-EXP-001-format-ratio" + ], + "first_red": [ + { + "family_id": "TDD-WP4-EXP-001", + "assertion": "四比例像素、JPG/PNG、未提交修改或同 Blob 规则错误" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP4-EXP-001", + "assertion": "精确像素、sRGB、无水印、PNG 无损、JPG 80-100 默认 92;未提交文字或样式经确认后,提交形成且仅形成一次撤销记录并进入正常自动保存,再用提交后的同一画布状态合成;真正的导出动作不额外创建撤销记录" + } + ], + "task_green_gate": "确认未提交修改只形成一次撤销并进入自动保存;导出本身不额外建撤销;后端失败不撤回已成功下载", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: web-editor, export-compositor, api, local-data-root.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "UNIT", + "E2E", + "VIS-PERF" + ], + "validation_commands": [ + "pnpm test:unit", + "pnpm test:e2e", + "pnpm test:visual", + "pnpm test:performance", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-EXP-001-cancel-pending-edit/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-EXP-001-confirm-pending-edit/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-EXP-001-format-ratio/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-4", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "editor", + "role": "implementation", + "frames": { + "frame_id": "bHQnJ", + "frame_name": "04A 三栏编辑器", + "primary_task": "TASK-WP4-01", + "mapped_state_scope": "三栏、保存状态、画布、对象属性与固定底栏;画布/素材加载;保存/素材失败;第 51 元素;conflicted/full/unavailable" + }, + "applicable_states": { + "page_id": "editor", + "actor_entry": "有成功底图的项目所有者", + "normal": "三栏、保存状态、画布、属性与素材", + "empty_loading": "画布/素材加载;无成功图不能正常进入", + "failure_disabled": "保存/素材失败;第 51 元素、不可用模板禁用", + "conflict_capacity_special": "dirty/saving/saved/failed;conflicted 只读;full 可存 JSON,unavailable 保存失败" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/" + }, + { + "page_id": "export", + "role": "implementation", + "frames": { + "frame_id": "i9upg7", + "frame_name": "04B 导出弹层", + "primary_task": "TASK-WP4-05", + "mapped_state_scope": "JPG/PNG、质量、尺寸;合成/持久化加载;未提交确认;四类失败结果;冲突一次下载和 full/unavailable" + }, + "applicable_states": { + "page_id": "export", + "actor_entry": "编辑器内项目所有者", + "normal": "JPG/PNG、质量、尺寸、下载/latest 分结果", + "empty_loading": "合成/持久化加载;无业务空态", + "failure_disabled": "合成、下载、项目保存、latest 保存分别失败;无画布/冲突次数用尽禁用", + "conflict_capacity_special": "未提交确认;conflicted 仅一次本地导出;full/unavailable 后端失败不撤回下载" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/export/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP4-06", + "work_package": "WP-4", + "title": "键盘、焦点与语义可访问性", + "dependencies": { + "source_text": "TASK-WP4-01 至 TASK-WP4-05", + "task_ids": [ + "TASK-WP4-01", + "TASK-WP4-05" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "NFR-06" + ], + "acceptance_criteria": [ + "AC-32" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "NFR-06、AC-32" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "13.3 可访问性基础" + ], + "modules": [ + "web", + "web-editor" + ], + "implementation_boundary": "落实 skip link、焦点顺序、ARIA/live region、弹层焦点/返回、画布外等价控件、200% 缩放和 axe", + "parent_families": [ + "TDD-WP4-A11Y-001" + ], + "case_ids": [ + "TDD-WP4-A11Y-001-keyboard-focus" + ], + "first_red": [ + { + "family_id": "TDD-WP4-A11Y-001", + "assertion": "关键动作不可键盘到达、焦点逃逸或状态只靠颜色" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP4-A11Y-001", + "assertion": "焦点顺序、ARIA、live region、弹层返回、等价画布工具、axe critical/serious 为 0" + } + ], + "task_green_gate": "axe critical/serious 为 0;状态不只靠颜色;异步更新不抢焦点;最长文案、弹层和主动作可达", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: web, web-editor.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "E2E", + "VIS-PERF" + ], + "validation_commands": [ + "pnpm test:e2e", + "pnpm test:visual", + "pnpm test:performance", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-A11Y-001-keyboard-focus/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-4", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "editor", + "role": "implementation", + "frames": { + "frame_id": "bHQnJ", + "frame_name": "04A 三栏编辑器", + "primary_task": "TASK-WP4-01", + "mapped_state_scope": "三栏、保存状态、画布、对象属性与固定底栏;画布/素材加载;保存/素材失败;第 51 元素;conflicted/full/unavailable" + }, + "applicable_states": { + "page_id": "editor", + "actor_entry": "有成功底图的项目所有者", + "normal": "三栏、保存状态、画布、属性与素材", + "empty_loading": "画布/素材加载;无成功图不能正常进入", + "failure_disabled": "保存/素材失败;第 51 元素、不可用模板禁用", + "conflict_capacity_special": "dirty/saving/saved/failed;conflicted 只读;full 可存 JSON,unavailable 保存失败" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP4-07", + "work_package": "WP-4", + "title": "视觉与性能预算", + "dependencies": { + "source_text": "TASK-WP4-01 至 TASK-WP4-06;最终素材依赖 WP-5", + "task_ids": [ + "TASK-WP4-01", + "TASK-WP4-06" + ], + "work_packages": [ + "WP-5" + ] + }, + "requirements": [ + "NFR-02", + "NFR-03" + ], + "acceptance_criteria": [ + "AC-19", + "AC-23", + "AC-27", + "AC-32" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "NFR-02、AC-19、23、32", + "NFR-03、AC-27、32" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + "FX-CANVAS-50" + ], + "development_plan_sections": [ + "13.1 P0-A 性能预算", + "13.2 视觉一致性" + ], + "modules": [ + "web-editor", + "test-visual-performance" + ], + "implementation_boundary": "建立固定 Canvas/字体/动态值、Chrome/Edge 截图 diff、50 元素交互、自动保存、编辑器打开、导出、内存和 DOM 性能 harness", + "parent_families": [ + "TDD-WP4-PERF-001", + "TDD-WP4-VIS-001" + ], + "case_ids": [ + "TDD-WP4-PERF-001-budget", + "TDD-WP4-VIS-001-browser-diff" + ], + "first_red": [ + { + "family_id": "TDD-WP4-PERF-001", + "assertion": "50 元素、自动保存、资源面板或导出超过预算" + }, + { + "family_id": "TDD-WP4-VIS-001", + "assertion": "Chrome/Edge 白名单结构或导出漂移" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP4-PERF-001", + "assertion": "第 10.2 节全部预算通过,失败不破坏项目或 latest export" + }, + { + "family_id": "TDD-WP4-VIS-001", + "assertion": "固定环境按第 10 节阈值比较;已知替代项人工复核" + } + ], + "task_green_gate": "边界偏差、显著像素和全部性能预算符合 tdd;已知替代人工复核;不得通过放宽超时、减元素或降尺寸掩盖失败", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: web-editor, test-visual-performance.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "VIS-PERF", + "MANUAL" + ], + "validation_commands": [ + "pnpm test:visual", + "pnpm test:performance", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-PERF-001-budget/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-VIS-001-browser-diff/" + ], + "automation": [ + "automated", + "manual_review" + ], + "release_gate": [ + "work_package:WP-4", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "editor", + "role": "implementation", + "frames": { + "frame_id": "bHQnJ", + "frame_name": "04A 三栏编辑器", + "primary_task": "TASK-WP4-01", + "mapped_state_scope": "三栏、保存状态、画布、对象属性与固定底栏;画布/素材加载;保存/素材失败;第 51 元素;conflicted/full/unavailable" + }, + "applicable_states": { + "page_id": "editor", + "actor_entry": "有成功底图的项目所有者", + "normal": "三栏、保存状态、画布、属性与素材", + "empty_loading": "画布/素材加载;无成功图不能正常进入", + "failure_disabled": "保存/素材失败;第 51 元素、不可用模板禁用", + "conflict_capacity_special": "dirty/saving/saved/failed;conflicted 只读;full 可存 JSON,unavailable 保存失败" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP5-01", + "work_package": "WP-5", + "title": "只读素材编译器", + "dependencies": { + "source_text": "WP-0", + "task_ids": [ + + ], + "work_packages": [ + "WP-0" + ] + }, + "requirements": [ + "COL-01", + "COL-02", + "COL-03", + "COL-04", + "COL-05", + "DYN-01", + "DYN-02", + "DYN-03", + "DYN-04", + "DYN-05", + "DYN-06", + "DYN-07", + "DYN-08", + "DYN-09", + "STATIC-01", + "STATIC-02", + "STATIC-03", + "STATIC-04", + "TEXT-01", + "TEXT-02", + "TEXT-03", + "TEXT-04", + "TEXT-05", + "TEXT-06", + "TEXT-07", + "TEXT-08", + "TEXT-09", + "TEXT-10", + "TEXT-11", + "TEXT-12", + "TEXT-13", + "TEXT-14" + ], + "acceptance_criteria": [ + "AC-32", + "AC-42" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "TEXT-01 至 TEXT-14、COL-01 至 COL-05、DYN-01 至 DYN-09、STATIC-01 至 STATIC-04、AC-32、42" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "10.1 唯一输入", + "10.3 复杂资源包" + ], + "modules": [ + "asset-compiler", + "asset-metadata", + "local-data-root" + ], + "implementation_boundary": "建立 TypeScript CLI,只读读取规范 manifest/catalog/metadata,输出 TemplateRenderModel、版本化元数据、最小 derived 产物和源前后校验报告;不执行 Lua/Prefab", + "parent_families": [ + "TDD-WP5-MAN-001" + ], + "case_ids": [ + "TDD-WP5-MAN-001-readonly-compiler" + ], + "first_red": [ + { + "family_id": "TDD-WP5-MAN-001", + "assertion": "编译器读取证据目录、执行 Lua/Prefab、复制全库或改写源" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP5-MAN-001", + "assertion": "只读规范入口;声明式转换;源前后哈希/时间不变;无等价全库副本" + } + ], + "task_green_gate": "源文件哈希/时间不变;不读证据目录;不复制全库或形成等价派生副本;内容哈希去重复用", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: asset-compiler, asset-metadata, local-data-root.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "credential, path, log, package and diagnostic redaction boundaries" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "UNIT", + "PKG-SEC", + "MANUAL" + ], + "validation_commands": [ + "pnpm test:unit", + "pnpm test:security", + "pnpm test:package", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-MAN-001-readonly-compiler/" + ], + "automation": [ + "automated", + "manual_review" + ], + "release_gate": [ + "work_package:WP-5", + "release:P0-A" + ], + "ui_scope": [ + + ], + "ui_scope_reason": "No direct UI coverage-unit ownership; validate only the listed module and case boundaries." + }, + { + "task_id": "TASK-WP5-02", + "work_package": "WP-5", + "title": "普通贴纸 catalog 与虚拟目录", + "dependencies": { + "source_text": "TASK-WP5-01", + "task_ids": [ + "TASK-WP5-01" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "STATIC-01", + "STATIC-02", + "STATIC-03", + "STATIC-04" + ], + "acceptance_criteria": [ + "AC-13", + "AC-32" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "STATIC-01 至 04、AC-13、32" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "9.4 素材面板与公开缓存", + "10.2 StaticStickerCatalog 构建" + ], + "modules": [ + "asset-compiler", + "static-sticker-catalog", + "web" + ], + "implementation_boundary": "构建 part1-25 的 1,407 项 StaticStickerCatalog,保留三组重复、稳定 ID/顺序/哈希/尺寸/MIME/缩略图引用;接入虚拟列表和懒加载", + "parent_families": [ + "TDD-WP5-CAT-001" + ], + "case_ids": [ + "TDD-WP5-CAT-001-catalog-1407" + ], + "first_red": [ + { + "family_id": "TDD-WP5-CAT-001", + "assertion": "计数、part、重复项、顺序或懒加载错误" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP5-CAT-001", + "assertion": "part1-25 共 1,407 PNG;3 组重复保留;虚拟列表节点不线性增长,原图按需加载" + } + ], + "task_green_gate": "计数、part、重复和顺序精确;原图按需加载;DOM 只保留视口和两屏缓冲", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: asset-compiler, static-sticker-catalog, web.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "UNIT", + "E2E", + "MANUAL" + ], + "validation_commands": [ + "pnpm test:unit", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-CAT-001-catalog-1407/" + ], + "automation": [ + "automated", + "manual_review" + ], + "release_gate": [ + "work_package:WP-5", + "release:P0-A" + ], + "ui_scope": [ + + ], + "ui_scope_reason": "No direct UI coverage-unit ownership; validate only the listed module and case boundaries." + }, + { + "task_id": "TASK-WP5-03", + "work_package": "WP-5", + "title": "复杂资源注册与 P0-A 白名单", + "dependencies": { + "source_text": "TASK-WP5-01;与 WP-4 renderer 契约联调", + "task_ids": [ + "TASK-WP5-01" + ], + "work_packages": [ + "WP-4" + ] + }, + "requirements": [ + "ADMIN-07", + "COL-01", + "COL-02", + "COL-03", + "COL-04", + "COL-05", + "DYN-01", + "DYN-08", + "NFR-02", + "NFR-07", + "STATIC-01", + "TEXT-01", + "TEXT-04" + ], + "acceptance_criteria": [ + "AC-15", + "AC-16", + "AC-32", + "AC-42", + "AC-48" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "COL-01 至 05、AC-15 P0-A 子集、16、32", + "TEXT-01、TEXT-04、COL-01、DYN-01、DYN-08、STATIC-01、ADMIN-07、NFR-02、NFR-07、AC-32、42、48" + ], + "acceptance_scope_notes": [ + "COL-01 至 05、AC-15 P0-A 子集、16、32" + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "10.3 复杂资源包", + "10.5 Manifest 与发布路径" + ], + "modules": [ + "asset-compiler", + "template-registry", + "asset-renderer" + ], + "implementation_boundary": "导入注册 332 文字、86 字体项、16 色卡、35 动态;公开 manifest 只启用 32 文字、实际字体+FONT081、COLOR001/002/008/016、10 动态和 1,407 普通贴纸", + "parent_families": [ + "TDD-WP5-COL-001", + "TDD-WP5-WHITE-001" + ], + "case_ids": [ + "TDD-WP5-COL-001-four-layouts", + "TDD-WP5-WHITE-001-p0a-allowlist" + ], + "first_red": [ + { + "family_id": "TDD-WP5-COL-001", + "assertion": "P0-A 启用非四种色卡或四种布局不消费同一五色" + }, + { + "family_id": "TDD-WP5-WHITE-001", + "assertion": "普通用户发现白名单外复杂素材或缺少规定白名单" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP5-COL-001", + "assertion": "只启用 COLOR001/002/008/016,统一五色,刷新规则与 WP-4 一致" + }, + { + "family_id": "TDD-WP5-WHITE-001", + "assertion": "精确 32 文字、实际字体+FONT081、4 色卡、10 动态、1,407 普通贴纸" + } + ], + "task_green_gate": "白名单外复杂素材不对普通用户可见;四种色卡消费同一五色;色卡/动态不计入 25 part;不把 full_p0 分批公开", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: asset-compiler, template-registry, asset-renderer.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "UNIT", + "E2E", + "VIS-PERF", + "API" + ], + "validation_commands": [ + "pnpm test:unit", + "pnpm test:e2e", + "pnpm test:visual", + "pnpm test:performance", + "pnpm test:api", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-COL-001-four-layouts/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-WHITE-001-p0a-allowlist/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-5", + "release:P0-A" + ], + "ui_scope": [ + + ], + "ui_scope_reason": "No direct UI coverage-unit ownership; validate only the listed module and case boundaries." + }, + { + "task_id": "TASK-WP5-04", + "work_package": "WP-5", + "title": "Immutable manifest 与三类资源隔离", + "dependencies": { + "source_text": "TASK-WP5-01 至 TASK-WP5-03、WP-0 gate/cache", + "task_ids": [ + "TASK-WP5-01", + "TASK-WP5-03" + ], + "work_packages": [ + "WP-0" + ] + }, + "requirements": [ + "NFR-07", + "PRIV-02", + "PRIV-05" + ], + "acceptance_criteria": [ + "AC-42", + "AC-46", + "AC-48" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.12", + "17.13", + "17.14" + ], + "requirement_ac_sources": [ + "NFR-07、17.14、AC-46、48", + "PRIV-02、05、17.12、13、AC-42、48" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "9.4 素材面板与公开缓存", + "10.5 Manifest 与发布路径", + "10.6 三类资源隔离" + ], + "modules": [ + "api", + "asset-release-manifest", + "web-client-cache" + ], + "implementation_boundary": "实现 release_version、manifest/file SHA-256、public/preview/private 三类路由、鉴权、no-store/immutable 缓存和不可推导资源 URL", + "parent_families": [ + "TDD-WP5-CACHE-001", + "TDD-WP5-RES-001" + ], + "case_ids": [ + "TDD-WP5-CACHE-001-no-private-client-state", + "TDD-WP5-RES-001-three-access-classes" + ], + "first_red": [ + { + "family_id": "TDD-WP5-CACHE-001", + "assertion": "SW 拦截 internal/private 或 IndexedDB 保存私有字段" + }, + { + "family_id": "TDD-WP5-RES-001", + "assertion": "公开 manifest 暴露 internal/private、路径可推导或缓存策略混用" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP5-CACHE-001", + "assertion": "仅公开 allowlist;每场景实际枚举 registration、Cache keys 和 IndexedDB 记录" + }, + { + "family_id": "TDD-WP5-RES-001", + "assertion": "三类路由、鉴权和 cache header 分离;浏览器永不获得绝对路径" + } + ], + "task_green_gate": "public manifest 不含 internal/private;浏览器不见绝对路径;SW/Cache/IndexedDB 实际枚举无私有或预览内容", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, asset-release-manifest, web-client-cache.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds", + "credential, path, log, package and diagnostic redaction boundaries" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "E2E", + "API", + "PKG-SEC" + ], + "validation_commands": [ + "pnpm test:e2e", + "pnpm test:api", + "pnpm test:security", + "pnpm test:package", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-CACHE-001-no-private-client-state/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-RES-001-three-access-classes/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-5", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "preview-user-variant", + "role": "implementation", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP5-07", + "mapped_state_scope": "有效授权、无授权/空批次、加载、撤销/过期阻断;不出现后台权限;全局容量条" + }, + "applicable_states": { + "page_id": "preview-user-variant", + "actor_entry": "有有效/撤销/过期 AssetPreviewGrant 的普通账号", + "normal": "授权批次素材显示“预览”,其余页面同普通用户", + "empty_loading": "无授权/批次空;manifest 加载", + "failure_disabled": "撤销/过期立即阻断新读取", + "conflict_capacity_special": "不出现后台入口、调点、邀请码、模型或私有内容;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/preview-user-variant/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP5-05", + "work_package": "WP-5", + "title": "后台普通贴纸上传与版本发布", + "dependencies": { + "source_text": "TASK-WP5-02、TASK-WP5-04、WP-0 存储", + "task_ids": [ + "TASK-WP5-02", + "TASK-WP5-04" + ], + "work_packages": [ + "WP-0" + ] + }, + "requirements": [ + "ADMIN-06" + ], + "acceptance_criteria": [ + "AC-31", + "AC-55" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.7", + "17.19" + ], + "requirement_ac_sources": [ + "ADMIN-06、17.7、17.19、AC-31、55" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "10.4 后台新增普通贴纸" + ], + "modules": [ + "api", + "worker", + "sqlite", + "local-data-root", + "web-admin" + ], + "implementation_boundary": "实现 PNG/WebP 流式校验、stable ID/part/顺序、原图与缩略图独立预留/计量、immutable release 切换和旧版本保留", + "parent_families": [ + "TDD-WP5-UPL-001" + ], + "case_ids": [ + "TDD-WP5-UPL-001-upload-metering" + ], + "first_red": [ + { + "family_id": "TDD-WP5-UPL-001", + "assertion": "后台上传未流式校验、原图/缩略图漏计量或 full 仍写入" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP5-UPL-001", + "assertion": "PNG/WebP、稳定 ID、part、顺序和 MIME 校验;两类文件分别预留并计量" + } + ], + "task_green_gate": "两类文件均计入 5 GB;full/unavailable 阻断;恰好等于上限允许提交后 full;不把既有归档复制进 managed-assets", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, worker, sqlite, local-data-root, web-admin.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-UPL-001-upload-metering/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-5", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "admin-assets", + "role": "implementation", + "frames": { + "frame_id": "A28V3c", + "frame_name": "06C 素材与历史清理", + "primary_task": "TASK-WP5-06", + "mapped_state_scope": "上传/版本/候选;无上传/无候选;格式/编译/权限失败;full/unavailable;引用冲突、排队、物理删除和重计量" + }, + "applicable_states": { + "page_id": "admin-assets", + "actor_entry": "active super_admin", + "normal": "普通贴纸、资源版本/发布、历史清理", + "empty_loading": "无上传素材/无候选;列表/处理加载", + "failure_disabled": "格式/编译失败;权限、文件状态禁用", + "conflict_capacity_special": "stable ID/version 冲突;full/unavailable 阻断上传;引用冲突/排队/重计量" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-assets/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP5-06", + "work_package": "WP-5", + "title": "历史贴纸显式清理", + "dependencies": { + "source_text": "TASK-WP5-05、WP-2 project_asset_refs、WP-1 审计", + "task_ids": [ + "TASK-WP5-05" + ], + "work_packages": [ + "WP-1", + "WP-2" + ] + }, + "requirements": [ + "ADMIN-06", + "ADMIN-09" + ], + "acceptance_criteria": [ + "AC-31", + "AC-50", + "AC-55" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.7", + "17.19" + ], + "requirement_ac_sources": [ + "ADMIN-06、09、17.7、17.19、AC-31、50、55" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "7.7 后台贴纸历史文件显式清理" + ], + "modules": [ + "api", + "worker", + "sqlite", + "local-data-root", + "web-admin" + ], + "implementation_boundary": "实现候选查询、同管理员确认、短期 snapshot、BEGIN IMMEDIATE 全引用复核、整批拒绝/排队、Worker 物理删除、重计量和全阶段审计", + "parent_families": [ + "TDD-WP5-CLN-001" + ], + "case_ids": [ + "TDD-WP5-CLN-001-reference-race" + ], + "first_red": [ + { + "family_id": "TDD-WP5-CLN-001", + "assertion": "自动清理、有引用仍删除、整批部分排队或排队即减容量" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP5-CLN-001", + "assertion": "候选、同管理员确认、BEGIN IMMEDIATE 复核、整批拒绝/排队、物理删除、重测和全阶段审计" + } + ], + "task_green_gate": "有任一 release/active/trashed/待发布引用则整批拒绝;排队不减容量;无自动清理;物理删除和重测后才恢复", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, worker, sqlite, local-data-root, web-admin.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "WRK", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:worker", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-CLN-001-reference-race/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-5", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "admin-assets", + "role": "implementation", + "frames": { + "frame_id": "A28V3c", + "frame_name": "06C 素材与历史清理", + "primary_task": "TASK-WP5-06", + "mapped_state_scope": "上传/版本/候选;无上传/无候选;格式/编译/权限失败;full/unavailable;引用冲突、排队、物理删除和重计量" + }, + "applicable_states": { + "page_id": "admin-assets", + "actor_entry": "active super_admin", + "normal": "普通贴纸、资源版本/发布、历史清理", + "empty_loading": "无上传素材/无候选;列表/处理加载", + "failure_disabled": "格式/编译失败;权限、文件状态禁用", + "conflict_capacity_special": "stable ID/version 冲突;full/unavailable 阻断上传;引用冲突/排队/重计量" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-assets/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP5-07", + "work_package": "WP-5", + "title": "内部预览授权生命周期", + "dependencies": { + "source_text": "TASK-WP5-03、TASK-WP5-04、WP-1 会话", + "task_ids": [ + "TASK-WP5-03", + "TASK-WP5-04" + ], + "work_packages": [ + "WP-1" + ] + }, + "requirements": [ + "ADMIN-07" + ], + "acceptance_criteria": [ + "AC-42", + "AC-48" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.13" + ], + "requirement_ac_sources": [ + "ADMIN-07、17.13、AC-42、48" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "9.7 内部预览授权" + ], + "modules": [ + "api", + "sqlite", + "web", + "web-admin" + ], + "implementation_boundary": "实现批次、AssetPreviewGrant、active/revoked/expired、每次授权校验、随机 manifest item ID、撤销即时阻断和既有项目按版本渲染", + "parent_families": [ + "TDD-WP5-PREV-001" + ], + "case_ids": [ + "TDD-WP5-PREV-001-grant-lifecycle" + ], + "first_red": [ + { + "family_id": "TDD-WP5-PREV-001", + "assertion": "授权改变角色、公开 manifest 泄漏或撤销后仍可取资源" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP5-PREV-001", + "assertion": "每次校验 grant;no-store;撤销立即阻断新访问;已有项目按版本渲染" + } + ], + "task_green_gate": "授权不改变普通用户角色;不出现后台能力;撤销/到期阻断新取用但不破坏已保存项目", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: api, sqlite, web, web-admin.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-PREV-001-grant-lifecycle/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-5", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "preview-user-variant", + "role": "implementation", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP5-07", + "mapped_state_scope": "有效授权、无授权/空批次、加载、撤销/过期阻断;不出现后台权限;全局容量条" + }, + "applicable_states": { + "page_id": "preview-user-variant", + "actor_entry": "有有效/撤销/过期 AssetPreviewGrant 的普通账号", + "normal": "授权批次素材显示“预览”,其余页面同普通用户", + "empty_loading": "无授权/批次空;manifest 加载", + "failure_disabled": "撤销/过期立即阻断新读取", + "conflict_capacity_special": "不出现后台入口、调点、邀请码、模型或私有内容;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/preview-user-variant/\u003cstate\u003e/" + }, + { + "page_id": "admin-preview", + "role": "implementation", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP5-07", + "mapped_state_scope": "批次、模板状态、授权/撤销/到期、空/骨架、非法转换/发布失败;不出现 P0-B 全量开放" + }, + "applicable_states": { + "page_id": "admin-preview", + "actor_entry": "active super_admin", + "normal": "批次、模板状态、账号授权/撤销/到期", + "empty_loading": "无批次/授权;表格骨架", + "failure_disabled": "非法状态转换、过期、发布校验失败", + "conflict_capacity_special": "授权不改变角色;P0-B 全量开放不可在 P0-A 出现;继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-preview/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP6-01", + "work_package": "WP-6", + "title": "后台壳、权限与安全摘要", + "dependencies": { + "source_text": "WP-1、WP-2、WP-5", + "task_ids": [ + + ], + "work_packages": [ + "WP-1", + "WP-2", + "WP-5" + ] + }, + "requirements": [ + "ADMIN-01", + "ADMIN-02", + "ADMIN-04", + "ADMIN-08" + ], + "acceptance_criteria": [ + "AC-25", + "AC-49" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "ADMIN-01、02、04、08、AC-25、49" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "9.6 运营后台与两类审计" + ], + "modules": [ + "web-admin", + "api", + "sqlite" + ], + "implementation_boundary": "按 UIDesign 实现独立 /admin 路由域、侧栏/总览、用户、邀请码、点数、素材、预览、生成记录入口和 active super_admin 服务端授权", + "parent_families": [ + "TDD-WP6-ADM-001" + ], + "case_ids": [ + "TDD-WP6-ADM-001-role-and-summary" + ], + "first_red": [ + { + "family_id": "TDD-WP6-ADM-001", + "assertion": "普通/预览账号进入后台、后台显示私有正文或敏感配置" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP6-ADM-001", + "assertion": "active super_admin 服务端授权;默认仅安全摘要;角色和会话域严格分离" + } + ], + "task_green_gate": "普通/预览账号无法进入;管理员与普通 session 域分离;默认列表只含脱敏摘要;无敏感配置回显", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: web-admin, api, sqlite.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "API", + "E2E" + ], + "validation_commands": [ + "pnpm test:api", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-ADM-001-role-and-summary/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-6", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "admin-overview", + "role": "implementation", + "frames": { + "frame_id": "e4e2Kz", + "frame_name": "06A 后台总览", + "primary_task": "TASK-WP6-01", + "mapped_state_scope": "名额、任务、成本核对、服务/容量和审计摘要;骨架/空事件;聚合失败;三模型状态分列和待处理事项" + }, + "applicable_states": { + "page_id": "admin-overview", + "actor_entry": "active super_admin", + "normal": "名额、任务、模型、点数、服务、容量、审计摘要", + "empty_loading": "无近期事件;指标骨架", + "failure_disabled": "聚合失败保留旧值和时间;敏感动作按状态禁用", + "conflict_capacity_special": "default/runtime/recommended 分列;pending_manual_review 为成本核对;容量持续条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-overview/\u003cstate\u003e/" + }, + { + "page_id": "admin-users", + "role": "implementation", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP6-01", + "mapped_state_scope": "脱敏列表/详情、暂停恢复/调点、空/筛选空/骨架、原因缺失和状态禁用、负 available" + }, + "applicable_states": { + "page_id": "admin-users", + "actor_entry": "active super_admin", + "normal": "脱敏列表/详情、暂停恢复、调点", + "empty_loading": "无用户/筛选空;表格骨架", + "failure_disabled": "操作失败、原因缺失、状态前置禁用", + "conflict_capacity_special": "调点可使 available 为负但 reserved 不变;页面操作不消费容量但仍继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-users/\u003cstate\u003e/" + }, + { + "page_id": "admin-invites", + "role": "implementation", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP6-01", + "mapped_state_scope": "创建/停用/期限/次数/脱敏复制、空/骨架、名额满、过期/耗尽、请求失败和幂等/CAS 结果" + }, + "applicable_states": { + "page_id": "admin-invites", + "actor_entry": "active super_admin", + "normal": "创建、停用、期限/次数、脱敏复制", + "empty_loading": "无邀请码;表格骨架", + "failure_disabled": "名额满、停用/过期/耗尽不可当可用;请求失败", + "conflict_capacity_special": "CAS/幂等结果;页面操作不消费容量但仍继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-invites/\u003cstate\u003e/" + }, + { + "page_id": "admin-assets", + "role": "implementation", + "frames": { + "frame_id": "A28V3c", + "frame_name": "06C 素材与历史清理", + "primary_task": "TASK-WP5-06", + "mapped_state_scope": "上传/版本/候选;无上传/无候选;格式/编译/权限失败;full/unavailable;引用冲突、排队、物理删除和重计量" + }, + "applicable_states": { + "page_id": "admin-assets", + "actor_entry": "active super_admin", + "normal": "普通贴纸、资源版本/发布、历史清理", + "empty_loading": "无上传素材/无候选;列表/处理加载", + "failure_disabled": "格式/编译失败;权限、文件状态禁用", + "conflict_capacity_special": "stable ID/version 冲突;full/unavailable 阻断上传;引用冲突/排队/重计量" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-assets/\u003cstate\u003e/" + }, + { + "page_id": "admin-preview", + "role": "implementation", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP5-07", + "mapped_state_scope": "批次、模板状态、授权/撤销/到期、空/骨架、非法转换/发布失败;不出现 P0-B 全量开放" + }, + "applicable_states": { + "page_id": "admin-preview", + "actor_entry": "active super_admin", + "normal": "批次、模板状态、账号授权/撤销/到期", + "empty_loading": "无批次/授权;表格骨架", + "failure_disabled": "非法状态转换、过期、发布校验失败", + "conflict_capacity_special": "授权不改变角色;P0-B 全量开放不可在 P0-A 出现;继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-preview/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP6-02", + "work_package": "WP-6", + "title": "私有内容告知与逐次访问", + "dependencies": { + "source_text": "TASK-WP6-01、WP-1 UserProfile/审计", + "task_ids": [ + "TASK-WP6-01" + ], + "work_packages": [ + "WP-1" + ] + }, + "requirements": [ + "ADMIN-05" + ], + "acceptance_criteria": [ + "AC-25", + "AC-50" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.1", + "17.10" + ], + "requirement_ac_sources": [ + "ADMIN-05、17.1、AC-25", + "ADMIN-05、17.10、AC-25", + "ADMIN-05、17.10、AC-25、50", + "ADMIN-05、AC-25" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + "FX-ACTOR-ADMIN-A" + ], + "development_plan_sections": [ + "7.8 私有内容告知确认与逐次访问", + "9.6 运营后台与两类审计" + ], + "modules": [ + "web-admin", + "api", + "sqlite", + "local-data-root" + ], + "implementation_boundary": "实现当前 notice version bootstrap、身份+版本持久 ack、428 区域门禁、升版重阻断、“打开并记录审计”和先审计后返回内容", + "parent_families": [ + "TDD-WP6-PRIV-001", + "TDD-WP6-PRIV-002" + ], + "case_ids": [ + "TDD-WP6-PRIV-001-ack", + "TDD-WP6-PRIV-001-persistence", + "TDD-WP6-PRIV-001-version-bump", + "TDD-WP6-PRIV-002-deny-without-audit", + "TDD-WP6-PRIV-002-open-after-audit" + ], + "first_red": [ + { + "family_id": "TDD-WP6-PRIV-001", + "assertion": "告知确认只存在 Cookie/session/localStorage 或同版本重复" + }, + { + "family_id": "TDD-WP6-PRIV-002", + "assertion": "hover/预取打开内容、确认替代逐次审计、要求填写访问目的/原因或审计失败仍返回内容" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP6-PRIV-001", + "assertion": "UserProfile 按 admin+version 持久;跨标签、浏览器/API 重启、重登和 Chrome/Edge不重复;升版重阻断" + }, + { + "family_id": "TDD-WP6-PRIV-002", + "assertion": "每个入口原样显示“打开并记录审计”;每次点击先提交独立 PrivateContentAccessLog;UI 和 API 均不要求逐次填写访问目的、原因或二次确认;审计只记录 PRD/DevelopmentPlan 允许的对象、管理员、时间、内容类型等非正文信息;失败不返回;列表/HTML/缓存无正文" + } + ], + "task_green_gate": "跨标签、重启、重登和 Chrome/Edge 同版本不重复;hover/预取不打开;每次点击独立记录;审计失败不返回内容;不要求逐次填写原因", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: web-admin, api, sqlite, local-data-root.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-PRIV-001-ack/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-PRIV-001-persistence/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-PRIV-001-version-bump/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-PRIV-002-deny-without-audit/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-PRIV-002-open-after-audit/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-6", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "admin-generations", + "role": "implementation", + "frames": { + "frame_id": "OnsiT", + "frame_name": "06D 生成记录与私有告知", + "primary_task": "TASK-WP6-02", + "mapped_state_scope": "默认隐藏正文;身份+版本告知;逐次打开;空记录/审计写入加载;428、审计失败、升版重阻断" + }, + "applicable_states": { + "page_id": "admin-generations", + "actor_entry": "active super_admin", + "normal": "默认安全摘要、告知、逐次打开", + "empty_loading": "无记录;列表/审计写入加载", + "failure_disabled": "未确认 428、审计失败不打开、权限禁用", + "conflict_capacity_special": "告知升版重阻断;每次打开先独立审计;页面读取不消费容量但仍继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-generations/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP6-03", + "work_package": "WP-6", + "title": "免费服务硬停止与恢复", + "dependencies": { + "source_text": "TASK-WP6-01、WP-1/2 事务基础", + "task_ids": [ + "TASK-WP6-01" + ], + "work_packages": [ + "WP-1" + ] + }, + "requirements": [ + "ADMIN-05", + "ADMIN-08", + "ADMIN-09", + "NFR-08" + ], + "acceptance_criteria": [ + "AC-47", + "AC-52" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.15" + ], + "requirement_ac_sources": [ + "ADMIN-05、08、NFR-08、17.15、AC-47", + "ADMIN-08、09、NFR-08、AC-47、52" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "11.1 Resend", + "11.2 高德" + ], + "modules": [ + "web-admin", + "api", + "sqlite", + "resend-adapter", + "amap-adapter" + ], + "implementation_boundary": "实现 Resend 每日/月度、高德月度用量领取,paused_quota/provider、上限只可下调、健康检查和 super_admin 人工恢复", + "parent_families": [ + "TDD-WP6-SVC-001", + "TDD-WP6-SVC-002" + ], + "case_ids": [ + "TDD-WP6-SVC-001-hard-quota", + "TDD-WP6-SVC-002-limit-recovery" + ], + "first_red": [ + { + "family_id": "TDD-WP6-SVC-001", + "assertion": "Resend 发第 81 封/超月限、高德发第 1001 次或暂停后伪造成功" + }, + { + "family_id": "TDD-WP6-SVC-002", + "assertion": "后台提高上限、启用收费或自动恢复" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP6-SVC-001", + "assertion": "配额领取事务化;paused_quota/provider;已有会话继续;DYN004 停而手动地点继续" + }, + { + "family_id": "TDD-WP6-SVC-002", + "assertion": "只允许不扩大能力的下调并审计;提高/付费/自动扩容被拒绝;恢复需前置确认" + } + ], + "task_green_gate": "第 81/1001 次不调用;不得提高固定上限、启用收费、自动恢复/扩容;高德暂停只影响 DYN004 自动定位", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: web-admin, api, sqlite, resend-adapter, amap-adapter.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "EXT-MOCK", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:all", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-SVC-001-hard-quota/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-SVC-002-limit-recovery/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-6", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "admin-services-storage", + "role": "implementation", + "frames": { + "frame_id": "L3lde2", + "frame_name": "06E 服务与存储", + "primary_task": "TASK-WP6-05", + "mapped_state_scope": "Resend/高德/网关/Worker/LocalDataRoot;指标加载;paused/degraded/unavailable;恢复前置、清理排队和重计量" + }, + "applicable_states": { + "page_id": "admin-services-storage", + "actor_entry": "active super_admin", + "normal": "Resend/高德/网关/Worker/LocalDataRoot 状态与允许动作", + "empty_loading": "指标加载;无告警", + "failure_disabled": "paused/degraded/unavailable;不合法恢复/提高上限禁用", + "conflict_capacity_special": "full/unavailable、清理排队和物理重计量;不显示绝对路径" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-services-storage/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP6-04", + "work_package": "WP-6", + "title": "敏感操作审计与保留", + "dependencies": { + "source_text": "TASK-WP6-01 至 TASK-WP6-03、WP-5 清理", + "task_ids": [ + "TASK-WP6-01", + "TASK-WP6-03" + ], + "work_packages": [ + "WP-5" + ] + }, + "requirements": [ + "ADMIN-09" + ], + "acceptance_criteria": [ + "AC-50" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + "17.16" + ], + "requirement_ac_sources": [ + "ADMIN-09、17.16、AC-50" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "9.6 运营后台与两类审计", + "12.3 审计与敏感信息" + ], + "modules": [ + "web-admin", + "api", + "worker", + "sqlite" + ], + "implementation_boundary": "把用户、点数、邀请、模型、素材、预览、服务、余额恢复和贴纸清理各阶段纳入同事务 AdminOperationLog;实现 180 天 Worker 清理", + "parent_families": [ + "TDD-WP6-AUD-001" + ], + "case_ids": [ + "TDD-WP6-AUD-001-sensitive-operations" + ], + "first_red": [ + { + "family_id": "TDD-WP6-AUD-001", + "assertion": "敏感操作无日志、两类日志混用、含正文或 180 天内可删" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP6-AUD-001", + "assertion": "全部规定操作同事务审计;贴纸清理全阶段;两类表分离;到期 Worker 清理" + } + ], + "task_green_gate": "两类审计严格分离、180 天内不可改删、贴纸清理请求/复核/拒绝或排队/物理结果齐全且不含正文", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: web-admin, api, worker, sqlite.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "SQLite constraints, transactions, idempotency and side-effect assertions", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "DB", + "API", + "WRK", + "E2E" + ], + "validation_commands": [ + "pnpm test:integration", + "pnpm test:api", + "pnpm test:worker", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-AUD-001-sensitive-operations/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-6", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "admin-audit", + "role": "implementation", + "frames": { + "frame_id": "DlCpN", + "frame_name": "06F 私有内容访问审计", + "primary_task": "TASK-WP6-04", + "mapped_state_scope": "两类独立审计、游标和 180 天;空/加载;查询失败;不可编辑删除;无正文、图片、密钥和路径" + }, + "applicable_states": { + "page_id": "admin-audit", + "actor_entry": "active super_admin", + "normal": "后台操作与私有访问两类独立页/标签", + "empty_loading": "无记录;游标加载", + "failure_disabled": "查询失败保留旧结果;无修改/人工删除动作", + "conflict_capacity_special": "180 天保留;正文、图片、密钥和路径不出现;页面读取不消费容量但仍继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-audit/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP6-05", + "work_package": "WP-6", + "title": "模型/服务/存储状态与诊断", + "dependencies": { + "source_text": "TASK-WP6-01、WP-0 诊断、WP-3 runtime", + "task_ids": [ + "TASK-WP6-01" + ], + "work_packages": [ + "WP-0", + "WP-3" + ] + }, + "requirements": [ + "ADMIN-03", + "ADMIN-08", + "GEN-15", + "NFR-09", + "PRIV-01", + "PRIV-02" + ], + "acceptance_criteria": [ + "AC-30", + "AC-41", + "AC-51", + "AC-55" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "GEN-15、ADMIN-03、08、AC-30、51", + "PRIV-01、02、ADMIN-08、NFR-09、AC-41、55" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "7.6 ModelConfig 原子配置与运行时推荐", + "9.6 运营后台与两类审计", + "11 外部服务硬停止与恢复" + ], + "modules": [ + "web-admin", + "api", + "sqlite", + "supervisor" + ], + "implementation_boundary": "实现总览、模型、服务与存储页面的 configured default/runtime/recommended 三列、Worker/网关/Resend/高德/storage 状态、REST refetch 和复制诊断", + "parent_families": [ + "TDD-WP6-DIAG-001", + "TDD-WP6-STATE-001" + ], + "case_ids": [ + "TDD-WP6-DIAG-001-redacted-diagnostics", + "TDD-WP6-STATE-001-three-model-states" + ], + "first_red": [ + { + "family_id": "TDD-WP6-DIAG-001", + "assertion": "总览/服务/存储/诊断暴露路径、密钥或正文" + }, + { + "family_id": "TDD-WP6-STATE-001", + "assertion": "后台把 configured default、runtime availability 和 recommended 合并" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP6-DIAG-001", + "assertion": "只显示固定非敏感字段、计量和状态;复制诊断通过同一脱敏扫描" + }, + { + "family_id": "TDD-WP6-STATE-001", + "assertion": "三列独立;临时异常不改配置;恢复只重新派生推荐" + } + ], + "task_green_gate": "推荐可 null;runtime 变化不回写配置;只显示稳定非敏感字段和逻辑位置;无密钥、邮箱、路径、正文或供应商原文", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: web-admin, api, sqlite, supervisor.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "OpenAPI, error envelope and HTTP semantics", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds", + "credential, path, log, package and diagnostic redaction boundaries" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "API", + "E2E", + "PKG-SEC" + ], + "validation_commands": [ + "pnpm test:api", + "pnpm test:e2e", + "pnpm test:security", + "pnpm test:package", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-DIAG-001-redacted-diagnostics/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-STATE-001-three-model-states/" + ], + "automation": [ + "automated" + ], + "release_gate": [ + "work_package:WP-6", + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "admin-overview", + "role": "implementation", + "frames": { + "frame_id": "e4e2Kz", + "frame_name": "06A 后台总览", + "primary_task": "TASK-WP6-01", + "mapped_state_scope": "名额、任务、成本核对、服务/容量和审计摘要;骨架/空事件;聚合失败;三模型状态分列和待处理事项" + }, + "applicable_states": { + "page_id": "admin-overview", + "actor_entry": "active super_admin", + "normal": "名额、任务、模型、点数、服务、容量、审计摘要", + "empty_loading": "无近期事件;指标骨架", + "failure_disabled": "聚合失败保留旧值和时间;敏感动作按状态禁用", + "conflict_capacity_special": "default/runtime/recommended 分列;pending_manual_review 为成本核对;容量持续条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-overview/\u003cstate\u003e/" + }, + { + "page_id": "admin-models", + "role": "implementation", + "frames": { + "frame_id": "YVfVG", + "frame_name": "06B 模型配置", + "primary_task": "TASK-WP6-05", + "mapped_state_scope": "完整三模型集合、default/runtime/recommended;加载;空推荐;替代/priority 禁用;CAS 冲突和整套回滚" + }, + "applicable_states": { + "page_id": "admin-models", + "actor_entry": "active super_admin", + "normal": "完整三模型集合、default/runtime/recommended 三层", + "empty_loading": "初始加载骨架;无 recommended 是合法状态", + "failure_disabled": "合法替代/priority 前置禁用;契约未验证/运行时不可用", + "conflict_capacity_special": "config_set CAS 冲突、完整集合原子回滚;仍继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-models/\u003cstate\u003e/" + }, + { + "page_id": "admin-services-storage", + "role": "implementation", + "frames": { + "frame_id": "L3lde2", + "frame_name": "06E 服务与存储", + "primary_task": "TASK-WP6-05", + "mapped_state_scope": "Resend/高德/网关/Worker/LocalDataRoot;指标加载;paused/degraded/unavailable;恢复前置、清理排队和重计量" + }, + "applicable_states": { + "page_id": "admin-services-storage", + "actor_entry": "active super_admin", + "normal": "Resend/高德/网关/Worker/LocalDataRoot 状态与允许动作", + "empty_loading": "指标加载;无告警", + "failure_disabled": "paused/degraded/unavailable;不合法恢复/提高上限禁用", + "conflict_capacity_special": "full/unavailable、清理排队和物理重计量;不显示绝对路径" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-services-storage/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP7-01", + "work_package": "WP-7", + "title": "候选制品与候选浏览器记录", + "dependencies": { + "source_text": "WP-0 至 WP-6 Green", + "task_ids": [ + + ], + "work_packages": [ + "WP-0", + "WP-6" + ] + }, + "requirements": [ + "NFR-01", + "NFR-09" + ], + "acceptance_criteria": [ + "AC-24", + "AC-41" + ], + "acceptance_criteria_role": "supporting", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "NFR-01、NFR-09、AC-24、AC-41;候选记录支撑,不新增测试 case" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "3.1 便携包布局", + "3.6 浏览器支持硬门禁", + "15 WP-7" + ], + "modules": [ + "release-ci", + "supervisor", + "web", + "api", + "worker" + ], + "implementation_boundary": "从候选便携包和当前安装的真实 Chrome/Edge 可执行文件生成 artifacts/tdd/\u003crun_id\u003e/release-candidate.json,记录 Windows build、品牌、major、full version、记录时间、候选制品哈希和固定端口;生成候选 ZIP 与候选 START-HERE.txt,但不写最终 RELEASE.json", + "parent_families": [ + + ], + "case_ids": [ + + ], + "first_red": [ + + ], + "minimal_green": [ + + ], + "task_green_gate": "候选记录字段完整、脱敏且与候选制品一致;只作为后续精确环境输入,不能标记发布冻结或替代最终 RELEASE 证据", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: release-ci, supervisor, web, api, worker.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "credential, path, log, package and diagnostic redaction boundaries", + "candidate record must remain distinct from final RELEASE.json" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "PKG-SEC", + "MANUAL" + ], + "validation_commands": [ + "pnpm test:security", + "pnpm test:package", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/release-candidate.json", + "artifacts/tdd/\u003crun_id\u003e/candidate-package/" + ], + "automation": [ + "automated", + "manual_review" + ], + "release_gate": [ + "release:P0-A" + ], + "ui_scope": [ + + ], + "ui_scope_reason": "No direct UI coverage-unit ownership; validate only the listed module and case boundaries." + }, + { + "task_id": "TASK-WP7-02", + "work_package": "WP-7", + "title": "三模型真实契约验收", + "dependencies": { + "source_text": "TASK-WP7-01、WP-3 Green、受控凭据", + "task_ids": [ + "TASK-WP7-01" + ], + "work_packages": [ + "WP-3" + ] + }, + "requirements": [ + "GEN-13" + ], + "acceptance_criteria": [ + "AC-40", + "AC-41" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "GEN-13、AC-40、41" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "8.3 契约验证证据", + "15 WP-7" + ], + "modules": [ + "release-validation", + "ai-adapters", + "windows-credential-manager" + ], + "implementation_boundary": "对三个模型分别运行纯文字、参考图、四比例、同步/异步、响应、九类错误、结算和契约变化重验,保存脱敏证据", + "parent_families": [ + "TDD-WP7-EXT-001" + ], + "case_ids": [ + "TDD-WP7-EXT-001-three-real-models" + ], + "first_red": [ + { + "family_id": "TDD-WP7-EXT-001", + "assertion": "任一模型缺独立真实契约证据" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP7-EXT-001", + "assertion": "三模型各自完成纯文字、参考图、四比例、同步/异步、响应、九类错误和结算证据" + } + ], + "task_green_gate": "每个模型独立证据齐全且匹配最后配置;任一失败保持 externally_blocked;不共享 verified 标记", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: release-validation, ai-adapters, windows-credential-manager.", + "must_preserve": [ + "PRD product semantics and P0-A boundary" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "EXT-REAL", + "MANUAL" + ], + "validation_commands": [ + "pnpm validate:external -- --service \u003cai-gateway-service-id\u003e --model gemini-3.1-flash-image-preview", + "pnpm validate:external -- --service \u003cai-gateway-service-id\u003e --model gemini-3-pro-image-preview", + "pnpm validate:external -- --service \u003cai-gateway-service-id\u003e --model gpt-image-2", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP7-EXT-001-three-real-models/" + ], + "automation": [ + "controlled_real", + "manual_review" + ], + "release_gate": [ + "release:P0-A" + ], + "ui_scope": [ + + ], + "ui_scope_reason": "No direct UI coverage-unit ownership; validate only the listed module and case boundaries." + }, + { + "task_id": "TASK-WP7-03", + "work_package": "WP-7", + "title": "Resend 真实发布门槛", + "dependencies": { + "source_text": "TASK-WP7-01、WP-1/WP-6 Green、受控域名", + "task_ids": [ + "TASK-WP7-01" + ], + "work_packages": [ + "WP-1", + "WP-6" + ] + }, + "requirements": [ + "AUTH-01", + "AUTH-02", + "AUTH-07" + ], + "acceptance_criteria": [ + "AC-01", + "AC-33", + "AC-41", + "AC-47", + "AC-49" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "AUTH-01、02、07、AC-01、33、41、47、49" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "1.4 外部产品发布阻塞与可并行范围", + "11.1 Resend", + "15 WP-7" + ], + "modules": [ + "release-validation", + "resend-adapter", + "windows-credential-manager" + ], + "implementation_boundary": "核验 SPF/DKIM、免费规则;QQ/163/企业邮箱各 20 封至少 19 封在 2 分钟内送达;用正式链完成普通/管理员认证", + "parent_families": [ + "TDD-WP7-EXT-002" + ], + "case_ids": [ + "TDD-WP7-EXT-002-real-resend" + ], + "first_red": [ + { + "family_id": "TDD-WP7-EXT-002", + "assertion": "Resend 域名/免费规则/送达门槛未证实" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP7-EXT-002", + "assertion": "依据 PRD 第 23.2 节、AC-41、AC-47 与 DevelopmentPlan 第 1.4、11.1 节:SPF/DKIM;QQ、163、企业邮箱各 20 封至少 19 封在 2 分钟内送达;正式账号真实认证" + } + ], + "task_green_gate": "人工统计脱敏;开发预置账号和 mock 不能作为证据;未达门槛不启动实际 P0-A 验收", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: release-validation, resend-adapter, windows-credential-manager.", + "must_preserve": [ + "PRD product semantics and P0-A boundary" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "EXT-REAL", + "MANUAL" + ], + "validation_commands": [ + "pnpm validate:external -- --service \u003cresend-service-id\u003e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP7-EXT-002-real-resend/" + ], + "automation": [ + "controlled_real", + "manual_review" + ], + "release_gate": [ + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "user-auth", + "role": "final_evidence", + "frames": [ + { + "frame_id": "Z0pf8", + "frame_name": "01A 普通用户登录", + "primary_task": "TASK-WP1-02", + "mapped_state_scope": "登录正常;字段初始空;发码/登录加载;验证码、Resend 和身份状态失败;管理员入口、固定本机提示、艺术带与焦点" + }, + { + "frame_id": "DVPM8", + "frame_name": "01B 注册展开态", + "primary_task": "TASK-WP1-03", + "mapped_state_scope": "邀请与邮箱已验证摘要;资料和告知未完成/完成;注册中;名额、邀请、验证码和提交失败;主动作禁用" + } + ], + "applicable_states": { + "page_id": "user-auth", + "actor_entry": "未登录普通入口", + "normal": "登录、分阶段注册、管理员文字入口、固定本机提示", + "empty_loading": "字段初始空;发码/验证/注册加载", + "failure_disabled": "Resend、验证码、邀请、名额、告知未完成;按钮禁用", + "conflict_capacity_special": "N/A:认证不消费存储容量" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/user-auth/\u003cstate\u003e/" + }, + { + "page_id": "admin-auth", + "role": "final_evidence", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP1-04", + "mapped_state_scope": "白名单邮箱验证码、字段空/加载、非白名单、停用/移除、Resend 失败;独立 audience 与返回普通登录" + }, + "applicable_states": { + "page_id": "admin-auth", + "actor_entry": "未登录后台入口", + "normal": "白名单邮箱验证码、独立 audience、返回普通登录", + "empty_loading": "字段空;发码/登录中", + "failure_disabled": "非白名单发码前阻断、停用/移除白名单、Resend 错误", + "conflict_capacity_special": "N/A:不显示普通创作或容量业务" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-auth/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP7-04", + "work_package": "WP-7", + "title": "高德真实发布门槛", + "dependencies": { + "source_text": "TASK-WP7-01、WP-4/WP-6 Green、受控 Key", + "task_ids": [ + "TASK-WP7-01" + ], + "work_packages": [ + "WP-4", + "WP-6" + ] + }, + "requirements": [ + "DYN-04", + "PRIV-03" + ], + "acceptance_criteria": [ + "AC-17", + "AC-41", + "AC-47" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "DYN-04、PRIV-03、AC-17、41、47" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "1.4 外部产品发布阻塞与可并行范围", + "11.2 高德", + "15 WP-7" + ], + "modules": [ + "release-validation", + "amap-adapter", + "windows-credential-manager" + ], + "implementation_boundary": "核验定位/逆地理、QPS、白名单、安全限制、每月 1,000 次硬停止和 DYN004 确认流程", + "parent_families": [ + "TDD-WP7-EXT-003" + ], + "case_ids": [ + "TDD-WP7-EXT-003-real-amap" + ], + "first_red": [ + { + "family_id": "TDD-WP7-EXT-003", + "assertion": "高德接口、绑定、安全限制或 1,000 次硬上限未证实" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP7-EXT-003", + "assertion": "定位/逆地理、QPS、白名单、安全和应用硬停止实测通过" + } + ], + "task_green_gate": "真实测试坐标不关联真实项目;不发第 1001 次;不启用付费或自动扩容;失败保持 externally_blocked", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: release-validation, amap-adapter, windows-credential-manager.", + "must_preserve": [ + "PRD product semantics and P0-A boundary" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "EXT-REAL", + "MANUAL" + ], + "validation_commands": [ + "pnpm validate:external -- --service \u003camap-service-id\u003e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP7-EXT-003-real-amap/" + ], + "automation": [ + "controlled_real", + "manual_review" + ], + "release_gate": [ + "release:P0-A" + ], + "ui_scope": [ + + ], + "ui_scope_reason": "No direct UI coverage-unit ownership; validate only the listed module and case boundaries." + }, + { + "task_id": "TASK-WP7-05", + "work_package": "WP-7", + "title": "候选精确环境 UI、视觉、性能与可访问性验收", + "dependencies": { + "source_text": "TASK-WP7-01 至 TASK-WP7-04", + "task_ids": [ + "TASK-WP7-01", + "TASK-WP7-04" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "NFR-02", + "NFR-06" + ], + "acceptance_criteria": [ + "AC-24", + "AC-25", + "AC-32", + "AC-41", + "AC-55", + "AC-56" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "UIDesign 全页、NFR-02、06、AC-24、25、32、41、55、56" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "3.6 浏览器支持硬门禁", + "13 性能、可访问性与视觉一致性", + "15 WP-7" + ], + "modules": [ + "release-validation", + "web", + "web-editor", + "supervisor" + ], + "implementation_boundary": "严格使用候选记录中的两个真实 full version,在 1920×1080、DPR 1、100%/200% 下重跑 AC-24、AC-32、全部 E2E、视觉、性能、下载、文件选择和逐个非 N/A 页面状态;按 frame 对照低保真", + "parent_families": [ + "TDD-WP7-UI-001" + ], + "case_ids": [ + "TDD-WP7-UI-001-page-state-evidence" + ], + "first_red": [ + { + "family_id": "TDD-WP7-UI-001", + "assertion": "UIDesign 页面/入口或适用状态无实现落点,或 1080p/200% 出现遮挡" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP7-UI-001", + "assertion": "第 11.1 节页面 × 状态矩阵全部适用单元格有证据;Pencil 仅作布局参考,Canvas Index 不计产品实现;固定文案、焦点、状态、控件和无重叠检查通过" + } + ], + "task_green_gate": "22 个 coverage unit 全部有证据;候选环境与记录任何漂移均使本任务重跑;无独立 Pencil frame 的页面不漏测;Canvas Index 不计产品页", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: release-validation, web, web-editor, supervisor.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "E2E", + "VIS-PERF", + "MANUAL" + ], + "validation_commands": [ + "pnpm test:e2e", + "pnpm test:visual", + "pnpm test:performance", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP7-UI-001-page-state-evidence/" + ], + "automation": [ + "automated", + "manual_review" + ], + "release_gate": [ + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "support-gate", + "role": "final_evidence", + "frames": { + "frame_id": "u1adni", + "frame_name": "07A 浏览器硬阻断", + "primary_task": "TASK-WP0-03", + "mapped_state_scope": "四种阻断 reason、支持品牌/major、最小诊断;bundle/API 无绕过;无业务空态、身份或容量读取" + }, + "applicable_states": { + "page_id": "support-gate", + "actor_entry": "所有主体,产品门禁前", + "normal": "四种阻断 reason、支持品牌/major、无继续入口", + "empty_loading": "N/A:引导无业务空态;身份不可判定属于阻断", + "failure_disabled": "bundle/API 均无法绕过;诊断仅最小字段", + "conflict_capacity_special": "N/A:不读取业务状态或容量" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/support-gate/\u003cstate\u003e/" + }, + { + "page_id": "user-auth", + "role": "final_evidence", + "frames": [ + { + "frame_id": "Z0pf8", + "frame_name": "01A 普通用户登录", + "primary_task": "TASK-WP1-02", + "mapped_state_scope": "登录正常;字段初始空;发码/登录加载;验证码、Resend 和身份状态失败;管理员入口、固定本机提示、艺术带与焦点" + }, + { + "frame_id": "DVPM8", + "frame_name": "01B 注册展开态", + "primary_task": "TASK-WP1-03", + "mapped_state_scope": "邀请与邮箱已验证摘要;资料和告知未完成/完成;注册中;名额、邀请、验证码和提交失败;主动作禁用" + } + ], + "applicable_states": { + "page_id": "user-auth", + "actor_entry": "未登录普通入口", + "normal": "登录、分阶段注册、管理员文字入口、固定本机提示", + "empty_loading": "字段初始空;发码/验证/注册加载", + "failure_disabled": "Resend、验证码、邀请、名额、告知未完成;按钮禁用", + "conflict_capacity_special": "N/A:认证不消费存储容量" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/user-auth/\u003cstate\u003e/" + }, + { + "page_id": "workspace", + "role": "final_evidence", + "frames": [ + { + "frame_id": "WbDYT", + "frame_name": "02A 空工作台", + "primary_task": "TASK-WP2-01", + "mapped_state_scope": "无项目艺术带;生成表单、推荐模型、四比例与空任务;模型/项目加载;模型、点数、参考图和容量禁用" + }, + { + "frame_id": "d99Lo", + "frame_name": "02B 生成中工作台", + "primary_task": "TASK-WP2-05", + "mapped_state_scope": "queued/running 无假百分比;冻结点数;critical 容量条;第二次提交禁用;失败/rejected 动作和配置变化重确认" + } + ], + "applicable_states": { + "page_id": "workspace", + "actor_entry": "active 普通/内部预览账号", + "normal": "生成表单、模型/点数/比例、最近项目", + "empty_loading": "无项目艺术带;模型/项目加载", + "failure_disabled": "服务/参考图/生成错误;模型、点数、单任务、历史/项目上限禁用", + "conflict_capacity_special": "model config 变化重确认;warning/critical 提示;full/unavailable 阻断新增" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/workspace/\u003cstate\u003e/" + }, + { + "page_id": "current-task", + "role": "final_evidence", + "frames": { + "frame_id": "d99Lo", + "frame_name": "02B 生成中工作台", + "primary_task": "TASK-WP2-05", + "mapped_state_scope": "queued/running 无假百分比;冻结点数;critical 容量条;第二次提交禁用;失败/rejected 动作和配置变化重确认" + }, + "applicable_states": { + "page_id": "current-task", + "actor_entry": "active 普通/内部预览账号", + "normal": "真实状态、结果入口", + "empty_loading": "无活动任务;queued/running 无假百分比", + "failure_disabled": "failed/rejected 与九类固定动作;第二任务禁用", + "conflict_capacity_special": "storage 错误按任务真相;pending_manual_review 不作为用户任务状态;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/current-task/\u003cstate\u003e/" + }, + { + "page_id": "projects", + "role": "final_evidence", + "frames": { + "frame_id": "zXyG9", + "frame_name": "03A 项目列表", + "primary_task": "TASK-WP2-01", + "mapped_state_scope": "active/trashed、筛选、多选 failed_empty;空/骨架;20 active、恢复/批量禁用;多标签和容量提示" + }, + "applicable_states": { + "page_id": "projects", + "actor_entry": "active 普通/内部预览账号", + "normal": "active/trashed 列表、筛选、多选 failed_empty", + "empty_loading": "无项目/筛选空;稳定卡片骨架", + "failure_disabled": "列表失败保留旧数据;20 active、恢复/批量条件禁用", + "conflict_capacity_special": "多标签版本提示;删除排队不乐观减容量;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/projects/\u003cstate\u003e/" + }, + { + "page_id": "project-detail", + "role": "final_evidence", + "frames": { + "frame_id": "v2Qbu", + "frame_name": "03B 项目详情", + "primary_task": "TASK-WP2-01", + "mapped_state_scope": "历史、固定比例、继续生成、编辑、原图/latest;无成功图/无成品;10 图上限、资源失败和容量状态" + }, + "applicable_states": { + "page_id": "project-detail", + "actor_entry": "项目所有者", + "normal": "历史、固定比例、继续生成、编辑、原图/latest 下载", + "empty_loading": "无成功图草稿;历史/成品加载", + "failure_disabled": "10 图上限、当前底图不可删、无 latest、资源读取失败", + "conflict_capacity_special": "比例不可改;清理/容量状态不伪造资源可用性;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/project-detail/\u003cstate\u003e/" + }, + { + "page_id": "editor", + "role": "final_evidence", + "frames": { + "frame_id": "bHQnJ", + "frame_name": "04A 三栏编辑器", + "primary_task": "TASK-WP4-01", + "mapped_state_scope": "三栏、保存状态、画布、对象属性与固定底栏;画布/素材加载;保存/素材失败;第 51 元素;conflicted/full/unavailable" + }, + "applicable_states": { + "page_id": "editor", + "actor_entry": "有成功底图的项目所有者", + "normal": "三栏、保存状态、画布、属性与素材", + "empty_loading": "画布/素材加载;无成功图不能正常进入", + "failure_disabled": "保存/素材失败;第 51 元素、不可用模板禁用", + "conflict_capacity_special": "dirty/saving/saved/failed;conflicted 只读;full 可存 JSON,unavailable 保存失败" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/" + }, + { + "page_id": "export", + "role": "final_evidence", + "frames": { + "frame_id": "i9upg7", + "frame_name": "04B 导出弹层", + "primary_task": "TASK-WP4-05", + "mapped_state_scope": "JPG/PNG、质量、尺寸;合成/持久化加载;未提交确认;四类失败结果;冲突一次下载和 full/unavailable" + }, + "applicable_states": { + "page_id": "export", + "actor_entry": "编辑器内项目所有者", + "normal": "JPG/PNG、质量、尺寸、下载/latest 分结果", + "empty_loading": "合成/持久化加载;无业务空态", + "failure_disabled": "合成、下载、项目保存、latest 保存分别失败;无画布/冲突次数用尽禁用", + "conflict_capacity_special": "未提交确认;conflicted 仅一次本地导出;full/unavailable 后端失败不撤回下载" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/export/\u003cstate\u003e/" + }, + { + "page_id": "credits", + "role": "final_evidence", + "frames": { + "frame_id": "YlKzE", + "frame_name": "05A 点数明细", + "primary_task": "TASK-WP2-04", + "mapped_state_scope": "available/reserved、流水和分页;无流水/加载;失败保留安全摘要;负 available 如实显示且无购买入口" + }, + "applicable_states": { + "page_id": "credits", + "actor_entry": "active 普通/内部预览账号", + "normal": "available/reserved、流水、关联与时间", + "empty_loading": "无流水;分页加载", + "failure_disabled": "加载失败保留安全余额摘要", + "conflict_capacity_special": "负 available 如实显示;无购买/充值入口;页面操作不消费容量但仍继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/credits/\u003cstate\u003e/" + }, + { + "page_id": "settings", + "role": "final_evidence", + "frames": { + "frame_id": "Ws5E0", + "frame_name": "05B 设置与本机数据", + "primary_task": "TASK-WP1-05", + "mapped_state_scope": "资料、本机数据、容量摘要和固定文案;加载/保存失败;full/unavailable;注销确认、处理中和返回登录" + }, + "applicable_states": { + "page_id": "settings", + "actor_entry": "active 普通/内部预览账号", + "normal": "资料、本机数据、容量摘要、固定文案、注销", + "empty_loading": "资料/状态加载", + "failure_disabled": "保存失败;注销确认/处理中禁用重复提交", + "conflict_capacity_special": "full/unavailable 状态与允许动作;注销后返回登录" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/settings/\u003cstate\u003e/" + }, + { + "page_id": "preview-user-variant", + "role": "final_evidence", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP5-07", + "mapped_state_scope": "有效授权、无授权/空批次、加载、撤销/过期阻断;不出现后台权限;全局容量条" + }, + "applicable_states": { + "page_id": "preview-user-variant", + "actor_entry": "有有效/撤销/过期 AssetPreviewGrant 的普通账号", + "normal": "授权批次素材显示“预览”,其余页面同普通用户", + "empty_loading": "无授权/批次空;manifest 加载", + "failure_disabled": "撤销/过期立即阻断新读取", + "conflict_capacity_special": "不出现后台入口、调点、邀请码、模型或私有内容;继承普通端全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/preview-user-variant/\u003cstate\u003e/" + }, + { + "page_id": "admin-auth", + "role": "final_evidence", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP1-04", + "mapped_state_scope": "白名单邮箱验证码、字段空/加载、非白名单、停用/移除、Resend 失败;独立 audience 与返回普通登录" + }, + "applicable_states": { + "page_id": "admin-auth", + "actor_entry": "未登录后台入口", + "normal": "白名单邮箱验证码、独立 audience、返回普通登录", + "empty_loading": "字段空;发码/登录中", + "failure_disabled": "非白名单发码前阻断、停用/移除白名单、Resend 错误", + "conflict_capacity_special": "N/A:不显示普通创作或容量业务" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-auth/\u003cstate\u003e/" + }, + { + "page_id": "admin-overview", + "role": "final_evidence", + "frames": { + "frame_id": "e4e2Kz", + "frame_name": "06A 后台总览", + "primary_task": "TASK-WP6-01", + "mapped_state_scope": "名额、任务、成本核对、服务/容量和审计摘要;骨架/空事件;聚合失败;三模型状态分列和待处理事项" + }, + "applicable_states": { + "page_id": "admin-overview", + "actor_entry": "active super_admin", + "normal": "名额、任务、模型、点数、服务、容量、审计摘要", + "empty_loading": "无近期事件;指标骨架", + "failure_disabled": "聚合失败保留旧值和时间;敏感动作按状态禁用", + "conflict_capacity_special": "default/runtime/recommended 分列;pending_manual_review 为成本核对;容量持续条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-overview/\u003cstate\u003e/" + }, + { + "page_id": "admin-users", + "role": "final_evidence", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP6-01", + "mapped_state_scope": "脱敏列表/详情、暂停恢复/调点、空/筛选空/骨架、原因缺失和状态禁用、负 available" + }, + "applicable_states": { + "page_id": "admin-users", + "actor_entry": "active super_admin", + "normal": "脱敏列表/详情、暂停恢复、调点", + "empty_loading": "无用户/筛选空;表格骨架", + "failure_disabled": "操作失败、原因缺失、状态前置禁用", + "conflict_capacity_special": "调点可使 available 为负但 reserved 不变;页面操作不消费容量但仍继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-users/\u003cstate\u003e/" + }, + { + "page_id": "admin-invites", + "role": "final_evidence", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP6-01", + "mapped_state_scope": "创建/停用/期限/次数/脱敏复制、空/骨架、名额满、过期/耗尽、请求失败和幂等/CAS 结果" + }, + "applicable_states": { + "page_id": "admin-invites", + "actor_entry": "active super_admin", + "normal": "创建、停用、期限/次数、脱敏复制", + "empty_loading": "无邀请码;表格骨架", + "failure_disabled": "名额满、停用/过期/耗尽不可当可用;请求失败", + "conflict_capacity_special": "CAS/幂等结果;页面操作不消费容量但仍继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-invites/\u003cstate\u003e/" + }, + { + "page_id": "admin-models", + "role": "final_evidence", + "frames": { + "frame_id": "YVfVG", + "frame_name": "06B 模型配置", + "primary_task": "TASK-WP6-05", + "mapped_state_scope": "完整三模型集合、default/runtime/recommended;加载;空推荐;替代/priority 禁用;CAS 冲突和整套回滚" + }, + "applicable_states": { + "page_id": "admin-models", + "actor_entry": "active super_admin", + "normal": "完整三模型集合、default/runtime/recommended 三层", + "empty_loading": "初始加载骨架;无 recommended 是合法状态", + "failure_disabled": "合法替代/priority 前置禁用;契约未验证/运行时不可用", + "conflict_capacity_special": "config_set CAS 冲突、完整集合原子回滚;仍继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-models/\u003cstate\u003e/" + }, + { + "page_id": "admin-assets", + "role": "final_evidence", + "frames": { + "frame_id": "A28V3c", + "frame_name": "06C 素材与历史清理", + "primary_task": "TASK-WP5-06", + "mapped_state_scope": "上传/版本/候选;无上传/无候选;格式/编译/权限失败;full/unavailable;引用冲突、排队、物理删除和重计量" + }, + "applicable_states": { + "page_id": "admin-assets", + "actor_entry": "active super_admin", + "normal": "普通贴纸、资源版本/发布、历史清理", + "empty_loading": "无上传素材/无候选;列表/处理加载", + "failure_disabled": "格式/编译失败;权限、文件状态禁用", + "conflict_capacity_special": "stable ID/version 冲突;full/unavailable 阻断上传;引用冲突/排队/重计量" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-assets/\u003cstate\u003e/" + }, + { + "page_id": "admin-preview", + "role": "final_evidence", + "frames": { + "frame_id": "UIDesign-only", + "frame_name": "无独立画板", + "primary_task": "TASK-WP5-07", + "mapped_state_scope": "批次、模板状态、授权/撤销/到期、空/骨架、非法转换/发布失败;不出现 P0-B 全量开放" + }, + "applicable_states": { + "page_id": "admin-preview", + "actor_entry": "active super_admin", + "normal": "批次、模板状态、账号授权/撤销/到期", + "empty_loading": "无批次/授权;表格骨架", + "failure_disabled": "非法状态转换、过期、发布校验失败", + "conflict_capacity_special": "授权不改变角色;P0-B 全量开放不可在 P0-A 出现;继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-preview/\u003cstate\u003e/" + }, + { + "page_id": "admin-generations", + "role": "final_evidence", + "frames": { + "frame_id": "OnsiT", + "frame_name": "06D 生成记录与私有告知", + "primary_task": "TASK-WP6-02", + "mapped_state_scope": "默认隐藏正文;身份+版本告知;逐次打开;空记录/审计写入加载;428、审计失败、升版重阻断" + }, + "applicable_states": { + "page_id": "admin-generations", + "actor_entry": "active super_admin", + "normal": "默认安全摘要、告知、逐次打开", + "empty_loading": "无记录;列表/审计写入加载", + "failure_disabled": "未确认 428、审计失败不打开、权限禁用", + "conflict_capacity_special": "告知升版重阻断;每次打开先独立审计;页面读取不消费容量但仍继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-generations/\u003cstate\u003e/" + }, + { + "page_id": "admin-services-storage", + "role": "final_evidence", + "frames": { + "frame_id": "L3lde2", + "frame_name": "06E 服务与存储", + "primary_task": "TASK-WP6-05", + "mapped_state_scope": "Resend/高德/网关/Worker/LocalDataRoot;指标加载;paused/degraded/unavailable;恢复前置、清理排队和重计量" + }, + "applicable_states": { + "page_id": "admin-services-storage", + "actor_entry": "active super_admin", + "normal": "Resend/高德/网关/Worker/LocalDataRoot 状态与允许动作", + "empty_loading": "指标加载;无告警", + "failure_disabled": "paused/degraded/unavailable;不合法恢复/提高上限禁用", + "conflict_capacity_special": "full/unavailable、清理排队和物理重计量;不显示绝对路径" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-services-storage/\u003cstate\u003e/" + }, + { + "page_id": "admin-audit", + "role": "final_evidence", + "frames": { + "frame_id": "DlCpN", + "frame_name": "06F 私有内容访问审计", + "primary_task": "TASK-WP6-04", + "mapped_state_scope": "两类独立审计、游标和 180 天;空/加载;查询失败;不可编辑删除;无正文、图片、密钥和路径" + }, + "applicable_states": { + "page_id": "admin-audit", + "actor_entry": "active super_admin", + "normal": "后台操作与私有访问两类独立页/标签", + "empty_loading": "无记录;游标加载", + "failure_disabled": "查询失败保留旧结果;无修改/人工删除动作", + "conflict_capacity_special": "180 天保留;正文、图片、密钥和路径不出现;页面读取不消费容量但仍继承后台全局容量条" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/admin-audit/\u003cstate\u003e/" + }, + { + "page_id": "system-ui", + "role": "final_evidence", + "frames": { + "frame_id": "awt96", + "frame_name": "07B Windows 辅助系统界面", + "primary_task": "TASK-WP0-07", + "mapped_state_scope": "托盘/启动中/ready;启动失败、端口占用、API/Worker degraded;脱敏诊断;full/unavailable 告警与受限动作" + }, + "applicable_states": { + "page_id": "system-ui", + "actor_entry": "本机托盘/Supervisor,无产品角色", + "normal": "托盘、运行状态、打开 Dada、诊断、退出", + "empty_loading": "启动中;N/A 业务空态", + "failure_disabled": "启动失败、端口占用、API/Worker degraded,动作严格受限", + "conflict_capacity_special": "full/unavailable 只作脱敏告警;固定端口不动态切换" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/system-ui/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + }, + { + "task_id": "TASK-WP7-06", + "work_package": "WP-7", + "title": "追踪闭环与最终 AC 预冻结验收", + "dependencies": { + "source_text": "TASK-WP7-01 至 TASK-WP7-05", + "task_ids": [ + "TASK-WP7-01", + "TASK-WP7-05" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "NFR-05" + ], + "acceptance_criteria": [ + "AC-01", + "AC-02", + "AC-03", + "AC-04", + "AC-05", + "AC-06", + "AC-07", + "AC-09", + "AC-10", + "AC-11", + "AC-12", + "AC-13", + "AC-14", + "AC-15", + "AC-16", + "AC-17", + "AC-18", + "AC-19", + "AC-20", + "AC-21", + "AC-22", + "AC-23", + "AC-24", + "AC-25", + "AC-27", + "AC-28", + "AC-29", + "AC-30", + "AC-31", + "AC-32", + "AC-33", + "AC-34", + "AC-35", + "AC-36", + "AC-38", + "AC-39", + "AC-40", + "AC-41", + "AC-42", + "AC-43", + "AC-44", + "AC-45", + "AC-46", + "AC-47", + "AC-48", + "AC-49", + "AC-50", + "AC-51", + "AC-52", + "AC-53", + "AC-55", + "AC-56" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "NFR-05、52 当前 AC、109 需求 ID、13 模块、19 契约、9 错误" + ], + "acceptance_scope_notes": [ + "NFR-05、52 当前 AC、109 需求 ID、13 模块、19 契约、9 错误" + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "14 测试、监控与 AC 追踪", + "15 WP-7", + "19 完成定义" + ], + "modules": [ + "release-validation", + "trace-validator" + ], + "implementation_boundary": "运行 test:all 和 validate:tdd-trace;汇总候选制品、外部、UI/视觉/性能证据;用固定 super_admin/普通账号及正常链创建临时第二普通账号完成 52 AC;确认候选浏览器字段在验收期间未漂移", + "parent_families": [ + "TDD-WP7-AC-001" + ], + "case_ids": [ + "TDD-WP7-AC-001-trace-structure" + ], + "first_red": [ + { + "family_id": "TDD-WP7-AC-001", + "assertion": "52 项 AC、89 个测试族或 117 个规范 case 缺失,重复主责、孤儿 case 或用 P0-B 结果冒充" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP7-AC-001", + "assertion": "第 12 节矩阵每项一个主责且证据齐全;89/89 父族有 case 且派生属性完整;未来四项不计入;四份全局来源哈希未变,UI 参考变化按第 1.2.2 节局部重验" + } + ], + "task_green_gate": "52/52 当前 AC passed;109 需求 ID、13 模块、19 契约、9 错误、89/89 父族、117/117 case 完整;未来四项不计入;未通过时不得写最终 RELEASE.json", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: release-validation, trace-validator.", + "must_preserve": [ + "PRD product semantics and P0-A boundary" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "UNIT", + "MANUAL" + ], + "validation_commands": [ + "pnpm test:unit", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP7-AC-001-trace-structure/" + ], + "automation": [ + "automated", + "manual_review" + ], + "release_gate": [ + "release:P0-A" + ], + "ui_scope": [ + + ], + "ui_scope_reason": "No direct UI coverage-unit ownership; validate only the listed module and case boundaries." + }, + { + "task_id": "TASK-WP7-07", + "work_package": "WP-7", + "title": "最终 RELEASE 冻结、制品生成与泄漏扫描", + "dependencies": { + "source_text": "TASK-WP7-06", + "task_ids": [ + "TASK-WP7-06" + ], + "work_packages": [ + + ] + }, + "requirements": [ + "NFR-01", + "NFR-09", + "PRIV-01", + "PRIV-02" + ], + "acceptance_criteria": [ + "AC-24", + "AC-41", + "AC-48", + "AC-56" + ], + "acceptance_criteria_role": "direct-or-supporting-as-listed-by-normative-cases", + "product_contracts": [ + + ], + "requirement_ac_sources": [ + "NFR-01、09、AC-24、41", + "PRIV-01、02、NFR-09、AC-41、48、56" + ], + "acceptance_scope_notes": [ + + ], + "fixture_ids": [ + + ], + "development_plan_sections": [ + "3.1 便携包布局", + "3.6 浏览器支持硬门禁", + "12.3 审计与敏感信息", + "15 WP-7", + "19 完成定义" + ], + "modules": [ + "release-ci", + "trace-validator", + "security-scanner", + "supervisor", + "web", + "api", + "worker" + ], + "implementation_boundary": "验收通过后把未漂移的候选浏览器记录写入最终 RELEASE.json,生成最终 ZIP、SHA-256 和 START-HERE.txt;把 RELEASE SHA-256 写入最终 evidence.json;扫描源码、Git、最终 ZIP、DB 配置、manifest、日志、截图、trace/evidence,并执行最终 package/support-gate smoke", + "parent_families": [ + "TDD-WP7-REL-001", + "TDD-WP7-SEC-001" + ], + "case_ids": [ + "TDD-WP7-REL-001-final-release-record", + "TDD-WP7-SEC-001-artifact-leak-scan" + ], + "first_red": [ + { + "family_id": "TDD-WP7-REL-001", + "assertion": "RELEASE.json 缺失/漂移、ZIP 哈希或真实浏览器未验收" + }, + { + "family_id": "TDD-WP7-SEC-001", + "assertion": "制品、日志、DB 配置、manifest 或文档出现真实敏感值/用户路径" + } + ], + "minimal_green": [ + { + "family_id": "TDD-WP7-REL-001", + "assertion": "发布记录、制品、START-HERE、Chrome/Edge full version、固定 major 和 Windows build 一致" + }, + { + "family_id": "TDD-WP7-SEC-001", + "assertion": "全制品扫描零命中;凭据只在 Windows Credential Manager;诊断脱敏" + } + ], + "task_green_gate": "最终记录、制品、Windows build、两个 full version、固定 major 和端口一致;零真实敏感值/用户绝对路径;最终写入或扫描失败时不得发布,且不能沿用候选 passed 状态冒充最终冻结", + "refactor_scope": { + "allowed": "Only internal deduplication and structural improvement inside modules: release-ci, trace-validator, security-scanner, supervisor, web, api, worker.", + "must_preserve": [ + "PRD product semantics and P0-A boundary", + "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds", + "credential, path, log, package and diagnostic redaction boundaries" + ], + "forbidden": [ + "new product routes, roles, states, fallback behavior or configuration", + "technology replacement or cross-module ownership change", + "weakening or deleting any assigned case assertion" + ] + }, + "layers": [ + "PKG-SEC", + "E2E", + "MANUAL" + ], + "validation_commands": [ + "pnpm test:security", + "pnpm test:package", + "pnpm test:e2e", + "pnpm validate:tdd-trace" + ], + "evidence_directories": [ + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP7-REL-001-final-release-record/", + "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP7-SEC-001-artifact-leak-scan/" + ], + "automation": [ + "automated", + "manual_review" + ], + "release_gate": [ + "release:P0-A" + ], + "ui_scope": [ + { + "page_id": "system-ui", + "role": "final_evidence", + "frames": { + "frame_id": "awt96", + "frame_name": "07B Windows 辅助系统界面", + "primary_task": "TASK-WP0-07", + "mapped_state_scope": "托盘/启动中/ready;启动失败、端口占用、API/Worker degraded;脱敏诊断;full/unavailable 告警与受限动作" + }, + "applicable_states": { + "page_id": "system-ui", + "actor_entry": "本机托盘/Supervisor,无产品角色", + "normal": "托盘、运行状态、打开 Dada、诊断、退出", + "empty_loading": "启动中;N/A 业务空态", + "failure_disabled": "启动失败、端口占用、API/Worker degraded,动作严格受限", + "conflict_capacity_special": "full/unavailable 只作脱敏告警;固定端口不动态切换" + }, + "evidence_directory": "artifacts/tdd/\u003crun_id\u003e/ui/system-ui/\u003cstate\u003e/" + } + ], + "ui_scope_reason": null + } + ], + "case_catalog": [ + { + "case_id": "TDD-WP4-TXT-002-font-metrics-ranges", + "parent_family": "TDD-WP4-TXT-002", + "requirement_ac_source": "TEXT-07 至 14、NFR-02、AC-11、12", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "真实归档字体/缺失字体、最长文字、属性边界/步长", + "numbered_steps": "1. 等待 FontFace ready;2. 参数化字号/缩放/行距/字距/描边/颜色/背景透明度;3. 完成;4. 缺字体加载;5. 重开/导出", + "expected_response_ui": "字号与控制柄同步,重新测量不裁切;范围步长精确;缺字体模板 unavailable;背景透明度不影响文字", + "expected_db_files": "完成一次撤销/保存;缺字体分支无 Canvas 新元素", + "forbidden_side_effects": "不静默系统字体回退、不把背景透明度应用文字、不超范围取值", + "evidence_files": "font-load.json、canvas-state.json、pixel-diff.json、trace.zip" + }, + { + "case_id": "TDD-WP2-PROJ-004-stale-tab", + "parent_family": "TDD-WP2-PROJ-004", + "requirement_ac_source": "PROJECT-07、AC-36 P0-A 子集", + "fixture_ids": [ + "FX-PROJECT-CONFLICT" + ], + "fixture_and_preconditions": "FX-PROJECT-CONFLICT,标签 A/B 均基于 N", + "numbered_steps": "1. A 保存到 N+1;2. B 以 N 保存;3. B 尝试编辑/覆盖/另存副本", + "expected_response_ui": "B 返回 412 和最新安全版本摘要;立即只读 conflicted,只显示一次本地导出与刷新", + "expected_db_files": "仅 A 状态写入;B 的 state_version/save_status/latest_exports/project 数量不变", + "forbidden_side_effects": "B 不自动重试覆盖、不 merge、不另存项目、不恢复自动保存", + "evidence_files": "两标签 response.json、db-diff.json、trace.zip、screenshots/conflicted.png" + }, + { + "case_id": "TDD-WP6-PRIV-001-ack", + "parent_family": "TDD-WP6-PRIV-001", + "requirement_ac_source": "ADMIN-05、17.1、AC-25", + "fixture_ids": [ + "FX-ACTOR-ADMIN-A" + ], + "fixture_and_preconditions": "FX-ACTOR-ADMIN-A 未确认 current notice v1", + "numbered_steps": "1. 进入私有区域;2. 得到 428;3. 以 expected v1 调 notice ack;4. 重试区域摘要", + "expected_response_ui": "首次 428 PRIVATE_CONTENT_NOTICE_ACK_REQUIRED 只含 version/message_key;ack 成功后区域仅显示安全摘要", + "expected_db_files": "只更新该 admin 的 notice version/ack time;幂等重试不新增语义变化", + "forbidden_side_effects": "ack 不创建 PrivateContentAccessLog;不返回正文/图片;不写 Cookie/localStorage 作为真相", + "evidence_files": "response.json、db-diff.json、trace.zip、screenshots/notice.png" + }, + { + "case_id": "TDD-WP6-PRIV-001-persistence", + "parent_family": "TDD-WP6-PRIV-001", + "requirement_ac_source": "ADMIN-05、AC-25", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "admin A 已确认 v1", + "numbered_steps": "1. 新标签;2. API 重启;3. 浏览器重启/重登;4. 在真实 Chrome 与 Edge 登录同一 admin", + "expected_response_ui": "同版本均不重复提示,session/bootstrap 计算 notice_acknowledged=true", + "expected_db_files": "UserProfile ack 字段不因浏览器/会话改变;每次 session 独立但 ack 不重复写", + "forbidden_side_effects": "Cookie/session/localStorage/IndexedDB 清空不使服务端遗忘;跨管理员不共享 ack", + "evidence_files": "每环境 response.json、db-diff.json、trace.zip、screenshots/ack-persisted.png" + }, + { + "case_id": "TDD-WP5-PREV-001-grant-lifecycle", + "parent_family": "TDD-WP5-PREV-001", + "requirement_ac_source": "ADMIN-07、17.13、AC-42、48", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "普通账号,active/revoked/expired grant,已有项目引用预览版本", + "numbered_steps": "1. admin 授权批次;2. 用户读取/添加;3. 撤销/到期;4. 再读取/添加;5. 重开已有项目", + "expected_response_ui": "active 时只见授权项;撤销/到期立即阻断新读取/添加;已有项目按保存版本渲染", + "expected_db_files": "grant 状态/审计更新;UserProfile.role 不变;项目引用版本不改写", + "forbidden_side_effects": "不出现后台权限、不把 preview 写 public manifest/cache、不因撤销破坏既有项目", + "evidence_files": "response.json、db-diff.json、cache-enumeration.json、trace.zip" + }, + { + "case_id": "TDD-WP5-COL-001-four-layouts", + "parent_family": "TDD-WP5-COL-001", + "requirement_ac_source": "COL-01 至 05、AC-15 P0-A 子集、16、32", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "COLOR001/002/008/016 与同一五色 fixture", + "numbered_steps": "1. 渲染四卡;2. 改裁剪/滤镜;3. 换底图;4. 尝试访问其他色卡", + "expected_response_ui": "四布局消费完全相同五色;刷新规则一致;其他色卡不可发现", + "expected_db_files": "只保存稳定 ID/version/五色 snapshot", + "forbidden_side_effects": "不启用其余 12 色卡、不各自重新提色、不联网读取图片", + "evidence_files": "palette.json、pixel-diff.json、manifest.json" + }, + { + "case_id": "TDD-WP2-PROJ-002-save-failure-recovery", + "parent_family": "TDD-WP2-PROJ-002", + "requirement_ac_source": "PROJECT-04、05、EXPORT-06、AC-20、35", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "saved N;页面创建 dirty;参数化网络失败、storage unavailable、强制刷新/崩溃", + "numbered_steps": "1. 触发保存失败;2. 检查 failed/离开弹层;3. 页面保持时恢复并重试;4. 另一路强制退出后重开;5. 枚举浏览器存储", + "expected_response_ui": "失败不显示 saved;正常恢复可保存;强制退出只恢复后端 N 且撤销栈为空", + "expected_db_files": "失败期间 DB 不变;成功重试才 N+1;浏览器持久存储无草稿/提示词/私有引用", + "forbidden_side_effects": "不把失败当成功;不在关闭后恢复内存草稿;不让 SSE 代替 REST 真相", + "evidence_files": "response.json、db-diff.json、cache-enumeration.json、trace.zip、screenshots/save-failed.png" + }, + { + "case_id": "TDD-WP6-PRIV-001-version-bump", + "parent_family": "TDD-WP6-PRIV-001", + "requirement_ac_source": "ADMIN-05、AC-25", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "admin A/B 已确认 v1,应用 current notice 切到 v2", + "numbered_steps": "1. 两个 admin 分别进入区域;2. 尝试用 expected v1 ack;3. 读取 v2 并确认", + "expected_response_ui": "两者重新 428;旧 expected version 失败且要求重读;各自确认 v2 后可进入摘要", + "expected_db_files": "旧 ack 保留历史语义但当前字段仅在正确 v2 ack 后更新;A/B 独立", + "forbidden_side_effects": "不以旧确认放行;不因 A 确认替 B 确认;不返回私有正文", + "evidence_files": "response.json、db-diff.json、trace.zip" + }, + { + "case_id": "TDD-WP0-DEP-001-frozen-toolchain", + "parent_family": "TDD-WP0-DEP-001", + "requirement_ac_source": "NFR-09、DevelopmentPlan 2.1、13.1", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "冻结 lockfile、干净离线依赖缓存、win-x64 runner", + "numbered_steps": "1. 严格按 lockfile 安装;2. 编译 TypeScript;3. 最小加载 React/Fabric/Fastify/better-sqlite3;4. 用随包 Node 运行 native smoke", + "expected_response_ui": "所有命令退出 0,版本与 lockfile/DevelopmentPlan 一致", + "expected_db_files": "只生成声明的构建缓存与报告;业务 DB/LocalDataRoot 无变化", + "forbidden_side_effects": "不升级/替换依赖、技术栈或 native 模块;不联网漂移解析版本", + "evidence_files": "commands.json、dependency-tree.json、native-smoke.json" + }, + { + "case_id": "TDD-WP0-STO-002-equal-limit", + "parent_family": "TDD-WP0-STO-002", + "requirement_ac_source": "17.19、NFR-05、AC-55", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "已计量+活动预留=5,368,709,119,预计写 1 字节,可写目录", + "numbered_steps": "1. 调受管二进制写入预检;2. 提交文件/DB;3. 重读 storage state", + "expected_response_ui": "不得返回 507;写入成功后 notice/status 为 full", + "expected_db_files": "建立并消费一份 reservation;managed bytes 精确为 5,368,709,120;managed file 已提交;last_measured_at 更新", + "forbidden_side_effects": "不用 \u003e= 拒绝;不回滚已成功等号写入;不调用自动清理", + "evidence_files": "response.json、db-diff.json、fs-before.json、fs-after.json" + }, + { + "case_id": "TDD-WP1-AUTH-004-session-revocation", + "parent_family": "TDD-WP1-AUTH-004", + "requirement_ac_source": "AUTH-04 至 07、AC-22、33、49", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "每个参数使用独立库:active 普通用户或 active super_admin 各有 2 个 session", + "numbered_steps": "1. 验证正常 session;2. 分别触发普通用户 logout/暂停/注销或管理员 logout/停用/移出白名单;3. 再调受保护 API", + "expected_response_ui": "撤销前成功;每种撤销后均为 401 或相应身份入口,已打开页面退出旧数据;两种 audience 不能互用", + "expected_db_files": "相应主体全部 session revoked_at 在同一事务写入;账号/白名单状态按触发操作变化", + "forbidden_side_effects": "不只撤销当前浏览器;不把普通 session 提升为后台 session;不保留可交互私有响应", + "evidence_files": "每参数 response.json、db-diff.json、trace.zip、screenshots/revoked.png" + }, + { + "case_id": "TDD-WP0-API-001-schema-envelope", + "parent_family": "TDD-WP0-API-001", + "requirement_ac_source": "NFR-05、DevelopmentPlan 6.1、6.6", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "生成 TypeBox/OpenAPI/客户端 snapshot;合法与非法 fixture", + "numbered_steps": "1. 生成 OpenAPI 3.1;2. 比较 snapshot;3. 对每个 operation 注入合法/非法请求;4. 校验错误信封和 correlation ID", + "expected_response_ui": "Schema/运行/客户端一致;非法响应使用冻结 HTTP/code/message_key/details 白名单", + "expected_db_files": "只读场景 DB 无变化;写场景失败按各 operation 事务回滚", + "forbidden_side_effects": "不出现未声明字段/枚举、供应商原文、堆栈、路径或缺失 correlation ID", + "evidence_files": "openapi.json、snapshot-diff.json、response.json、redaction.json" + }, + { + "case_id": "TDD-WP2-ERR-001-unknown-retryable", + "parent_family": "TDD-WP2-ERR-001", + "requirement_ac_source": "GEN-09、16、17.18、AC-04、53", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "独立 unknown_retryable fixture;已提交任务", + "numbered_steps": "1. 触发未知临时错误;2. 检查唯一下一步为“稍后重试”;3. 在受控条件恢复后点击;4. 查询任务和脱敏诊断", + "expected_response_ui": "原任务 failed/category=unknown_retryable;只提供“稍后重试”;动作后同项目新增一个 GenerationJob", + "expected_db_files": "原任务 release 一次、无 output;新任务独立 reserve;只保留非敏感诊断", + "forbidden_side_effects": "不显示“使用原输入重试”、修改输入、选模型或联系管理员;不泄漏原始错误或自动重试", + "evidence_files": "response.json、worker-events.json、db-diff.json、screenshots/unknown-retryable.png" + }, + { + "case_id": "TDD-WP0-BND-001-loopback-origin", + "parent_family": "TDD-WP0-BND-001", + "requirement_ac_source": "NFR-09、AC-24", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "API 未启动;回环、局域网、错误 Host/Origin 和预检请求参数", + "numbered_steps": "1. 启动产品包;2. 检查监听地址;3. 从允许/拒绝地址请求;4. 发送跨源/CORS 预检", + "expected_response_ui": "只接受 127.0.0.1:43121 与同源;其他路径连接失败或按门禁拒绝", + "expected_db_files": "无业务表、会话、外部用量变化", + "forbidden_side_effects": "不监听 0.0.0.0/IPv6 wildcard,不建防火墙入站规则,不返回 CORS 放行头", + "evidence_files": "socket-listeners.json、response.json、firewall-diff.json" + }, + { + "case_id": "TDD-WP2-GEN-003-stale-config", + "parent_family": "TDD-WP2-GEN-003", + "requirement_ac_source": "GEN-15、ADMIN-03、AC-30", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "用户已确认旧 model_config_version/cost;管理员原子发布新集合", + "numbered_steps": "1. 旧页面直接提交;2. 读取 412 摘要;3. 重新 GET models 并明确确认;4. 再提交", + "expected_response_ui": "第一次 412 且要求重新确认;第二次才可创建任务", + "expected_db_files": "第一次 job/project/reference/reserve/outbox 全无变化;第二次按新快照创建", + "forbidden_side_effects": "第一次不上游、不持久化参考图、不冻结;不自动替用户切推荐模型", + "evidence_files": "response.json、db-diff.json、external-calls.json、trace.zip" + }, + { + "case_id": "TDD-WP2-ERR-001-unknown-non-retryable", + "parent_family": "TDD-WP2-ERR-001", + "requirement_ac_source": "GEN-09、16、17.18、AC-04、53", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "独立 unknown_non_retryable fixture;已提交任务", + "numbered_steps": "1. 触发未知不可重试错误;2. 检查唯一下一步为“联系管理员”;3. 尝试寻找或调用重复提交动作;4. 查询任务", + "expected_response_ui": "原任务 failed/category=unknown_non_retryable;只提供“联系管理员”,无重试或修改入口", + "expected_db_files": "release 一次;无 output;原草稿保留但本 case 不创建新 job", + "forbidden_side_effects": "不自动重试、不循环轮询制造新任务、不降级为 unknown_retryable、不提供其他类别动作", + "evidence_files": "response.json、worker-events.json、db-diff.json、screenshots/unknown-non-retryable.png" + }, + { + "case_id": "TDD-WP2-PROJ-004-conflict-export-once", + "parent_family": "TDD-WP2-PROJ-004", + "requirement_ac_source": "PROJECT-07、EXPORT-05、AC-36 P0-A 子集", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "conflicted 标签页,conflict_export_used=false", + "numbered_steps": "1. 本地导出一次(成功和失败各参数);2. 再次尝试;3. 刷新最新版本", + "expected_response_ui": "第一次结束后立即禁用再次导出;结果明确“仅下载本页版本,未写入项目”;刷新到后端最新状态", + "expected_db_files": "所有步骤不调用 latest API,projects/project_states/latest_exports 无变化;flag 只在页面内存", + "forbidden_side_effects": "不因第一次失败允许第二次;不覆盖后端、不另存副本、不把 flag 持久化", + "evidence_files": "network-timeline.json、db-diff.json、trace.zip、screenshots/conflict-export.png" + }, + { + "case_id": "TDD-WP1-SLOT-001-stage-limit", + "parent_family": "TDD-WP1-SLOT-001", + "requirement_ac_source": "AUTH-01、NFR-04、AC-32、45", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "参数化 9/10 个 active+suspended 普通账号、deleted、多个 super_admin", + "numbered_steps": "1. 发码前尝试第 10/11 人;2. 在发码后并发占满名额再完成;3. 删除普通账号再注册", + "expected_response_ui": "第 10 人可成功,第 11 人发码/完成均阻断;deleted 释放;super_admin 不占名额", + "expected_db_files": "成功时计数/账号/邀请原子;失败零变化;累计统计保留 deleted", + "forbidden_side_effects": "不把 suspended/deleted/super_admin 计错,不通过并发超 10,不让失败占邀请码", + "evidence_files": "response.json、db-diff.json、concurrency-trace.json" + }, + { + "case_id": "TDD-WP6-SVC-001-hard-quota", + "parent_family": "TDD-WP6-SVC-001", + "requirement_ac_source": "ADMIN-05、08、NFR-08、17.15、AC-47", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "Resend 日 79/80、月 2399/2400;高德 999/1000;provider 异常;已有 session", + "numbered_steps": "1. 并发领取最后额度;2. 尝试下一次;3. 注入 provider 故障;4. 检查登录/注册/DYN004/现有 session", + "expected_response_ui": "最后一份已领取调用可结束,后续不调用;状态 paused_quota/provider;已有 session 继续;手动地点继续", + "expected_db_files": "external_service_usage 事务计数/status/reason 更新;失败不创建验证码假成功", + "forbidden_side_effects": "不发送第 81/超月/第 1001 次,不影响已有 session,不切付费/备用,不建运行时邮件质量状态", + "evidence_files": "response.json、db-diff.json、external-calls.json、concurrency-trace.json" + }, + { + "case_id": "TDD-WP2-GEN-002-success", + "parent_family": "TDD-WP2-GEN-002", + "requirement_ac_source": "GEN-06、08、11、CREDIT-03、AC-03", + "fixture_ids": [ + "FX-GATEWAY-SYNC" + ], + "fixture_and_preconditions": "上一 case 的 queued job + FX-GATEWAY-SYNC", + "numbered_steps": "1. Worker 领取;2. 调上游并验证单图;3. 落盘;4. 查询任务/项目", + "expected_response_ui": "queued→running→succeeded;项目可进入编辑且历史新增一图", + "expected_db_files": "lease/heartbeat、output managed file、output_asset、generation_commit、project history/draft_state 一次提交;容量增加实测字节", + "forbidden_side_effects": "不在文件安全落盘前 succeeded;不保存多图;不重复扣点;不改变项目比例", + "evidence_files": "worker-events.json、db-diff.json、fs-after.json、screenshots/succeeded.png" + }, + { + "case_id": "TDD-WP2-EXP-001-result-matrix", + "parent_family": "TDD-WP2-EXP-001", + "requirement_ac_source": "EXPORT-05、06、AC-35、55", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "参数化:合成失败、下载失败、project 保存失败、latest 持久化失败、storage full/unavailable", + "numbered_steps": "1. 在 UIDesign 四结果组合及存储状态下导出;2. 记录下载/上传调用顺序;3. 重读项目/latest", + "expected_response_ui": "分别显示冻结结果文案;可合成时允许规定本地下载;下载失败可复用同一次合成;后端失败明确 latest 未更新", + "expected_db_files": "失败分支保留旧 latest;project 保存失败不写新 state;latest 失败不写 latest/managed file;成功分支才更新", + "forbidden_side_effects": "不撤回已下载文件;不以本地下载覆盖后端记录;不显示双成功假状态;不把 Blob 存浏览器持久缓存", + "evidence_files": "每参数 network-timeline.json、response.json、db-diff.json、trace.zip、screenshots/result.png" + }, + { + "case_id": "TDD-WP0-STO-003-unavailable-matrix", + "parent_family": "TDD-WP0-STO-003", + "requirement_ac_source": "17.19、NFR-05、AC-35、55", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "LocalDataRoot 不可写,再参数化 SQLite 仍可写/不可写", + "numbered_steps": "1. 尝试 project JSON 保存、生成和二进制写;2. 读取/下载/仅下载;3. 尝试删除/清理", + "expected_response_ui": "新增后端写全部失败且 UI 为 failed/unavailable;读取、下载和可行的仅下载保留;SQLite 不可写时删除/排队明确未提交", + "expected_db_files": "不更新 state_version/managed bytes/latest/job/ledger;SQLite 可写时允许规定逻辑删除/队列,反之无 DB 变化", + "forbidden_side_effects": "不显示已保存;不上游;不把内存草稿写浏览器持久存储;不伪造清理完成", + "evidence_files": "response.json、db-diff.json、trace.zip、screenshots/unavailable.png" + }, + { + "case_id": "TDD-WP7-EXT-001-three-real-models", + "parent_family": "TDD-WP7-EXT-001", + "requirement_ac_source": "GEN-13、AC-40、41", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "三模型各自真实凭据/配置,显式执行确认", + "numbered_steps": "1. 显示模型/次数/额度;2. 分别执行纯文字、参考图、四比例、sync/async/查询/响应/错误;3. 脱敏;4. 绑定 config_version", + "expected_response_ui": "三模型独立完整矩阵通过才解除;任一缺项保持 externally_blocked", + "expected_db_files": "只写对应模型验证证据/runtime 状态和允许审计;测试任务/点数按隔离规则", + "forbidden_side_effects": "不共享证据、不自动充值、不保留真实输入/图片/原始响应、不在普通 CI 调用", + "evidence_files": "每模型 contract-matrix.json、external-calls.json、redaction.json、manual-review.json" + }, + { + "case_id": "TDD-WP7-SEC-001-artifact-leak-scan", + "parent_family": "TDD-WP7-SEC-001", + "requirement_ac_source": "PRIV-01、02、NFR-09、AC-41、48、56", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "ZIP、源码、Git、DB 配置、manifest、日志、截图、trace/evidence 全集合;秘密 trap", + "numbered_steps": "1. 解包并扫描文本/二进制/元数据;2. 检查 Windows 用户名/绝对路径;3. 检查缓存/凭据位置;4. 人工复核命中", + "expected_response_ui": "真实敏感值和硬编码用户路径零命中;凭据仅 Credential Manager;诊断通过同一扫描", + "expected_db_files": "只生成扫描报告;不修改被扫描制品", + "forbidden_side_effects": "不把 allowlist/HMAC/验证码/session/提示词/图片/原始错误写证据,不用删除报告掩盖命中", + "evidence_files": "scan-report.json、allowlist.json、manual-review.json" + }, + { + "case_id": "TDD-WP1-CFG-001-secure-revision", + "parent_family": "TDD-WP1-CFG-001", + "requirement_ac_source": "AUTH-07、ADMIN-09、AC-49、50", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "current applied revision N;参数化完整 N+1、HMAC/凭据缺失、身份冲突", + "numbered_steps": "1. 离线写候选安全配置;2. API 启动应用;3. 查询 apply state/session;4. 注入失败重试", + "expected_response_ui": "完整配置原子生效并推进 revision;失败保持 N 并阻止受影响入口", + "expected_db_files": "成功同事务更新 apply state、撤销受影响 session、写 system/backend_secure_config 审计;失败全回滚", + "forbidden_side_effects": "不写白名单/HMAC/pepper/人员身份/凭据,不出现半生效配置", + "evidence_files": "config-result.json、db-diff.json、redaction.json" + }, + { + "case_id": "TDD-WP0-BRW-001-real-supported", + "parent_family": "TDD-WP0-BRW-001", + "requirement_ac_source": "NFR-01、AC-24、41", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "最终 RELEASE.json;真实 Chrome/Edge 独立 profile", + "numbered_steps": "1. 分别启动记录的 full version;2. 完成 UA-CH support check;3. 进入 bootstrap/login;4. 复查产品 API", + "expected_response_ui": "两浏览器均通过并建立短期支持 cookie,产品 API 每次复核品牌/major", + "expected_db_files": "仅门禁所需非敏感记录/cookie;不建用户 session", + "forbidden_side_effects": "不用 Playwright Chromium、伪 UA 或前一 major 代替;不联网查询当前版本", + "evidence_files": "每浏览器 environment.json、response.json、trace.zip、screenshots/supported.png" + }, + { + "case_id": "TDD-WP3-ADP-001-per-model-contract", + "parent_family": "TDD-WP3-ADP-001", + "requirement_ac_source": "GEN-01、02、05、06、13、16、AC-40", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "三个模型各自独立 mock/真实受控账号和脱敏 fixture", + "numbered_steps": "1. 每模型分别执行纯文字、合法参考图、四比例;2. 覆盖同步/异步与查询;3. 验证 MIME/尺寸/单图;4. 注入九类映射", + "expected_response_ui": "每模型只按自身已证实协议成功;结果恰一图;错误映射到固定 category", + "expected_db_files": "真实验证只写对应 model/config_version 的 evidence 状态;任务/点数按独立用例结算", + "forbidden_side_effects": "不从一个模型推断另两个、不共享 verified 标记、不接受多图/未知字段、不记录原始响应", + "evidence_files": "每模型 contract-matrix.json、response.json、external-calls.json、redaction.json" + }, + { + "case_id": "TDD-WP6-ADM-001-role-and-summary", + "parent_family": "TDD-WP6-ADM-001", + "requirement_ac_source": "ADMIN-01、02、04、08、AC-25、49", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "active/suspended super_admin、普通/预览账号,后台安全摘要 fixture", + "numbered_steps": "1. 各主体请求后台页/API;2. 停用 admin 后复用旧页面;3. 浏览列表/详情;4. 检查私有默认", + "expected_response_ui": "仅 active super_admin 可进入;停用立即退出;默认只见脱敏元数据,普通/预览无后台入口", + "expected_db_files": "读取无业务变化;拒绝分支无审计/私有读取;规定登录审计独立存在", + "forbidden_side_effects": "不共享普通/后台 session,不因预览 grant 获后台,不默认返回提示词/图片/密钥", + "evidence_files": "每主体 response.json、db-access.json、trace.zip、screenshots/admin-denied.png" + }, + { + "case_id": "TDD-WP1-ADM-001-admin-auth-boundary", + "parent_family": "TDD-WP1-ADM-001", + "requirement_ac_source": "AUTH-07、AC-49", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "白名单/非白名单邮箱、已存在普通账号冲突、两个 admin、全部停用状态", + "numbered_steps": "1. 后台发码;2. 首次验证/后续登录;3. 尝试普通 session 访问后台;4. 停用全部并尝试自助恢复", + "expected_response_ui": "非白名单发码前拒绝;白名单首次建 super_admin;audience 严格分离;无最后管理员保护且无自助恢复", + "expected_db_files": "允许分支建 admin/session/审计;拒绝分支不建 challenge/session;停用撤销 session", + "forbidden_side_effects": "不泄漏白名单、不使用邀请码/普通名额、不原地提升普通账号、不创建部署人员角色", + "evidence_files": "每参数 response.json、db-diff.json、external-calls.json、trace.zip" + }, + { + "case_id": "TDD-WP4-CAN-001-fifty-elements", + "parent_family": "TDD-WP4-CAN-001", + "requirement_ac_source": "EDITOR-04 至 09、17.5、AC-27", + "fixture_ids": [ + "FX-CANVAS-50" + ], + "fixture_and_preconditions": "FX-CANVAS-50,稳定选择重叠 fixture", + "numbered_steps": "1. 添加到 50;2. 循环选择/长按候选/框选/多选移动;3. 层级/复制/删除;4. 保存/导出;5. 添加第 51", + "expected_response_ui": "前 50 可编辑保存导出;选择顺序确定;第 51 明确阻断且布局不跳", + "expected_db_files": "Canvas 最多 50,成功操作各一次撤销/保存;第 51 无 state change", + "forbidden_side_effects": "不出现图层面板/隐藏/锁定/编组,不因阻断损坏已有元素", + "evidence_files": "canvas-state.json、db-diff.json、trace.zip、performance.json" + }, + { + "case_id": "TDD-WP3-MDL-003-runtime-recommendation", + "parent_family": "TDD-WP3-MDL-003", + "requirement_ac_source": "GEN-15、ADMIN-03、17.2、AC-30、51", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "三模型 verified/available,配置快照和哈希已记录", + "numbered_steps": "1. 依次模拟默认模型不可用、全部不可用、一个原因恢复但另一原因仍在、全部恢复;2. 每步 GET models", + "expected_response_ui": "configured default 始终原 ID;recommended 按可用模型 priority 派生或 null;reason 使用固定优先级", + "expected_db_files": "只更新 model_runtime_availability/GatewayBalanceState/runtime version;config set/version/hash 不变", + "forbidden_side_effects": "不写 enabled/is_default/priority;不自动恢复;不把推荐变成第二默认或用户隐式选择", + "evidence_files": "每步 response.json、db-diff.json、screenshots/model-states.png" + }, + { + "case_id": "TDD-WP4-STK-001-transform-sticker", + "parent_family": "TDD-WP4-STK-001", + "requirement_ac_source": "EDITOR-04 至 09、PROJECT-04、AC-13、27", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "普通贴纸元素和重叠选择 fixture", + "numbered_steps": "1. 移动/缩放/旋转/翻转/透明度;2. 复制/层级/多选;3. 撤销重做;4. 保存/导出重开", + "expected_response_ui": "画布、属性控件、导出和重开状态一致;每次连续手势是一项撤销", + "expected_db_files": "Canvas element snapshot/state_version 按提交更新", + "forbidden_side_effects": "不改变 stable ID/resource_version,不引入隐藏/锁定/编组,不丢选择", + "evidence_files": "canvas-state.json、db-diff.json、pixel-diff.json、trace.zip" + }, + { + "case_id": "TDD-WP3-MDL-002-contract-change", + "parent_family": "TDD-WP3-MDL-002", + "requirement_ac_source": "GEN-13、15、ADMIN-03、AC-30、40", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "verified 模型集合", + "numbered_steps": "1. 修改端点/字段/参考图/响应/异步查询/error mapping 任一契约字段;2. 保存;3. GET models;4. 尝试生成", + "expected_response_ui": "保存成功但对应模型 contract unverified、runtime reason contract_unverified;生成被阻断直到独立重验", + "expected_db_files": "新 config_version/set;对应 runtime 独立置 false;审计/outbox 同事务", + "forbidden_side_effects": "不沿用旧 verified 证据;不暗改 enabled/default/priority;不调用真实上游", + "evidence_files": "每参数 response.json、db-diff.json、external-calls.json" + }, + { + "case_id": "TDD-WP0-BRW-002-hard-block", + "parent_family": "TDD-WP0-BRW-002", + "requirement_ac_source": "NFR-01、AC-24", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "参数化其他品牌、错误 major、非 Windows、UA-CH 缺失/冲突/解析失败和原始 API 客户端", + "numbered_steps": "1. 请求 support check;2. 请求 HTML/bundle/API;3. 尝试登录/项目/后台深链;4. 查 DB/外部调用", + "expected_response_ui": "全部 426 BROWSER_UNSUPPORTED,reason 仅四类,页面只有重新打开说明且无绕过", + "expected_db_files": "业务 DB 读取/写入计数为 0,session/验证码/资源读取均无变化", + "forbidden_side_effects": "不返回继续令牌/参数,不发 Resend/AI/高德,不泄露产品数据", + "evidence_files": "每参数 response.json、db-access.json、external-calls.json、screenshots/blocked.png" + }, + { + "case_id": "TDD-WP5-MAN-001-readonly-compiler", + "parent_family": "TDD-WP5-MAN-001", + "requirement_ac_source": "TEXT-01 至 TEXT-14、COL-01 至 COL-05、DYN-01 至 DYN-09、STATIC-01 至 STATIC-04、AC-32、42", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "只读规范入口与独立输出目录;Lua/Prefab/证据目录 trap", + "numbered_steps": "1. 记录源 hash/mtime;2. 运行声明式转换;3. 注入尝试执行 Lua/Prefab/读取证据目录;4. 复核输出", + "expected_response_ui": "只消费允许 catalog/metadata/资源;非法入口失败;输出 manifest 可重现", + "expected_db_files": "只写版本化派生输出;源 hash/mtime 零变化", + "forbidden_side_effects": "不执行 Android runtime、不扫描证据目录、不复制约 3.57 GB 全库、不覆盖源", + "evidence_files": "compiler-report.json、source-before.json、source-after.json、output-manifest.json" + }, + { + "case_id": "TDD-WP1-AUD-001-immutable-triggers", + "parent_family": "TDD-WP1-AUD-001", + "requirement_ac_source": "ADMIN-05、09、17.10、17.16、AC-50", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "各一条 AdminOperationLog/PrivateContentAccessLog;普通、retention、privacy purge 连接", + "numbered_steps": "1. 普通连接 UPDATE/DELETE;2. 伪造 purge 函数;3. 合法作用域在到期/注销执行", + "expected_response_ui": "普通和伪造操作被 trigger 阻断;仅注册作用域执行规定清理", + "expected_db_files": "非法尝试零变化;合法作用域只删除/匿名化允许行并留非敏感结果", + "forbidden_side_effects": "不允许后台/API 任意修改,不混用两类日志,不把正文写审计", + "evidence_files": "sql-results.json、db-diff.json、trigger-definition.json" + }, + { + "case_id": "TDD-WP6-STATE-001-three-model-states", + "parent_family": "TDD-WP6-STATE-001", + "requirement_ac_source": "GEN-15、ADMIN-03、08、AC-30、51", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "default 不可用、其他推荐、全不可用、恢复参数", + "numbered_steps": "1. 打开总览/模型页;2. 注入 runtime 变化;3. SSE 后 REST refetch;4. 恢复一个原因", + "expected_response_ui": "configured default、逐模型 runtime、recommended 三列独立;推荐可 null;UI 不暗换用户选择", + "expected_db_files": "只改 runtime/version;ModelConfig/current set 无变化", + "forbidden_side_effects": "不合并三种状态、不把 SSE 当真相、不回写默认/enabled/priority", + "evidence_files": "response.json、db-diff.json、screenshots/model-columns.png、trace.zip" + }, + { + "case_id": "TDD-WP4-DYN-002-location-consent", + "parent_family": "TDD-WP4-DYN-002", + "requirement_ac_source": "DYN-04、PRIV-03、AC-17、47", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "DYN004 固定坐标/高德 mock;同意、拒绝、服务暂停参数", + "numbered_steps": "1. 插入前检查 Dada 提示;2. 拒绝;3. 同意并定位/逆地理;4. 手动地点回退;5. 删除元素/注销", + "expected_response_ui": "拒绝调用 0 且不插入坐标;同意后正确显示;暂停时自动定位禁用但手动地点可用", + "expected_db_files": "只在同意后把坐标/文本存实例;删除/注销按规则清理", + "forbidden_side_effects": "前端不持高德密钥,不把坐标用于其他元素/用户,不在提示前调用", + "evidence_files": "external-calls.json、canvas-state.json、db-diff.json、trace.zip" + }, + { + "case_id": "TDD-WP2-GEN-001-submit-snapshot", + "parent_family": "TDD-WP2-GEN-001", + "requirement_ac_source": "GEN-01 至 08、PROJECT-01、AC-03、34、44", + "fixture_ids": [ + "FX-CREDIT-ENOUGH", + "FX-MODEL-VERIFIED", + "FX-REF-VALID" + ], + "fixture_and_preconditions": "FX-MODEL-VERIFIED、FX-CREDIT-ENOUGH、FX-REF-VALID,new_project", + "numbered_steps": "1. multipart 提交 prompt/model/ratio/config version/cost/reference;2. 查询任务;3. 检查 staging/正式文件", + "expected_response_ui": "成功响应为 queued,返回同一任务真相;UI 不显示假百分比", + "expected_db_files": "新 project、job、reference snapshot、reserve ledger、outbox 同事务;提交后 reference 从 staging 进入私有 managed file", + "forbidden_side_effects": "不接受未冻结高级字段;不让 Worker 领取未完整提交任务;不暴露路径;失败补偿不留下可读半文件", + "evidence_files": "request.json、response.json、db-diff.json、fs-before.json、fs-after.json" + }, + { + "case_id": "TDD-WP1-AUTH-004-challenge-guards", + "parent_family": "TDD-WP1-AUTH-004", + "requirement_ac_source": "AUTH-02、04、AC-33", + "fixture_ids": [ + "FX-CHALLENGE" + ], + "fixture_and_preconditions": "FX-CHALLENGE、可控时钟、active 普通账号", + "numbered_steps": "1. 成功消费验证码;2. 重放同码;3. 新建 challenge 后前进超过 10 分钟再提交;4. 发码后 60 秒内再发;5. 连续错误触发限流", + "expected_response_ui": "仅首次有效提交成功;重放/过期/错误使用稳定错误;60 秒重发和高频为 429;页面不显示假成功", + "expected_db_files": "首次 challenge consumed_at 只写一次;失败次数/限流记录按规则变化;失败分支不新增 session", + "forbidden_side_effects": "不记录验证码明文;不延长原 challenge;限流失败不调用 Resend、不创建会话", + "evidence_files": "每参数 response.json、db-diff.json、external-calls.json" + }, + { + "case_id": "TDD-WP2-GEN-001-concurrent-reserve", + "parent_family": "TDD-WP2-GEN-001", + "requirement_ac_source": "CREDIT-03、GEN-07、AC-05、29", + "fixture_ids": [ + "FX-CREDIT-ENOUGH" + ], + "fixture_and_preconditions": "FX-CREDIT-ENOUGH,两个不同 submission/idempotency key 同时开始", + "numbered_steps": "1. 用 barrier 并发提交两次;2. 等待响应;3. 查询 current job、余额和流水", + "expected_response_ui": "一个响应创建任务,另一个 200 返回同一现有任务引用;UI 提供返回当前任务", + "expected_db_files": "仅一个 queued/running job、一个 project(new_project 模式)、一条 reserve ledger;余额只转移一次", + "forbidden_side_effects": "不创建第二项目/参考关系/outbox/upstream call;available 不为负", + "evidence_files": "两份 response.json、db-diff.json、concurrency-trace.json" + }, + { + "case_id": "TDD-WP3-MDL-002-invalid-set", + "parent_family": "TDD-WP3-MDL-002", + "requirement_ac_source": "ADMIN-03、17.2、AC-30", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "参数化缺替代、非法替代、priority 缺失/浮点/0/负数/重复、缺模型/未知模型", + "numbered_steps": "1. 分别 PUT 完整候选;2. 读取稳定错误;3. GET 当前集合", + "expected_response_ui": "返回对应 400/409 稳定 code;UI 聚焦修正字段;当前集合仍为 N", + "expected_db_files": "current pointer、versions/runtime/审计成功记录/outbox 均无变化", + "forbidden_side_effects": "不生成孤儿候选 set;不部分改变 enabled/default/priority;不新增错误分类", + "evidence_files": "每参数 response.json、db-diff.json" + }, + { + "case_id": "TDD-WP2-EXP-001-same-blob-success", + "parent_family": "TDD-WP2-EXP-001", + "requirement_ac_source": "EXPORT-04、AC-23、35", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "saved project,已有旧 JPG latest;新客户端 Blob B", + "numbered_steps": "1. 记录 B SHA-256;2. 用 B 触发浏览器下载;3. 同一 B 调 EXPORT_SAVE;4. 重读 latest 并下载", + "expected_response_ui": "UI 显示“已下载并保存为最新成品”;两个通道 hash 相同", + "expected_db_files": "原子替换该格式 latest_exports/managed file;旧 JPG 进入规定清理;PNG latest 不变;容量按真实文件更新", + "forbidden_side_effects": "不重新编码第二份 Blob;不保留完整导出历史;不影响另一格式;幂等重试不重复计量", + "evidence_files": "download.json、request.json、response.json、db-diff.json、fs-before.json、fs-after.json" + }, + { + "case_id": "TDD-WP7-EXT-002-real-resend", + "parent_family": "TDD-WP7-EXT-002", + "requirement_ac_source": "AUTH-01、02、07、AC-01、33、41、47、49", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "已验证发信域名、正式受控普通/admin 邮箱、免费规则记录", + "numbered_steps": "1. 核 SPF/DKIM/免费规则;2. QQ/163/至少一种企业邮箱各发 20 封;3. 统计 2 分钟送达;4. 真实完成普通/admin 认证", + "expected_response_ui": "每类至少 19/20 在 2 分钟内且两类认证成功;否则阻止发布但不改 runtime service_status", + "expected_db_files": "只保存人工汇总/证据 hash;不建逐封 EmailVerificationEvent", + "forbidden_side_effects": "不用预置账号/mock 冒充,不保存验证码/真实邮箱进证据,不切付费备用", + "evidence_files": "delivery-summary.json、domain-check.json、auth-result.json、redaction.json" + }, + { + "case_id": "TDD-WP2-ERR-001-upstream-timeout", + "parent_family": "TDD-WP2-ERR-001", + "requirement_ac_source": "GEN-09、16、17.18、AC-04、53", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "独立 upstream_timeout fixture;已提交任务超时", + "numbered_steps": "1. 触发超时;2. 检查唯一下一步为“使用原输入重试”;3. 点击该动作;4. 查询原任务、新任务和项目", + "expected_response_ui": "原任务 failed/category=upstream_timeout;只提供“使用原输入重试”;动作后同项目新增一个 GenerationJob", + "expected_db_files": "原任务 release 一次且无 output;新任务独立 reserve 并保存相同输入关系快照", + "forbidden_side_effects": "不改成“稍后重试”;不要求修改输入/选择模型/联系管理员;不复用原任务 ID 或创建第二项目", + "evidence_files": "response.json、worker-events.json、db-diff.json、screenshots/upstream-timeout.png" + }, + { + "case_id": "TDD-WP2-PROJ-005-failed-draft-retry", + "parent_family": "TDD-WP2-PROJ-005", + "requirement_ac_source": "PROJECT-01、GEN-09、AC-04、43", + "fixture_ids": [ + "FX-PROJECT-EMPTY" + ], + "fixture_and_preconditions": "FX-PROJECT-EMPTY 和含成功图项目", + "numbered_steps": "1. 失败页重试两次;2. 返回工作台主动新建;3. 多选批量删除 failed_empty 与成功项目", + "expected_response_ui": "重试只在原 project 新增 job;主动新建才新 project;批量只接受无成功图草稿", + "expected_db_files": "原草稿保留 prompt/config;job 数递增;批量合格项 trashed,成功项目不变", + "forbidden_side_effects": "不把重试变新项目、不把成功项目纳入快捷批量、不丢草稿输入", + "evidence_files": "response.json、db-diff.json、trace.zip" + }, + { + "case_id": "TDD-WP7-EXT-003-real-amap", + "parent_family": "TDD-WP7-EXT-003", + "requirement_ac_source": "DYN-04、PRIV-03、AC-17、41、47", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "个人认证高德 Web 服务 Key、安全绑定和显式确认", + "numbered_steps": "1. 核接口/QPS/白名单/安全/免费规则;2. 执行定位/逆地理;3. 验证 1,000 硬限模拟/受控测试;4. 脱敏坐标证据", + "expected_response_ui": "接口、绑定和应用硬停止通过才解除;失败保持 externally_blocked", + "expected_db_files": "只写非敏感用量/状态/证据;测试坐标不关联真实项目", + "forbidden_side_effects": "不暴露 Key/真实用户坐标,不发第 1001 次,不启用付费或自动扩容", + "evidence_files": "amap-contract.json、external-calls.json、redaction.json、manual-review.json" + }, + { + "case_id": "TDD-WP4-EXP-001-cancel-pending-edit", + "parent_family": "TDD-WP4-EXP-001", + "requirement_ac_source": "EXPORT-03、AC-23", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "与上一 case 相同", + "numbered_steps": "1. 打开弹层;2. 取消未提交修改确认;3. 检查画布/撤销/网络", + "expected_response_ui": "弹层关闭或停留在未导出状态;无下载、无成功提示", + "expected_db_files": "state_version、latest_exports、撤销栈、保存队列均不因取消改变", + "forbidden_side_effects": "不提交当前编辑、不合成、不下载、不调 EXPORT_SAVE", + "evidence_files": "network-timeline.json、db-diff.json、trace.zip" + }, + { + "case_id": "TDD-WP0-DATA-001-root-validation", + "parent_family": "TDD-WP0-DATA-001", + "requirement_ac_source": "NFR-09、17.19、AC-41、55、56", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "参数化 repo/project/download/只读素材根、合规外部目录、已初始化后缺失目录", + "numbered_steps": "1. 用离线配置设置各路径;2. 启动;3. 删除已初始化根后重启;4. 调资源 API", + "expected_response_ui": "违规路径拒绝;合规路径可写;缺失根进入 data_missing 且不自动重建;浏览器只见逻辑资源 ID", + "expected_db_files": "仅合规首次初始化创建固定目录/DB;失败不创建散落目录", + "forbidden_side_effects": "不硬编码用户名、不回显绝对路径、不在源码/下载/素材根写业务数据", + "evidence_files": "config-result.json、fs-before.json、fs-after.json、response.json" + }, + { + "case_id": "TDD-WP3-WRK-001-recovery", + "parent_family": "TDD-WP3-WRK-001", + "requirement_ac_source": "GEN-08、09、CREDIT-03、AC-04、51", + "fixture_ids": [ + "FX-GATEWAY-ASYNC", + "FX-GATEWAY-UNKNOWN" + ], + "fixture_and_preconditions": "参数化 FX-GATEWAY-ASYNC 有引用和 FX-GATEWAY-UNKNOWN 无安全引用;在 submit 后终止 Worker", + "numbered_steps": "1. 使租约过期;2. 重启 Worker;3. 有引用分支 poll;4. 无引用分支终结;5. 再重启复查", + "expected_response_ui": "有引用不重新 submit,只 poll 到真实终态;无引用为 failed/unknown_retryable,后台显示成本核对待人工", + "expected_db_files": "租约重新领取;无引用 upstream_outcome_known=false、upstream_cost_reconciliation=pending_manual_review,release 一次", + "forbidden_side_effects": "不把 pending_manual_review 写入 job status;不补扣用户点数;不重复上游 submit/结算", + "evidence_files": "worker-events.json、db-diff.json、external-calls.json" + }, + { + "case_id": "TDD-WP0-SEC-001-credential-channel", + "parent_family": "TDD-WP0-SEC-001", + "requirement_ac_source": "PRIV-01、AC-41", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "Windows Credential Manager 测试条目;API/Worker 各需不同凭据;缺失/清除参数", + "numbered_steps": "1. Supervisor 读取;2. 通过对应匿名管道启动子进程;3. 检查命令行/环境/句柄;4. 清除并重启", + "expected_response_ui": "仅目标子进程能在内存读取一次;缺失时服务明确不可用/启动失败", + "expected_db_files": "不写业务 DB;只写非敏感状态与日志", + "forbidden_side_effects": "凭据不进参数、环境、文件、日志、崩溃诊断;API 不获网关密钥,Worker 不获 Resend/高德密钥", + "evidence_files": "process-env-scan.json、pipe-acl.json、redaction.json" + }, + { + "case_id": "TDD-WP5-CAT-001-catalog-1407", + "parent_family": "TDD-WP5-CAT-001", + "requirement_ac_source": "STATIC-01 至 04、AC-13、32", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "规范 catalog/metadata,含 3 组重复图和 part1-25", + "numbered_steps": "1. 编译/加载目录;2. 校验 ID/part/顺序/计数;3. 滚动全目录;4. 观察原图请求/DOM", + "expected_response_ui": "恰 1,407 项,重复图片保留不同稳定 ID;虚拟列表稳定,原图按需加载", + "expected_db_files": "只读 catalog;不复制或改写源;浏览器仅缓存允许公开项", + "forbidden_side_effects": "不去重业务 ID、不一次下载全量、不暴露绝对路径、不线性增长 DOM", + "evidence_files": "catalog-validation.json、network-timeline.json、dom-count.json、source-hashes.json" + }, + { + "case_id": "TDD-WP4-TXT-001-multiline-template-switch", + "parent_family": "TDD-WP4-TXT-001", + "requirement_ac_source": "TEXT-01 至 06、PROJECT-04、AC-09、10", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "多行文字模板实例、固定变换", + "numbered_steps": "1. 输入含换行文字并完成;2. 切换另一模板;3. 撤销/重做;4. 重开/导出", + "expected_response_ui": "换行持久;空内容按规则拒绝;切模板重置默认样式但保留位置/旋转/整体尺寸", + "expected_db_files": "每次完成一条撤销并保存最新 element snapshot", + "forbidden_side_effects": "不把切模板重置变换、不裁切内容、不保存取消编辑", + "evidence_files": "canvas-state.json、db-diff.json、pixel-diff.json、trace.zip" + }, + { + "case_id": "TDD-WP6-SVC-002-limit-recovery", + "parent_family": "TDD-WP6-SVC-002", + "requirement_ac_source": "ADMIN-08、09、NFR-08、AC-47、52", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "paused 服务;参数化下调 hard_limit、提高/付费/自动扩容、新周期/供应商恢复", + "numbered_steps": "1. 尝试各配置;2. 无确认恢复;3. 建立非敏感恢复检查;4. admin 明确确认", + "expected_response_ui": "只允许不扩大能力的下调并审计;提高/付费/自动扩容拒绝;满足条件+确认后恢复", + "expected_db_files": "成功下调/恢复与 AdminOperationLog 同事务;非法请求零变化", + "forbidden_side_effects": "不自动恢复、不保存凭据/供应商原文、不把暂停伪装成功或提高上限", + "evidence_files": "每参数 response.json、db-diff.json、screenshots/service-state.png" + }, + { + "case_id": "TDD-WP0-EVT-001-rest-refetch", + "parent_family": "TDD-WP0-EVT-001", + "requirement_ac_source": "PROJECT-04、GEN-14、NFR-05、DevelopmentPlan 6.2、AC-20、30", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "可控 SSE 序列:正常、断线、event_id 缺号、runtime/config 变化", + "numbered_steps": "1. 订阅 /api/v1/events;2. 注入事件;3. 断线/缺号;4. 观察 REST 请求和 UI", + "expected_response_ui": "事件只提示 ID/type/entity/version/time;每次由 REST 取真相;断线/缺号 bootstrap/refetch", + "expected_db_files": "SSE 不直接写业务表;REST 读取后前端状态更新", + "forbidden_side_effects": "不携带正文/图片/凭据,不把 runtime 事件写 ModelConfig,不抢焦点", + "evidence_files": "sse-events.json、network-timeline.json、trace.zip" + }, + { + "case_id": "TDD-WP6-DIAG-001-redacted-diagnostics", + "parent_family": "TDD-WP6-DIAG-001", + "requirement_ac_source": "PRIV-01、02、ADMIN-08、NFR-09、AC-41、55", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "总览/服务/存储/诊断包含所有状态;注入密钥、邮箱、路径、正文 trap", + "numbered_steps": "1. 请求各摘要;2. 复制诊断;3. 检查托盘诊断;4. 跑脱敏扫描", + "expected_response_ui": "仅显示固定非敏感字段、逻辑位置、计量和状态;复制内容一致", + "expected_db_files": "只读;可记录非敏感诊断访问/时间,不改变服务状态", + "forbidden_side_effects": "不含密钥/HMAC/邮箱/提示词/图片/绝对路径/供应商正文,不提供隐藏修复写入口", + "evidence_files": "response.json、diagnostic.txt、redaction.json、screenshots/diagnostics.png" + }, + { + "case_id": "TDD-WP2-PROJ-001-new-versus-continue", + "parent_family": "TDD-WP2-PROJ-001", + "requirement_ac_source": "PROJECT-01 至 03、GEN-04、11、AC-03、06、34", + "fixture_ids": [ + "FX-PROJECT-ACTIVE-19" + ], + "fixture_and_preconditions": "FX-PROJECT-ACTIVE-19、一个 9 图固定比例项目", + "numbered_steps": "1. 工作台新建两次;2. 在第一个项目继续生成;3. 尝试改比例;4. 补到 10 图再继续", + "expected_response_ui": "两次新建为两个 project;继续只新增 job/history且沿用比例;10 图阻断追加但可另建", + "expected_db_files": "projects +2;继续分支 project 数不变;成功 history 正确关联", + "forbidden_side_effects": "不默认追加最近项目、不创建第三项目、不改变既有项目比例、不让历史上限阻断其他新建", + "evidence_files": "response.json、db-diff.json、trace.zip" + }, + { + "case_id": "TDD-WP2-ERR-001-gateway-contract", + "parent_family": "TDD-WP2-ERR-001", + "requirement_ac_source": "GEN-13、16、17.18、AC-40、53", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "gateway_contract_invalid 创建前/后 fixture;另一个 contract verified 模型", + "numbered_steps": "1. 触发契约未验证/失效;2. 检查下一步仅“选择其他模型或联系管理员”;3. 显式改选已验证模型并重新确认;4. 无候选时检查联系管理员", + "expected_response_ui": "返回/保存 category=gateway_contract_invalid;已提交任务 failed;改选 verified 模型后才能新提交", + "expected_db_files": "创建前无 reserve/job;创建后 release 一次;失效模型 contract 状态按契约更新;新任务保存新模型/版本", + "forbidden_side_effects": "不提供等待、原输入/稍后重试;不让未验证模型提交;不自动切推荐或部分改写配置", + "evidence_files": "response.json、db-diff.json、external-calls.json、screenshots/gateway-contract.png" + }, + { + "case_id": "TDD-WP3-ADP-002-invalidate-revalidate", + "parent_family": "TDD-WP3-ADP-002", + "requirement_ac_source": "GEN-13、15、ADMIN-03、AC-30、40", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "三模型 verified;参数化端点/字段/参考图/响应/异步/查询/error protocol 变化", + "numbered_steps": "1. 改一个契约字段并保存;2. 尝试生成;3. 仅为该模型重跑完整矩阵;4. 再尝试", + "expected_response_ui": "变化后立即 unverified/不可新建;完整独立重验后才恢复 verified", + "expected_db_files": "新 config_version;对应 runtime/evidence 版本更新;其他模型证据不变", + "forbidden_side_effects": "不沿用旧证据、不局部 smoke 即 verified、不暗改 enabled/default/priority", + "evidence_files": "每字段 db-diff.json、contract-matrix.json、response.json" + }, + { + "case_id": "TDD-WP5-UPL-001-upload-metering", + "parent_family": "TDD-WP5-UPL-001", + "requirement_ac_source": "ADMIN-06、17.7、17.19、AC-31、55", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "PNG/WebP、坏 MIME/解码、稳定 ID 冲突;active/full/unavailable;原图+缩略图字节", + "numbered_steps": "1. multipart 上传并指定 part/order;2. 生成缩略图;3. 注入非法/冲突/容量状态;4. 重计量", + "expected_response_ui": "合法上传成功并可上架;非法/冲突明确失败;full/unavailable 阻断写但已有资源可读", + "expected_db_files": "原图/缩略图分别 reservation/managed_file 并计量;失败零文件/目录项", + "forbidden_side_effects": "不用扩展名替代解码、不漏计缩略、不部分覆盖稳定 ID、不在 full 写入", + "evidence_files": "response.json、db-diff.json、fs-before.json、fs-after.json" + }, + { + "case_id": "TDD-WP4-COL-001-deterministic-palette", + "parent_family": "TDD-WP4-COL-001", + "requirement_ac_source": "COL-01 至 05、AC-15 P0-A 子集、16", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "固定解码底图、mmcq-v1、四个 P0-A 色卡", + "numbered_steps": "1. 重复提取五色;2. 调裁剪/调色/滤镜;3. 换原始底图;4. 渲染四布局;5. 监控网络", + "expected_response_ui": "同图五色/顺序确定;处理不刷新;换底图刷新;四色卡消费同一五色", + "expected_db_files": "五色快照只在底图更换提交时保存;无上传文件", + "forbidden_side_effects": "不读取处理后像素/额外图片,不联网提色,不启用白名单外色卡", + "evidence_files": "palette.json、network-timeline.json、pixel-diff.json、db-diff.json" + }, + { + "case_id": "TDD-WP6-PRIV-002-open-after-audit", + "parent_family": "TDD-WP6-PRIV-002", + "requirement_ac_source": "ADMIN-05、17.10、AC-25、50", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "active admin A 已确认 current;目标含图片和完整提示词", + "numbered_steps": "1. 列表确认无正文;2. 不带 purpose/reason 调 PRIVATE_OPEN;3. 在提交钩子确认审计落库后才释放受控读取;4. 对同目标再打开", + "expected_response_ui": "每个入口原样“打开并记录审计”;每次打开成功且各生成一条访问审计", + "expected_db_files": "每次先 append 一条含 admin/目标/时间/content_type/expires_at 的 PrivateContentAccessLog;内容本身不入审计", + "forbidden_side_effects": "UI/API 不要求目的、原因或二次确认;不预取/hover 打开;不把正文放列表、HTML、缓存或证据", + "evidence_files": "response.json、db-diff.json、ordering-trace.json、trace.zip、screenshots/open-entry.png" + }, + { + "case_id": "TDD-WP6-PRIV-002-deny-without-audit", + "parent_family": "TDD-WP6-PRIV-002", + "requirement_ac_source": "ADMIN-05、17.10、AC-25", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "参数化未确认、普通用户/预览账号、停用 admin、审计 insert 失败", + "numbered_steps": "1. 调区域/PRIVATE_OPEN;2. 模拟审计约束失败;3. 枚举页面、SW、Cache、IndexedDB", + "expected_response_ui": "未确认 428;其他未授权 401/403/404 按冻结协议;审计失败返回非成功且无内容字节", + "expected_db_files": "未授权无访问审计;审计失败事务不留下伪成功记录,也不发放读取", + "forbidden_side_effects": "不返回正文/图片/可推导 URL;不写 AdminOperationLog 替代;不因 notice ack 省略逐次审计", + "evidence_files": "每参数 response.json、db-diff.json、cache-enumeration.json、trace.zip" + }, + { + "case_id": "TDD-WP1-DEL-001-account-delete", + "parent_family": "TDD-WP1-DEL-001", + "requirement_ac_source": "AUTH-06、AC-22、39、56", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "用户拥有项目、参考/生成/导出、坐标、点数、多个 session", + "numbered_steps": "1. 确认注销;2. 并发调用受保护 API;3. 尝试旧资源 ID/恢复;4. 用新邀请重新注册同邮箱", + "expected_response_ui": "注销成功后所有旧访问立即 401/404;不可恢复;新注册是全新账号", + "expected_db_files": "同事务撤销 sessions、删除身份/业务关系/未用点数并创建允许匿名事件;物理文件排队", + "forbidden_side_effects": "不延迟撤权到物理清理,不恢复旧 ID/点数/资料,不保留邮箱映射到匿名主体", + "evidence_files": "response.json、db-diff.json、worker-events.json、trace.zip" + }, + { + "case_id": "TDD-WP4-DYN-001-fixed-time", + "parent_family": "TDD-WP4-DYN-001", + "requirement_ac_source": "DYN-01 至 03、AC-14", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "可控时钟、DYN001-003/007/008/011 fixture", + "numbered_steps": "1. 插入/确认动态值;2. 推进墙钟;3. 重开;4. 导出", + "expected_response_ui": "使用插入/确认时快照,重开/导出不随当前时间变化;结果静态不可点击", + "expected_db_files": "动态实例只保存允许字段和值快照", + "forbidden_side_effects": "不保存定时器/外部链接,不在重开重新计算,不输出 GIF/视频", + "evidence_files": "canvas-state.json、clock-trace.json、pixel-diff.json" + }, + { + "case_id": "TDD-WP2-CRED-001-reserve", + "parent_family": "TDD-WP2-CRED-001", + "requirement_ac_source": "CREDIT-01 至 05、AC-03", + "fixture_ids": [ + "FX-CREDIT-ENOUGH", + "FX-MODEL-VERIFIED" + ], + "fixture_and_preconditions": "FX-CREDIT-ENOUGH、FX-MODEL-VERIFIED,无活动任务", + "numbered_steps": "1. 记录余额;2. 以成本 1 调 POST /api/v1/generations;3. 查询 /me/credits 和流水", + "expected_response_ui": "创建任务成功;UI 显示 available 9/reserved 1 和 queued;流水显示 generation_reserve", + "expected_db_files": "credit_accounts 原子 10/0→9/1;一条 reserve ledger、一个 queued job 和 outbox 同事务", + "forbidden_side_effects": "不提前生成 commit;不使总点数改变;不出现任务已建但未冻结或冻结无任务", + "evidence_files": "request.json、response.json、db-diff.json" + }, + { + "case_id": "TDD-WP0-DATA-002-no-backup-migration", + "parent_family": "TDD-WP0-DATA-002", + "requirement_ac_source": "AUTH-06、NFR-09、AC-24、56", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "有账号/项目/下载成品的 LocalDataRoot", + "numbered_steps": "1. 搜索 UI/API/包功能;2. 尝试导出项目包/DB/账号/点数;3. 删除根/重装;4. 启动模拟 P0-B 导入", + "expected_response_ui": "仅原图/JPG/PNG 下载可用;固定本机提示持续显示;删除/重装不可恢复;无迁移入口", + "expected_db_files": "下载目录文件保留;业务数据删除后不被重建或导入", + "forbidden_side_effects": "不自动备份、不生成迁移包、不把下载图识别为正式迁移数据", + "evidence_files": "route-inventory.json、package-scan.json、trace.zip、screenshots/fixed-copy.png" + }, + { + "case_id": "TDD-WP4-BG-002-processing-controls", + "parent_family": "TDD-WP4-BG-002", + "requirement_ac_source": "EDITOR-01 至 03、PROJECT-04、EXPORT-03、AC-07、20、23", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "固定底图和像素基线", + "numbered_steps": "1. 参数化填充/适配/裁剪/缩放/定位及亮度、对比度、饱和度、色温、锐度、预设滤镜;2. 完成;3. 撤销;4. 恢复原图;5. 导出/重开", + "expected_response_ui": "每项预览与提交值一致;完成一次撤销;导出/重开一致;恢复原图只清底图处理", + "expected_db_files": "每次提交进入保存的 Canvas JSON;取消无 DB 变化", + "forbidden_side_effects": "不影响覆盖元素,不持久化未提交预览,不用静默超范围值", + "evidence_files": "每参数 canvas-state.json、db-diff.json、pixel-diff.json、trace.zip" + }, + { + "case_id": "TDD-WP5-CACHE-001-no-private-client-state", + "parent_family": "TDD-WP5-CACHE-001", + "requirement_ac_source": "NFR-07、17.14、AC-46、48", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "已访问 public/preview/private、提示词和项目;注册 SW fixture", + "numbered_steps": "1. 完成各访问;2. 离线/刷新;3. 枚举 SW registrations、Cache keys/body、IndexedDB stores/records", + "expected_response_ui": "仅 public allowlist 元数据/资源存在;SW 不拦 preview/private;离线不能恢复私有正文/草稿", + "expected_db_files": "只允许 public_asset_lru 记录;业务 DB 无变化", + "forbidden_side_effects": "不仅凭响应头判断,不缓存 no-store 内容、项目/提示词/session/验证码/未保存编辑", + "evidence_files": "cache-enumeration.json、service-worker.json、trace.zip" + }, + { + "case_id": "TDD-WP2-CRED-002-admin-adjustment", + "parent_family": "TDD-WP2-CRED-002", + "requirement_ac_source": "CREDIT-05、06、ADMIN-01、09、AC-29、50", + "fixture_ids": [ + "FX-ACTOR-ADMIN-A", + "FX-JOB-ACTIVE" + ], + "fixture_and_preconditions": "FX-JOB-ACTIVE;available 0/reserved 1;FX-ACTOR-ADMIN-A", + "numbered_steps": "1. 管理员填写原因扣减 5;2. 用同 adjustment_id 重试;3. 用户读点数", + "expected_response_ui": "首次成功,重试返回同一结果;用户显示 available -5/reserved 1;无充值入口", + "expected_db_files": "available 0→-5,reserved 保持 1;一条 admin_adjustment ledger 和一条 AdminOperationLog 同事务", + "forbidden_side_effects": "不改活动任务/冻结流水;不重复调点;不允许空原因;不使生成流程自身制造负数", + "evidence_files": "response.json、db-diff.json、screenshots/negative-balance.png" + }, + { + "case_id": "TDD-WP2-ERR-001-model-disabled", + "parent_family": "TDD-WP2-ERR-001", + "requirement_ac_source": "GEN-07、16、17.18、AC-30、53", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "model_disabled 创建前 fixture;参数化存在/不存在其他 enabled 模型", + "numbered_steps": "1. 触发创建前阻断;2. 检查下一步仅“选择其他模型或等待”;3. 有可用模型时显式改选并确认;4. 无可用模型时保持页面等待", + "expected_response_ui": "返回 category=model_disabled 且不创建任务;改选后才能提交;无模型时保持禁用", + "expected_db_files": "阻断分支无 job/project/reference/reserve/outbox;改选分支按新模型快照创建", + "forbidden_side_effects": "不提供联系管理员、原输入重试或稍后重试;不自动切推荐或把 runtime 状态写回配置", + "evidence_files": "response.json、db-diff.json、external-calls.json、screenshots/model-disabled.png" + }, + { + "case_id": "TDD-WP0-LOG-001-rotation-redaction", + "parent_family": "TDD-WP0-LOG-001", + "requirement_ac_source": "PRIV-01、02、NFR-09、AC-41、56", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "生成超过 10 MiB/10 文件/30 天日志;注入密钥、邮箱、提示词、路径和写失败", + "numbered_steps": "1. 写边界日志;2. 触发轮转/保留清理;3. 复制诊断;4. 使目录不可写并尝试 AI", + "expected_response_ui": "轮转严格为 10 MiB/10 文件/30 天;诊断只含白名单;写失败进入 unavailable 并阻断 AI", + "expected_db_files": "只更新日志文件和非敏感状态;不改业务对象", + "forbidden_side_effects": "不记录敏感正文/绝对路径/供应商原文,不在日志失败时继续 AI", + "evidence_files": "log-manifest.json、redaction.json、response.json、external-calls.json" + }, + { + "case_id": "TDD-WP0-STO-003-full-matrix", + "parent_family": "TDD-WP0-STO-003", + "requirement_ac_source": "17.19、PROJECT-04、EXPORT-06、AC-55", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "managed bytes 恰为上限,status full,SQLite 可写", + "numbered_steps": "1. 保存纯 JSON project state;2. 读取/下载已有文件;3. 客户端合成并仅下载;4. 尝试 latest 保存和新生成;5. 永久删除/显式清理", + "expected_response_ui": "JSON 保存、读取、下载、仅下载、删除/清理入口可用;latest/新生成/其他二进制写为 507", + "expected_db_files": "JSON state_version 可增加;禁止项不新增 managed file/job/ledger;删除/清理只先逻辑提交/排队", + "forbidden_side_effects": "不自动删除;客户端下载不更新 latest_exports;排队不提前减少 managed bytes", + "evidence_files": "response.json、db-diff.json、fs-before.json、fs-after.json、trace.zip" + }, + { + "case_id": "TDD-WP5-CLN-001-reference-race", + "parent_family": "TDD-WP5-CLN-001", + "requirement_ac_source": "ADMIN-06、09、17.7、17.19、AC-31、50、55", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "查询时整批文件全部无任何发布/项目/待发布引用", + "numbered_steps": "1. 查询候选并由 admin A 创建 intent;2. 参数化确认前新增各类引用/快照过期/admin 变化;3. A 确认;4. 无竞态分支确认并运行 Worker", + "expected_response_ui": "任一新增引用整批 409 conflict+denied 审计;stale 重新查询;无竞态才整批排队/物理删除/重测", + "expected_db_files": "冲突 bytes/状态/queue 不变;成功排队不减量,物理后同事务更新并记录全阶段审计", + "forbidden_side_effects": "不让查询时有引用项入候选、不由 admin B 确认、不部分排队、不自动清理或提前减量", + "evidence_files": "每参数 response.json、db-diff.json、worker-events.json、fs-after.json" + }, + { + "case_id": "TDD-WP0-STO-001-byte-thresholds", + "parent_family": "TDD-WP0-STO-001", + "requirement_ac_source": "17.19、AC-55", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "第 5.5 节七个精确字节 fixture,可写目录", + "numbered_steps": "1. 对每个值重计量;2. 读取 storage state/API/UI;3. 重复计算", + "expected_response_ui": "normal/warning/critical/full 边界逐字节正确,重复结果确定", + "expected_db_files": "只更新 measured bytes/notice/status/last_measured_at;无 managed file 变化", + "forbidden_side_effects": "不用浮点比例导致错一字节,不自动删除,不把 warning/critical 当阻断", + "evidence_files": "每值 result.json、db-diff.json、screenshots/capacity-bar.png" + }, + { + "case_id": "TDD-WP2-CRED-001-finalize-once", + "parent_family": "TDD-WP2-CRED-001", + "requirement_ac_source": "CREDIT-03、05、GEN-09、10、AC-03、04、29", + "fixture_ids": [ + "FX-JOB-ACTIVE" + ], + "fixture_and_preconditions": "参数化成功、技术失败和安全拒绝的 FX-JOB-ACTIVE", + "numbered_steps": "1. Worker 提交终态;2. 重复 callback/poll;3. 模拟 Worker 重启再处理", + "expected_response_ui": "成功为 succeeded;技术失败为 failed;安全拒绝为 rejected;用户余额/动作匹配固定类别", + "expected_db_files": "每任务恰一条 commit 或 release;reserved 恰减一次;成功才建 output/history,失败/拒绝 available 恢复", + "forbidden_side_effects": "不双重 commit/release;不在失败建 output;终态不可逆;不保存供应商原文", + "evidence_files": "worker-events.json、db-diff.json、fs-before.json、fs-after.json" + }, + { + "case_id": "TDD-WP1-AUTH-002-invalid-invite", + "parent_family": "TDD-WP1-AUTH-002", + "requirement_ac_source": "AUTH-01、02、AC-02", + "fixture_ids": [ + "FX-INVITE-EXPIRED" + ], + "fixture_and_preconditions": "参数化 FX-INVITE-EXPIRED/DISABLED/EXHAUSTED 和不存在的邀请码", + "numbered_steps": "1. 对每个参数调 REGISTER_SEND;2. 检查 Resend mock 调用;3. 查询认证相关表", + "expected_response_ui": "返回冻结的非成功错误语义并在邀请码字段显示原因,第二阶段不展开", + "expected_db_files": "users/user_profiles/credit_accounts/privacy_consents/email_challenges/sessions 无新增;邀请码计数不变", + "forbidden_side_effects": "Resend 调用为 0;不建号、不赠点、不占名额、不写成功审计或成功提示", + "evidence_files": "每参数 response.json、db-diff.json、external-calls.json、screenshots/error.png" + }, + { + "case_id": "TDD-WP2-PROJ-003-trash-restore-purge", + "parent_family": "TDD-WP2-PROJ-003", + "requirement_ac_source": "PROJECT-03、08、AC-21", + "fixture_ids": [ + "FX-PROJECT-ACTIVE-20" + ], + "fixture_and_preconditions": "active project、FX-PROJECT-ACTIVE-20、可控 720 小时时钟", + "numbered_steps": "1. 移入回收站;2. 满 20 时恢复;3. 释放名额再恢复;4. 主动永久删除;5. 另一项目推进到 purge_at", + "expected_response_ui": "满额恢复阻断且时间不变;释放后可恢复;purge 后立即不可见/不可恢复", + "expected_db_files": "status/deleted_at/purge_at 精确;purged 撤销访问关系并排物理清理", + "forbidden_side_effects": "不提前物理结果、不因恢复重算 purge_at、不让 purged 资源可读", + "evidence_files": "response.json、db-diff.json、worker-events.json" + }, + { + "case_id": "TDD-WP2-PROJ-002-debounce", + "parent_family": "TDD-WP2-PROJ-002", + "requirement_ac_source": "PROJECT-04、06、AC-20", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "saved project version N、可控前端时钟", + "numbered_steps": "1. 1 秒内完成多次已提交编辑;2. 在首个保存请求在途时继续编辑;3. 释放响应并推进时钟;4. 撤销/重做", + "expected_response_ui": "同时最多一请求;第一份后下一请求为合并后的最新完整状态;状态 saving→saved", + "expected_db_files": "每次成功 state_version +1;最终 project_states 为最新已提交 JSON;撤销/重做也正常保存", + "forbidden_side_effects": "不逐操作并发;不保存 Fabric 私有字段;不把未提交编辑或撤销栈写浏览器持久存储", + "evidence_files": "network-timeline.json、response.json、db-diff.json、trace.zip" + }, + { + "case_id": "TDD-WP0-SUP-001-lifecycle", + "parent_family": "TDD-WP0-SUP-001", + "requirement_ac_source": "NFR-09、AC-24、41", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "真实便携包;参数化第二实例、43121 占用、API/Worker 崩溃、正常退出", + "numbered_steps": "1. 双击启动;2. 注入各故障;3. 观察托盘/重启次数;4. 退出并等待 15 秒", + "expected_response_ui": "单实例;端口占用明确失败且不换端口;有限重启/degraded/允许动作符合契约;退出后无残留", + "expected_db_files": "仅规定日志/状态记录;正常退出 flush WAL/队列;不改业务真相", + "forbidden_side_effects": "不无限重启、不杀无关进程、不弹隐藏控制台、不留下 API/Worker/端口", + "evidence_files": "process-tree.json、port.json、supervisor-events.json、screenshots/system-ui.png" + }, + { + "case_id": "TDD-WP6-AUD-001-sensitive-operations", + "parent_family": "TDD-WP6-AUD-001", + "requirement_ac_source": "ADMIN-09、17.16、AC-50", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "每类规定敏感操作 fixture,含贴纸清理各阶段和 system 配置生效", + "numbered_steps": "1. 逐类执行成功/拒绝;2. 查询 AdminOperationLog;3. 查询 PrivateContentAccessLog;4. 尝试改删/越权查看", + "expected_response_ui": "每次操作同事务形成不可变、非敏感 before/after/result;两类审计分离;只有 admin 查看", + "expected_db_files": "AdminOperationLog 条数/actor_type/ref/expires_at 正确;私有打开只写专表", + "forbidden_side_effects": "不漏失败审计、不重复保存私有正文、不记录白名单/密钥/验证码/路径、不允许人工修改删除", + "evidence_files": "operation-matrix.json、db-diff.json、redaction.json、trace.zip" + }, + { + "case_id": "TDD-WP4-VIS-001-browser-diff", + "parent_family": "TDD-WP4-VIS-001", + "requirement_ac_source": "NFR-02、AC-19、23、32", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "最终 RELEASE Chrome/Edge、固定 Canvas/字体/动态值/DPR", + "numbered_steps": "1. 等待资源稳定;2. 两浏览器截图/导出;3. 计算元素边界/显著像素;4. 人工复核已知替代", + "expected_response_ui": "结构、字体、换行、颜色、描边、装饰在第 10.1 阈值内;替代项明确标记", + "expected_db_files": "只生成视觉证据;业务状态使用同一 fixture", + "forbidden_side_effects": "不用低保真 PNG 作像素基准,不用阈值掩盖缺字体/空画布,不冒充全 P0-B", + "evidence_files": "每场景 pixel-diff.json、layout-boxes.json、manual-review.json、截图" + }, + { + "case_id": "TDD-WP7-AC-001-trace-structure", + "parent_family": "TDD-WP7-AC-001", + "requirement_ac_source": "NFR-05、52 当前 AC、109 需求 ID、13 模块、19 契约、9 错误", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "冻结 allowlist、89 family 定义、117 case 定义、页面矩阵和全部 evidence manifest", + "numbered_steps": "1. 运行 pnpm validate:tdd-trace;2. 注入缺 AC/重复主责/P0-B passed/未知需求/孤儿 family/case 缺字段/错误父族解析;3. 恢复后重跑", + "expected_response_ui": "每种破坏均非零且定位;正确状态返回 0:52 AC、109 唯一 ID、89/89 family 有 case、117 case 字段齐全", + "expected_db_files": "只生成 family/trace validation manifest;不改业务 DB", + "forbidden_side_effects": "不信任手写合计、不让 AC-08/26/37/54 计 passed、不允许未知父族、删除末段式解析或空 automation/release_gate", + "evidence_files": "family-manifest.json、trace-validation.json、negative-fixtures.json" + }, + { + "case_id": "TDD-WP1-AUTH-001-valid-register", + "parent_family": "TDD-WP1-AUTH-001", + "requirement_ac_source": "AUTH-01 至 04、AC-01", + "fixture_ids": [ + "FX-CHALLENGE", + "FX-INVITE-VALID" + ], + "fixture_and_preconditions": "FX-INVITE-VALID、FX-CHALLENGE;占名额普通账号为 9;未注册 .invalid 邮箱", + "numbered_steps": "1. 调 REGISTER_SEND;2. 读取模拟 Resend 验证码;3. 以署名、社交 ID、当前告知 version/同意和同一 registration_id 调 REGISTER_COMPLETE;4. 调普通 session", + "expected_response_ui": "两次均符合成功 Schema;注册后得到普通 audience 的 30 天会话并进入创作,点数显示 available 10/reserved 0", + "expected_db_files": "users/user_profiles/credit_accounts/privacy_consents 各新增正确关系;invite_codes.used_count +1;challenge 只消费一次;新增 session 只存 token 摘要;初始点数流水一次", + "forbidden_side_effects": "不创建 super_admin;不保存验证码明文;不重复赠点或核销邀请码;不产生第二会话/第二注册实体", + "evidence_files": "request.json、response.json、db-diff.json、trace.zip、screenshots/registered.png" + }, + { + "case_id": "TDD-WP5-WHITE-001-p0a-allowlist", + "parent_family": "TDD-WP5-WHITE-001", + "requirement_ac_source": "TEXT-01、TEXT-04、COL-01、DYN-01、DYN-08、STATIC-01、ADMIN-07、NFR-02、NFR-07、AC-32、42、48", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "普通用户无 grant、预览用户有单批 grant、注册全量模板", + "numbered_steps": "1. 分别读取公开/预览 manifest;2. 搜索白名单外 ID;3. 浏览所有面板", + "expected_response_ui": "普通用户仅 32 文字、实际字体+FONT081、4 色卡、10 动态、1,407 贴纸;预览只多授权批次", + "expected_db_files": "只读;授权不改变 role", + "forbidden_side_effects": "不向普通用户暴露白名单外 passed/internal,不提前开放 P0-B,不遗漏白名单;AC-54 为未来 P0-B,不进入本 case 的当前验收或 passed 关联", + "evidence_files": "manifest.json、response.json、trace.zip、screenshots/allowlist.png" + }, + { + "case_id": "TDD-WP4-BG-001-switch-background", + "parent_family": "TDD-WP4-BG-001", + "requirement_ac_source": "GEN-12、EDITOR-01、PROJECT-04、AC-07", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "画布含文字/贴纸/色卡/动态元素和已调底图,项目有第二历史图", + "numbered_steps": "1. 记录覆盖元素;2. 确认换底图;3. 检查参数/色卡;4. 撤销/重做;5. 重开", + "expected_response_ui": "覆盖层位置尺寸保留;底图处理重置;五色重提;一次撤销且重开一致", + "expected_db_files": "完整 Canvas state 自动保存并 state_version 递增", + "forbidden_side_effects": "不删除/缩放覆盖层,不保留旧调色,不产生多次撤销或改项目比例", + "evidence_files": "canvas-before.json、canvas-after.json、db-diff.json、trace.zip、pixel-diff.json" + }, + { + "case_id": "TDD-WP0-PKG-001-portable-zip", + "parent_family": "TDD-WP0-PKG-001", + "requirement_ac_source": "NFR-01、09、AC-24、41、56", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "release build、空白 Windows 用户目录", + "numbered_steps": "1. 生成 win-x64 ZIP/哈希/START-HERE/RELEASE;2. 解压非仓库目录;3. 离线启动;4. 扫描制品和端口", + "expected_response_ui": "包含 Dada.exe、随包 Node/native 依赖并固定 43121;说明与 RELEASE 一致", + "expected_db_files": "仅合规 LocalDataRoot 生成运行数据;制品本身不可变", + "forbidden_side_effects": "不含真实配置/凭据/用户名/LocalDataRoot,不动态换端口,不要求 Docker/安装器", + "evidence_files": "package-manifest.json、sha256.txt、package-scan.json、process-tree.json" + }, + { + "case_id": "TDD-WP4-A11Y-001-keyboard-focus", + "parent_family": "TDD-WP4-A11Y-001", + "requirement_ac_source": "NFR-06、AC-32", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "第 11.1 节全部 page_id,最长文案、弹层和 200% 缩放", + "numbered_steps": "1. 仅键盘走主流程;2. 检查 skip link/focus order/弹层返回;3. 触发 live region;4. 运行 axe;5. 测画布等价控件", + "expected_response_ui": "所有动作可达,焦点不逃逸/不被 SSE 抢走;critical/serious 为 0;状态非仅颜色", + "expected_db_files": "无非用户触发业务写;可访问性扫描只产证据", + "forbidden_side_effects": "不用正 tabindex、不隐藏主动作、不以缩小字体规避 200% 问题", + "evidence_files": "每页 axe.json、focus-trace.json、trace.zip、screenshots/200pct.png" + }, + { + "case_id": "TDD-WP1-NOTICE-001-registration-consent", + "parent_family": "TDD-WP1-NOTICE-001", + "requirement_ac_source": "AUTH-03、PRIV-04、06、AC-01、41、56", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "当前告知 version/effective_at/hash;缺字段、未勾选和完整参数", + "numbered_steps": "1. 展开注册第二阶段;2. 检查全部处理方/用途/本机风险;3. 未同意提交;4. 同意当前 version 注册", + "expected_response_ui": "未同意/版本错误不能注册;完整告知原样可达;成功进入创作", + "expected_db_files": "失败无 user/consent/invite/credit;成功记录 consent version/time 与账号同事务", + "forbidden_side_effects": "不省略 AI/Resend/高德、DYN004、管理员访问、注销、180 天、无备份/迁移;不预勾选", + "evidence_files": "response.json、db-diff.json、screenshots/notice-expanded.png" + }, + { + "case_id": "TDD-WP2-EXP-002-empty-latest", + "parent_family": "TDD-WP2-EXP-002", + "requirement_ac_source": "EXPORT-04、AC-23、38 P0-A 子集", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "从未导出但有成功原图的项目", + "numbered_steps": "1. 打开项目详情/latest 区;2. 请求 JPG/PNG latest;3. 使用允许动作", + "expected_response_ui": "显示“暂无导出成品”,只提供进入编辑并导出和下载原始生成图", + "expected_db_files": "latest_exports 无行且不因读取创建;原图读取只读", + "forbidden_side_effects": "不自动合成/保存默认成品,不伪造跨设备下载,不改变项目", + "evidence_files": "response.json、db-diff.json、trace.zip、screenshots/no-export.png" + }, + { + "case_id": "TDD-WP7-UI-001-page-state-evidence", + "parent_family": "TDD-WP7-UI-001", + "requirement_ac_source": "UIDesign 全页、NFR-02、06、AC-24、25、32、41、55、56", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "第 11.1 节 22 page_id 与适用状态、最终 Chrome/Edge、100%/200%", + "numbered_steps": "1. 逐非 N/A 单元运行 case;2. 截图/键盘/axe;3. 验证全局容量条;4. 对照 Pencil 相关 frame;5. 人工复核", + "expected_response_ui": "所有 UIDesign 页面/状态有实现证据且无重叠;Canvas Index 不实现;无 frame 页面不漏测", + "expected_db_files": "只生成 UI 证据;交互 DB 变化由所属业务 case 证明", + "forbidden_side_effects": "不用 PNG OCR 推文案、不把 frame 当页面全集、不以 N/A 逃避容量条/错误态", + "evidence_files": "每单元 trace.zip、axe.json、screenshots/100pct.png、screenshots/200pct.png、manual-review.json" + }, + { + "case_id": "TDD-WP4-EXP-001-format-ratio", + "parent_family": "TDD-WP4-EXP-001", + "requirement_ac_source": "EXPORT-01 至 03、AC-23", + "fixture_ids": [ + "FX-CANVAS-RATIOS" + ], + "fixture_and_preconditions": "FX-CANVAS-RATIOS,JPG quality 参数化 80/92/100,PNG", + "numbered_steps": "1. 对四比例分别导出 JPG/PNG;2. 解码像素/ICC;3. 与 Canvas fixture 比较", + "expected_response_ui": "尺寸精确为 1080×1440、1080×1080、1440×1080、1080×1920;sRGB、无水印、PNG 无损、JPG 范围/默认正确", + "expected_db_files": "纯客户端合成本身无 DB 变化;后续保存只处理同一 Blob", + "forbidden_side_effects": "不缩放到其他尺寸;PNG 时质量控件不可聚焦;不因导出改变画布/撤销栈", + "evidence_files": "每组合 result.json、image-metadata.json、pixel-diff.json、export-hash.json" + }, + { + "case_id": "TDD-WP2-ERR-001-upstream-failed", + "parent_family": "TDD-WP2-ERR-001", + "requirement_ac_source": "GEN-09、16、17.18、AC-04、53", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "独立 upstream_failed fixture;已提交任务临时失败", + "numbered_steps": "1. 触发临时失败;2. 检查唯一下一步为“稍后重试”;3. 在受控条件恢复后点击;4. 查询原任务、新任务和项目", + "expected_response_ui": "原任务 failed/category=upstream_failed;只提供“稍后重试”;动作后同项目新增一个 GenerationJob", + "expected_db_files": "原任务 release 一次且无 output;新任务独立 reserve 和关系快照", + "forbidden_side_effects": "不显示“使用原输入重试”或输入/模型修改动作;不自动重试、不创建第二项目", + "evidence_files": "response.json、worker-events.json、db-diff.json、screenshots/upstream-failed.png" + }, + { + "case_id": "TDD-WP0-STO-003-cleanup-remeasure", + "parent_family": "TDD-WP0-STO-003", + "requirement_ac_source": "ADMIN-06、17.19、AC-31、55", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "full;查询时全部为无引用、可清理的历史贴纸文件", + "numbered_steps": "1. 查询候选并创建 intent;2. 参数 A 在确认前给其中一项新增 active/trashed 项目、已发布版本或待发布引用,再确认;3. 参数 B 保持全部无引用并确认;4. 读取排队容量;5. Worker 物理删除并重计量", + "expected_response_ui": "A 返回 ASSET_HISTORY_REFERENCE_CONFLICT 且整批不排队;B 整批排队,排队阶段仍 full,物理删除并重计量后才按真实值恢复", + "expected_db_files": "A 只追加 result=denied 审计且 managed bytes 不变;B scheduled 前后 bytes 不变,物理成功后 files/queue/bytes/status/last_measured_at 同事务更新", + "forbidden_side_effects": "不让查询时已有引用文件进入候选;不部分排队冲突批次;不在物理删除前减量;不自动创建 intent", + "evidence_files": "每参数 response.json、db-diff.json、worker-events.json、fs-before.json、fs-after.json" + }, + { + "case_id": "TDD-WP2-BAL-001-balance-impact", + "parent_family": "TDD-WP2-BAL-001", + "requirement_ac_source": "GEN-14、15、17.17、AC-04、51", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "参数化 model/account/unknown 影响;活动任务与空闲模型", + "numbered_steps": "1. 注入余额不足;2. 结算已提交任务;3. GET models/后台;4. 重复事件;5. 未确认恢复前尝试启用", + "expected_response_ui": "影响范围按规则;任务 failed+release 一次;runtime 不可用;恢复前操作阻断", + "expected_db_files": "GatewayBalanceState/affected models/runtime/审计更新;ModelConfig hash 不变", + "forbidden_side_effects": "不自动充值、不用 Dada 点数继续调用、不重复 release、不自动恢复或改默认/priority", + "evidence_files": "response.json、db-diff.json、worker-events.json、external-calls.json" + }, + { + "case_id": "TDD-WP2-ERR-001-safety-rejected", + "parent_family": "TDD-WP2-ERR-001", + "requirement_ac_source": "GEN-10、16、17.18、AC-04、53", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "供应商明确安全拒绝证据;与 reference fixture 完全分离", + "numbered_steps": "1. 触发安全拒绝;2. 检查唯一下一步为“修改提示词或参考图”;3. 不修改输入尝试继续;4. 修改提示词或参考图后提交", + "expected_response_ui": "原任务 rejected/category=safety_rejected;未修改时不能新提交;修改后同项目新增 GenerationJob", + "expected_db_files": "原任务 release 一次、无 output;修改前无新 job/reserve;修改后新任务保存修正快照", + "forbidden_side_effects": "不提供原样/稍后重试、选择模型或联系管理员;不保存违规输出;不映射为 reference_invalid", + "evidence_files": "response.json、worker-events.json、db-diff.json、screenshots/safety-rejected.png" + }, + { + "case_id": "TDD-WP2-ERR-001-gateway-balance", + "parent_family": "TDD-WP2-ERR-001", + "requirement_ac_source": "GEN-15、16、17.17、17.18、AC-40、51、53", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "gateway_balance_insufficient 创建前/后 fixture;明确未受影响模型集合", + "numbered_steps": "1. 触发余额不足;2. 检查下一步仅“选择未受影响模型或联系管理员”;3. 显式选择未受影响模型并重新确认;4. 无候选时检查联系管理员", + "expected_response_ui": "返回/保存 category=gateway_balance_insufficient;已提交任务 failed;只有改选未受影响模型后才能新提交", + "expected_db_files": "创建前无 reserve/job;创建后 release 一次;新任务使用改选模型快照;runtime 影响范围按 GEN-15 更新", + "forbidden_side_effects": "不提供等待、原输入/稍后重试或任意“其他模型”;不自动充值、不用 Dada 点数恢复、不回写 ModelConfig", + "evidence_files": "response.json、db-diff.json、external-calls.json、screenshots/gateway-balance.png" + }, + { + "case_id": "TDD-WP3-MDL-002-cas-conflict", + "parent_family": "TDD-WP3-MDL-002", + "requirement_ac_source": "ADMIN-03、AC-30", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "两个 admin 基于 expected N 编辑不同完整集合", + "numbered_steps": "1. A 保存为 N+1;2. B 仍以 N 保存;3. B 刷新", + "expected_response_ui": "A 成功;B 返回 412 MODEL_CONFIG_VERSION_CONFLICT 和最新安全摘要", + "expected_db_files": "仅 A 的 immutable set、pointer、审计/outbox 存在;B 零写入", + "forbidden_side_effects": "B 不覆盖 A、不自动 merge、不复用过期配置继续提交", + "evidence_files": "两份 response.json、db-diff.json、trace.zip" + }, + { + "case_id": "TDD-WP1-DEL-002-anonymous-retention", + "parent_family": "TDD-WP1-DEL-002", + "requirement_ac_source": "AUTH-06、17.10、17.11、AC-22、39", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "注销前有生成/点数事件和私有访问审计;可控 180 天时钟", + "numbered_steps": "1. 注销;2. 检查匿名字段;3. 在到期前尝试管理删除;4. 到期运行 Worker", + "expected_response_ui": "匿名事件只含允许统计;访问审计目标不可反推;到期前不可删,到期后系统清理", + "expected_db_files": "原身份关联移除;随机匿名主体无映射;expires_at 不因注销延长;到期行删除", + "forbidden_side_effects": "不保留邮箱/IP/提示词/图片/项目/job 原 ID,不让管理员手删或延长期限", + "evidence_files": "db-diff.json、retention-events.json、redaction.json" + }, + { + "case_id": "TDD-WP3-MDL-002-replace-default", + "parent_family": "TDD-WP3-MDL-002", + "requirement_ac_source": "ADMIN-03、17.2、AC-30", + "fixture_ids": [ + "FX-MODEL-VERIFIED" + ], + "fixture_and_preconditions": "FX-MODEL-VERIFIED,current set version N", + "numbered_steps": "1. 完整提交三模型集合:停用当前默认并指定另一个 enabled default;2. 带 expected N/Idempotency-Key;3. GET models", + "expected_response_ui": "保存成功,读取始终恰一个 enabled default,config_set_version=N+1", + "expected_db_files": "新 immutable set/必要 config versions、AdminOperationLog/outbox 写入,最后原子切 current pointer", + "forbidden_side_effects": "不出现可见零默认/双默认中间态;不逐行部分保存;不改无关 runtime", + "evidence_files": "request.json、response.json、db-diff.json、transaction-trace.json" + }, + { + "case_id": "TDD-WP1-AUTH-003-entry-state-matrix", + "parent_family": "TDD-WP1-AUTH-003", + "requirement_ac_source": "AUTH-01、02、05、06、AC-33", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "参数化未注册、active 已注册、deleted、suspended 邮箱;注册和登录两个入口", + "numbered_steps": "1. 每种邮箱分别调注册发码与登录发码;2. 对允许分支完成验证码;3. 检查页面不自动切入口", + "expected_response_ui": "行为严格匹配 PRD AUTH-02 状态矩阵;deleted 仅可新邀请注册;suspended 均提示联系管理员", + "expected_db_files": "只允许的分支创建 challenge/session/new user;重复注册不核销邀请码;deleted 新建主体与旧主体无关联", + "forbidden_side_effects": "不静默注册/登录转换;不恢复 deleted 数据;不因 suspended 释放名额;错误不泄漏后台白名单", + "evidence_files": "每参数 response.json、db-diff.json、trace.zip、screenshots/entry-state.png" + }, + { + "case_id": "TDD-WP4-PERF-001-budget", + "parent_family": "TDD-WP4-PERF-001", + "requirement_ac_source": "NFR-03、AC-27、32", + "fixture_ids": [ + "FX-CANVAS-50" + ], + "fixture_and_preconditions": "FX-CANVAS-50、1,407 贴纸目录、四比例导出、最终浏览器", + "numbered_steps": "1. 预热一次;2. 每预算运行五次;3. 记录 p50/p95/max/memory/DOM;4. 注入导出失败", + "expected_response_ui": "第 10.2 节所有预算通过;失败不破坏 project/latest;资源面板节点不线性增长", + "expected_db_files": "只生成性能数据;失败分支 DB/latest 不变", + "forbidden_side_effects": "不提高超时、减少元素/素材或降低尺寸掩盖失败,不用 Chromium 替代真实浏览器", + "evidence_files": "performance.json、memory.json、dom-count.json、environment.json" + }, + { + "case_id": "TDD-WP2-CRED-001-insufficient", + "parent_family": "TDD-WP2-CRED-001", + "requirement_ac_source": "CREDIT-04、AC-28", + "fixture_ids": [ + "FX-CREDIT-INSUFFICIENT" + ], + "fixture_and_preconditions": "FX-CREDIT-INSUFFICIENT,成本 1", + "numbered_steps": "1. UI 检查生成按钮;2. 直接调生成 API 防绕过;3. 查询 DB/网关 mock", + "expected_response_ui": "UI 禁用并显示 available/reserved/required/联系管理员;API 返回冻结错误语义", + "expected_db_files": "余额、ledger、job、project、reference、outbox 均无变化", + "forbidden_side_effects": "上游调用 0;无 storage reservation/staging 文件;不产生负余额", + "evidence_files": "response.json、db-diff.json、external-calls.json、screenshots/insufficient.png" + }, + { + "case_id": "TDD-WP0-STO-002-over-limit", + "parent_family": "TDD-WP0-STO-002", + "requirement_ac_source": "17.19、NFR-05、AC-55", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "已计量+活动预留=5,368,709,119,预计写 2 字节", + "numbered_steps": "1. 分别尝试生成/参考图/export/贴纸原图/缩略图;2. 查询所有副作用", + "expected_response_ui": "每次 507 STORAGE_CAPACITY_EXCEEDED,返回非敏感状态和 remaining bytes", + "expected_db_files": "storage state 保持由实际量决定;无新 reservation/managed file/latest export/job/ledger/outbox", + "forbidden_side_effects": "上游调用 0;无 staging 残留;不把单个超大请求伪造成持久 full(若现有承诺仍低于上限)", + "evidence_files": "每路由 response.json、db-diff.json、fs-after.json、external-calls.json" + }, + { + "case_id": "TDD-WP2-ERR-001-reference-invalid", + "parent_family": "TDD-WP2-ERR-001", + "requirement_ac_source": "GEN-05、16、17.18、AC-04、44、53", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "格式/大小/数量和非安全型内容不可用四组 fixture;不得使用安全拒绝响应", + "numbered_steps": "1. 分别触发创建前/后无效;2. 检查唯一下一步为“更换或移除参考图”;3. 不改参考图尝试继续;4. 更换/移除后提交", + "expected_response_ui": "category=reference_invalid;未修改时不创建新任务;更换/移除后同项目新增 GenerationJob", + "expected_db_files": "创建前无 job/reserve;创建后 failed+release 一次;修正后保存新的 reference snapshot", + "forbidden_side_effects": "不提供修改提示词、重试、等待、选模型或联系管理员;不映射为 safety_rejected", + "evidence_files": "每 fixture response.json、worker-events.json、db-diff.json、screenshots/reference-invalid.png" + }, + { + "case_id": "TDD-WP4-EXP-001-confirm-pending-edit", + "parent_family": "TDD-WP4-EXP-001", + "requirement_ac_source": "PROJECT-04、06、EXPORT-03、AC-23", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "saved 画布、一次未提交文字/样式编辑、撤销栈深度 U", + "numbered_steps": "1. 打开导出;2. 看到“导出前需要提交当前修改”;3. 确认;4. 等待画布稳定并启动正常自动保存;5. 合成导出;6. 执行一次撤销", + "expected_response_ui": "导出使用确认后的状态;确认使撤销栈 U→U+1 且撤销可回到确认前;导出动作不再增加撤销项", + "expected_db_files": "确认后的完整状态进入正常保存队列;保存成功按 PROJECT-04 增加 state_version;latest 是否更新由后续保存结果决定", + "forbidden_side_effects": "不在确认时产生多条撤销;不以导出额外编辑画布;不导出确认前状态;不跳过自动保存流程", + "evidence_files": "undo-trace.json、network-timeline.json、export-hash.json、trace.zip、screenshots/pending-confirm.png" + }, + { + "case_id": "TDD-WP3-BAL-001-confirmed-recovery", + "parent_family": "TDD-WP3-BAL-001", + "requirement_ac_source": "GEN-14、15、ADMIN-09、AC-51", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "余额导致 model/account/unknown runtime unavailable;无/有真实恢复确认", + "numbered_steps": "1. 未确认时点击恢复;2. 执行非敏感健康检查;3. admin 明确确认;4. 重新计算所有阻断原因", + "expected_response_ui": "无确认失败;确认真实恢复后只解除已满足原因,仍有其他原因则继续 unavailable", + "expected_db_files": "recovery check、GatewayBalanceState/runtime/AdminOperationLog 同事务更新;config set 不变", + "forbidden_side_effects": "不自动恢复/充值,不补扣用户点数,不清除仍存在的 contract/Worker 阻断", + "evidence_files": "response.json、db-diff.json、external-calls.json、screenshots/recovery.png" + }, + { + "case_id": "TDD-WP4-DYN-003-identity-font", + "parent_family": "TDD-WP4-DYN-003", + "requirement_ac_source": "DYN-05 至 09、AC-18、19", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "用户社交 ID 含/不含 @;实例覆盖;DYN012/FONT081", + "numbered_steps": "1. 插入身份贴纸;2. 修改实例覆盖;3. 检查账号资料;4. 插入 DYN012;5. 重开/导出", + "expected_response_ui": "最多一个前导 @;实例覆盖独立且不改账号;DYN012 使用 FONT081 并明确标注替代", + "expected_db_files": "只保存实例 snapshot;UserProfile 不变", + "forbidden_side_effects": "不声称 DIN 字体、不静默回退、不执行 Lua/Prefab、不把覆盖写账号", + "evidence_files": "canvas-state.json、db-diff.json、font-load.json、pixel-diff.json" + }, + { + "case_id": "TDD-WP0-CACHE-001-public-lru", + "parent_family": "TDD-WP0-CACHE-001", + "requirement_ac_source": "NFR-07、17.14、AC-46、48", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "公开资源超过 157,286,400 字节;internal/private/project/提示词 fixture", + "numbered_steps": "1. 按访问顺序填充 public cache;2. 触发写前 LRU;3. 尝试缓存私有类型;4. 枚举 SW/Cache/IndexedDB", + "expected_response_ui": "总量不超上限,淘汰最久未用且当前资源可重取;私有类型均不缓存", + "expected_db_files": "public_asset_lru 只含公开元数据;业务 DB 无变化", + "forbidden_side_effects": "不缓存 internal preview、私有内容、项目、验证码、session、未保存编辑;不计用户下载", + "evidence_files": "cache-enumeration.json、lru-trace.json、trace.zip" + }, + { + "case_id": "TDD-WP0-FILE-001-atomic-commit", + "parent_family": "TDD-WP0-FILE-001", + "requirement_ac_source": "NFR-05、17.19、AC-44、55", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "受控文件驱动;合法/错误 MIME、hash、..、符号链接逃逸;各崩溃点", + "numbered_steps": "1. 流式写 staging;2. 校验/预留;3. 在改名/DB 提交前后终止;4. 重启对账", + "expected_response_ui": "非法输入拒绝;成功对象完整可读;崩溃后恢复为已提交或补偿清理,不出现半对象", + "expected_db_files": "reservation、managed_files、staging/正式文件按提交点一致;启动对账修复计量", + "forbidden_side_effects": "不接受扩展名猜 MIME、不越根、不产生可读半文件/孤儿引用/重复计量", + "evidence_files": "response.json、crash-points.json、db-diff.json、fs-before.json、fs-after.json" + }, + { + "case_id": "TDD-WP2-REF-001-reference-lifecycle", + "parent_family": "TDD-WP2-REF-001", + "requirement_ac_source": "GEN-05、PROJECT-09、AC-44、48", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "新上传、同项目已有 reference、他人/跨项目/撤销/已 purge reference", + "numbered_steps": "1. 提交前在页面选择/移除;2. multipart 新上传;3. 同项目复用;4. 尝试越权/失效;5. 删除项目", + "expected_response_ui": "提交前仅内存;每 job 独立关系快照;仅同 owner+project 可复用;purge 后立即不可读", + "expected_db_files": "成功建立 job reference/managed file;移除前无文件;purge 撤销关系并排清理", + "forbidden_side_effects": "不修改旧任务关系、不跨用户/项目复用、不缓存预提交图片、不暴露路径", + "evidence_files": "每参数 response.json、db-diff.json、fs-after.json、cache-enumeration.json" + }, + { + "case_id": "TDD-WP7-REL-001-final-release-record", + "parent_family": "TDD-WP7-REL-001", + "requirement_ac_source": "NFR-01、09、AC-24、41", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "最终便携 ZIP、START-HERE、SHA-256、RELEASE,真实验收电脑", + "numbered_steps": "1. 校验制品 hash;2. 导入 Windows build/Chrome/Edge 品牌、major/full version;3. 两浏览器跑全部发布 E2E/视觉/性能;4. 比较候选基线", + "expected_response_ui": "RELEASE/制品/诊断/门禁值一致;任一漂移使旧视觉/性能失去发布资格并重跑", + "expected_db_files": "只生成发布记录/证据;业务 fixture 在隔离验收根", + "forbidden_side_effects": "不缺 RELEASE、不手填假版本、不接受前一 major/Chromium、不动态换端口", + "evidence_files": "RELEASE.json、environment.json、package-manifest.json、evidence.json" + }, + { + "case_id": "TDD-WP2-PROJ-002-cas-success", + "parent_family": "TDD-WP2-PROJ-002", + "requirement_ac_source": "PROJECT-04、17.3、AC-20", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "owner project version N,完整合法 Canvas JSON", + "numbered_steps": "1. PUT state with If-Match: N;2. GET project;3. 用相同幂等请求重放", + "expected_response_ui": "首次成功并返回 saved/N+1;重放返回第一次结果", + "expected_db_files": "UPDATE ... state_version=N 命中一行;project_states 新快照,state_version 仅 +1", + "forbidden_side_effects": "不隐式上传/复制/派生资源;不泄漏或接受他人资源引用;不因重放 +2", + "evidence_files": "request.json、response.json、db-diff.json" + }, + { + "case_id": "TDD-WP4-TXT-003-catalog-search-recent", + "parent_family": "TDD-WP4-TXT-003", + "requirement_ac_source": "TEXT-01、17.6、AC-09、32", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "P0-A 32 文字模板、四分类、稳定 catalog、两个用户", + "numbered_steps": "1. 未选模板尝试加文字;2. 按显示名称搜索;3. 检查分类/顺序;4. 使用模板;5. 切换账号读最近使用", + "expected_response_ui": "只能从模板添加;四类/显示名搜索/稳定顺序正确;最近使用按账号隔离", + "expected_db_files": "只在成功使用后更新 recent_assets;未选/搜索不写项目", + "forbidden_side_effects": "不提供独立普通文字,不复用普通贴纸搜索,不跨账号共享最近项", + "evidence_files": "catalog.json、response.json、db-diff.json、trace.zip" + }, + { + "case_id": "TDD-WP1-AUTH-001-final-recheck-race", + "parent_family": "TDD-WP1-AUTH-001", + "requirement_ac_source": "AUTH-01、NFR-04、AC-01、02、45", + "fixture_ids": [ + "FX-INVITE-VALID" + ], + "fixture_and_preconditions": "FX-INVITE-VALID 已成功发码;随后参数化为邀请码耗尽/停用/过期或第 10 个名额被另一事务占用", + "numbered_steps": "1. 完成前改变可变条件;2. 调 REGISTER_COMPLETE;3. 用相同 Idempotency-Key 重试", + "expected_response_ui": "返回对应冻结错误;不建立 session,不进入创作;相同重试返回同一失败结果", + "expected_db_files": "BEGIN IMMEDIATE 后无新 user/profile/credit/consent/session;邀请码次数不增加;名额统计不变", + "forbidden_side_effects": "不出现账号已建但邀请码未核销、邀请码已核销但账号未建或初始点数孤儿流水", + "evidence_files": "response.json、db-diff.json、transaction-trace.json" + }, + { + "case_id": "TDD-WP3-MDL-001-seed-read", + "parent_family": "TDD-WP3-MDL-001", + "requirement_ac_source": "GEN-01、ADMIN-03、17.2、AC-30", + "fixture_ids": [ + "FX-MODEL-SEED" + ], + "fixture_and_preconditions": "全新迁移后的 FX-MODEL-SEED", + "numbered_steps": "1. 启动迁移;2. 调 GET /api/v1/models;3. 查集合约束", + "expected_response_ui": "返回固定三模型;Flash 唯一 configured default;priority 1/2/3;recommended null;三者 contract unverified/runtime unavailable", + "expected_db_files": "一个 current set,三个 immutable member/version,独立 runtime 行", + "forbidden_side_effects": "不把 unverified 标为 available;不生成第二默认;不把 recommended 写配置", + "evidence_files": "response.json、db-diff.json" + }, + { + "case_id": "TDD-WP5-RES-001-three-access-classes", + "parent_family": "TDD-WP5-RES-001", + "requirement_ac_source": "PRIV-02、05、17.12、13、AC-42、48", + "fixture_ids": [ + + ], + "fixture_and_preconditions": "public、internal_preview、private 资源及不同主体/grant", + "numbered_steps": "1. 请求三类 manifest/资源;2. 推导 stable ID/路径;3. 撤销 grant 后重取;4. 检查 headers/缓存", + "expected_response_ui": "public 可匿名于产品授权范围读取;preview 每次验 grant/no-store;private 仅所有者/受控 admin;越权 403/404", + "expected_db_files": "读取无业务写,访问审计仅私有完整内容规定入口产生", + "forbidden_side_effects": "不混路由/cache header,不返回路径/internal manifest,不用公开 ID 推导私有对象", + "evidence_files": "每主体 response.json、headers.json、cache-enumeration.json" + } + ] +} diff --git a/tasks.md b/tasks.md new file mode 100644 index 0000000..dba44e1 --- /dev/null +++ b/tasks.md @@ -0,0 +1,391 @@ +# Dada P0-A 开发任务计划 + +| 文档项 | 内容 | +| --- | --- | +| 文档版本 | 1.1 | +| 编写日期 | 2026-07-27 | +| 当前交付 | 仅 P0-A Windows 本机测试版 | +| 产品需求唯一权威 | `PRD.md` v1.10 | +| 功能导航 | `FeatureSummary.md` 1.1 | +| 工程基线 | `DevelopmentPlan.md` 1.1 | +| UI 基线 | `UIDesign.md` 1.0 | +| TDD 基线 | 哈希锁定的 `tdd.md`,文件内版本 1.4,89 个测试族、117 个规范 case | +| 低保真基线 | `Dada-P0A-LowFi.pen` 与 `Dada-LowFi-Preview/` | +| 机器可读任务记录 | `tasks.manifest.json`,逐任务固定 requirements、AC、DevelopmentPlan 章节、case、模块、TDD 动作、命令、证据与 UI 映射 | +| 当前状态 | 开发尚未开始;所有任务初始为 `not_started`;`RELEASE.json` 尚不存在 | +| 文档职责 | 把 WP-0 至 WP-7 拆为可执行开发任务,固定依赖、产出、测试归属和完成门禁;不修改需求、架构、UI 或测试语义 | + +## 1. 冻结输入与解释规则 + +### 1.1 输入校验 + +| 输入 | 版本 | SHA-256 | +| --- | --- | --- | +| `PRD.md` | 1.10 | `31F93674DF1A90B557FEE3AA9E74FB084E246CA8FE09F6BD4B1DC9D56D606565` | +| `FeatureSummary.md` | 1.1 | `6F80E272AAB08A5525B54501D83F16A4F6A7A170596947BBC25F1DA54F2FE844` | +| `DevelopmentPlan.md` | 1.1 | `7C579E9DF8D00DA9333F587D05FC966123437EE68575D87D73C903C1487FA9D6` | +| `UIDesign.md` | 1.0 | `0C449DF833E5471843E17EB74F5B470EBC955F117CAF1D79AC9C0EF90DE763F0` | +| `tdd.md` | 文件内版本 1.4 | `41EABEE330122FFB44752F834A97EAAE5C1CF35B99CB33B61AE6889077F96BFD` | +| `Dada-P0A-LowFi.pen` | Pencil 2.14,19 个顶层画板 | `A352C8F205E9399EB2E6306176253AF6FF65DDDBB9FDCEA2E2FE13E3C3459975` | + +用户输入把该 `tdd.md` 称为 1.3,但给出的 SHA-256 与当前文件完全一致,而文件头为 1.4。任务计划以哈希锁定的实际文件为准,因此后文统一登记为 1.4;不得把同一哈希改写为 1.3。 + +8 张低保真预览 PNG 的哈希已与 `tdd.md` 第 1.2.2 节一致。`.pen` 的 19 个顶层画板中,`Z8p3I` Canvas Index 只作设计资产索引,不属于产品页面;其余画板只约束相应页面的布局参考,不替代 `UIDesign.md` 的页面全集和文案权威。 + +### 1.2 权威与变更处理 + +1. 产品范围、状态、权限、业务规则、数据语义和 AC 结果只由 `PRD.md` 决定。 +2. `FeatureSummary.md` 只用于导航十三个功能模块、十九个契约、状态和 AC。 +3. `DevelopmentPlan.md` 固定技术栈、组件边界、API、SQLite、事务、进程、存储和 WP 顺序;任务不得重新选型或留下实现二选一。 +4. `UIDesign.md` 固定页面、控件、文案、焦点、状态和视觉规则;低保真只作布局和层级参考。 +5. `tdd.md` 固定 Red-Green-Refactor、89 个父测试族、117 个规范 case、证据和门禁。本计划不合并、删除或弱化 case。 +6. 四份全局 Markdown 任一哈希变化时,全部任务停止产出通过证据并按 `tdd.md` 标记受影响项为 `source_changed`。低保真变化按 frame 影响范围局部失效;范围不可判定时失效全部 UI、视觉和 E2E 证据。 + +## 2. 任务执行协议 + +### 2.1 状态与基本单位 + +任务状态沿用 `tdd.md`:`not_started`、`red`、`green`、`externally_blocked`、`passed`、`source_changed`。一个开发任务可以拥有多个父测试族,但每个父测试族在本计划中只有一个开发任务主责;`tdd.md` 第 6.9 节中属于该父族的全部规范 case 自动归属同一任务。 + +每个任务按固定顺序执行: + +1. 校验冻结输入哈希和上游依赖状态。 +2. 从所属规范 case 建立最小失败测试,保存 `red_reason`、禁止副作用和 Red 证据。 +3. 只实现使测试通过的最小行为,不添加 PRD 之外的入口、状态、配置或回退。 +4. 运行本层、所属 WP、跨 WP 依赖和安全脱敏回归。 +5. 在测试持续 Green 时重构,不改变 OpenAPI、Schema、事务或 UI 行为。 +6. 写入 `artifacts/tdd//` 证据;缺 Red、最终 Green 或必要人工/真实证据时不得标记 `passed`。 + +### 2.2 Definition of Ready + +任务进入 `red` 前必须同时满足: + +- 冻结哈希一致,受影响源没有未处理的 `source_changed`; +- 规范 case 的需求 ID、AC、fixture、层级、禁止副作用和证据目录已确定; +- 外部调用使用 mock;真实验证只通过显式 `pnpm validate:external` 执行; +- 测试使用临时 SQLite、临时 LocalDataRoot、独立浏览器 profile 和脱敏 fixture,不读取真实业务实例。 + +硬依赖未 Green 时,下游可以编写并执行只针对已冻结契约、独立 fixture 或 mock 接口的 Red 测试,也可以完成 mock 接线;不得进入依赖真实上游行为的最小 Green 实现,更不得标记 Green、passed 或工作包完成。硬依赖 Green 是从 Red 进入 Green 的前置条件,不是建立 Red 的前置条件。 + +### 2.3 Definition of Done + +单个任务达到 `green` 必须满足: + +- 所属父测试族及全部规范 case 已保存可复现 Red 和最终 Green 结果; +- 所有固定层级分别通过,不能用 E2E 代替 DB/API,也不能用 mock 代替 EXT-REAL; +- 状态、响应、持久化、文件、UI 和禁止副作用均有断言; +- `evidence_refs` 完整且脱敏扫描通过; +- 所属 WP 回归和本计划第 5 节的跨包契约回归通过; +- 没有 P0-B、P1 或明确不做能力混入。 + +任务含 EXT-REAL 或 MANUAL 层级时,本地自动化 Green 后可以进入 `externally_blocked`;只有真实/人工证据齐全才为 `passed`。WP 只有在本 WP 所有任务达到其规定门禁、且“不能提前宣告”条件全部消除后才能完成。 + +### 2.4 仓库级测试接口前置 + +WP-0 必须建立并持续维护以下脚本:`pnpm test:unit`、`test:integration`、`test:api`、`test:worker`、`test:e2e`、`test:visual`、`test:performance`、`test:security`、`test:package`、`validate:tdd-trace`、`test:all` 和 `validate:external`。任一失败返回非零;普通 CI 不运行真实外部验证。 + +## 3. 依赖顺序与并行边界 + +| 阶段 | 可执行工作 | 硬门禁 | +| --- | --- | --- | +| A | WP-0 全部任务 | 无上游;WP-0 Green 后才开放业务实现完成声明 | +| B | WP-1;WP-5 的只读编译器、catalog 和资源路由骨架可启动 | WP-1 依赖 WP-0;WP-5 依赖 WP-0 | +| C | WP-2;WP-5 继续 | WP-2 依赖 WP-0、WP-1 | +| D | WP-3、WP-4、WP-5 可并行;WP-4 最终素材视觉集成等待 WP-5 | WP-3/WP-4 依赖 WP-2;WP-5 最终 renderer 集成依赖 WP-4 | +| E | WP-6 | 依赖 WP-1、WP-2、WP-5;模型页最终状态另依赖 WP-3 | +| F | WP-7 | WP-0 至 WP-6 Green、三个外部阻塞具备真实验证条件 | + +依赖未 Green 时,下游可以先写 Red、Schema fixture 或 mock 接线,但不能标记 Green。AI 网关、Resend、高德和最终真实 Chrome/Edge 是发布外部门禁,不阻止其本地状态机和 mock 分支开发,但不得伪装成已完成集成。 + +## 4. 可执行开发任务 + +### 4.1 WP-0 基础工程与本机边界 + +主责范围:PRIV-01、PRIV-02、NFR-01、NFR-07、NFR-09;AC-24、AC-46、AC-55、AC-56。 + +| 任务 | 硬依赖 | 实现与产出 | 唯一主责测试族 | Green / 禁止提前宣告 | +| --- | --- | --- | --- | --- | +| `TASK-WP0-01` 工程骨架与冻结依赖 | 无 | 建立 pnpm monorepo、唯一 lockfile、React/Vite/TypeScript、Fabric、Fastify、TypeBox、Drizzle/better-sqlite3、Node Worker 和 .NET 8 Supervisor 最小可运行骨架;接通第 2.4 节脚本入口 | `TDD-WP0-DEP-001` | 精确版本安装、类型检查、React/Fabric 渲染、Fastify、native 模块和随包 Node 预检通过;失败时先修订 DevelopmentPlan,不得私自换栈 | +| `TASK-WP0-02` Schema、OpenAPI 与事件基线 | `TASK-WP0-01` | 建立 TypeBox 单一 Schema 来源、OpenAPI 3.1、生成客户端、统一错误信封、correlation ID、SSE 非敏感事件和 REST refetch/bootstrap | `TDD-WP0-API-001`、`TDD-WP0-EVT-001` | OpenAPI snapshot 与运行校验一致;事件不承载业务真相或私有正文;断线/缺号恢复通过 | +| `TASK-WP0-03` 回环访问与浏览器硬门禁 | `TASK-WP0-02` | 固定 `127.0.0.1:43121`、Host/Origin/CORS 防护、最小 gate shell、UA-CH 交叉校验、24 小时短期支持 Cookie、全产品路由前置 426 门禁 | `TDD-WP0-BND-001`、`TDD-WP0-BRW-001`、`TDD-WP0-BRW-002` | 局域网/其他 Host/Origin、非 Windows、其他品牌、错误 major、UA-CH 缺失/冲突和直调 API 均不可进入;支持分支最终 passed 等待 WP-7 真实记录 | +| `TASK-WP0-04` LocalDataRoot 与本机数据边界 | `TASK-WP0-01` | 建立目录布局、路径规范化、资源 ID 隔离、data_missing、只读素材根校验、无备份/无归档/无迁移边界和固定本机风险提示接线 | `TDD-WP0-DATA-001`、`TDD-WP0-DATA-002` | 违规目录、符号链接和路径逃逸拒绝;已初始化根缺失不自动重建;浏览器不见绝对路径;产品无业务导入/项目包/恢复入口 | +| `TASK-WP0-05` 容量状态、预留与文件一致性 | `TASK-WP0-02`、`TASK-WP0-04` | 实现 LocalBackendStorageState、精确阈值、storage reservation、staging 流式校验、同卷原子改名、managed file、补偿队列、启动对账和物理删除后重测 | `TDD-WP0-STO-001`、`TDD-WP0-STO-002`、`TDD-WP0-STO-003`、`TDD-WP0-FILE-001` | 写前只用 `>` 拒绝,恰好 5 GB 写入成功后 full;超限零副作用;full/unavailable 动作不同;未物理删除前不减字节 | +| `TASK-WP0-06` 公开客户端缓存 | `TASK-WP0-02`、`TASK-WP0-04` | 建立 150 MiB public allowlist LRU、Cache Storage/IndexedDB 元数据、写前淘汰和 Service Worker 路由边界 | `TDD-WP0-CACHE-001` | 逐场景枚举实际浏览器存储;internal/private/项目/提示词/未保存草稿均不进入持久缓存 | +| `TASK-WP0-07` Supervisor、凭据和运行诊断 | `TASK-WP0-01`、`TASK-WP0-04`、`TASK-WP0-05` | 实现单实例 mutex、固定端口检查、API/Worker 启停与有限重启、15 秒退出、Credential Manager 匿名管道注入、托盘状态、离线配置命令和脱敏诊断 | `TDD-WP0-SUP-001`、`TDD-WP0-SEC-001` | 第二实例、端口占用、startup/api/worker degraded、凭据缺失/清除/重启和子进程残留均有确定行为;不动态换端口、不泄露凭据 | +| `TASK-WP0-08` 日志、轮转和不可写联动 | `TASK-WP0-05`、`TASK-WP0-07` | 建立 API/Worker/Supervisor JSONL 白名单日志、10 MiB/10 文件/30 天轮转、诊断复用脱敏器和日志不可写状态联动 | `TDD-WP0-LOG-001` | 日志不含密钥、邮箱、提示词、图片、绝对路径或供应商原文;日志不可写进入 unavailable 并阻断 AI | +| `TASK-WP0-09` 隔离 CI 与便携包 | `TASK-WP0-01` 至 `TASK-WP0-08` | 配置 Windows Gitea Runner 隔离流水线;生成 Dada.exe、随包 Node、API/Worker、迁移、资源元数据、`RELEASE.json` 占位规则、`START-HERE.txt`、ZIP 和 SHA-256 | `TDD-WP0-PKG-001` | CI 不读真实凭据、LocalDataRoot 或 3.57 GB 归档;包固定 43121、零真实配置/路径;正式 RELEASE 记录在 WP-7 冻结 | + +WP-0 结束时运行:`test:unit`、`test:integration`、`test:api`、`test:worker`、`test:security`、`test:package` 和所属 E2E。真实浏览器支持记录尚未冻结时,AC-24 只能保持 Green 或 externally_blocked,不能 passed。 + +### 4.2 WP-1 认证、权限、数据模型与审计基础 + +主责范围:AUTH-01 至 AUTH-07、PRIV-03、PRIV-04、PRIV-06、NFR-04;AC-01、AC-02、AC-22、AC-33、AC-39、AC-45、AC-49。 + +| 任务 | 硬依赖 | 实现与产出 | 唯一主责测试族 | Green / 禁止提前宣告 | +| --- | --- | --- | --- | --- | +| `TASK-WP1-01` 认证数据与邀请注册事务 | WP-0 | 建立 UserProfile、邀请码、验证码挑战、普通账号初始点数/registration_grant、幂等键与事务;接入 Resend mock | `TDD-WP1-AUTH-001`、`TDD-WP1-AUTH-002` | 发码前/建号前复核;有效注册一次提交;无效、过期、停用、耗尽邀请零副作用 | +| `TASK-WP1-02` 登录状态机、会话与登录画面 | `TASK-WP1-01` | 实现注册/登录分离入口、未注册/已注册/已注销/suspended 状态、10 分钟验证码、60 秒重发、30 天 opaque session、CSRF 和退出/暂停/注销撤销;按 `Z0pf8` 落实普通用户登录布局、艺术带、管理员文字入口、固定本机提示和焦点 | `TDD-WP1-AUTH-003`、`TDD-WP1-AUTH-004` | 六类身份状态不静默换流程;验证码不可复用;会话撤销即时生效;普通与管理员 audience 分离;登录页状态与布局证据齐全 | +| `TASK-WP1-03` 注册展开态、内测告知与账号名额 | `TASK-WP1-01`、`TASK-WP1-02` | 实现版本化内测告知、必选确认、资料字段、active+suspended 普通账号 10 人上限、deleted 释放和 super_admin 不占名额;按 `DVPM8` 落实邀请/邮箱只读摘要、资料、告知和注册主动作 | `TDD-WP1-NOTICE-001`、`TDD-WP1-SLOT-001` | 告知覆盖 PRD 固定事项;未同意不建号;第 11 个普通账号被阻断;多个同权限 super_admin 合法;注册展开态状态与布局证据齐全 | +| `TASK-WP1-04` 管理员白名单与安全配置生效 | WP-0、`TASK-WP1-01`、`TASK-WP1-02` | 实现 HMAC 管理员白名单、独立管理员认证、多管理员、安全配置 revision、原子应用/回滚、system 审计和离线恢复边界 | `TDD-WP1-ADM-001`、`TDD-WP1-CFG-001` | 非白名单发码前拒绝;普通账号不能原地提升;配置失败不部分生效;部署人员不成为产品角色或审计 actor | +| `TASK-WP1-05` 注销、匿名保留与物理清理 | `TASK-WP1-01` 至 `TASK-WP1-04` | 实现注销事务、立即撤权与断链、邮箱释放、匿名事件、物理清理队列和最长 180 天保留 | `TDD-WP1-DEL-001`、`TDD-WP1-DEL-002` | 旧数据不可恢复;原邮箱只能新邀请新建;匿名事件不可反查;注销不延长私有访问审计期限 | +| `TASK-WP1-06` 两类审计基础不可变性 | WP-0、`TASK-WP1-04`、`TASK-WP1-05` | 建立 AdminOperationLog 与 PrivateContentAccessLog 表、append-only trigger、合法 retention/privacy purge 作用域和非敏感摘要 | `TDD-WP1-AUD-001` | 普通连接不能改删;两类日志不混用;正文、图片、密钥和路径不进入审计 | + +WP-1 的认证 UI 同步实现 `user-auth` 与 `admin-auth` 的正常、加载、失败和禁用状态。Resend mock Green 不等于正式认证 passed;真实送达与正式账号链由 WP-7 完成。 + +### 4.3 WP-2 项目、点数与 GenerationJob + +主责范围:CREDIT-01 至 CREDIT-06、PROJECT-01 至 PROJECT-09、GEN-03 至 GEN-06、GEN-11、GEN-12、GEN-14、GEN-16、NFR-05;AC-03 至 AC-06、AC-20、AC-21、AC-28、AC-29、AC-34、AC-35、AC-36 P0-A 子集、AC-38 P0-A 子集、AC-43、AC-44、AC-51、AC-53。 + +| 任务 | 硬依赖 | 实现与产出 | 唯一主责测试族 | Green / 禁止提前宣告 | +| --- | --- | --- | --- | --- | +| `TASK-WP2-01` 项目、历史、失败草稿与空工作台 | WP-0、WP-1 | 实现新建项目、项目内追加、固定比例、20 active、10 成功图、默认命名/重命名、failed_empty 重试和批量入回收站;按 `WbDYT` 落实无项目工作台艺术带、生成表单和空任务区 | `TDD-WP2-PROJ-001`、`TDD-WP2-PROJ-005` | 新建/追加/上限不混淆;重试只新建任务;有成功图项目不能进入 failed_empty 批量操作;艺术带仅在无项目工作台出现 | +| `TASK-WP2-02` 自动保存与多标签冲突 | `TASK-WP2-01` | 实现 Dada Canvas Schema、1 秒 debounce、单请求在途、最新快照合并、If-Match CAS、dirty/saving/saved/failed/conflicted、离开守卫和一次冲突本地导出 | `TDD-WP2-PROJ-002`、`TDD-WP2-PROJ-004` | 旧标签不能覆盖或另存副本;冲突页只读且仅一次本地导出,不写 latest;刷新只恢复 saved | +| `TASK-WP2-03` 回收站、恢复与 purge | `TASK-WP2-01`、WP-0 文件清理 | 实现 trashed、精确 `+720h` purge_at、20 active 恢复限制、立即撤权和异步物理清理 | `TDD-WP2-PROJ-003` | 满 20 时保持 trashed;purged 后立即不可读;删除排队不伪造容量下降 | +| `TASK-WP2-04` 点数账户、流水与管理员调点 | WP-1、WP-0 SQLite | 实现 available/reserved、reserve/commit/release、不可变 ledger、operation_key、余额不足和带原因的 admin adjustment | `TDD-WP2-CRED-001`、`TDD-WP2-CRED-002` | 生成流程 available 不为负;结算一次;调点只改 available、可为负,reserved 不变,流水和审计同事务 | +| `TASK-WP2-05` 生成提交、单任务、参考图与生成中工作台 | `TASK-WP2-01`、`TASK-WP2-04`、WP-0 存储 | 实现 multipart 提交、config/cost 复核、`BEGIN IMMEDIATE`、活动任务部分唯一索引、参考图内存态/流式提交/关系快照、幂等和 412 重确认;按 `d99Lo` 落实生成中工作台、当前任务、冻结点数、critical 容量条和禁用提交 | `TDD-WP2-GEN-001`、`TDD-WP2-GEN-003`、`TDD-WP2-REF-001` | 同账号只建一个活动任务;第二提交返回当前任务且不建项目/关系/冻结;过期配置和无效参考图零持久副作用;生成中页面不显示假进度且提交动作按状态禁用 | +| `TASK-WP2-06` 任务终态、九类错误与网关余额影响 | `TASK-WP2-04`、`TASK-WP2-05`;WP-3 Adapter 接口 mock | 实现成功/失败/rejected、输出落盘与一次结算、固定九类错误、用户动作、GatewayBalanceState model/account/unknown 影响和 pending_manual_review | `TDD-WP2-GEN-002`、`TDD-WP2-BAL-001`、`TDD-WP2-ERR-001` | `reference_invalid` 与 `safety_rejected` 分离;供应商原文不泄露;runtime 变化不回写 ModelConfig;用户点数只释放一次 | +| `TASK-WP2-07` 原图与 latest export 服务 | `TASK-WP2-01`、`TASK-WP2-02`、WP-0 存储 | 实现历史原图下载、latest JPG/PNG 资源关系、同 Blob 上传、后端失败矩阵和无导出成品空态 | `TDD-WP2-EXP-001`、`TDD-WP2-EXP-002` | 客户端下载与后端保存结果独立;失败保留旧 latest;从未导出不自动合成;不承诺跨设备下载 | + +WP-2 同步交付 `workspace`、`current-task`、`projects`、`project-detail`、`credits` 和 `settings` 的业务接线。真实模型完成态与真实点数结算仍依赖 WP-3,不得用 Adapter mock 宣告 AC-40。 + +### 4.4 WP-3 三模型契约验证与适配 + +主责范围:GEN-01、GEN-02、GEN-07 至 GEN-10、GEN-13、GEN-15、ADMIN-03;AC-30、AC-40。 + +| 任务 | 硬依赖 | 实现与产出 | 唯一主责测试族 | Green / 禁止提前宣告 | +| --- | --- | --- | --- | --- | +| `TASK-WP3-01` ModelConfig 集合与原子替换 | WP-2 | 实现三模型固定 seed、immutable config_version/config_set、恰好一个 enabled default、唯一正整数 priority、完整集合 CAS、替代默认错误和审计 | `TDD-WP3-MDL-001`、`TDD-WP3-MDL-002` | 初始 1/2/3 优先级;缺失/非正/重复/零或多默认整批拒绝;切换无可见中间态;失败原集合不变 | +| `TASK-WP3-02` 独立 runtime 与推荐模型 | `TASK-WP3-01`、WP-2 余额状态 | 实现 runtime reason/version、configured default/runtime/recommended 三层读取、空推荐、人工恢复和余额影响审计 | `TDD-WP3-MDL-003`、`TDD-WP3-BAL-001` | 降级/恢复不改 enabled/default/priority;推荐只从可用候选派生;成本核对不补扣用户点数 | +| `TASK-WP3-03` 三个独立 Adapter 与契约证据 | `TASK-WP3-01`、WP-2 Generation 接口 | 分别实现三个 Adapter、纯文字/参考图/四比例、同步/异步、响应、一图、错误映射;配置字段变化令对应模型 unverified;提供 mock 和受控真实验证 | `TDD-WP3-ADP-001`、`TDD-WP3-ADP-002` | 三模型 fixture/证据不得共用;完整重验前不可恢复 verified;真实证据未齐时任务保持 externally_blocked | +| `TASK-WP3-04` Worker 租约、崩溃恢复与结算接线 | `TASK-WP3-03`、`TASK-WP2-06` | 实现领取、租约、心跳、poll、崩溃恢复、无安全引用的 unknown_retryable、一次 release 和人工成本核对 | `TDD-WP3-WRK-001` | 有上游引用只 poll、不重新 submit;未知结果终止用户任务且不双结算;Worker degraded 禁止新任务 | + +WP-3 本地 mock 全 Green 后,如任一模型缺最后一次配置对应的真实证据,整个 WP-3 保持 `externally_blocked`,AC-30 的纯配置行为可 Green,AC-40 不得 passed。 + +### 4.5 WP-4 桌面编辑器与导出 + +主责范围:EDITOR-01 至 EDITOR-09、TEXT-01 至 TEXT-14、COL-01 至 COL-05、DYN-01 至 DYN-09、EXPORT-01 至 EXPORT-06、NFR-03、NFR-06;AC-07、AC-09 至 AC-12、AC-14、AC-16 至 AC-19、AC-23 P0-A 子集、AC-27、AC-32。 + +| 任务 | 硬依赖 | 实现与产出 | 唯一主责测试族 | Green / 禁止提前宣告 | +| --- | --- | --- | --- | --- | +| `TASK-WP4-01` 编辑器壳、Canvas Schema 与底图 | WP-2;使用 WP-5 稳定 fixture | 按 UIDesign/低保真实现三栏编辑器、顶部/底部状态、Fabric 转换边界、底图填充/适配/裁剪/调色/滤镜/恢复原图和换底图 | `TDD-WP4-BG-001`、`TDD-WP4-BG-002` | 底图参数可预览、提交、撤销、保存、重开和导出一致;换图保留覆盖层、重置底图处理并刷新色卡 | +| `TASK-WP4-02` 画布选择、变换与普通贴纸 | `TASK-WP4-01` | 实现循环选择、长按候选、多选/框选、移动/缩放/旋转/翻转/透明度/复制/层级/吸附、撤销重做和 50 元素双端限制 | `TDD-WP4-CAN-001`、`TDD-WP4-STK-001` | 50 元素可编辑保存导出,第 51 个被阻断;无图层面板、隐藏、锁定、编组;动态 UI 不改变工具尺寸 | +| `TASK-WP4-03` 文字模板、字体与属性 | `TASK-WP4-01`;WP-5 模板/字体 fixture | 实现必须先选模板、四类/显示名搜索/catalog 顺序/账号最近使用、多行内容、模板切换、FontFace ready、字号/缩放、填充/描边/背景/对齐/行距/字距和一次提交撤销 | `TDD-WP4-TXT-001`、`TDD-WP4-TXT-002`、`TDD-WP4-TXT-003` | 文本/换行/变换按规则保留;真实字体缺失使模板 unavailable;不提供普通文字或普通贴纸关键词搜索;不静默回退 | +| `TASK-WP4-04` 色卡与动态贴纸 provider | `TASK-WP4-01`;WP-5 声明式资源 | 实现 `mmcq-v1` 确定五色、四个色卡 renderer、时间/地点/身份 provider、DYN004 先确认后定位、坐标保存/清理、DYN012 FONT081 标记 | `TDD-WP4-COL-001`、`TDD-WP4-DYN-001`、`TDD-WP4-DYN-002`、`TDD-WP4-DYN-003` | 色卡只读原始底图且网络上传为 0;时间值重开不漂移;拒绝定位调用为 0;身份前缀一个 `@`;DYN012 不静默换字体 | +| `TASK-WP4-05` 客户端导出与结果弹层 | `TASK-WP4-01` 至 `TASK-WP4-04`、`TASK-WP2-07` | 实现四比例真实像素、sRGB、JPG 80-100/默认 92、PNG 无损、无水印、未提交修改确认、同一 Blob 下载/上传和四结果组合 UI | `TDD-WP4-EXP-001` | 确认未提交修改只形成一次撤销并进入自动保存;导出本身不额外建撤销;后端失败不撤回已成功下载 | +| `TASK-WP4-06` 键盘、焦点与语义可访问性 | `TASK-WP4-01` 至 `TASK-WP4-05` | 落实 skip link、焦点顺序、ARIA/live region、弹层焦点/返回、画布外等价控件、200% 缩放和 axe | `TDD-WP4-A11Y-001` | axe critical/serious 为 0;状态不只靠颜色;异步更新不抢焦点;最长文案、弹层和主动作可达 | +| `TASK-WP4-07` 视觉与性能预算 | `TASK-WP4-01` 至 `TASK-WP4-06`;最终素材依赖 WP-5 | 建立固定 Canvas/字体/动态值、Chrome/Edge 截图 diff、50 元素交互、自动保存、编辑器打开、导出、内存和 DOM 性能 harness | `TDD-WP4-VIS-001`、`TDD-WP4-PERF-001` | 边界偏差、显著像素和全部性能预算符合 tdd;已知替代人工复核;不得通过放宽超时、减元素或降尺寸掩盖失败 | + +WP-4 以 `editor` 和 `export` 为主 UI 单元,并回归 `workspace`、`project-detail` 的进入/返回、保存和 latest 状态。占位字体、未校验模板或只在一个浏览器通过时不能完成。 + +### 4.6 WP-5 素材转换、发布与 P0-A 白名单 + +主责范围:STATIC-01 至 STATIC-04、ADMIN-06、ADMIN-07、PRIV-05、NFR-02;AC-13、AC-15 P0-A 子集、AC-31、AC-42、AC-48。 + +| 任务 | 硬依赖 | 实现与产出 | 唯一主责测试族 | Green / 禁止提前宣告 | +| --- | --- | --- | --- | --- | +| `TASK-WP5-01` 只读素材编译器 | WP-0 | 建立 TypeScript CLI,只读读取规范 manifest/catalog/metadata,输出 TemplateRenderModel、版本化元数据、最小 derived 产物和源前后校验报告;不执行 Lua/Prefab | `TDD-WP5-MAN-001` | 源文件哈希/时间不变;不读证据目录;不复制全库或形成等价派生副本;内容哈希去重复用 | +| `TASK-WP5-02` 普通贴纸 catalog 与虚拟目录 | `TASK-WP5-01` | 构建 part1-25 的 1,407 项 StaticStickerCatalog,保留三组重复、稳定 ID/顺序/哈希/尺寸/MIME/缩略图引用;接入虚拟列表和懒加载 | `TDD-WP5-CAT-001` | 计数、part、重复和顺序精确;原图按需加载;DOM 只保留视口和两屏缓冲 | +| `TASK-WP5-03` 复杂资源注册与 P0-A 白名单 | `TASK-WP5-01`;与 WP-4 renderer 契约联调 | 导入注册 332 文字、86 字体项、16 色卡、35 动态;公开 manifest 只启用 32 文字、实际字体+FONT081、COLOR001/002/008/016、10 动态和 1,407 普通贴纸 | `TDD-WP5-WHITE-001`、`TDD-WP5-COL-001` | 白名单外复杂素材不对普通用户可见;四种色卡消费同一五色;色卡/动态不计入 25 part;不把 full_p0 分批公开 | +| `TASK-WP5-04` Immutable manifest 与三类资源隔离 | `TASK-WP5-01` 至 `TASK-WP5-03`、WP-0 gate/cache | 实现 release_version、manifest/file SHA-256、public/preview/private 三类路由、鉴权、no-store/immutable 缓存和不可推导资源 URL | `TDD-WP5-RES-001`、`TDD-WP5-CACHE-001` | public manifest 不含 internal/private;浏览器不见绝对路径;SW/Cache/IndexedDB 实际枚举无私有或预览内容 | +| `TASK-WP5-05` 后台普通贴纸上传与版本发布 | `TASK-WP5-02`、`TASK-WP5-04`、WP-0 存储 | 实现 PNG/WebP 流式校验、stable ID/part/顺序、原图与缩略图独立预留/计量、immutable release 切换和旧版本保留 | `TDD-WP5-UPL-001` | 两类文件均计入 5 GB;full/unavailable 阻断;恰好等于上限允许提交后 full;不把既有归档复制进 managed-assets | +| `TASK-WP5-06` 历史贴纸显式清理 | `TASK-WP5-05`、WP-2 project_asset_refs、WP-1 审计 | 实现候选查询、同管理员确认、短期 snapshot、`BEGIN IMMEDIATE` 全引用复核、整批拒绝/排队、Worker 物理删除、重计量和全阶段审计 | `TDD-WP5-CLN-001` | 有任一 release/active/trashed/待发布引用则整批拒绝;排队不减容量;无自动清理;物理删除和重测后才恢复 | +| `TASK-WP5-07` 内部预览授权生命周期 | `TASK-WP5-03`、`TASK-WP5-04`、WP-1 会话 | 实现批次、AssetPreviewGrant、active/revoked/expired、每次授权校验、随机 manifest item ID、撤销即时阻断和既有项目按版本渲染 | `TDD-WP5-PREV-001` | 授权不改变普通用户角色;不出现后台能力;撤销/到期阻断新取用但不破坏已保存项目 | + +真实约 3.57 GB 归档只在受控 release job 只读校验,日常 CI 使用小型合成 fixture。WP-5 的最终人工视觉通过依赖 WP-4 renderer;两者可并行开发但不能相互用占位实现宣告完成。 + +### 4.7 WP-6 运营后台与内部运营控制 + +主责范围:ADMIN-01、ADMIN-02、ADMIN-04、ADMIN-05、ADMIN-08、ADMIN-09、NFR-08;AC-25、AC-47、AC-50、AC-52。模型配置、点数和素材能力分别复用 WP-3、WP-2、WP-5,不转移唯一主责。 + +| 任务 | 硬依赖 | 实现与产出 | 唯一主责测试族 | Green / 禁止提前宣告 | +| --- | --- | --- | --- | --- | +| `TASK-WP6-01` 后台壳、权限与安全摘要 | WP-1、WP-2、WP-5 | 按 UIDesign 实现独立 `/admin` 路由域、侧栏/总览、用户、邀请码、点数、素材、预览、生成记录入口和 active super_admin 服务端授权 | `TDD-WP6-ADM-001` | 普通/预览账号无法进入;管理员与普通 session 域分离;默认列表只含脱敏摘要;无敏感配置回显 | +| `TASK-WP6-02` 私有内容告知与逐次访问 | `TASK-WP6-01`、WP-1 UserProfile/审计 | 实现当前 notice version bootstrap、身份+版本持久 ack、428 区域门禁、升版重阻断、“打开并记录审计”和先审计后返回内容 | `TDD-WP6-PRIV-001`、`TDD-WP6-PRIV-002` | 跨标签、重启、重登和 Chrome/Edge 同版本不重复;hover/预取不打开;每次点击独立记录;审计失败不返回内容;不要求逐次填写原因 | +| `TASK-WP6-03` 免费服务硬停止与恢复 | `TASK-WP6-01`、WP-1/2 事务基础 | 实现 Resend 每日/月度、高德月度用量领取,paused_quota/provider、上限只可下调、健康检查和 super_admin 人工恢复 | `TDD-WP6-SVC-001`、`TDD-WP6-SVC-002` | 第 81/1001 次不调用;不得提高固定上限、启用收费、自动恢复/扩容;高德暂停只影响 DYN004 自动定位 | +| `TASK-WP6-04` 敏感操作审计与保留 | `TASK-WP6-01` 至 `TASK-WP6-03`、WP-5 清理 | 把用户、点数、邀请、模型、素材、预览、服务、余额恢复和贴纸清理各阶段纳入同事务 AdminOperationLog;实现 180 天 Worker 清理 | `TDD-WP6-AUD-001` | 两类审计严格分离、180 天内不可改删、贴纸清理请求/复核/拒绝或排队/物理结果齐全且不含正文 | +| `TASK-WP6-05` 模型/服务/存储状态与诊断 | `TASK-WP6-01`、WP-0 诊断、WP-3 runtime | 实现总览、模型、服务与存储页面的 configured default/runtime/recommended 三列、Worker/网关/Resend/高德/storage 状态、REST refetch 和复制诊断 | `TDD-WP6-STATE-001`、`TDD-WP6-DIAG-001` | 推荐可 null;runtime 变化不回写配置;只显示稳定非敏感字段和逻辑位置;无密钥、邮箱、路径、正文或供应商原文 | + +WP-6 必须覆盖 `admin-overview`、`admin-users`、`admin-invites`、`admin-models`、`admin-assets`、`admin-preview`、`admin-generations`、`admin-services-storage` 和 `admin-audit`。后台按钮的禁用态不替代服务端授权、CAS、事务或审计。 + +### 4.8 WP-7 P0-A 验收准备与发布 + +主责范围:PRD 第 22 节全部 52 项当前 AC 和第 23 节发布门槛;产品 AC 唯一主责仍留在 WP-0 至 WP-6,WP-7 只主责 AC-41 并汇总发布证据。 + +| 任务 | 硬依赖 | 实现与产出 | 唯一主责测试族 | Passed / 禁止提前宣告 | +| --- | --- | --- | --- | --- | +| `TASK-WP7-01` 候选制品与候选浏览器记录 | WP-0 至 WP-6 Green | 从候选便携包和当前安装的真实 Chrome/Edge 可执行文件生成 `artifacts/tdd//release-candidate.json`,记录 Windows build、品牌、major、full version、记录时间、候选制品哈希和固定端口;生成候选 ZIP 与候选 `START-HERE.txt`,但不写最终 `RELEASE.json` | 支撑任务,不新增父测试族;最终发布验收由 `TASK-WP7-07` 主责 | 候选记录字段完整、脱敏且与候选制品一致;只作为后续精确环境输入,不能标记发布冻结或替代最终 RELEASE 证据 | +| `TASK-WP7-02` 三模型真实契约验收 | `TASK-WP7-01`、WP-3 Green、受控凭据 | 对三个模型分别运行纯文字、参考图、四比例、同步/异步、响应、九类错误、结算和契约变化重验,保存脱敏证据 | `TDD-WP7-EXT-001` | 每个模型独立证据齐全且匹配最后配置;任一失败保持 externally_blocked;不共享 verified 标记 | +| `TASK-WP7-03` Resend 真实发布门槛 | `TASK-WP7-01`、WP-1/WP-6 Green、受控域名 | 核验 SPF/DKIM、免费规则;QQ/163/企业邮箱各 20 封至少 19 封在 2 分钟内送达;用正式链完成普通/管理员认证 | `TDD-WP7-EXT-002` | 人工统计脱敏;开发预置账号和 mock 不能作为证据;未达门槛不启动实际 P0-A 验收 | +| `TASK-WP7-04` 高德真实发布门槛 | `TASK-WP7-01`、WP-4/WP-6 Green、受控 Key | 核验定位/逆地理、QPS、白名单、安全限制、每月 1,000 次硬停止和 DYN004 确认流程 | `TDD-WP7-EXT-003` | 真实测试坐标不关联真实项目;不发第 1001 次;不启用付费或自动扩容;失败保持 externally_blocked | +| `TASK-WP7-05` 候选精确环境 UI、视觉、性能与可访问性验收 | `TASK-WP7-01` 至 `TASK-WP7-04` | 严格使用候选记录中的两个真实 full version,在 1920×1080、DPR 1、100%/200% 下重跑 AC-24、AC-32、全部 E2E、视觉、性能、下载、文件选择和逐个非 N/A 页面状态;按 frame 对照低保真 | `TDD-WP7-UI-001` | 22 个 coverage unit 全部有证据;候选环境与记录任何漂移均使本任务重跑;无独立 Pencil frame 的页面不漏测;Canvas Index 不计产品页 | +| `TASK-WP7-06` 追踪闭环与最终 AC 预冻结验收 | `TASK-WP7-01` 至 `TASK-WP7-05` | 运行 `test:all` 和 `validate:tdd-trace`;汇总候选制品、外部、UI/视觉/性能证据;用固定 super_admin/普通账号及正常链创建临时第二普通账号完成 52 AC;确认候选浏览器字段在验收期间未漂移 | `TDD-WP7-AC-001` | 52/52 当前 AC passed;109 需求 ID、13 模块、19 契约、9 错误、89/89 父族、117/117 case 完整;未来四项不计入;未通过时不得写最终 `RELEASE.json` | +| `TASK-WP7-07` 最终 RELEASE 冻结、制品生成与泄漏扫描 | `TASK-WP7-06` | 验收通过后把未漂移的候选浏览器记录写入最终 `RELEASE.json`,生成最终 ZIP、SHA-256 和 `START-HERE.txt`;把 RELEASE SHA-256 写入最终 `evidence.json`;扫描源码、Git、最终 ZIP、DB 配置、manifest、日志、截图、trace/evidence,并执行最终 package/support-gate smoke | `TDD-WP7-REL-001`、`TDD-WP7-SEC-001` | 最终记录、制品、Windows build、两个 full version、固定 major 和端口一致;零真实敏感值/用户绝对路径;最终写入或扫描失败时不得发布,且不能沿用候选 passed 状态冒充最终冻结 | + +任一真实外部门槛失败时,不得开始 P0-A 实际验收,也不得把 WP-7 或整体发布标记 passed。 + +## 5. 跨工作包集成任务 + +下列集成门禁不创建新的产品主责或测试族;由上游任务交付接口,下游任务消费并共同回归: + +| 集成门禁 | 上游 -> 下游 | 必须证明 | +| --- | --- | --- | +| `INT-01` 存储状态与项目 | WP-0 -> WP-2 | full 可纯 JSON 保存、unavailable 拒绝新增后端写;项目只保存已提交资源 ID;删除完成后物理重测 | +| `INT-02` 存储状态与导出 | WP-0 -> WP-2/WP-4 | 客户端下载与 latest 上传解耦;full/unavailable 不覆盖旧 latest;失败不撤回已下载文件 | +| `INT-03` 存储状态与素材 | WP-0 -> WP-5 | 只读归档不复制;managed/derived 受 5 GB 约束;原图/缩略图独立预留和计量 | +| `INT-04` 浏览器 gate | WP-0 -> WP-1 至 WP-7 | 全部产品 HTML、bundle 和 API 均在 gate 后;阻断页不读取身份、业务、资源或容量 | +| `INT-05` 安全配置应用 | WP-0 -> WP-1/WP-6 | API 原子应用后才生效;离线执行者无产品角色;失败无部分生效且有允许的 system 审计 | +| `INT-06` 任务诊断 | WP-2 -> WP-3/WP-6 | 未知上游结果进入成本核对,不新增用户任务状态、不补扣点数、不泄露供应商原文 | +| `INT-07` 模型三层状态 | WP-3 -> WP-2/WP-6 | configured default、runtime availability、recommended 独立;runtime 降级不改配置;推荐可空 | +| `INT-08` 私有告知 | WP-1 -> WP-6 | UserProfile 按身份+版本持久;区域服务端门禁;每次打开仍先写独立访问审计 | +| `INT-09` 贴纸引用与清理 | WP-2/WP-5 -> WP-6/WP-0 | release、active/trashed 项目和待发布引用阻止整批清理;排队不减容量;物理删除后重测 | +| `INT-10` 编辑器真实素材 | WP-5 -> WP-4/WP-7 | 编辑预览与导出使用同一声明式 renderer/版本/字体;白名单、替代项和 Chrome/Edge 视觉证据一致 | + +任一 `INT-*` 失败时,涉及的上下游任务均不能超过 Green;若失败来自真实环境或外部依赖,则保持 externally_blocked,不以局部 mock 结果覆盖。 + +## 6. 页面与状态交付归属 + +### 6.1 UIDesign coverage unit 归属 + +| coverage unit | 实现主责任务 | 最终证据任务 | +| --- | --- | --- | +| `support-gate` | `TASK-WP0-03` | `TASK-WP7-05` | +| `user-auth` | `TASK-WP1-02`、`TASK-WP1-03` | `TASK-WP7-03`、`TASK-WP7-05` | +| `workspace` | `TASK-WP2-01`、`TASK-WP2-05` | `TASK-WP7-05` | +| `current-task` | `TASK-WP2-05`、`TASK-WP2-06`、`TASK-WP3-04` | `TASK-WP7-05` | +| `projects` | `TASK-WP2-01`、`TASK-WP2-02`、`TASK-WP2-03` | `TASK-WP7-05` | +| `project-detail` | `TASK-WP2-01`、`TASK-WP2-03`、`TASK-WP2-07` | `TASK-WP7-05` | +| `editor` | `TASK-WP4-01`、`TASK-WP4-02`、`TASK-WP4-03`、`TASK-WP4-04`、`TASK-WP4-05`、`TASK-WP4-06`、`TASK-WP4-07` | `TASK-WP7-05` | +| `export` | `TASK-WP2-07`、`TASK-WP4-05` | `TASK-WP7-05` | +| `credits` | `TASK-WP2-04` | `TASK-WP7-05` | +| `settings` | `TASK-WP0-04`、`TASK-WP1-05` | `TASK-WP7-05` | +| `preview-user-variant` | `TASK-WP5-04`、`TASK-WP5-07` | `TASK-WP7-05` | +| `admin-auth` | `TASK-WP1-04` | `TASK-WP7-03`、`TASK-WP7-05` | +| `admin-overview` | `TASK-WP6-01`、`TASK-WP6-05` | `TASK-WP7-05` | +| `admin-users` | `TASK-WP6-01`、`TASK-WP2-04` | `TASK-WP7-05` | +| `admin-invites` | `TASK-WP6-01`、`TASK-WP1-01` | `TASK-WP7-05` | +| `admin-models` | `TASK-WP3-01`、`TASK-WP3-02`、`TASK-WP6-05` | `TASK-WP7-05` | +| `admin-assets` | `TASK-WP5-05`、`TASK-WP5-06`、`TASK-WP6-01` | `TASK-WP7-05` | +| `admin-preview` | `TASK-WP5-07`、`TASK-WP6-01` | `TASK-WP7-05` | +| `admin-generations` | `TASK-WP6-02` | `TASK-WP7-05` | +| `admin-services-storage` | `TASK-WP6-03`、`TASK-WP6-05` | `TASK-WP7-05` | +| `admin-audit` | `TASK-WP6-04` | `TASK-WP7-05` | +| `system-ui` | `TASK-WP0-07`、`TASK-WP0-08`、`TASK-WP0-09` | `TASK-WP7-05`、`TASK-WP7-07` | + +所有 coverage unit 的正常、空/加载、失败/禁用及适用的冲突/容量/特殊状态以 `tdd.md` 第 11.1 节为准。`UIDesign.md` 中没有独立低保真 frame 的页面仍必须实现和留证;预览 PNG 不得通过 OCR 反推固定文案。 + +### 6.2 Pencil 产品 frame 映射 + +下表覆盖 `.pen` 中全部 18 个产品 frame。状态范围只定位实现与证据,不替代 `UIDesign.md` 的完整状态矩阵;同一 frame 同时承载两个 coverage unit 时在 `page_id` 中并列。 + +| page_id | frame ID | 画板名 | 实现主任务 | 必须覆盖的状态范围 | +| --- | --- | --- | --- | --- | +| `user-auth` | `Z0pf8` | 01A 普通用户登录 | `TASK-WP1-02` | 登录正常;字段初始空;发码/登录加载;验证码、Resend 和身份状态失败;管理员入口、固定本机提示、艺术带与焦点 | +| `user-auth` | `DVPM8` | 01B 注册展开态 | `TASK-WP1-03` | 邀请与邮箱已验证摘要;资料和告知未完成/完成;注册中;名额、邀请、验证码和提交失败;主动作禁用 | +| `workspace` | `WbDYT` | 02A 空工作台 | `TASK-WP2-01` | 无项目艺术带;生成表单、推荐模型、四比例与空任务;模型/项目加载;模型、点数、参考图和容量禁用 | +| `workspace`、`current-task` | `d99Lo` | 02B 生成中工作台 | `TASK-WP2-05` | queued/running 无假百分比;冻结点数;critical 容量条;第二次提交禁用;失败/rejected 动作和配置变化重确认 | +| `projects` | `zXyG9` | 03A 项目列表 | `TASK-WP2-01` | active/trashed、筛选、多选 failed_empty;空/骨架;20 active、恢复/批量禁用;多标签和容量提示 | +| `project-detail` | `v2Qbu` | 03B 项目详情 | `TASK-WP2-01` | 历史、固定比例、继续生成、编辑、原图/latest;无成功图/无成品;10 图上限、资源失败和容量状态 | +| `editor` | `bHQnJ` | 04A 三栏编辑器 | `TASK-WP4-01` | 三栏、保存状态、画布、对象属性与固定底栏;画布/素材加载;保存/素材失败;第 51 元素;conflicted/full/unavailable | +| `export` | `i9upg7` | 04B 导出弹层 | `TASK-WP4-05` | JPG/PNG、质量、尺寸;合成/持久化加载;未提交确认;四类失败结果;冲突一次下载和 full/unavailable | +| `credits` | `YlKzE` | 05A 点数明细 | `TASK-WP2-04` | available/reserved、流水和分页;无流水/加载;失败保留安全摘要;负 available 如实显示且无购买入口 | +| `settings` | `Ws5E0` | 05B 设置与本机数据 | `TASK-WP1-05` | 资料、本机数据、容量摘要和固定文案;加载/保存失败;full/unavailable;注销确认、处理中和返回登录 | +| `admin-overview` | `e4e2Kz` | 06A 后台总览 | `TASK-WP6-01` | 名额、任务、成本核对、服务/容量和审计摘要;骨架/空事件;聚合失败;三模型状态分列和待处理事项 | +| `admin-models` | `YVfVG` | 06B 模型配置 | `TASK-WP6-05` | 完整三模型集合、default/runtime/recommended;加载;空推荐;替代/priority 禁用;CAS 冲突和整套回滚 | +| `admin-assets` | `A28V3c` | 06C 素材与历史清理 | `TASK-WP5-06` | 上传/版本/候选;无上传/无候选;格式/编译/权限失败;full/unavailable;引用冲突、排队、物理删除和重计量 | +| `admin-generations` | `OnsiT` | 06D 生成记录与私有告知 | `TASK-WP6-02` | 默认隐藏正文;身份+版本告知;逐次打开;空记录/审计写入加载;428、审计失败、升版重阻断 | +| `admin-services-storage` | `L3lde2` | 06E 服务与存储 | `TASK-WP6-05` | Resend/高德/网关/Worker/LocalDataRoot;指标加载;paused/degraded/unavailable;恢复前置、清理排队和重计量 | +| `admin-audit` | `DlCpN` | 06F 私有内容访问审计 | `TASK-WP6-04` | 两类独立审计、游标和 180 天;空/加载;查询失败;不可编辑删除;无正文、图片、密钥和路径 | +| `support-gate` | `u1adni` | 07A 浏览器硬阻断 | `TASK-WP0-03` | 四种阻断 reason、支持品牌/major、最小诊断;bundle/API 无绕过;无业务空态、身份或容量读取 | +| `system-ui` | `awt96` | 07B Windows 辅助系统界面 | `TASK-WP0-07` | 托盘/启动中/ready;启动失败、端口占用、API/Worker degraded;脱敏诊断;full/unavailable 告警与受限动作 | + +`Z8p3I` 00 Canvas Index 是非产品索引,仅由 `TASK-WP7-05` 校验设计资产清单,不计产品页面、实现任务或完成率。低保真中的版本、账号、点数、容量和时间均为示例值,运行状态必须来自 fixture,最终浏览器版本必须来自候选记录和验收后冻结的 `RELEASE.json`。 + +### 6.3 UIDesign-only 页面映射 + +以下 5 个 coverage unit 没有独立 Pencil 产品 frame,但仍是完整实现与证据范围;不得因无画板而跳过。 + +| page_id | frame ID | 画板名 | 实现主任务 | 必须覆盖的状态范围 | +| --- | --- | --- | --- | --- | +| `preview-user-variant` | `UIDesign-only` | 无独立画板 | `TASK-WP5-07` | 有效授权、无授权/空批次、加载、撤销/过期阻断;不出现后台权限;全局容量条 | +| `admin-auth` | `UIDesign-only` | 无独立画板 | `TASK-WP1-04` | 白名单邮箱验证码、字段空/加载、非白名单、停用/移除、Resend 失败;独立 audience 与返回普通登录 | +| `admin-users` | `UIDesign-only` | 无独立画板 | `TASK-WP6-01` | 脱敏列表/详情、暂停恢复/调点、空/筛选空/骨架、原因缺失和状态禁用、负 available | +| `admin-invites` | `UIDesign-only` | 无独立画板 | `TASK-WP6-01` | 创建/停用/期限/次数/脱敏复制、空/骨架、名额满、过期/耗尽、请求失败和幂等/CAS 结果 | +| `admin-preview` | `UIDesign-only` | 无独立画板 | `TASK-WP5-07` | 批次、模板状态、授权/撤销/到期、空/骨架、非法转换/发布失败;不出现 P0-B 全量开放 | + +## 7. 追踪与完成门禁 + +### 7.1 机器可读任务记录 + +`tasks.manifest.json` 是本计划的逐任务执行记录,不是新的需求、架构或测试来源。每个任务对象必须包含:`task_id`、`work_package`、`dependencies`、`requirements`、`acceptance_criteria`、`development_plan_sections`、`modules`、`parent_families`、完整 `case_ids`、逐父族 `first_red`、`minimal_green`、`refactor_scope`、`validation_commands`、`evidence_directories`、`automation`、`release_gate` 和 `ui_scope`。 + +manifest 必须满足: + +- 52 个任务全部有独立记录;`TASK-WP7-01` 是不新增父族/case 的候选发布支撑任务,其余任务按本计划拥有父测试族; +- 117 个具体 case_id 恰好各出现一次并映射到其已知父族,不只依赖运行时模糊匹配; +- requirements、AC、首个 Red、最小 Green 和层级从当前 `tdd.md` 的父族/case 定义确定性取得,不能由任务实现者自行补写; +- DevelopmentPlan 章节、模块边界、Refactor 范围和 UI scope 由本计划固定;模块路径尚未在上游冻结时只使用已冻结组件名,不擅自固化目录结构; +- `tasks.md`、`tasks.manifest.json` 或任一冻结输入变化时,追踪校验先比较哈希与集合,再决定受影响任务状态,不能只更新 manifest 哈希。 + +### 7.2 数量闭环 + +| WP | 开发任务 | 本计划唯一归属父测试族 | `tdd.md` 规范 case | 当前 AC 唯一主责 | +| --- | ---: | ---: | ---: | ---: | +| WP-0 | 9 | 17 | 20 | 4 | +| WP-1 | 6 | 11 | 13 | 7 | +| WP-2 | 7 | 15 | 30 | 16 | +| WP-3 | 4 | 7 | 10 | 2 | +| WP-4 | 7 | 15 | 17 | 13 | +| WP-5 | 7 | 9 | 9 | 5 | +| WP-6 | 5 | 8 | 11 | 4 | +| WP-7 | 7 | 7 | 7 | 1 | +| 合计 | 52 | 89 | 117 | 52 | + +`pnpm validate:tdd-trace` 必须从结构化来源或确定性解析验证: + +- 本计划列出的父测试族集合与 `tdd.md` 第 6.1 至 6.8 节完全相等,恰为 89 个,且每个只归属一个开发任务; +- 第 6.9 节 117 个 case 都能按稳定正则映射到已知父族,89/89 父族至少一个 case; +- `tasks.manifest.json` 中 52 个任务齐全,117 个 case_id 各出现一次,任务的 derived automation/release_gate 与父族层级一致; +- 52 个当前 AC 恰有一个 WP 主责,AC-08、AC-26、AC-37、AC-54 不得进入当前 passed 统计; +- 109 个当前 PRD 需求 ID、十三个功能模块、十九个数据契约、九类 GenerationErrorCategory 和 22 个 UI coverage unit 均有落点; +- `.pen` 的 18 个产品 frame ID 各有 page_id、主任务和状态范围;5 个无独立画板 coverage unit 明确标为 `UIDesign-only`; +- 每个 case 的必填字段、派生 `automation`、`release_gate`、逐层状态和证据目录非空且未被人工改写。 + +### 7.3 工作包完成检查 + +| WP | 自动门禁 | 真实/人工门禁 | 不能提前宣告 | +| --- | --- | --- | --- | +| WP-0 | 单元、API、存储、Supervisor、安全、打包 Green | 最终浏览器记录在 WP-7 | 固定依赖、回环、容量等号、日志/诊断/凭据、无备份不迁移任一未过 | +| WP-1 | 认证状态机、事务、会话、名额、注销、审计 Green | Resend 正式认证 | 预置账号或 mock 邮件不得替代真实认证 | +| WP-2 | 项目、点数、任务、参考图、冲突、错误 Green | 真实模型完成态依赖 WP-3 | mock 成功不得替代真实模型结算 | +| WP-3 | 配置集合、runtime、Adapter mock、Worker 恢复 Green | 三模型独立真实契约 | 任一模型未匹配最后配置完成全矩阵 | +| WP-4 | 编辑器、导出、a11y、性能 harness Green | 最终视觉依赖 WP-5 真实白名单 | 占位字体/资源或单浏览器通过 | +| WP-5 | 编译、目录、隔离、缓存、上传、清理 Green | 真实归档只读校验与人工视觉 | 自动清理、引用未清、排队即减量或逐批公开 full_p0 | +| WP-6 | 后台、告知、审计、服务、存储 Green | 真实服务恢复与正式身份流程 | 浏览器状态代替后端确认、逐次审计缺失、敏感信息回显 | +| WP-7 | 候选记录、`test:all`、追踪和预冻结 AC Green | 精确 full version UI/视觉/性能、AI、Resend、高德通过后才写最终 RELEASE;最终制品扫描通过 | 候选记录被当作最终 RELEASE,或任一外部门槛、页面状态、AC、最终哈希/扫描未完成 | + +### 7.4 P0-A 最终完成定义 + +只有同时满足以下条件,开发任务计划才完成: + +1. WP-0 至 WP-7 全部达到各自门禁,所有任务为 `passed`,没有 `source_changed`、`red`、`green` 或 `externally_blocked` 遗留。 +2. 89/89 父测试族、117/117 规范 case 及参数分支均有可复现 Red、最终 Green/Passed 和脱敏证据。 +3. 52/52 当前 AC passed,109 个需求 ID、十三个模块、十九个契约和九类错误全部闭环;`reference_invalid` 与 `safety_rejected` 证据分离。 +4. 存储精确阈值、等号写入、超限零副作用、原图/缩略图计量、full/unavailable 动作和物理删除后重测全部通过。 +5. ModelConfig 始终恰好一个 enabled default、priority 唯一正整数;runtime 不回写配置;recommended 可为空。 +6. 私有告知按 super_admin 身份+版本持久,升版重阻断;每次私有图片/完整提示词打开仍先写独立审计。 +7. 浏览器实际枚举确认 SW、Cache Storage 和 IndexedDB 不含 internal/private、项目、提示词或未保存草稿。 +8. 临时第二普通账号通过正常邀请/验证码链创建,完成跨用户隔离后正常注销并进入规定清理路径。 +9. 22 个 UI coverage unit 的全部适用状态在最终 Chrome/Edge、1920×1080、100%/200% 下无不可用重叠,焦点、文案、视觉、50 元素和四比例导出通过。 +10. 三模型、Resend、高德真实门槛通过;没有自动充值、收费备用、自动恢复或自动扩容。 +11. 最终 ZIP、SHA-256、`RELEASE.json`、`START-HERE.txt`、固定端口和真实浏览器记录一致,局域网、其他设备及不支持浏览器不能进入产品。 +12. 代码、制品、日志、配置、manifest、截图、trace 和证据零真实凭据、验证码、会话令牌、管理员真实邮箱、完整私有内容和硬编码用户绝对路径。 +13. 普通用户主框架和设置区持续原样显示:“测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。” + +## 8. 当前计划明确不包含 + +- 不创建 AC-08、AC-26、AC-37、AC-54 或任一 P0-B 当前开发任务。 +- 不实现手机、局域网、远程访问、跨设备、公司系统合并、对象存储、产品 HTTPS、云备份、项目归档、数据迁移或恢复。 +- 不实现 P1 的本地底图上传、空白画布、普通贴纸关键词搜索、公开注册准备、高德主体迁移或正式合规条款。 +- 不实现支付、订阅、自动充值、批量生成/导出、复制生成、社区、普通文字、用户自定义贴纸、AI 贴纸、GIF/视频、直发小红书、局部编辑、协作、版本历史、编组或图层面板。 +- 不重新选择技术栈,不引入 Docker、Redis、远程数据库/队列、对象存储、外部日志/指标、自动更新或自动扩容。 +- 不在本计划中虚构人员、日历工期或故事点。排期只有在团队规模、可用工时、外部凭据窗口和真实设备排期确定后,基于本任务依赖图另行制定。 diff --git a/tdd.md b/tdd.md new file mode 100644 index 0000000..7854ef8 --- /dev/null +++ b/tdd.md @@ -0,0 +1,1017 @@ +# Dada P0-A 测试驱动开发计划 + +| 文档项 | 内容 | +| --- | --- | +| 文档版本 | 1.4 | +| 编写日期 | 2026-07-27 | +| 适用产品版本 | PRD v1.10,P0-A 本机测试需求冻结稿 | +| 功能索引版本 | FeatureSummary 1.1 | +| 工程计划版本 | DevelopmentPlan 1.1 | +| UI 设计版本 | UIDesign 1.0 | +| 当前交付 | 仅 P0-A Windows 本机测试版 | +| 产品需求唯一权威 | `PRD.md` | +| 文档职责 | 固定测试驱动节奏、测试层级、fixture、工作包门禁、AC 追踪、证据和发布验收方法 | +| 当前状态 | 可用于开发的候选测试基线;`RELEASE.json` 尚未生成,不能据此宣告发布验收完成 | + +## 1. 文档定位与冻结输入 + +### 1.1 权威顺序 + +1. `PRD.md` v1.10 是产品范围、状态、权限、业务规则、数据语义和验收结果的唯一权威。 +2. `FeatureSummary.md` 1.1 只用于定位十三个功能模块、关键状态、十九个数据契约和 AC,不产生测试新需求。 +3. `DevelopmentPlan.md` 1.1 固定技术栈、OpenAPI、SQLite、事务、存储、进程、工作包及测试层级;本文件不得改写这些工程决策。 +4. `UIDesign.md` 1.0 与低保真资产用于页面、控件、状态、文案、焦点、布局和界面验收;它们不得覆盖 PRD 行为或 DevelopmentPlan 接口。 +5. 本文件只定义如何先写失败测试、如何得到最小通过实现、如何回归和留证;不修改产品 API、Schema、状态、稳定错误码或 `message_key`。 + +若本文件与上游冲突,停止受影响测试和实现,以 PRD 为产品权威重新判断,并按依赖顺序同步 DevelopmentPlan、UIDesign 和本文件。不得只替换哈希后沿用旧结论。 + +### 1.2 输入哈希与失效作用域 + +#### 1.2.1 全局冻结来源 + +| 输入 | SHA-256 | +| --- | --- | +| `PRD.md` | `31F93674DF1A90B557FEE3AA9E74FB084E246CA8FE09F6BD4B1DC9D56D606565` | +| `FeatureSummary.md` | `6F80E272AAB08A5525B54501D83F16A4F6A7A170596947BBC25F1DA54F2FE844` | +| `DevelopmentPlan.md` | `7C579E9DF8D00DA9333F587D05FC966123437EE68575D87D73C903C1487FA9D6` | +| `UIDesign.md` | `0C449DF833E5471843E17EB74F5B470EBC955F117CAF1D79AC9C0EF90DE763F0` | + +上述四份 Markdown 是所有测试层的全局来源基线。每次测试运行先校验四项哈希;任一不一致时: + +1. 整次运行标记为 `source_changed`,不得继续生成通过证据。 +2. 完整重读发生变化的权威来源及全部受影响下游来源。 +3. 更新需求、UI、fixture、测试和 AC 映射后重新建立失败基线。 +4. 不把变更前的截图、性能数据、外部契约记录或人工确认复用为变更后的通过证据。 + +#### 1.2.2 UI 参考资产 + +| 输入 | SHA-256 | +| --- | --- | +| `Dada-P0A-LowFi.pen` | `A352C8F205E9399EB2E6306176253AF6FF65DDDBB9FDCEA2E2FE13E3C3459975` | + +低保真预览图清单: + +| 文件 | SHA-256 | +| --- | --- | +| `Dada-LowFi-Preview/awt96.png` | `9E0392DBEA2407BC0602E62EDEE755DF85BE085B0A6CD328C69DA8C79832AB2C` | +| `Dada-LowFi-Preview/bHQnJ.png` | `FA9F1CFC664F90BB8CD5DCFE985DA9A1280B3F3EF3C971F9480CB226A6D6DC88` | +| `Dada-LowFi-Preview/d99Lo.png` | `2ADC0DE944290E2BDFFF91083F0A3AB5BBEB0C3E294E0DC39CAE55763EFCF0C0` | +| `Dada-LowFi-Preview/DVPM8.png` | `9B1E7237857089CB3185EC4D3BBC2B3C9293267D7026A4F411A2131175FDEE90` | +| `Dada-LowFi-Preview/e4e2Kz.png` | `9D528A72A4902934B77421FB53EF35457B62AEA0477155BA8664B38DF0833232` | +| `Dada-LowFi-Preview/WbDYT.png` | `703A3D371F716C808CA158700D380B7CAFA25D89A7672B7199362A8A65E8EB76` | +| `Dada-LowFi-Preview/Z0pf8.png` | `ED213DFD7022BC355C7E243CD27484BFB25791DF2C38ED1A498175C563E17B9B` | +| `Dada-LowFi-Preview/Z8p3I.png` | `4714CA2C6D4CC00395B81B175389CF04DDE9EB0C71876BDBE72060DC741A1035` | + +`.pen` 和预览 PNG 不是产品需求来源,只约束第 11 节映射到的 UI、视觉和 E2E 证据。相关 job 运行前校验这些哈希;某张 PNG 变化时只把对应页面/状态的 UI、视觉和 E2E case 标记为 `source_changed`,`.pen` 变化时先比较受影响 frame,只失效对应页面证据;若无法确定受影响 frame,则失效全部 UI、视觉和 E2E 证据。UNIT、DB、API、WRK、EXT-MOCK、EXT-REAL 和不消费布局的 PKG-SEC 证据不得仅因低保真资产变化而失效。所有失效项都必须重新读取 UIDesign 与变更资产、更新映射并重建视觉基线,不能只替换哈希。 + +### 1.3 当前范围 + +P0-A 只在项目方当前 Windows 电脑上运行。Fastify 只监听 `127.0.0.1:43121`,浏览器只从 localhost 访问本地后端,业务数据只写入 `LocalDataRoot`,约 3.57 GB 规范素材从安全配置引用的原目录只读使用。本地后端访问 AI 网关、Resend 和高德时仍使用外网 HTTPS。 + +当前测试不得实现或暗示手机、局域网、远程访问、跨设备继续处理、公司服务器、对象存储、正式域名、产品 HTTPS、云备份、项目归档或 P0-A 数据迁移。AC-08、AC-26、AC-37、AC-54 是未来 P0-B 门槛,不进入当前完成统计;AC-15、AC-23、AC-36、AC-38 只执行 PRD 明确的 P0-A 子集。 + +当前 AC 总数固定为 52: + +- P0-A 必验 48 项:AC-01 至 AC-07、AC-09 至 AC-14、AC-16 至 AC-22、AC-24 至 AC-25、AC-27 至 AC-35、AC-39 至 AC-53、AC-55 至 AC-56。 +- P0-A 子集 4 项:AC-15、AC-23、AC-36、AC-38。 +- 未来且不计入当前完成 4 项:AC-08、AC-26、AC-37、AC-54。 + +## 2. TDD 执行协议 + +### 2.1 Red-Green-Refactor + +每个能力和缺陷都按以下顺序执行,不能先实现后补测试: + +1. **Red**:先写一个只因目标行为尚未实现而失败的最小测试。记录测试 ID、权威需求、fixture、预期失败原因和所有禁止副作用。 +2. **确认 Red**:在隔离环境运行该测试,确认失败信息指向目标缺口,而不是环境、随机数据、未安装依赖或其他已知失败。 +3. **Green**:只实现使该测试通过的最小产品行为;不得借机增加 PRD 未定义的入口、状态、回退或配置。 +4. **回归 Green**:运行同层测试、所属工作包测试和跨工作包依赖测试。金融、文件、权限、审计和外部调用必须同时断言状态与无副作用。 +5. **Refactor**:在测试持续通过的前提下消除重复、改善结构;不得改变 OpenAPI、Schema、事务边界和用户行为。 +6. **Evidence**:保存脱敏证据清单。没有 Red 证据、最终 Green 结果或必要人工证据的场景不能标记完成。 + +测试状态只允许: + +| 状态 | 含义 | +| --- | --- | +| `not_started` | 尚未建立失败测试 | +| `red` | 已确认测试因目标缺口失败 | +| `green` | 自动断言通过,但尚可能等待工作包或发布门禁 | +| `externally_blocked` | 本地模拟通过,但等待真实 AI 网关、Resend、高德、浏览器或发布环境证据 | +| `passed` | 自动、人工、外部及证据门槛全部满足 | +| `source_changed` | 全局来源或作用域内 UI 参考变化,受影响结果按第 1.2 节失效 | + +不设置 `skipped_as_passed`、`expected_failure_as_passed` 或无依据豁免。临时跳过只能保持未完成并写明原因。 + +### 2.2 测试 ID 与用例记录 + +测试族 ID 使用 `TDD-WP<0-7>--`,例如 `TDD-WP0-STO-002`。一个测试族可以包含参数化子用例,子用例追加稳定后缀,例如 `TDD-WP0-STO-002-equal-limit`。 + +每个可执行用例必须记录: + +| 字段 | 要求 | +| --- | --- | +| `test_id` | 全局唯一且提交后不复用 | +| `work_package` | 唯一主责 WP;交叉依赖另列 supporting WP | +| `requirements` | 一个或多个 PRD 需求 ID、数据契约或 NFR | +| `acceptance_criteria` | AC 编号及 P0-A 子集标记 | +| `layer` | 本文第 3 节固定层级 | +| `fixture_ids` | 本文第 5 节稳定 fixture | +| `red_reason` | 实现前预期失败的唯一原因 | +| `green_assertions` | 状态、响应、持久化、UI 和禁止副作用 | +| `automation` | 按第 2.2.1 节生成的非空有序数组,元素只允许 `automated`、`controlled_real`、`manual_review` | +| `evidence_refs` | 机器可读结果、截图、性能、日志或人工记录 | +| `release_gate` | 按第 2.2.1 节生成的非空门禁数组,明确阻止的工作包和 P0-A 发布 | + +#### 2.2.1 测试族执行属性 + +本文实际定义 89 个测试族;AREA 允许大写字母和数字,因此 `TDD-WP4-A11Y-001` 必须计入。`pnpm validate:tdd-trace` 生成 `artifacts/tdd//family-manifest.json`,逐族按下列规则确定执行属性,不能依赖人工补默认值: + +| 字段 | 确定规则 | +| --- | --- | +| `red_reason` | 精确继承父测试族“首个 Red”;case 可追加更窄触发条件,但不得删除或弱化父断言 | +| `automation` | 非空有序数组:父层级含 UNIT/DB/API/WRK/EXT-MOCK/E2E/PKG-SEC/VIS-PERF 时含 `automated`;含 EXT-REAL 时含 `controlled_real`;含 MANUAL 时含 `manual_review`;固定按此顺序去重 | +| `release_gate` | WP-0 至 WP-6 固定为 `["work_package:WP-n","release:P0-A"]`;WP-7 固定为 `["release:P0-A"]` | +| `work_package` | 从测试族 ID 的 `WP` 唯一解析;case 不得覆盖 | +| `layer` | 精确继承父测试族“层级”列;case 结果必须逐层列出执行状态,不得以 E2E 代替 DB/API 或以 mock 代替真实门禁 | + +因此第 2.2 节 `automation` 与 `release_gate` 在 `result.json` 中使用上述数组值。任一父族缺“首个 Red”或“层级”、属性数组为空、case 指向未知父族或人工改写派生值时,追踪校验失败。 + +### 2.3 测试脚本接口 + +后续工程必须提供以下仓库级脚本;脚本名称属于开发接口,不是产品 API: + +| 命令 | 作用 | +| --- | --- | +| `pnpm test:unit` | TypeBox、纯函数、状态转换和前端域控制器 | +| `pnpm test:integration` | SQLite、临时 LocalDataRoot、文件一致性和服务事务 | +| `pnpm test:api` | Fastify inject、OpenAPI、鉴权、错误信封和资源路由 | +| `pnpm test:worker` | 队列、租约、崩溃、结算、清理和重计量 | +| `pnpm test:e2e` | Playwright Chrome/Edge 独立 profile 的产品流程 | +| `pnpm test:visual` | 固定 Canvas 与页面截图、Chrome/Edge 差异和人工复核包 | +| `pnpm test:performance` | 50 元素、自动保存、打开编辑器和导出预算 | +| `pnpm test:security` | 凭据、日志、制品、路径、缓存和私有内容泄漏扫描 | +| `pnpm test:package` | 便携包、随包 Node/native 模块、Supervisor 和固定端口边界 | +| `pnpm validate:tdd-trace` | 校验当前 AC 唯一主责、P0-B 排除项、PRD 需求 ID、UIDesign 页面/状态覆盖和 case 必填字段,防止追踪矩阵手工漂移 | +| `pnpm test:all` | 除真实外部调用外的全部阻断测试 | +| `pnpm validate:external -- --service [--model ]` | 显式受控真实验证;普通 CI 禁止运行 | + +任一脚本失败必须返回非零退出码。测试脚本不得读取真实 P0-A `LocalDataRoot`、日常浏览器 profile 或未显式授权的 Windows 凭据。 + +### 2.4 证据清单 + +每次运行写入 CI 或验收工作目录下的 `artifacts/tdd//evidence.json`。该目录不是产品数据目录,不提交真实私有内容。清单至少包含: + +```json +{ + "schema_version": 1, + "run_id": "opaque-run-id", + "commit": "git-commit", + "source_hashes": {}, + "ui_reference_hashes": {}, + "environment": {}, + "release_record_hash": null, + "tests": [ + { + "test_id": "TDD-WP0-BRW-001-real-supported", + "parent_family": "TDD-WP0-BRW-001", + "work_package": "WP-0", + "requirements": ["NFR-01"], + "acceptance_criteria": ["AC-24"], + "layer": ["E2E", "MANUAL"], + "fixture_ids": ["final-release-browser-fixture"], + "red_reason": "真实支持 Chrome/Edge 无法通过门禁", + "green_assertions": ["release-recorded full version passes"], + "automation": ["automated", "manual_review"], + "release_gate": ["work_package:WP-0", "release:P0-A"], + "status": "green", + "started_at": "ISO-8601", + "finished_at": "ISO-8601", + "evidence_refs": [] + } + ], + "redaction_scan": "passed" +} +``` + +`evidence.json`、截图、trace、日志、OpenAPI 示例和 fixture 均不得包含真实密钥、验证码、会话令牌、管理员真实邮箱、完整私有提示词、真实用户图片、Windows 用户名、绝对本机路径或供应商原始错误正文。扫描失败时整次运行失败。 + +## 3. 固定测试层级 + +| 层级 | 标识 | 基础设施 | 主要职责 | +| --- | --- | --- | --- | +| Schema/单元 | `UNIT` | Vitest、TypeBox fixture、可控时钟 | 枚举、Schema、格式化、版本、状态转换、路径、容量计算、色卡确定性 | +| SQLite/文件集成 | `DB` | 每测试临时 SQLite、临时 LocalDataRoot、受控文件驱动 | 事务、索引、幂等、审计、引用、预留、物理清理和恢复 | +| API 契约 | `API` | Fastify inject、OpenAPI snapshot、原始 HTTP 客户端 | 路由、错误信封、门禁、鉴权、CSRF、If-Match、multipart、资源隔离 | +| Worker 恢复 | `WRK` | 模拟网关、进程终止 harness、可控租约时钟 | 领取、心跳、恢复、结算一次、成本核对、清理重放 | +| 外部模拟 | `EXT-MOCK` | 三模型、Resend、高德的确定 fixture | 错误、配额、同步/异步和恢复状态;普通 CI 不访问外网 | +| 外部真实 | `EXT-REAL` | 显式命令、Windows 凭据管理器、受控账号 | 三模型独立契约、邮件送达、高德接口和发布门槛 | +| 浏览器流程 | `E2E` | Playwright Chrome/Edge channel、独立 user-data-dir | 认证、项目、编辑、导出、多标签、后台、缓存、权限和门禁 | +| 安全/打包 | `PKG-SEC` | .NET/Node harness、进程检查、ZIP/日志/环境扫描 | 凭据传递、固定端口、便携包、诊断脱敏和零泄漏 | +| 视觉/性能 | `VIS-PERF` | 固定 Canvas、截图 diff、PerformanceObserver | NFR-02、NFR-03、1080p、200% 缩放、50 元素和导出 | +| 人工发布 | `MANUAL` | 真实便携包、真实外部依赖、固定验收账号 | 自动化不能替代的视觉、送达、替代资源和发布确认 | + +低层测试发现的数据、状态和权限错误不能只由 E2E 覆盖;E2E 负责证明用户流程接线正确。真实外部测试不能替代模拟失败分支,模拟测试也不能替代真实发布门槛。 + +### 3.1 OpenAPI 与事件分组覆盖 + +| 分组 | 主测试族 | 必验契约 | +| --- | --- | --- | +| 浏览器支持 | `TDD-WP0-BRW-001`、`TDD-WP0-BRW-002` | support check、426、最小字段、产品路由前置门禁 | +| Bootstrap | `TDD-WP0-API-001`、`TDD-WP3-MDL-003` | app、公开功能、模型配置/runtime/推荐和非敏感依赖摘要 | +| 普通认证 | `TDD-WP1-AUTH-*` | 注册/登录分离、挑战、会话、限流和稳定错误 | +| 管理员认证 | `TDD-WP1-ADM-001`、`TDD-WP1-CFG-001` | 白名单前置校验、独立 audience、告知版本摘要 | +| 账号 | `TDD-WP1-DEL-001`、`TDD-WP2-CRED-*` | 资料、点数、流水和不可逆注销 | +| 模型 | `TDD-WP3-MDL-*` | 配置集合、版本、runtime availability 和派生推荐 | +| 生成 | `TDD-WP2-GEN-*`、`TDD-WP2-REF-001` | multipart、配置复核、单任务、参考图和任务真相 | +| 项目 | `TDD-WP2-PROJ-*` | 所有者、If-Match、完整 JSON、回收站和 purge | +| 历史与成品 | `TDD-WP2-EXP-*`、`TDD-WP4-EXP-001` | 原图、历史、每格式 latest 与客户端下载分离 | +| 三类素材 | `TDD-WP5-RES-001`、`TDD-WP5-PREV-001` | public/preview/private 分路由、鉴权和缓存 | +| 贴纸历史清理 | `TDD-WP5-CLN-001` | 候选、intent、确认、整批复核、异步结果 | +| 私有告知与访问 | `TDD-WP6-PRIV-*` | 身份+版本 ack、服务端区域门禁、先审计后读取 | +| 管理后台 | `TDD-WP6-ADM-001`、`TDD-WP6-AUD-001` | active super_admin、事务内审计和安全摘要 | +| 状态事件 | `TDD-WP0-EVT-001` | 仅提示 ID/类型/版本/时间;断线或缺号后 REST refetch | + +所有 `/api/v1` JSON、multipart、SSE 和错误响应都由 TypeBox/OpenAPI 3.1 的同一 Schema 来源验证。前端生成客户端 snapshot 漂移、未声明枚举、错误 HTTP 状态或错误信封字段时,API 契约测试失败。 + +## 4. 候选环境与发布冻结 + +### 4.1 当前候选基线 + +| 项目 | 候选值 | 用途 | +| --- | --- | --- | +| 操作系统 | Microsoft Windows 11 家庭版 中文版,25H2,`10.0.26200`,build `26200` | 开发视觉、性能、打包和辅助界面候选基线 | +| Chrome | `150.0.7871.184`,major `150` | 当前真实 Chrome channel 候选基线 | +| Edge | `150.0.4078.99`,major `150` | 当前真实 Edge channel 候选基线 | +| 产品视口 | `1920 x 1080` CSS px | UIDesign 首要桌面验收视口 | +| 截图 DPR | `1` | Playwright 确定性页面与 Canvas 基线 | +| 默认缩放 | `100%` | 正常布局、视觉和性能 | +| 可访问性缩放 | `200%` | 文字覆盖、弹层、主动作和滚动可达性 | +| 语言 | `zh-CN` | 固定简体中文文案和排序 | +| 时区 | `Asia/Shanghai` | 界面时间显示;持久化仍为 UTC 毫秒 | + +上述浏览器必须使用本机真实 Chrome/Edge channel。Playwright 自带 Chromium 只能用于开发诊断,不能作为 AC-24、AC-32 或发布通过证据。伪造 User-Agent 或 UA-CH 可以证明拒绝分支,但不能证明支持分支。 + +本节具体版本号只用于当前候选视觉、性能和打包基线,不是产品支持范围本身,也不得写死进产品逻辑;产品运行支持口径以最终 `RELEASE.json` 和浏览器门禁实现为准。 + +### 4.2 `RELEASE.json` 缺失门禁 + +当前目录没有 `RELEASE.json`,因此本节环境只能标为 candidate。WP-7 必须: + +1. 从实际发布包记录 Windows build、Chrome/Edge 品牌、major、full version 和记录时间。 +2. 在记录的两个真实 full version 上重新运行 AC-24、AC-32、全部 E2E、视觉、性能、下载、文件选择和 200% 缩放。 +3. 对比本节候选值。任何不同都使候选截图和性能结果失去发布证据资格,但不自动否定与浏览器无关的单元/DB 测试。 +4. 把 `RELEASE.json` SHA-256 写入最终 `evidence.json`;缺失、版本不一致或哈希不一致时 WP-7 失败。 +5. 运行时只接受 `RELEASE.json` 记录的 major,不联网查询“当前版本”,也不接受前一 major。 + +## 5. 固定 fixture + +### 5.1 主体与认证 + +全部自动化邮箱使用 `.invalid`,不得使用项目方真实邮箱。 + +| fixture | 内容 | +| --- | --- | +| `FX-ACTOR-USER-A` | active 普通用户,10 available、0 reserved,拥有项目 A | +| `FX-ACTOR-USER-B` | 通过正常邀请、验证码和注册链临时创建的第二普通用户 | +| `FX-ACTOR-SUSPENDED` | suspended 普通用户,仍占普通账号名额 | +| `FX-ACTOR-DELETED` | 已注销主体,只保留允许的匿名事件 | +| `FX-ACTOR-ADMIN-A` | active super_admin,已在安全白名单 | +| `FX-ACTOR-ADMIN-B` | 第二个独立 active super_admin | +| `FX-ACTOR-DEPLOYER` | 无 UserProfile、无会话、无产品角色的配置维护主体 | +| `FX-INVITE-VALID` | 未过期、启用且有剩余次数 | +| `FX-INVITE-EXPIRED` | 已过期 | +| `FX-INVITE-DISABLED` | 已停用 | +| `FX-INVITE-EXHAUSTED` | 已达最大使用次数 | +| `FX-CHALLENGE` | 10 分钟一次性验证码、60 秒重发限制、带 pepper 摘要 | + +跨普通用户隔离的发布验收不得直接插入 `FX-ACTOR-USER-B`。它必须在独立 Chrome/Edge profile 中使用真实可验收的邀请和验证码链创建,完成越权检查后正常注销,并等待内容进入规定清理路径。直接 DB fixture 只用于低层事务测试。 + +### 5.2 模型、任务与点数 + +| fixture | 内容 | +| --- | --- | +| `FX-MODEL-SEED` | 三模型 configured enabled;Flash 唯一默认 priority 1,Pro priority 2,GPT priority 3;初始 contract unverified、runtime unavailable | +| `FX-MODEL-VERIFIED` | 三模型分别具有独立 verified 证据和可用 runtime 状态 | +| `FX-MODEL-NO-RUNTIME` | 配置不变,三个模型 runtime 均不可用于新任务 | +| `FX-MODEL-CONFLICT` | 过期 config_set_version、非法默认替代或重复优先级候选集合 | +| `FX-CREDIT-ENOUGH` | available 10、reserved 0、模型成本 1 | +| `FX-CREDIT-INSUFFICIENT` | available 0、reserved 0、模型成本 1 | +| `FX-CREDIT-NEGATIVE` | 仅由 admin_adjustment 产生 available -5,reserved 保持不变 | +| `FX-JOB-ACTIVE` | 一个 queued 或 running 任务及一份 generation_reserve | +| `FX-JOB-TERMINAL` | succeeded、failed、rejected 的不可逆终态组合 | +| `FX-GATEWAY-SYNC` | 同步完成模型响应 | +| `FX-GATEWAY-ASYNC` | start 返回上游引用、poll 返回终态 | +| `FX-GATEWAY-UNKNOWN` | 已提交但无可安全查询引用;`GenerationJob.status=failed`,`error_category=unknown_retryable`,`upstream_cost_reconciliation=pending_manual_review`,`upstream_outcome_known=false`,冻结点释放一次 | + +### 5.3 项目、参考图与画布 + +| fixture | 内容 | +| --- | --- | +| `FX-PROJECT-EMPTY` | failed_empty 草稿,无成功图 | +| `FX-PROJECT-HISTORY-9` | 9 张成功图,可继续生成 | +| `FX-PROJECT-HISTORY-10` | 10 张成功图,阻止追加 | +| `FX-PROJECT-ACTIVE-19` | 19 个 active 项目,可再创建一个 | +| `FX-PROJECT-ACTIVE-20` | 20 个 active 项目,阻止创建和恢复 | +| `FX-PROJECT-CONFLICT` | 两个标签基于同一 state_version 的不同内存状态 | +| `FX-REF-VALID` | 可解码的 JPG、PNG、WebP,分别满足模型限制 | +| `FX-REF-MALFORMED` | 扩展名与内容不符、损坏解码和错误 MIME | +| `FX-REF-OVERSIZE` | 超单文件、总大小或数量限制 | +| `FX-REF-NONSAFETY-INVALID` | 供应商明确判定不可用但不属于安全拒绝的参考图 | +| `FX-REF-SAFETY-REJECTED` | 供应商明确安全拒绝证据;不得与前一 fixture 共用模拟错误 | +| `FX-CANVAS-50` | 12 个文字、24 个普通贴纸、4 个色卡、10 个动态贴纸,共 50 个覆盖元素 | +| `FX-CANVAS-RATIOS` | 3:4、1:1、4:3、9:16 四个固定画布和标准像素 | + +### 5.4 时间、位置与视觉 + +- 固定后端时钟为 `2026-07-27T04:00:00.000Z`,界面期望为 Asia/Shanghai 的 `2026-07-27 12:00:00`。 +- DYN004 使用确定测试坐标与固定地理编码响应;拒绝 Dada 自有提示时定位 API 调用次数必须为 0。 +- 色卡背景使用固定解码像素和 `mmcq-v1`;测试裁剪、调色、滤镜不改变五色,更换原始底图会改变五色。 +- 字体测试等待 `FontFace` ready;字体缺失使模板 unavailable。DYN012 只使用 FONT081 Lexend Deca,并始终标记替代字体。 +- 动态值、动画时刻、随机 ID 生成器、列表排序和图片解码均固定 seed;视觉基线不得依赖当前墙钟或网络返回顺序。 + +### 5.5 存储边界 + +容量测试通过受控文件驱动、数据库计数和预留模拟精确字节,不实际创建 5 GB 文件。必须参数化以下值: + +| 字节值 | 期望 | +| ---: | --- | +| `4,294,967,295` | normal | +| `4,294,967,296` | warning 起点 | +| `4,831,838,207` | warning 末值 | +| `4,831,838,208` | critical 起点 | +| `5,368,709,119` | critical 末值 | +| `5,368,709,120` | full;若由本次写入恰好达到,写入成功后进入 full | +| `5,368,709,121` | 超限请求拒绝;不得创建持久副作用 | + +计量分类至少区分 reference、generated、export、derived、`sticker_original`、`sticker_thumbnail`。只读规范素材、应用代码、数据库、日志、审计、浏览器公开缓存和下载目录均不得计入。 + +## 6. 工作包 TDD 门禁 + +### 6.1 WP-0 基础工程与本机边界 + +| 测试族 | 首个 Red | Green 断言 | 层级 | +| --- | --- | --- | --- | +| `TDD-WP0-DEP-001` | 冻结依赖任一无法安装、加载或最小运行 | 精确版本、TypeScript、React/Fabric、Fastify、better-sqlite3 native 和随包 Node 全通过;不私自替换技术栈 | UNIT、PKG-SEC | +| `TDD-WP0-API-001` | TypeBox、OpenAPI、生成客户端或错误信封漂移 | OpenAPI 3.1 snapshot 与运行验证一致;响应有 correlation ID;`details` 只含白名单字段且不泄露内部信息 | UNIT、API | +| `TDD-WP0-BND-001` | API 接受非回环绑定、错误 Host/Origin 或 CORS | 只绑定 `127.0.0.1:43121`;拒绝局域网、其他 Host/Origin,不创建防火墙入站规则 | API、PKG-SEC | +| `TDD-WP0-BRW-001` | 真实支持 Chrome/Edge 无法通过门禁 | `RELEASE.json` 记录的两个真实 full version 通过并建立短期支持 Cookie,产品 API 每次复核品牌/major | E2E、MANUAL | +| `TDD-WP0-BRW-002` | 其他品牌、错误 major、UA-CH 缺失/冲突或直调 API 可进入产品 | 全部返回 426 `BROWSER_UNSUPPORTED`,只有最小引导,无登录、资源、DB 业务读取或外部调用,无绕过令牌 | API、E2E | +| `TDD-WP0-SUP-001` | 第二实例、端口占用、API/Worker 崩溃或退出留下残留进程 | mutex、固定端口、有限重启、degraded 状态、15 秒优雅退出和托盘允许动作符合 DevelopmentPlan | PKG-SEC、MANUAL | +| `TDD-WP0-DATA-001` | LocalDataRoot 位于仓库/项目/下载/素材根,或丢失后自动重建 | 路径校验拒绝违规目录;已初始化根缺失进入 data_missing;浏览器只见资源 ID | DB、API、PKG-SEC | +| `TDD-WP0-DATA-002` | 产品出现自动备份、项目包、业务导入或 P0-B 迁移 | 只允许下载原始生成图和 JPG/PNG;删除根或重装不可恢复;固定本机风险文案持续显示 | API、E2E、MANUAL | +| `TDD-WP0-STO-001` | 任一阈值使用模糊比例或边界错一字节 | 第 5.5 节七个精确字节值产生固定 notice/status | UNIT、DB | +| `TDD-WP0-STO-002` | 写入预计量用 `>=` 拒绝等号,或超限后仍有副作用 | `>` 才拒绝;等于上限提交成功后 full;超限不创建任务、冻结、文件关系或上游调用 | UNIT、DB、API | +| `TDD-WP0-STO-003` | full/unavailable 动作混淆或清理排队即减字节 | full 允许 JSON 保存与客户端仅下载;unavailable 拒绝新增后端写;物理删除和重测前计量不变 | DB、API、WRK、E2E | +| `TDD-WP0-FILE-001` | 文件流、数据库事务或进程崩溃产生可读半文件、孤儿引用或计量漂移 | 预检、staging 流式哈希/MIME、同卷原子改名、SQLite 提交、补偿队列和启动对账全覆盖;路径规范化拒绝 `..`、符号链接逃逸和 manifest 外对象 | DB、API、WRK | +| `TDD-WP0-CACHE-001` | 应用缓存超过 157,286,400 字节或含私有/内部内容 | LRU 在写前淘汰;只含 allowlist 公开资源;逐场景枚举 SW、Cache Storage、IndexedDB | UNIT、E2E | +| `TDD-WP0-EVT-001` | SSE 携带私有正文、被客户端当作业务真相或事件缺号后不恢复 | 事件只含固定非敏感字段;客户端收到后 REST refetch;断线/缺号 bootstrap;配置和 runtime 版本分离 | API、E2E | +| `TDD-WP0-SEC-001` | 凭据进入参数、环境、文件、日志或错误 | Supervisor 通过继承匿名管道最小传递;API/Worker 分离;缺失、清除、重启和扫描全通过 | PKG-SEC | +| `TDD-WP0-LOG-001` | 日志无限增长、含敏感数据或目录不可写后仍调用 AI | 10 MiB/10 文件/30 天轮转;白名单字段;写失败进入 unavailable 并阻断 AI | DB、WRK、PKG-SEC | +| `TDD-WP0-PKG-001` | ZIP 缺组件、包含真实配置或动态换端口 | 便携布局、SHA-256、START-HERE、RELEASE 记录和固定端口全部正确,制品零凭据 | PKG-SEC | + +WP-0 Green 不等于 AC-24 发布通过;真实浏览器记录必须在 WP-7 重新冻结。 + +### 6.2 WP-1 认证、权限、数据模型与审计基础 + +| 测试族 | 首个 Red | Green 断言 | 层级 | +| --- | --- | --- | --- | +| `TDD-WP1-AUTH-001` | 有效邀请注册任一步部分成功 | 发码前和建号前复核;账号、初始 10 点、registration_grant、告知版本和邀请码次数同事务一次提交 | DB、API、E2E | +| `TDD-WP1-AUTH-002` | 无效/过期/停用/耗尽邀请码仍发码或占用次数 | 不发码、不建号、不赠点,返回稳定原因且无副作用 | DB、API、E2E | +| `TDD-WP1-AUTH-003` | 注册/登录对未注册、已注册、已注销、suspended 邮箱静默切换流程 | 六种状态严格按 PRD 分离入口;已注销邮箱只能新邀请重建且旧数据不恢复 | API、E2E | +| `TDD-WP1-AUTH-004` | 验证码重用、过期仍有效或会话未及时撤销 | 10 分钟一次性、60 秒重发、30 天会话;退出/暂停/注销/白名单移除立即撤销 | DB、API | +| `TDD-WP1-NOTICE-001` | 未勾选、版本缺失或告知遗漏第三方/本机数据处理仍可注册 | 告知含版本和生效日期,覆盖 AI 网关、Resend、高德、本机存储与无备份、管理员访问、DYN004、注销和 180 天规则;未同意不建号,成功时记录版本/时间 | UNIT、API、E2E、MANUAL | +| `TDD-WP1-SLOT-001` | suspended 不占名额、super_admin 占名额或第 11 人可注册 | active+suspended 普通账号最多 10;deleted 释放;super_admin 不占且不用邀请码 | DB、API、E2E | +| `TDD-WP1-ADM-001` | 白名单外发码、普通账号提升或全部管理员停用后自助恢复 | 后台独立 audience;多管理员可用;恢复仅安全配置;部署人员无产品身份 | DB、API、E2E | +| `TDD-WP1-CFG-001` | 安全配置修订部分生效或泄露白名单/HMAC | 完整验证后单一事务生效、撤销会话、system 审计和 revision 推进;失败整体回滚 | DB、PKG-SEC | +| `TDD-WP1-DEL-001` | 注销后仍可访问账号、项目、资源、坐标或会话 | 注销事务立即撤权和断链,物理内容异步清理,邮箱可作为全新账号重新注册 | DB、API、WRK、E2E | +| `TDD-WP1-DEL-002` | 匿名事件可回溯或注销延长访问审计期限 | 只保留允许字段和随机主体;匿名事件不晚于注销后 180 天;访问审计沿原 expires_at | DB、WRK | +| `TDD-WP1-AUD-001` | 普通连接可改删两类审计 | trigger 阻断 UPDATE/DELETE;仅保留期/隐私清理作用域可执行规定删除 | DB | + +真实 Resend 认证在 WP-7 才能把相关 AC 从 green 提升为 passed;开发预置账号永远不能成为正式认证证据。 + +### 6.3 WP-2 项目、点数与 GenerationJob + +| 测试族 | 首个 Red | Green 断言 | 层级 | +| --- | --- | --- | --- | +| `TDD-WP2-PROJ-001` | 新建/继续生成/历史上限混淆项目数量或比例 | 每次“新建创作”新项目;继续生成只追加;比例固定;10 张历史阻断追加但不阻断新项目 | DB、API、E2E | +| `TDD-WP2-PROJ-002` | 连续编辑并发保存、失败显示已保存或刷新恢复私有草稿 | 1 秒 debounce、单请求在途、最新快照合并;失败重试;强制退出只恢复 saved,撤销栈为空 | UNIT、API、E2E | +| `TDD-WP2-PROJ-003` | 回收站计时、20 项目恢复或 purge 可恢复边界错误 | purge_at 精确 +720 小时;满 20 保持 trashed;purged 立即不可访问并异步清理 | DB、API、WRK、E2E | +| `TDD-WP2-PROJ-004` | 旧标签覆盖、另存副本或多次冲突导出 | CAS 返回 412;旧页只读;仅一次本地导出且不写 latest;刷新后端最新状态 | API、E2E | +| `TDD-WP2-PROJ-005` | 重试新建项目或成功项目混入 failed_empty 批量删除 | 同一草稿每次重试只新增任务;仅无成功图草稿可批量入回收站 | DB、API、E2E | +| `TDD-WP2-CRED-001` | 点数不足、重复结算或生成流程制造负数 | 不足不建任务/流水/上游;reserve/commit/release 各一次;生成流程 available 不为负 | DB、API、WRK | +| `TDD-WP2-CRED-002` | 管理员调点修改 reserved 或缺原因/审计 | 只改 available,可为负;原因、流水和 AdminOperationLog 同事务 | DB、API、E2E | +| `TDD-WP2-GEN-001` | 并发提交创建两个任务、项目、参考关系或冻结 | `BEGIN IMMEDIATE`+部分唯一索引只保留一个 queued/running;后续返回当前任务 | DB、API | +| `TDD-WP2-GEN-002` | 成功/失败/拒绝与点数、项目历史或重试不一致 | 成功一图并 commit;失败/rejected 无输出并 release;重试同项目新任务 | DB、API、WRK、E2E | +| `TDD-WP2-GEN-003` | 旧 model_config_version 静默按新成本或限制提交 | 返回 412、最新摘要;不建任务、不上传引用、不冻结、不调用上游;重新确认后才提交 | API、E2E | +| `TDD-WP2-REF-001` | 未提交参考图被持久化或重试覆盖旧关系 | 提交前只在内存;每个任务保存独立关系快照;purged 后立即不可读并异步删除 | DB、API、E2E | +| `TDD-WP2-EXP-001` | 项目/成品保存失败撤回下载或覆盖旧 latest | 同一次 Blob 用于下载和上传;下载可成功、latest 保持旧值;刷新只恢复 saved | API、E2E | +| `TDD-WP2-EXP-002` | 从未导出项目自动生成默认成品 | 显示“暂无导出成品”,只提供进入编辑导出和下载原图 | API、E2E | +| `TDD-WP2-BAL-001` | 模型/账户/未知余额影响改写配置或重复释放 | 按影响范围只改 runtime;只 release 一次;未确认恢复前不可恢复 | DB、API、WRK | +| `TDD-WP2-ERR-001` | 九类错误被新增、归并、泄露原文或错误处理点数 | 三模型统一固定 category;提交前无任务,提交后只 release 一次;状态和用户动作符合第 9 节 | UNIT、API、WRK、E2E | + +### 6.4 WP-3 三模型契约验证与适配 + +| 测试族 | 首个 Red | Green 断言 | 层级 | +| --- | --- | --- | --- | +| `TDD-WP3-MDL-001` | 初始集合零/多默认、优先级非法或 runtime 假装 verified | 三模型固定 seed;一个 enabled default;priority 1/2/3;contract unverified 时 runtime 不可用 | DB、API | +| `TDD-WP3-MDL-002` | 停用默认、重复优先级或 CAS 冲突产生部分配置 | 完整三模型集合原子校验和切换;失败原集合、runtime 和审计结果符合协议 | UNIT、DB、API、E2E | +| `TDD-WP3-MDL-003` | runtime 降级改变 enabled/default/priority 或推荐为空时写回配置 | 配置字段不变;推荐只从可用候选按 priority 派生,可为 null | UNIT、DB、API、E2E | +| `TDD-WP3-ADP-001` | 一个模型 fixture 被复用于另两个模型或静默接受多图 | 三个独立 Adapter 分别验证纯文字、参考图、四比例、同步/异步、响应和一图约束 | EXT-MOCK、EXT-REAL | +| `TDD-WP3-ADP-002` | 契约字段变化后仍为 verified | 端点、字段、参考图、响应、异步查询或错误协议任一变化立即 unverified,完整重验后才恢复 | DB、EXT-MOCK、EXT-REAL | +| `TDD-WP3-WRK-001` | Worker 崩溃后重新 submit、重复结算或丢任务 | 租约/心跳;有引用只 poll;无安全引用则 unknown_retryable+release+pending_manual_review | DB、WRK | +| `TDD-WP3-BAL-001` | 余额恢复自动执行或成本核对补扣用户点数 | model/account/unknown 影响正确;人工确认恢复并审计;成本核对不改任务终态或用户点数 | DB、WRK、E2E | + +三个模型任一缺少最后一次配置下的真实证据时,WP-3 保持 externally_blocked。 + +### 6.5 WP-4 桌面编辑器与导出 + +| 测试族 | 首个 Red | Green 断言 | 层级 | +| --- | --- | --- | --- | +| `TDD-WP4-BG-001` | 换底图丢覆盖层、保留旧调色或色卡不刷新 | 覆盖层位置/尺寸保留;底图参数重置;色卡重提;一次撤销和保存 | UNIT、E2E | +| `TDD-WP4-BG-002` | 填充/适配/裁剪/缩放/定位或亮度、对比度、饱和度、色温、锐度、预设滤镜、恢复原图未保存、不可撤销或未进入导出 | 每项参数可预览、提交、撤销、自动保存并在重开与导出中一致;恢复原图只重置底图处理,不改变覆盖元素 | UNIT、E2E、VIS-PERF | +| `TDD-WP4-CAN-001` | 选择循环、多选、层级、吸附或第 51 元素错误 | 50 元素可编辑保存导出;第 51 个阻断;无图层面板/隐藏/锁定/编组 | UNIT、E2E、VIS-PERF | +| `TDD-WP4-TXT-001` | 多行丢换行、空内容提交或切模板改变变换 | 内容/换行持久;模板切换重置默认样式但保留位置/旋转/整体尺寸,可撤销 | UNIT、E2E、VIS-PERF | +| `TDD-WP4-TXT-002` | 字体静默回退、字号与控制柄不同步、文字裁切、范围步长错误或背景透明度影响文字 | 真实归档字体;字号与缩放同步且内容重新测量不裁切;行距/字距/描边等精确范围;完成为一次撤销;重新打开和导出一致 | UNIT、E2E、VIS-PERF | +| `TDD-WP4-TXT-003` | 未选模板即可添加普通文字,或模板分类、显示名称搜索、catalog 顺序、账号最近使用漂移 | 只能从模板添加;四类、显示名称搜索、稳定顺序和账号级最近使用符合 PRD;普通贴纸不复用该搜索 | UNIT、E2E | +| `TDD-WP4-STK-001` | 普通贴纸变换不进入保存/撤销/导出 | 移动、缩放、旋转、翻转、透明度、复制、层级和多选一致 | UNIT、E2E | +| `TDD-WP4-COL-001` | 色卡随机、读取处理后底图或额外上传图片 | 同图 `mmcq-v1` 五色确定;裁剪/调色/滤镜不刷新;换底图刷新;网络上传为 0 | UNIT、E2E、VIS-PERF | +| `TDD-WP4-DYN-001` | 时间贴纸重开后变成新时间 | 使用插入/确认值并持久化,导出静态不可点击内容 | UNIT、E2E | +| `TDD-WP4-DYN-002` | DYN004 提示前调用定位、拒绝后插入或删除后留坐标 | 同意后才定位并保存坐标;拒绝调用为 0;手动地点回退;删除/注销清理 | UNIT、E2E | +| `TDD-WP4-DYN-003` | 身份贴纸重复 `@@`、覆盖修改账号或 DYN012 静默换字体 | 前缀一个;实例覆盖独立;DYN012 固定 FONT081 且证据标记替代 | UNIT、E2E、MANUAL | +| `TDD-WP4-EXP-001` | 四比例像素、JPG/PNG、未提交修改或同 Blob 规则错误 | 精确像素、sRGB、无水印、PNG 无损、JPG 80-100 默认 92;未提交文字或样式经确认后,提交形成且仅形成一次撤销记录并进入正常自动保存,再用提交后的同一画布状态合成;真正的导出动作不额外创建撤销记录 | UNIT、E2E、VIS-PERF | +| `TDD-WP4-A11Y-001` | 关键动作不可键盘到达、焦点逃逸或状态只靠颜色 | 焦点顺序、ARIA、live region、弹层返回、等价画布工具、axe critical/serious 为 0 | E2E、VIS-PERF | +| `TDD-WP4-VIS-001` | Chrome/Edge 白名单结构或导出漂移 | 固定环境按第 10 节阈值比较;已知替代项人工复核 | VIS-PERF、MANUAL | +| `TDD-WP4-PERF-001` | 50 元素、自动保存、资源面板或导出超过预算 | 第 10.2 节全部预算通过,失败不破坏项目或 latest export | VIS-PERF | + +### 6.6 WP-5 素材转换、发布与 P0-A 白名单 + +| 测试族 | 首个 Red | Green 断言 | 层级 | +| --- | --- | --- | --- | +| `TDD-WP5-CAT-001` | 计数、part、重复项、顺序或懒加载错误 | part1-25 共 1,407 PNG;3 组重复保留;虚拟列表节点不线性增长,原图按需加载 | UNIT、E2E、MANUAL | +| `TDD-WP5-MAN-001` | 编译器读取证据目录、执行 Lua/Prefab、复制全库或改写源 | 只读规范入口;声明式转换;源前后哈希/时间不变;无等价全库副本 | UNIT、PKG-SEC、MANUAL | +| `TDD-WP5-WHITE-001` | 普通用户发现白名单外复杂素材或缺少规定白名单 | 精确 32 文字、实际字体+FONT081、4 色卡、10 动态、1,407 普通贴纸 | API、E2E | +| `TDD-WP5-COL-001` | P0-A 启用非四种色卡或四种布局不消费同一五色 | 只启用 COLOR001/002/008/016,统一五色,刷新规则与 WP-4 一致 | UNIT、E2E、VIS-PERF | +| `TDD-WP5-RES-001` | 公开 manifest 暴露 internal/private、路径可推导或缓存策略混用 | 三类路由、鉴权和 cache header 分离;浏览器永不获得绝对路径 | API、E2E、PKG-SEC | +| `TDD-WP5-UPL-001` | 后台上传未流式校验、原图/缩略图漏计量或 full 仍写入 | PNG/WebP、稳定 ID、part、顺序和 MIME 校验;两类文件分别预留并计量 | DB、API、E2E | +| `TDD-WP5-CLN-001` | 自动清理、有引用仍删除、整批部分排队或排队即减容量 | 候选、同管理员确认、BEGIN IMMEDIATE 复核、整批拒绝/排队、物理删除、重测和全阶段审计 | DB、API、WRK、E2E | +| `TDD-WP5-PREV-001` | 授权改变角色、公开 manifest 泄漏或撤销后仍可取资源 | 每次校验 grant;no-store;撤销立即阻断新访问;已有项目按版本渲染 | DB、API、E2E | +| `TDD-WP5-CACHE-001` | SW 拦截 internal/private 或 IndexedDB 保存私有字段 | 仅公开 allowlist;每场景实际枚举 registration、Cache keys 和 IndexedDB 记录 | E2E | + +真实 3.57 GB 归档只在受控 release job 只读校验;日常 CI 使用小型合成 fixture。 + +### 6.7 WP-6 运营后台与内部运营控制 + +| 测试族 | 首个 Red | Green 断言 | 层级 | +| --- | --- | --- | --- | +| `TDD-WP6-ADM-001` | 普通/预览账号进入后台、后台显示私有正文或敏感配置 | active super_admin 服务端授权;默认仅安全摘要;角色和会话域严格分离 | API、E2E | +| `TDD-WP6-PRIV-001` | 告知确认只存在 Cookie/session/localStorage 或同版本重复 | UserProfile 按 admin+version 持久;跨标签、浏览器/API 重启、重登和 Chrome/Edge不重复;升版重阻断 | DB、API、E2E | +| `TDD-WP6-PRIV-002` | hover/预取打开内容、确认替代逐次审计、要求填写访问目的/原因或审计失败仍返回内容 | 每个入口原样显示“打开并记录审计”;每次点击先提交独立 PrivateContentAccessLog;UI 和 API 均不要求逐次填写访问目的、原因或二次确认;审计只记录 PRD/DevelopmentPlan 允许的对象、管理员、时间、内容类型等非正文信息;失败不返回;列表/HTML/缓存无正文 | DB、API、E2E | +| `TDD-WP6-SVC-001` | Resend 发第 81 封/超月限、高德发第 1001 次或暂停后伪造成功 | 配额领取事务化;paused_quota/provider;已有会话继续;DYN004 停而手动地点继续 | DB、API、EXT-MOCK、E2E | +| `TDD-WP6-SVC-002` | 后台提高上限、启用收费或自动恢复 | 只允许不扩大能力的下调并审计;提高/付费/自动扩容被拒绝;恢复需前置确认 | DB、API、E2E | +| `TDD-WP6-AUD-001` | 敏感操作无日志、两类日志混用、含正文或 180 天内可删 | 全部规定操作同事务审计;贴纸清理全阶段;两类表分离;到期 Worker 清理 | DB、API、WRK、E2E | +| `TDD-WP6-STATE-001` | 后台把 configured default、runtime availability 和 recommended 合并 | 三列独立;临时异常不改配置;恢复只重新派生推荐 | API、E2E | +| `TDD-WP6-DIAG-001` | 总览/服务/存储/诊断暴露路径、密钥或正文 | 只显示固定非敏感字段、计量和状态;复制诊断通过同一脱敏扫描 | API、E2E、PKG-SEC | + +### 6.8 WP-7 P0-A 验收准备与发布 + +| 测试族 | 首个 Red | Green 断言 | 层级 | +| --- | --- | --- | --- | +| `TDD-WP7-REL-001` | `RELEASE.json` 缺失/漂移、ZIP 哈希或真实浏览器未验收 | 发布记录、制品、START-HERE、Chrome/Edge full version、固定 major 和 Windows build 一致 | PKG-SEC、E2E、MANUAL | +| `TDD-WP7-EXT-001` | 任一模型缺独立真实契约证据 | 三模型各自完成纯文字、参考图、四比例、同步/异步、响应、九类错误和结算证据 | EXT-REAL、MANUAL | +| `TDD-WP7-EXT-002` | Resend 域名/免费规则/送达门槛未证实 | 依据 PRD 第 23.2 节、AC-41、AC-47 与 DevelopmentPlan 第 1.4、11.1 节:SPF/DKIM;QQ、163、企业邮箱各 20 封至少 19 封在 2 分钟内送达;正式账号真实认证 | EXT-REAL、MANUAL | +| `TDD-WP7-EXT-003` | 高德接口、绑定、安全限制或 1,000 次硬上限未证实 | 定位/逆地理、QPS、白名单、安全和应用硬停止实测通过 | EXT-REAL、MANUAL | +| `TDD-WP7-UI-001` | UIDesign 页面/入口或适用状态无实现落点,或 1080p/200% 出现遮挡 | 第 11.1 节页面 × 状态矩阵全部适用单元格有证据;Pencil 仅作布局参考,Canvas Index 不计产品实现;固定文案、焦点、状态、控件和无重叠检查通过 | E2E、VIS-PERF、MANUAL | +| `TDD-WP7-SEC-001` | 制品、日志、DB 配置、manifest 或文档出现真实敏感值/用户路径 | 全制品扫描零命中;凭据只在 Windows Credential Manager;诊断脱敏 | PKG-SEC | +| `TDD-WP7-AC-001` | 52 项 AC、89 个测试族或 117 个规范 case 缺失,重复主责、孤儿 case 或用 P0-B 结果冒充 | 第 12 节矩阵每项一个主责且证据齐全;89/89 父族有 case 且派生属性完整;未来四项不计入;四份全局来源哈希未变,UI 参考变化按第 1.2.2 节局部重验 | UNIT、MANUAL | + +任一真实外部门槛失败时不得开始 P0-A 实际验收,也不得把 WP-7 标记 passed。 + +### 6.9 高风险可执行 case + +第 6.1 至 6.8 节的 89 个测试族是覆盖导航,不代替逐场景用例。第 6.9.2 至 6.9.9 节给出重点能力的细分 case,第 6.9.10 至 6.9.17 节为其余父族给出至少一个规范 case;合计 117 个 case,保证 89/89 父测试族均有执行入口。同一测试族的参数分支仍按第 2.2 节展开。实现不得删除 case、合并掉禁止副作用断言,或用一条端到端 happy path 代替 DB/API 分层断言。 + +#### 6.9.1 通用执行约定 + +- API case 默认使用已通过浏览器门禁的请求上下文、`Host: 127.0.0.1:43121`、同源 Origin、正确 audience 的隔离 session、页面加载取得的 CSRF token;所有创建型、金融或文件副作用请求使用稳定的独立 `Idempotency-Key`。case 明确测试门禁或鉴权失败时才替换这些默认值。 +- `REGISTER_SEND`、`REGISTER_COMPLETE`、`LOGIN_SEND`、`LOGIN_COMPLETE`、`PRIVATE_OPEN` 和 `EXPORT_SAVE` 是测试别名,分别在生成的 OpenAPI 中解析到 `/api/v1/auth/register/*` 发码/完成、`/api/v1/auth/login/*` 发码/完成、`/api/v1/admin/private-content/*` 单对象打开和 `/api/v1/projects/{id}/exports` latest 成品保存 operation。别名解析不到唯一 operation、请求或响应不符合 TypeBox/OpenAPI 时先使 `TDD-WP0-API-001` 失败;不得为满足用例新增产品路由。 +- 表中 `case_id` 就是第 2.2 节的可执行 `test_id`。父测试族必须先与第 6.1 至 6.8 节的已知父族集合匹配,再用正则 `^(TDD-WP[0-7]-[A-Z0-9]+-[0-9]{3})-` 解析,且捕获组 1 必须是该已知父族;不得通过删除最后一个命名段或按最后一个连字符截断。`result.json` 必须逐项记录第 2.2 节全部字段,包括父测试族继承的 WP、层级、自动/人工属性和发布门禁;不能只记录测试族汇总结果。 +- 每个 case 在临时 SQLite、临时 LocalDataRoot、可控 UTC 毫秒时钟和独立浏览器 profile 中运行。步骤 0 固定保存脱敏 DB/文件基线;最后一步固定复查余额不变量、活动任务唯一索引、审计不可变约束和证据脱敏。 +- 证据根固定为 `artifacts/tdd//cases//`。每个目录必须有 `result.json`;API case 增加 `request.json`、`response.json`,DB case 增加 `db-diff.json`,文件 case 增加 `fs-before.json`、`fs-after.json`,Worker case 增加 `worker-events.json`,E2E case 增加 `trace.zip` 和 `screenshots/`。文件只保留 Schema 白名单字段、哈希和逻辑资源 ID,不保留正文、图片、邮箱、验证码、令牌或绝对路径。 +- 表中的“响应”同时是 HTTP 与 UI 断言:HTTP 状态、错误信封和字段以冻结 OpenAPI 为准;上游只冻结语义而未冻结具体成功状态码/字段名时,case 断言生成 Schema 所定义的成功响应及列出的业务结果,不在本文件发明字段。 + +#### 6.9.2 认证 + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP1-AUTH-001-valid-register` | AUTH-01 至 04、AC-01 | `FX-INVITE-VALID`、`FX-CHALLENGE`;占名额普通账号为 9;未注册 `.invalid` 邮箱 | 1. 调 `REGISTER_SEND`;2. 读取模拟 Resend 验证码;3. 以署名、社交 ID、当前告知 version/同意和同一 registration_id 调 `REGISTER_COMPLETE`;4. 调普通 session | 两次均符合成功 Schema;注册后得到普通 audience 的 30 天会话并进入创作,点数显示 available 10/reserved 0 | `users/user_profiles/credit_accounts/privacy_consents` 各新增正确关系;`invite_codes.used_count +1`;challenge 只消费一次;新增 session 只存 token 摘要;初始点数流水一次 | 不创建 super_admin;不保存验证码明文;不重复赠点或核销邀请码;不产生第二会话/第二注册实体 | `request.json`、`response.json`、`db-diff.json`、`trace.zip`、`screenshots/registered.png` | +| `TDD-WP1-AUTH-002-invalid-invite` | AUTH-01、02、AC-02 | 参数化 `FX-INVITE-EXPIRED/DISABLED/EXHAUSTED` 和不存在的邀请码 | 1. 对每个参数调 `REGISTER_SEND`;2. 检查 Resend mock 调用;3. 查询认证相关表 | 返回冻结的非成功错误语义并在邀请码字段显示原因,第二阶段不展开 | `users/user_profiles/credit_accounts/privacy_consents/email_challenges/sessions` 无新增;邀请码计数不变 | Resend 调用为 0;不建号、不赠点、不占名额、不写成功审计或成功提示 | 每参数 `response.json`、`db-diff.json`、`external-calls.json`、`screenshots/error.png` | +| `TDD-WP1-AUTH-001-final-recheck-race` | AUTH-01、NFR-04、AC-01、02、45 | `FX-INVITE-VALID` 已成功发码;随后参数化为邀请码耗尽/停用/过期或第 10 个名额被另一事务占用 | 1. 完成前改变可变条件;2. 调 `REGISTER_COMPLETE`;3. 用相同 Idempotency-Key 重试 | 返回对应冻结错误;不建立 session,不进入创作;相同重试返回同一失败结果 | `BEGIN IMMEDIATE` 后无新 user/profile/credit/consent/session;邀请码次数不增加;名额统计不变 | 不出现账号已建但邀请码未核销、邀请码已核销但账号未建或初始点数孤儿流水 | `response.json`、`db-diff.json`、`transaction-trace.json` | +| `TDD-WP1-AUTH-003-entry-state-matrix` | AUTH-01、02、05、06、AC-33 | 参数化未注册、active 已注册、deleted、suspended 邮箱;注册和登录两个入口 | 1. 每种邮箱分别调注册发码与登录发码;2. 对允许分支完成验证码;3. 检查页面不自动切入口 | 行为严格匹配 PRD AUTH-02 状态矩阵;deleted 仅可新邀请注册;suspended 均提示联系管理员 | 只允许的分支创建 challenge/session/new user;重复注册不核销邀请码;deleted 新建主体与旧主体无关联 | 不静默注册/登录转换;不恢复 deleted 数据;不因 suspended 释放名额;错误不泄漏后台白名单 | 每参数 `response.json`、`db-diff.json`、`trace.zip`、`screenshots/entry-state.png` | +| `TDD-WP1-AUTH-004-challenge-guards` | AUTH-02、04、AC-33 | `FX-CHALLENGE`、可控时钟、active 普通账号 | 1. 成功消费验证码;2. 重放同码;3. 新建 challenge 后前进超过 10 分钟再提交;4. 发码后 60 秒内再发;5. 连续错误触发限流 | 仅首次有效提交成功;重放/过期/错误使用稳定错误;60 秒重发和高频为 429;页面不显示假成功 | 首次 challenge `consumed_at` 只写一次;失败次数/限流记录按规则变化;失败分支不新增 session | 不记录验证码明文;不延长原 challenge;限流失败不调用 Resend、不创建会话 | 每参数 `response.json`、`db-diff.json`、`external-calls.json` | +| `TDD-WP1-AUTH-004-session-revocation` | AUTH-04 至 07、AC-22、33、49 | 每个参数使用独立库:active 普通用户或 active super_admin 各有 2 个 session | 1. 验证正常 session;2. 分别触发普通用户 logout/暂停/注销或管理员 logout/停用/移出白名单;3. 再调受保护 API | 撤销前成功;每种撤销后均为 401 或相应身份入口,已打开页面退出旧数据;两种 audience 不能互用 | 相应主体全部 session `revoked_at` 在同一事务写入;账号/白名单状态按触发操作变化 | 不只撤销当前浏览器;不把普通 session 提升为后台 session;不保留可交互私有响应 | 每参数 `response.json`、`db-diff.json`、`trace.zip`、`screenshots/revoked.png` | + +#### 6.9.3 点数 + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP2-CRED-001-reserve` | CREDIT-01 至 05、AC-03 | `FX-CREDIT-ENOUGH`、`FX-MODEL-VERIFIED`,无活动任务 | 1. 记录余额;2. 以成本 1 调 `POST /api/v1/generations`;3. 查询 `/me/credits` 和流水 | 创建任务成功;UI 显示 available 9/reserved 1 和 queued;流水显示 generation_reserve | `credit_accounts` 原子 10/0→9/1;一条 reserve ledger、一个 queued job 和 outbox 同事务 | 不提前生成 commit;不使总点数改变;不出现任务已建但未冻结或冻结无任务 | `request.json`、`response.json`、`db-diff.json` | +| `TDD-WP2-CRED-001-insufficient` | CREDIT-04、AC-28 | `FX-CREDIT-INSUFFICIENT`,成本 1 | 1. UI 检查生成按钮;2. 直接调生成 API 防绕过;3. 查询 DB/网关 mock | UI 禁用并显示 available/reserved/required/联系管理员;API 返回冻结错误语义 | 余额、ledger、job、project、reference、outbox 均无变化 | 上游调用 0;无 storage reservation/staging 文件;不产生负余额 | `response.json`、`db-diff.json`、`external-calls.json`、`screenshots/insufficient.png` | +| `TDD-WP2-GEN-001-concurrent-reserve` | CREDIT-03、GEN-07、AC-05、29 | `FX-CREDIT-ENOUGH`,两个不同 submission/idempotency key 同时开始 | 1. 用 barrier 并发提交两次;2. 等待响应;3. 查询 current job、余额和流水 | 一个响应创建任务,另一个 200 返回同一现有任务引用;UI 提供返回当前任务 | 仅一个 queued/running job、一个 project(new_project 模式)、一条 reserve ledger;余额只转移一次 | 不创建第二项目/参考关系/outbox/upstream call;available 不为负 | 两份 `response.json`、`db-diff.json`、`concurrency-trace.json` | +| `TDD-WP2-CRED-002-admin-adjustment` | CREDIT-05、06、ADMIN-01、09、AC-29、50 | `FX-JOB-ACTIVE`;available 0/reserved 1;`FX-ACTOR-ADMIN-A` | 1. 管理员填写原因扣减 5;2. 用同 adjustment_id 重试;3. 用户读点数 | 首次成功,重试返回同一结果;用户显示 available -5/reserved 1;无充值入口 | available 0→-5,reserved 保持 1;一条 admin_adjustment ledger 和一条 AdminOperationLog 同事务 | 不改活动任务/冻结流水;不重复调点;不允许空原因;不使生成流程自身制造负数 | `response.json`、`db-diff.json`、`screenshots/negative-balance.png` | +| `TDD-WP2-CRED-001-finalize-once` | CREDIT-03、05、GEN-09、10、AC-03、04、29 | 参数化成功、技术失败和安全拒绝的 `FX-JOB-ACTIVE` | 1. Worker 提交终态;2. 重复 callback/poll;3. 模拟 Worker 重启再处理 | 成功为 succeeded;技术失败为 failed;安全拒绝为 rejected;用户余额/动作匹配固定类别 | 每任务恰一条 commit 或 release;reserved 恰减一次;成功才建 output/history,失败/拒绝 available 恢复 | 不双重 commit/release;不在失败建 output;终态不可逆;不保存供应商原文 | `worker-events.json`、`db-diff.json`、`fs-before.json`、`fs-after.json` | + +#### 6.9.4 GenerationJob + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP2-GEN-001-submit-snapshot` | GEN-01 至 08、PROJECT-01、AC-03、34、44 | `FX-MODEL-VERIFIED`、`FX-CREDIT-ENOUGH`、`FX-REF-VALID`,new_project | 1. multipart 提交 prompt/model/ratio/config version/cost/reference;2. 查询任务;3. 检查 staging/正式文件 | 成功响应为 queued,返回同一任务真相;UI 不显示假百分比 | 新 project、job、reference snapshot、reserve ledger、outbox 同事务;提交后 reference 从 staging 进入私有 managed file | 不接受未冻结高级字段;不让 Worker 领取未完整提交任务;不暴露路径;失败补偿不留下可读半文件 | `request.json`、`response.json`、`db-diff.json`、`fs-before.json`、`fs-after.json` | +| `TDD-WP2-GEN-002-success` | GEN-06、08、11、CREDIT-03、AC-03 | 上一 case 的 queued job + `FX-GATEWAY-SYNC` | 1. Worker 领取;2. 调上游并验证单图;3. 落盘;4. 查询任务/项目 | queued→running→succeeded;项目可进入编辑且历史新增一图 | lease/heartbeat、output managed file、output_asset、generation_commit、project history/draft_state 一次提交;容量增加实测字节 | 不在文件安全落盘前 succeeded;不保存多图;不重复扣点;不改变项目比例 | `worker-events.json`、`db-diff.json`、`fs-after.json`、`screenshots/succeeded.png` | +| `TDD-WP2-ERR-001-upstream-timeout` | GEN-09、16、17.18、AC-04、53 | 独立 `upstream_timeout` fixture;已提交任务超时 | 1. 触发超时;2. 检查唯一下一步为“使用原输入重试”;3. 点击该动作;4. 查询原任务、新任务和项目 | 原任务 failed/category=`upstream_timeout`;只提供“使用原输入重试”;动作后同项目新增一个 GenerationJob | 原任务 release 一次且无 output;新任务独立 reserve 并保存相同输入关系快照 | 不改成“稍后重试”;不要求修改输入/选择模型/联系管理员;不复用原任务 ID 或创建第二项目 | `response.json`、`worker-events.json`、`db-diff.json`、`screenshots/upstream-timeout.png` | +| `TDD-WP2-ERR-001-upstream-failed` | GEN-09、16、17.18、AC-04、53 | 独立 `upstream_failed` fixture;已提交任务临时失败 | 1. 触发临时失败;2. 检查唯一下一步为“稍后重试”;3. 在受控条件恢复后点击;4. 查询原任务、新任务和项目 | 原任务 failed/category=`upstream_failed`;只提供“稍后重试”;动作后同项目新增一个 GenerationJob | 原任务 release 一次且无 output;新任务独立 reserve 和关系快照 | 不显示“使用原输入重试”或输入/模型修改动作;不自动重试、不创建第二项目 | `response.json`、`worker-events.json`、`db-diff.json`、`screenshots/upstream-failed.png` | +| `TDD-WP2-ERR-001-safety-rejected` | GEN-10、16、17.18、AC-04、53 | 供应商明确安全拒绝证据;与 reference fixture 完全分离 | 1. 触发安全拒绝;2. 检查唯一下一步为“修改提示词或参考图”;3. 不修改输入尝试继续;4. 修改提示词或参考图后提交 | 原任务 rejected/category=`safety_rejected`;未修改时不能新提交;修改后同项目新增 GenerationJob | 原任务 release 一次、无 output;修改前无新 job/reserve;修改后新任务保存修正快照 | 不提供原样/稍后重试、选择模型或联系管理员;不保存违规输出;不映射为 reference_invalid | `response.json`、`worker-events.json`、`db-diff.json`、`screenshots/safety-rejected.png` | +| `TDD-WP2-ERR-001-model-disabled` | GEN-07、16、17.18、AC-30、53 | `model_disabled` 创建前 fixture;参数化存在/不存在其他 enabled 模型 | 1. 触发创建前阻断;2. 检查下一步仅“选择其他模型或等待”;3. 有可用模型时显式改选并确认;4. 无可用模型时保持页面等待 | 返回 category=`model_disabled` 且不创建任务;改选后才能提交;无模型时保持禁用 | 阻断分支无 job/project/reference/reserve/outbox;改选分支按新模型快照创建 | 不提供联系管理员、原输入重试或稍后重试;不自动切推荐或把 runtime 状态写回配置 | `response.json`、`db-diff.json`、`external-calls.json`、`screenshots/model-disabled.png` | +| `TDD-WP2-ERR-001-gateway-balance` | GEN-15、16、17.17、17.18、AC-40、51、53 | `gateway_balance_insufficient` 创建前/后 fixture;明确未受影响模型集合 | 1. 触发余额不足;2. 检查下一步仅“选择未受影响模型或联系管理员”;3. 显式选择未受影响模型并重新确认;4. 无候选时检查联系管理员 | 返回/保存 category=`gateway_balance_insufficient`;已提交任务 failed;只有改选未受影响模型后才能新提交 | 创建前无 reserve/job;创建后 release 一次;新任务使用改选模型快照;runtime 影响范围按 GEN-15 更新 | 不提供等待、原输入/稍后重试或任意“其他模型”;不自动充值、不用 Dada 点数恢复、不回写 ModelConfig | `response.json`、`db-diff.json`、`external-calls.json`、`screenshots/gateway-balance.png` | +| `TDD-WP2-ERR-001-gateway-contract` | GEN-13、16、17.18、AC-40、53 | `gateway_contract_invalid` 创建前/后 fixture;另一个 contract verified 模型 | 1. 触发契约未验证/失效;2. 检查下一步仅“选择其他模型或联系管理员”;3. 显式改选已验证模型并重新确认;4. 无候选时检查联系管理员 | 返回/保存 category=`gateway_contract_invalid`;已提交任务 failed;改选 verified 模型后才能新提交 | 创建前无 reserve/job;创建后 release 一次;失效模型 contract 状态按契约更新;新任务保存新模型/版本 | 不提供等待、原输入/稍后重试;不让未验证模型提交;不自动切推荐或部分改写配置 | `response.json`、`db-diff.json`、`external-calls.json`、`screenshots/gateway-contract.png` | +| `TDD-WP2-ERR-001-reference-invalid` | GEN-05、16、17.18、AC-04、44、53 | 格式/大小/数量和非安全型内容不可用四组 fixture;不得使用安全拒绝响应 | 1. 分别触发创建前/后无效;2. 检查唯一下一步为“更换或移除参考图”;3. 不改参考图尝试继续;4. 更换/移除后提交 | category=`reference_invalid`;未修改时不创建新任务;更换/移除后同项目新增 GenerationJob | 创建前无 job/reserve;创建后 failed+release 一次;修正后保存新的 reference snapshot | 不提供修改提示词、重试、等待、选模型或联系管理员;不映射为 safety_rejected | 每 fixture `response.json`、`worker-events.json`、`db-diff.json`、`screenshots/reference-invalid.png` | +| `TDD-WP2-ERR-001-unknown-retryable` | GEN-09、16、17.18、AC-04、53 | 独立 `unknown_retryable` fixture;已提交任务 | 1. 触发未知临时错误;2. 检查唯一下一步为“稍后重试”;3. 在受控条件恢复后点击;4. 查询任务和脱敏诊断 | 原任务 failed/category=`unknown_retryable`;只提供“稍后重试”;动作后同项目新增一个 GenerationJob | 原任务 release 一次、无 output;新任务独立 reserve;只保留非敏感诊断 | 不显示“使用原输入重试”、修改输入、选模型或联系管理员;不泄漏原始错误或自动重试 | `response.json`、`worker-events.json`、`db-diff.json`、`screenshots/unknown-retryable.png` | +| `TDD-WP2-ERR-001-unknown-non-retryable` | GEN-09、16、17.18、AC-04、53 | 独立 `unknown_non_retryable` fixture;已提交任务 | 1. 触发未知不可重试错误;2. 检查唯一下一步为“联系管理员”;3. 尝试寻找或调用重复提交动作;4. 查询任务 | 原任务 failed/category=`unknown_non_retryable`;只提供“联系管理员”,无重试或修改入口 | release 一次;无 output;原草稿保留但本 case 不创建新 job | 不自动重试、不循环轮询制造新任务、不降级为 unknown_retryable、不提供其他类别动作 | `response.json`、`worker-events.json`、`db-diff.json`、`screenshots/unknown-non-retryable.png` | +| `TDD-WP2-GEN-003-stale-config` | GEN-15、ADMIN-03、AC-30 | 用户已确认旧 `model_config_version/cost`;管理员原子发布新集合 | 1. 旧页面直接提交;2. 读取 412 摘要;3. 重新 GET models 并明确确认;4. 再提交 | 第一次 412 且要求重新确认;第二次才可创建任务 | 第一次 job/project/reference/reserve/outbox 全无变化;第二次按新快照创建 | 第一次不上游、不持久化参考图、不冻结;不自动替用户切推荐模型 | `response.json`、`db-diff.json`、`external-calls.json`、`trace.zip` | +| `TDD-WP3-WRK-001-recovery` | GEN-08、09、CREDIT-03、AC-04、51 | 参数化 `FX-GATEWAY-ASYNC` 有引用和 `FX-GATEWAY-UNKNOWN` 无安全引用;在 submit 后终止 Worker | 1. 使租约过期;2. 重启 Worker;3. 有引用分支 poll;4. 无引用分支终结;5. 再重启复查 | 有引用不重新 submit,只 poll 到真实终态;无引用为 failed/unknown_retryable,后台显示成本核对待人工 | 租约重新领取;无引用 `upstream_outcome_known=false`、`upstream_cost_reconciliation=pending_manual_review`,release 一次 | 不把 pending_manual_review 写入 job status;不补扣用户点数;不重复上游 submit/结算 | `worker-events.json`、`db-diff.json`、`external-calls.json` | + +#### 6.9.5 容量 + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP0-STO-002-equal-limit` | 17.19、NFR-05、AC-55 | 已计量+活动预留=`5,368,709,119`,预计写 1 字节,可写目录 | 1. 调受管二进制写入预检;2. 提交文件/DB;3. 重读 storage state | 不得返回 507;写入成功后 notice/status 为 full | 建立并消费一份 reservation;managed bytes 精确为 `5,368,709,120`;managed file 已提交;last_measured_at 更新 | 不用 `>=` 拒绝;不回滚已成功等号写入;不调用自动清理 | `response.json`、`db-diff.json`、`fs-before.json`、`fs-after.json` | +| `TDD-WP0-STO-002-over-limit` | 17.19、NFR-05、AC-55 | 已计量+活动预留=`5,368,709,119`,预计写 2 字节 | 1. 分别尝试生成/参考图/export/贴纸原图/缩略图;2. 查询所有副作用 | 每次 507 `STORAGE_CAPACITY_EXCEEDED`,返回非敏感状态和 remaining bytes | storage state 保持由实际量决定;无新 reservation/managed file/latest export/job/ledger/outbox | 上游调用 0;无 staging 残留;不把单个超大请求伪造成持久 full(若现有承诺仍低于上限) | 每路由 `response.json`、`db-diff.json`、`fs-after.json`、`external-calls.json` | +| `TDD-WP0-STO-003-full-matrix` | 17.19、PROJECT-04、EXPORT-06、AC-55 | managed bytes 恰为上限,status full,SQLite 可写 | 1. 保存纯 JSON project state;2. 读取/下载已有文件;3. 客户端合成并仅下载;4. 尝试 latest 保存和新生成;5. 永久删除/显式清理 | JSON 保存、读取、下载、仅下载、删除/清理入口可用;latest/新生成/其他二进制写为 507 | JSON state_version 可增加;禁止项不新增 managed file/job/ledger;删除/清理只先逻辑提交/排队 | 不自动删除;客户端下载不更新 latest_exports;排队不提前减少 managed bytes | `response.json`、`db-diff.json`、`fs-before.json`、`fs-after.json`、`trace.zip` | +| `TDD-WP0-STO-003-unavailable-matrix` | 17.19、NFR-05、AC-35、55 | LocalDataRoot 不可写,再参数化 SQLite 仍可写/不可写 | 1. 尝试 project JSON 保存、生成和二进制写;2. 读取/下载/仅下载;3. 尝试删除/清理 | 新增后端写全部失败且 UI 为 failed/unavailable;读取、下载和可行的仅下载保留;SQLite 不可写时删除/排队明确未提交 | 不更新 state_version/managed bytes/latest/job/ledger;SQLite 可写时允许规定逻辑删除/队列,反之无 DB 变化 | 不显示已保存;不上游;不把内存草稿写浏览器持久存储;不伪造清理完成 | `response.json`、`db-diff.json`、`trace.zip`、`screenshots/unavailable.png` | +| `TDD-WP0-STO-003-cleanup-remeasure` | ADMIN-06、17.19、AC-31、55 | full;查询时全部为无引用、可清理的历史贴纸文件 | 1. 查询候选并创建 intent;2. 参数 A 在确认前给其中一项新增 active/trashed 项目、已发布版本或待发布引用,再确认;3. 参数 B 保持全部无引用并确认;4. 读取排队容量;5. Worker 物理删除并重计量 | A 返回 `ASSET_HISTORY_REFERENCE_CONFLICT` 且整批不排队;B 整批排队,排队阶段仍 full,物理删除并重计量后才按真实值恢复 | A 只追加 `result=denied` 审计且 managed bytes 不变;B scheduled 前后 bytes 不变,物理成功后 files/queue/bytes/status/last_measured_at 同事务更新 | 不让查询时已有引用文件进入候选;不部分排队冲突批次;不在物理删除前减量;不自动创建 intent | 每参数 `response.json`、`db-diff.json`、`worker-events.json`、`fs-before.json`、`fs-after.json` | + +#### 6.9.6 私有内容访问 + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP6-PRIV-001-ack` | ADMIN-05、17.1、AC-25 | `FX-ACTOR-ADMIN-A` 未确认 current notice v1 | 1. 进入私有区域;2. 得到 428;3. 以 expected v1 调 notice ack;4. 重试区域摘要 | 首次 428 `PRIVATE_CONTENT_NOTICE_ACK_REQUIRED` 只含 version/message_key;ack 成功后区域仅显示安全摘要 | 只更新该 admin 的 notice version/ack time;幂等重试不新增语义变化 | ack 不创建 PrivateContentAccessLog;不返回正文/图片;不写 Cookie/localStorage 作为真相 | `response.json`、`db-diff.json`、`trace.zip`、`screenshots/notice.png` | +| `TDD-WP6-PRIV-001-persistence` | ADMIN-05、AC-25 | admin A 已确认 v1 | 1. 新标签;2. API 重启;3. 浏览器重启/重登;4. 在真实 Chrome 与 Edge 登录同一 admin | 同版本均不重复提示,session/bootstrap 计算 `notice_acknowledged=true` | UserProfile ack 字段不因浏览器/会话改变;每次 session 独立但 ack 不重复写 | Cookie/session/localStorage/IndexedDB 清空不使服务端遗忘;跨管理员不共享 ack | 每环境 `response.json`、`db-diff.json`、`trace.zip`、`screenshots/ack-persisted.png` | +| `TDD-WP6-PRIV-001-version-bump` | ADMIN-05、AC-25 | admin A/B 已确认 v1,应用 current notice 切到 v2 | 1. 两个 admin 分别进入区域;2. 尝试用 expected v1 ack;3. 读取 v2 并确认 | 两者重新 428;旧 expected version 失败且要求重读;各自确认 v2 后可进入摘要 | 旧 ack 保留历史语义但当前字段仅在正确 v2 ack 后更新;A/B 独立 | 不以旧确认放行;不因 A 确认替 B 确认;不返回私有正文 | `response.json`、`db-diff.json`、`trace.zip` | +| `TDD-WP6-PRIV-002-open-after-audit` | ADMIN-05、17.10、AC-25、50 | active admin A 已确认 current;目标含图片和完整提示词 | 1. 列表确认无正文;2. 不带 purpose/reason 调 `PRIVATE_OPEN`;3. 在提交钩子确认审计落库后才释放受控读取;4. 对同目标再打开 | 每个入口原样“打开并记录审计”;每次打开成功且各生成一条访问审计 | 每次先 append 一条含 admin/目标/时间/content_type/expires_at 的 PrivateContentAccessLog;内容本身不入审计 | UI/API 不要求目的、原因或二次确认;不预取/hover 打开;不把正文放列表、HTML、缓存或证据 | `response.json`、`db-diff.json`、`ordering-trace.json`、`trace.zip`、`screenshots/open-entry.png` | +| `TDD-WP6-PRIV-002-deny-without-audit` | ADMIN-05、17.10、AC-25 | 参数化未确认、普通用户/预览账号、停用 admin、审计 insert 失败 | 1. 调区域/`PRIVATE_OPEN`;2. 模拟审计约束失败;3. 枚举页面、SW、Cache、IndexedDB | 未确认 428;其他未授权 401/403/404 按冻结协议;审计失败返回非成功且无内容字节 | 未授权无访问审计;审计失败事务不留下伪成功记录,也不发放读取 | 不返回正文/图片/可推导 URL;不写 AdminOperationLog 替代;不因 notice ack 省略逐次审计 | 每参数 `response.json`、`db-diff.json`、`cache-enumeration.json`、`trace.zip` | + +#### 6.9.7 模型配置 + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP3-MDL-001-seed-read` | GEN-01、ADMIN-03、17.2、AC-30 | 全新迁移后的 `FX-MODEL-SEED` | 1. 启动迁移;2. 调 `GET /api/v1/models`;3. 查集合约束 | 返回固定三模型;Flash 唯一 configured default;priority 1/2/3;recommended null;三者 contract unverified/runtime unavailable | 一个 current set,三个 immutable member/version,独立 runtime 行 | 不把 unverified 标为 available;不生成第二默认;不把 recommended 写配置 | `response.json`、`db-diff.json` | +| `TDD-WP3-MDL-002-replace-default` | ADMIN-03、17.2、AC-30 | `FX-MODEL-VERIFIED`,current set version N | 1. 完整提交三模型集合:停用当前默认并指定另一个 enabled default;2. 带 expected N/Idempotency-Key;3. GET models | 保存成功,读取始终恰一个 enabled default,config_set_version=N+1 | 新 immutable set/必要 config versions、AdminOperationLog/outbox 写入,最后原子切 current pointer | 不出现可见零默认/双默认中间态;不逐行部分保存;不改无关 runtime | `request.json`、`response.json`、`db-diff.json`、`transaction-trace.json` | +| `TDD-WP3-MDL-002-invalid-set` | ADMIN-03、17.2、AC-30 | 参数化缺替代、非法替代、priority 缺失/浮点/0/负数/重复、缺模型/未知模型 | 1. 分别 PUT 完整候选;2. 读取稳定错误;3. GET 当前集合 | 返回对应 400/409 稳定 code;UI 聚焦修正字段;当前集合仍为 N | current pointer、versions/runtime/审计成功记录/outbox 均无变化 | 不生成孤儿候选 set;不部分改变 enabled/default/priority;不新增错误分类 | 每参数 `response.json`、`db-diff.json` | +| `TDD-WP3-MDL-002-cas-conflict` | ADMIN-03、AC-30 | 两个 admin 基于 expected N 编辑不同完整集合 | 1. A 保存为 N+1;2. B 仍以 N 保存;3. B 刷新 | A 成功;B 返回 412 `MODEL_CONFIG_VERSION_CONFLICT` 和最新安全摘要 | 仅 A 的 immutable set、pointer、审计/outbox 存在;B 零写入 | B 不覆盖 A、不自动 merge、不复用过期配置继续提交 | 两份 `response.json`、`db-diff.json`、`trace.zip` | +| `TDD-WP3-MDL-002-contract-change` | GEN-13、15、ADMIN-03、AC-30、40 | verified 模型集合 | 1. 修改端点/字段/参考图/响应/异步查询/error mapping 任一契约字段;2. 保存;3. GET models;4. 尝试生成 | 保存成功但对应模型 contract unverified、runtime reason contract_unverified;生成被阻断直到独立重验 | 新 config_version/set;对应 runtime 独立置 false;审计/outbox 同事务 | 不沿用旧 verified 证据;不暗改 enabled/default/priority;不调用真实上游 | 每参数 `response.json`、`db-diff.json`、`external-calls.json` | +| `TDD-WP3-MDL-003-runtime-recommendation` | GEN-15、ADMIN-03、17.2、AC-30、51 | 三模型 verified/available,配置快照和哈希已记录 | 1. 依次模拟默认模型不可用、全部不可用、一个原因恢复但另一原因仍在、全部恢复;2. 每步 GET models | configured default 始终原 ID;recommended 按可用模型 priority 派生或 null;reason 使用固定优先级 | 只更新 `model_runtime_availability`/GatewayBalanceState/runtime version;config set/version/hash 不变 | 不写 enabled/is_default/priority;不自动恢复;不把推荐变成第二默认或用户隐式选择 | 每步 `response.json`、`db-diff.json`、`screenshots/model-states.png` | + +#### 6.9.8 自动保存与冲突 + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP2-PROJ-002-debounce` | PROJECT-04、06、AC-20 | saved project version N、可控前端时钟 | 1. 1 秒内完成多次已提交编辑;2. 在首个保存请求在途时继续编辑;3. 释放响应并推进时钟;4. 撤销/重做 | 同时最多一请求;第一份后下一请求为合并后的最新完整状态;状态 saving→saved | 每次成功 state_version +1;最终 project_states 为最新已提交 JSON;撤销/重做也正常保存 | 不逐操作并发;不保存 Fabric 私有字段;不把未提交编辑或撤销栈写浏览器持久存储 | `network-timeline.json`、`response.json`、`db-diff.json`、`trace.zip` | +| `TDD-WP2-PROJ-002-cas-success` | PROJECT-04、17.3、AC-20 | owner project version N,完整合法 Canvas JSON | 1. PUT state with `If-Match: N`;2. GET project;3. 用相同幂等请求重放 | 首次成功并返回 saved/N+1;重放返回第一次结果 | `UPDATE ... state_version=N` 命中一行;project_states 新快照,state_version 仅 +1 | 不隐式上传/复制/派生资源;不泄漏或接受他人资源引用;不因重放 +2 | `request.json`、`response.json`、`db-diff.json` | +| `TDD-WP2-PROJ-004-stale-tab` | PROJECT-07、AC-36 P0-A 子集 | `FX-PROJECT-CONFLICT`,标签 A/B 均基于 N | 1. A 保存到 N+1;2. B 以 N 保存;3. B 尝试编辑/覆盖/另存副本 | B 返回 412 和最新安全版本摘要;立即只读 conflicted,只显示一次本地导出与刷新 | 仅 A 状态写入;B 的 state_version/save_status/latest_exports/project 数量不变 | B 不自动重试覆盖、不 merge、不另存项目、不恢复自动保存 | 两标签 `response.json`、`db-diff.json`、`trace.zip`、`screenshots/conflicted.png` | +| `TDD-WP2-PROJ-002-save-failure-recovery` | PROJECT-04、05、EXPORT-06、AC-20、35 | saved N;页面创建 dirty;参数化网络失败、storage unavailable、强制刷新/崩溃 | 1. 触发保存失败;2. 检查 failed/离开弹层;3. 页面保持时恢复并重试;4. 另一路强制退出后重开;5. 枚举浏览器存储 | 失败不显示 saved;正常恢复可保存;强制退出只恢复后端 N 且撤销栈为空 | 失败期间 DB 不变;成功重试才 N+1;浏览器持久存储无草稿/提示词/私有引用 | 不把失败当成功;不在关闭后恢复内存草稿;不让 SSE 代替 REST 真相 | `response.json`、`db-diff.json`、`cache-enumeration.json`、`trace.zip`、`screenshots/save-failed.png` | + +#### 6.9.9 导出 + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP4-EXP-001-confirm-pending-edit` | PROJECT-04、06、EXPORT-03、AC-23 | saved 画布、一次未提交文字/样式编辑、撤销栈深度 U | 1. 打开导出;2. 看到“导出前需要提交当前修改”;3. 确认;4. 等待画布稳定并启动正常自动保存;5. 合成导出;6. 执行一次撤销 | 导出使用确认后的状态;确认使撤销栈 U→U+1 且撤销可回到确认前;导出动作不再增加撤销项 | 确认后的完整状态进入正常保存队列;保存成功按 PROJECT-04 增加 state_version;latest 是否更新由后续保存结果决定 | 不在确认时产生多条撤销;不以导出额外编辑画布;不导出确认前状态;不跳过自动保存流程 | `undo-trace.json`、`network-timeline.json`、`export-hash.json`、`trace.zip`、`screenshots/pending-confirm.png` | +| `TDD-WP4-EXP-001-cancel-pending-edit` | EXPORT-03、AC-23 | 与上一 case 相同 | 1. 打开弹层;2. 取消未提交修改确认;3. 检查画布/撤销/网络 | 弹层关闭或停留在未导出状态;无下载、无成功提示 | state_version、latest_exports、撤销栈、保存队列均不因取消改变 | 不提交当前编辑、不合成、不下载、不调 `EXPORT_SAVE` | `network-timeline.json`、`db-diff.json`、`trace.zip` | +| `TDD-WP4-EXP-001-format-ratio` | EXPORT-01 至 03、AC-23 | `FX-CANVAS-RATIOS`,JPG quality 参数化 80/92/100,PNG | 1. 对四比例分别导出 JPG/PNG;2. 解码像素/ICC;3. 与 Canvas fixture 比较 | 尺寸精确为 1080×1440、1080×1080、1440×1080、1080×1920;sRGB、无水印、PNG 无损、JPG 范围/默认正确 | 纯客户端合成本身无 DB 变化;后续保存只处理同一 Blob | 不缩放到其他尺寸;PNG 时质量控件不可聚焦;不因导出改变画布/撤销栈 | 每组合 `result.json`、`image-metadata.json`、`pixel-diff.json`、`export-hash.json` | +| `TDD-WP2-EXP-001-same-blob-success` | EXPORT-04、AC-23、35 | saved project,已有旧 JPG latest;新客户端 Blob B | 1. 记录 B SHA-256;2. 用 B 触发浏览器下载;3. 同一 B 调 `EXPORT_SAVE`;4. 重读 latest 并下载 | UI 显示“已下载并保存为最新成品”;两个通道 hash 相同 | 原子替换该格式 latest_exports/managed file;旧 JPG 进入规定清理;PNG latest 不变;容量按真实文件更新 | 不重新编码第二份 Blob;不保留完整导出历史;不影响另一格式;幂等重试不重复计量 | `download.json`、`request.json`、`response.json`、`db-diff.json`、`fs-before.json`、`fs-after.json` | +| `TDD-WP2-EXP-001-result-matrix` | EXPORT-05、06、AC-35、55 | 参数化:合成失败、下载失败、project 保存失败、latest 持久化失败、storage full/unavailable | 1. 在 UIDesign 四结果组合及存储状态下导出;2. 记录下载/上传调用顺序;3. 重读项目/latest | 分别显示冻结结果文案;可合成时允许规定本地下载;下载失败可复用同一次合成;后端失败明确 latest 未更新 | 失败分支保留旧 latest;project 保存失败不写新 state;latest 失败不写 latest/managed file;成功分支才更新 | 不撤回已下载文件;不以本地下载覆盖后端记录;不显示双成功假状态;不把 Blob 存浏览器持久缓存 | 每参数 `network-timeline.json`、`response.json`、`db-diff.json`、`trace.zip`、`screenshots/result.png` | +| `TDD-WP2-PROJ-004-conflict-export-once` | PROJECT-07、EXPORT-05、AC-36 P0-A 子集 | conflicted 标签页,`conflict_export_used=false` | 1. 本地导出一次(成功和失败各参数);2. 再次尝试;3. 刷新最新版本 | 第一次结束后立即禁用再次导出;结果明确“仅下载本页版本,未写入项目”;刷新到后端最新状态 | 所有步骤不调用 latest API,projects/project_states/latest_exports 无变化;flag 只在页面内存 | 不因第一次失败允许第二次;不覆盖后端、不另存副本、不把 flag 持久化 | `network-timeline.json`、`db-diff.json`、`trace.zip`、`screenshots/conflict-export.png` | + +#### 6.9.10 WP-0 其余测试族规范 case + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP0-DEP-001-frozen-toolchain` | NFR-09、DevelopmentPlan 2.1、13.1 | 冻结 lockfile、干净离线依赖缓存、win-x64 runner | 1. 严格按 lockfile 安装;2. 编译 TypeScript;3. 最小加载 React/Fabric/Fastify/better-sqlite3;4. 用随包 Node 运行 native smoke | 所有命令退出 0,版本与 lockfile/DevelopmentPlan 一致 | 只生成声明的构建缓存与报告;业务 DB/LocalDataRoot 无变化 | 不升级/替换依赖、技术栈或 native 模块;不联网漂移解析版本 | `commands.json`、`dependency-tree.json`、`native-smoke.json` | +| `TDD-WP0-API-001-schema-envelope` | NFR-05、DevelopmentPlan 6.1、6.6 | 生成 TypeBox/OpenAPI/客户端 snapshot;合法与非法 fixture | 1. 生成 OpenAPI 3.1;2. 比较 snapshot;3. 对每个 operation 注入合法/非法请求;4. 校验错误信封和 correlation ID | Schema/运行/客户端一致;非法响应使用冻结 HTTP/code/message_key/details 白名单 | 只读场景 DB 无变化;写场景失败按各 operation 事务回滚 | 不出现未声明字段/枚举、供应商原文、堆栈、路径或缺失 correlation ID | `openapi.json`、`snapshot-diff.json`、`response.json`、`redaction.json` | +| `TDD-WP0-BND-001-loopback-origin` | NFR-09、AC-24 | API 未启动;回环、局域网、错误 Host/Origin 和预检请求参数 | 1. 启动产品包;2. 检查监听地址;3. 从允许/拒绝地址请求;4. 发送跨源/CORS 预检 | 只接受 `127.0.0.1:43121` 与同源;其他路径连接失败或按门禁拒绝 | 无业务表、会话、外部用量变化 | 不监听 `0.0.0.0`/IPv6 wildcard,不建防火墙入站规则,不返回 CORS 放行头 | `socket-listeners.json`、`response.json`、`firewall-diff.json` | +| `TDD-WP0-BRW-001-real-supported` | NFR-01、AC-24、41 | 最终 `RELEASE.json`;真实 Chrome/Edge 独立 profile | 1. 分别启动记录的 full version;2. 完成 UA-CH support check;3. 进入 bootstrap/login;4. 复查产品 API | 两浏览器均通过并建立短期支持 cookie,产品 API 每次复核品牌/major | 仅门禁所需非敏感记录/cookie;不建用户 session | 不用 Playwright Chromium、伪 UA 或前一 major 代替;不联网查询当前版本 | 每浏览器 `environment.json`、`response.json`、`trace.zip`、`screenshots/supported.png` | +| `TDD-WP0-BRW-002-hard-block` | NFR-01、AC-24 | 参数化其他品牌、错误 major、非 Windows、UA-CH 缺失/冲突/解析失败和原始 API 客户端 | 1. 请求 support check;2. 请求 HTML/bundle/API;3. 尝试登录/项目/后台深链;4. 查 DB/外部调用 | 全部 426 `BROWSER_UNSUPPORTED`,reason 仅四类,页面只有重新打开说明且无绕过 | 业务 DB 读取/写入计数为 0,session/验证码/资源读取均无变化 | 不返回继续令牌/参数,不发 Resend/AI/高德,不泄露产品数据 | 每参数 `response.json`、`db-access.json`、`external-calls.json`、`screenshots/blocked.png` | +| `TDD-WP0-SUP-001-lifecycle` | NFR-09、AC-24、41 | 真实便携包;参数化第二实例、43121 占用、API/Worker 崩溃、正常退出 | 1. 双击启动;2. 注入各故障;3. 观察托盘/重启次数;4. 退出并等待 15 秒 | 单实例;端口占用明确失败且不换端口;有限重启/degraded/允许动作符合契约;退出后无残留 | 仅规定日志/状态记录;正常退出 flush WAL/队列;不改业务真相 | 不无限重启、不杀无关进程、不弹隐藏控制台、不留下 API/Worker/端口 | `process-tree.json`、`port.json`、`supervisor-events.json`、`screenshots/system-ui.png` | +| `TDD-WP0-DATA-001-root-validation` | NFR-09、17.19、AC-41、55、56 | 参数化 repo/project/download/只读素材根、合规外部目录、已初始化后缺失目录 | 1. 用离线配置设置各路径;2. 启动;3. 删除已初始化根后重启;4. 调资源 API | 违规路径拒绝;合规路径可写;缺失根进入 data_missing 且不自动重建;浏览器只见逻辑资源 ID | 仅合规首次初始化创建固定目录/DB;失败不创建散落目录 | 不硬编码用户名、不回显绝对路径、不在源码/下载/素材根写业务数据 | `config-result.json`、`fs-before.json`、`fs-after.json`、`response.json` | +| `TDD-WP0-DATA-002-no-backup-migration` | AUTH-06、NFR-09、AC-24、56 | 有账号/项目/下载成品的 LocalDataRoot | 1. 搜索 UI/API/包功能;2. 尝试导出项目包/DB/账号/点数;3. 删除根/重装;4. 启动模拟 P0-B 导入 | 仅原图/JPG/PNG 下载可用;固定本机提示持续显示;删除/重装不可恢复;无迁移入口 | 下载目录文件保留;业务数据删除后不被重建或导入 | 不自动备份、不生成迁移包、不把下载图识别为正式迁移数据 | `route-inventory.json`、`package-scan.json`、`trace.zip`、`screenshots/fixed-copy.png` | +| `TDD-WP0-STO-001-byte-thresholds` | 17.19、AC-55 | 第 5.5 节七个精确字节 fixture,可写目录 | 1. 对每个值重计量;2. 读取 storage state/API/UI;3. 重复计算 | normal/warning/critical/full 边界逐字节正确,重复结果确定 | 只更新 measured bytes/notice/status/last_measured_at;无 managed file 变化 | 不用浮点比例导致错一字节,不自动删除,不把 warning/critical 当阻断 | 每值 `result.json`、`db-diff.json`、`screenshots/capacity-bar.png` | +| `TDD-WP0-FILE-001-atomic-commit` | NFR-05、17.19、AC-44、55 | 受控文件驱动;合法/错误 MIME、hash、`..`、符号链接逃逸;各崩溃点 | 1. 流式写 staging;2. 校验/预留;3. 在改名/DB 提交前后终止;4. 重启对账 | 非法输入拒绝;成功对象完整可读;崩溃后恢复为已提交或补偿清理,不出现半对象 | reservation、managed_files、staging/正式文件按提交点一致;启动对账修复计量 | 不接受扩展名猜 MIME、不越根、不产生可读半文件/孤儿引用/重复计量 | `response.json`、`crash-points.json`、`db-diff.json`、`fs-before.json`、`fs-after.json` | +| `TDD-WP0-CACHE-001-public-lru` | NFR-07、17.14、AC-46、48 | 公开资源超过 157,286,400 字节;internal/private/project/提示词 fixture | 1. 按访问顺序填充 public cache;2. 触发写前 LRU;3. 尝试缓存私有类型;4. 枚举 SW/Cache/IndexedDB | 总量不超上限,淘汰最久未用且当前资源可重取;私有类型均不缓存 | `public_asset_lru` 只含公开元数据;业务 DB 无变化 | 不缓存 internal preview、私有内容、项目、验证码、session、未保存编辑;不计用户下载 | `cache-enumeration.json`、`lru-trace.json`、`trace.zip` | +| `TDD-WP0-EVT-001-rest-refetch` | PROJECT-04、GEN-14、NFR-05、DevelopmentPlan 6.2、AC-20、30 | 可控 SSE 序列:正常、断线、event_id 缺号、runtime/config 变化 | 1. 订阅 `/api/v1/events`;2. 注入事件;3. 断线/缺号;4. 观察 REST 请求和 UI | 事件只提示 ID/type/entity/version/time;每次由 REST 取真相;断线/缺号 bootstrap/refetch | SSE 不直接写业务表;REST 读取后前端状态更新 | 不携带正文/图片/凭据,不把 runtime 事件写 ModelConfig,不抢焦点 | `sse-events.json`、`network-timeline.json`、`trace.zip` | +| `TDD-WP0-SEC-001-credential-channel` | PRIV-01、AC-41 | Windows Credential Manager 测试条目;API/Worker 各需不同凭据;缺失/清除参数 | 1. Supervisor 读取;2. 通过对应匿名管道启动子进程;3. 检查命令行/环境/句柄;4. 清除并重启 | 仅目标子进程能在内存读取一次;缺失时服务明确不可用/启动失败 | 不写业务 DB;只写非敏感状态与日志 | 凭据不进参数、环境、文件、日志、崩溃诊断;API 不获网关密钥,Worker 不获 Resend/高德密钥 | `process-env-scan.json`、`pipe-acl.json`、`redaction.json` | +| `TDD-WP0-LOG-001-rotation-redaction` | PRIV-01、02、NFR-09、AC-41、56 | 生成超过 10 MiB/10 文件/30 天日志;注入密钥、邮箱、提示词、路径和写失败 | 1. 写边界日志;2. 触发轮转/保留清理;3. 复制诊断;4. 使目录不可写并尝试 AI | 轮转严格为 10 MiB/10 文件/30 天;诊断只含白名单;写失败进入 unavailable 并阻断 AI | 只更新日志文件和非敏感状态;不改业务对象 | 不记录敏感正文/绝对路径/供应商原文,不在日志失败时继续 AI | `log-manifest.json`、`redaction.json`、`response.json`、`external-calls.json` | +| `TDD-WP0-PKG-001-portable-zip` | NFR-01、09、AC-24、41、56 | release build、空白 Windows 用户目录 | 1. 生成 win-x64 ZIP/哈希/START-HERE/RELEASE;2. 解压非仓库目录;3. 离线启动;4. 扫描制品和端口 | 包含 Dada.exe、随包 Node/native 依赖并固定 43121;说明与 RELEASE 一致 | 仅合规 LocalDataRoot 生成运行数据;制品本身不可变 | 不含真实配置/凭据/用户名/LocalDataRoot,不动态换端口,不要求 Docker/安装器 | `package-manifest.json`、`sha256.txt`、`package-scan.json`、`process-tree.json` | + +#### 6.9.11 WP-1 其余测试族规范 case + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP1-NOTICE-001-registration-consent` | AUTH-03、PRIV-04、06、AC-01、41、56 | 当前告知 version/effective_at/hash;缺字段、未勾选和完整参数 | 1. 展开注册第二阶段;2. 检查全部处理方/用途/本机风险;3. 未同意提交;4. 同意当前 version 注册 | 未同意/版本错误不能注册;完整告知原样可达;成功进入创作 | 失败无 user/consent/invite/credit;成功记录 consent version/time 与账号同事务 | 不省略 AI/Resend/高德、DYN004、管理员访问、注销、180 天、无备份/迁移;不预勾选 | `response.json`、`db-diff.json`、`screenshots/notice-expanded.png` | +| `TDD-WP1-SLOT-001-stage-limit` | AUTH-01、NFR-04、AC-32、45 | 参数化 9/10 个 active+suspended 普通账号、deleted、多个 super_admin | 1. 发码前尝试第 10/11 人;2. 在发码后并发占满名额再完成;3. 删除普通账号再注册 | 第 10 人可成功,第 11 人发码/完成均阻断;deleted 释放;super_admin 不占名额 | 成功时计数/账号/邀请原子;失败零变化;累计统计保留 deleted | 不把 suspended/deleted/super_admin 计错,不通过并发超 10,不让失败占邀请码 | `response.json`、`db-diff.json`、`concurrency-trace.json` | +| `TDD-WP1-ADM-001-admin-auth-boundary` | AUTH-07、AC-49 | 白名单/非白名单邮箱、已存在普通账号冲突、两个 admin、全部停用状态 | 1. 后台发码;2. 首次验证/后续登录;3. 尝试普通 session 访问后台;4. 停用全部并尝试自助恢复 | 非白名单发码前拒绝;白名单首次建 super_admin;audience 严格分离;无最后管理员保护且无自助恢复 | 允许分支建 admin/session/审计;拒绝分支不建 challenge/session;停用撤销 session | 不泄漏白名单、不使用邀请码/普通名额、不原地提升普通账号、不创建部署人员角色 | 每参数 `response.json`、`db-diff.json`、`external-calls.json`、`trace.zip` | +| `TDD-WP1-CFG-001-secure-revision` | AUTH-07、ADMIN-09、AC-49、50 | current applied revision N;参数化完整 N+1、HMAC/凭据缺失、身份冲突 | 1. 离线写候选安全配置;2. API 启动应用;3. 查询 apply state/session;4. 注入失败重试 | 完整配置原子生效并推进 revision;失败保持 N 并阻止受影响入口 | 成功同事务更新 apply state、撤销受影响 session、写 system/backend_secure_config 审计;失败全回滚 | 不写白名单/HMAC/pepper/人员身份/凭据,不出现半生效配置 | `config-result.json`、`db-diff.json`、`redaction.json` | +| `TDD-WP1-DEL-001-account-delete` | AUTH-06、AC-22、39、56 | 用户拥有项目、参考/生成/导出、坐标、点数、多个 session | 1. 确认注销;2. 并发调用受保护 API;3. 尝试旧资源 ID/恢复;4. 用新邀请重新注册同邮箱 | 注销成功后所有旧访问立即 401/404;不可恢复;新注册是全新账号 | 同事务撤销 sessions、删除身份/业务关系/未用点数并创建允许匿名事件;物理文件排队 | 不延迟撤权到物理清理,不恢复旧 ID/点数/资料,不保留邮箱映射到匿名主体 | `response.json`、`db-diff.json`、`worker-events.json`、`trace.zip` | +| `TDD-WP1-DEL-002-anonymous-retention` | AUTH-06、17.10、17.11、AC-22、39 | 注销前有生成/点数事件和私有访问审计;可控 180 天时钟 | 1. 注销;2. 检查匿名字段;3. 在到期前尝试管理删除;4. 到期运行 Worker | 匿名事件只含允许统计;访问审计目标不可反推;到期前不可删,到期后系统清理 | 原身份关联移除;随机匿名主体无映射;expires_at 不因注销延长;到期行删除 | 不保留邮箱/IP/提示词/图片/项目/job 原 ID,不让管理员手删或延长期限 | `db-diff.json`、`retention-events.json`、`redaction.json` | +| `TDD-WP1-AUD-001-immutable-triggers` | ADMIN-05、09、17.10、17.16、AC-50 | 各一条 AdminOperationLog/PrivateContentAccessLog;普通、retention、privacy purge 连接 | 1. 普通连接 UPDATE/DELETE;2. 伪造 purge 函数;3. 合法作用域在到期/注销执行 | 普通和伪造操作被 trigger 阻断;仅注册作用域执行规定清理 | 非法尝试零变化;合法作用域只删除/匿名化允许行并留非敏感结果 | 不允许后台/API 任意修改,不混用两类日志,不把正文写审计 | `sql-results.json`、`db-diff.json`、`trigger-definition.json` | + +#### 6.9.12 WP-2 其余测试族规范 case + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP2-PROJ-001-new-versus-continue` | PROJECT-01 至 03、GEN-04、11、AC-03、06、34 | `FX-PROJECT-ACTIVE-19`、一个 9 图固定比例项目 | 1. 工作台新建两次;2. 在第一个项目继续生成;3. 尝试改比例;4. 补到 10 图再继续 | 两次新建为两个 project;继续只新增 job/history且沿用比例;10 图阻断追加但可另建 | projects +2;继续分支 project 数不变;成功 history 正确关联 | 不默认追加最近项目、不创建第三项目、不改变既有项目比例、不让历史上限阻断其他新建 | `response.json`、`db-diff.json`、`trace.zip` | +| `TDD-WP2-PROJ-003-trash-restore-purge` | PROJECT-03、08、AC-21 | active project、`FX-PROJECT-ACTIVE-20`、可控 720 小时时钟 | 1. 移入回收站;2. 满 20 时恢复;3. 释放名额再恢复;4. 主动永久删除;5. 另一项目推进到 purge_at | 满额恢复阻断且时间不变;释放后可恢复;purge 后立即不可见/不可恢复 | status/deleted_at/purge_at 精确;purged 撤销访问关系并排物理清理 | 不提前物理结果、不因恢复重算 purge_at、不让 purged 资源可读 | `response.json`、`db-diff.json`、`worker-events.json` | +| `TDD-WP2-PROJ-005-failed-draft-retry` | PROJECT-01、GEN-09、AC-04、43 | `FX-PROJECT-EMPTY` 和含成功图项目 | 1. 失败页重试两次;2. 返回工作台主动新建;3. 多选批量删除 failed_empty 与成功项目 | 重试只在原 project 新增 job;主动新建才新 project;批量只接受无成功图草稿 | 原草稿保留 prompt/config;job 数递增;批量合格项 trashed,成功项目不变 | 不把重试变新项目、不把成功项目纳入快捷批量、不丢草稿输入 | `response.json`、`db-diff.json`、`trace.zip` | +| `TDD-WP2-REF-001-reference-lifecycle` | GEN-05、PROJECT-09、AC-44、48 | 新上传、同项目已有 reference、他人/跨项目/撤销/已 purge reference | 1. 提交前在页面选择/移除;2. multipart 新上传;3. 同项目复用;4. 尝试越权/失效;5. 删除项目 | 提交前仅内存;每 job 独立关系快照;仅同 owner+project 可复用;purge 后立即不可读 | 成功建立 job reference/managed file;移除前无文件;purge 撤销关系并排清理 | 不修改旧任务关系、不跨用户/项目复用、不缓存预提交图片、不暴露路径 | 每参数 `response.json`、`db-diff.json`、`fs-after.json`、`cache-enumeration.json` | +| `TDD-WP2-EXP-002-empty-latest` | EXPORT-04、AC-23、38 P0-A 子集 | 从未导出但有成功原图的项目 | 1. 打开项目详情/latest 区;2. 请求 JPG/PNG latest;3. 使用允许动作 | 显示“暂无导出成品”,只提供进入编辑并导出和下载原始生成图 | latest_exports 无行且不因读取创建;原图读取只读 | 不自动合成/保存默认成品,不伪造跨设备下载,不改变项目 | `response.json`、`db-diff.json`、`trace.zip`、`screenshots/no-export.png` | +| `TDD-WP2-BAL-001-balance-impact` | GEN-14、15、17.17、AC-04、51 | 参数化 model/account/unknown 影响;活动任务与空闲模型 | 1. 注入余额不足;2. 结算已提交任务;3. GET models/后台;4. 重复事件;5. 未确认恢复前尝试启用 | 影响范围按规则;任务 failed+release 一次;runtime 不可用;恢复前操作阻断 | GatewayBalanceState/affected models/runtime/审计更新;ModelConfig hash 不变 | 不自动充值、不用 Dada 点数继续调用、不重复 release、不自动恢复或改默认/priority | `response.json`、`db-diff.json`、`worker-events.json`、`external-calls.json` | + +#### 6.9.13 WP-3 其余测试族规范 case + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP3-ADP-001-per-model-contract` | GEN-01、02、05、06、13、16、AC-40 | 三个模型各自独立 mock/真实受控账号和脱敏 fixture | 1. 每模型分别执行纯文字、合法参考图、四比例;2. 覆盖同步/异步与查询;3. 验证 MIME/尺寸/单图;4. 注入九类映射 | 每模型只按自身已证实协议成功;结果恰一图;错误映射到固定 category | 真实验证只写对应 model/config_version 的 evidence 状态;任务/点数按独立用例结算 | 不从一个模型推断另两个、不共享 verified 标记、不接受多图/未知字段、不记录原始响应 | 每模型 `contract-matrix.json`、`response.json`、`external-calls.json`、`redaction.json` | +| `TDD-WP3-ADP-002-invalidate-revalidate` | GEN-13、15、ADMIN-03、AC-30、40 | 三模型 verified;参数化端点/字段/参考图/响应/异步/查询/error protocol 变化 | 1. 改一个契约字段并保存;2. 尝试生成;3. 仅为该模型重跑完整矩阵;4. 再尝试 | 变化后立即 unverified/不可新建;完整独立重验后才恢复 verified | 新 config_version;对应 runtime/evidence 版本更新;其他模型证据不变 | 不沿用旧证据、不局部 smoke 即 verified、不暗改 enabled/default/priority | 每字段 `db-diff.json`、`contract-matrix.json`、`response.json` | +| `TDD-WP3-BAL-001-confirmed-recovery` | GEN-14、15、ADMIN-09、AC-51 | 余额导致 model/account/unknown runtime unavailable;无/有真实恢复确认 | 1. 未确认时点击恢复;2. 执行非敏感健康检查;3. admin 明确确认;4. 重新计算所有阻断原因 | 无确认失败;确认真实恢复后只解除已满足原因,仍有其他原因则继续 unavailable | recovery check、GatewayBalanceState/runtime/AdminOperationLog 同事务更新;config set 不变 | 不自动恢复/充值,不补扣用户点数,不清除仍存在的 contract/Worker 阻断 | `response.json`、`db-diff.json`、`external-calls.json`、`screenshots/recovery.png` | + +#### 6.9.14 WP-4 其余测试族规范 case + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP4-BG-001-switch-background` | GEN-12、EDITOR-01、PROJECT-04、AC-07 | 画布含文字/贴纸/色卡/动态元素和已调底图,项目有第二历史图 | 1. 记录覆盖元素;2. 确认换底图;3. 检查参数/色卡;4. 撤销/重做;5. 重开 | 覆盖层位置尺寸保留;底图处理重置;五色重提;一次撤销且重开一致 | 完整 Canvas state 自动保存并 state_version 递增 | 不删除/缩放覆盖层,不保留旧调色,不产生多次撤销或改项目比例 | `canvas-before.json`、`canvas-after.json`、`db-diff.json`、`trace.zip`、`pixel-diff.json` | +| `TDD-WP4-BG-002-processing-controls` | EDITOR-01 至 03、PROJECT-04、EXPORT-03、AC-07、20、23 | 固定底图和像素基线 | 1. 参数化填充/适配/裁剪/缩放/定位及亮度、对比度、饱和度、色温、锐度、预设滤镜;2. 完成;3. 撤销;4. 恢复原图;5. 导出/重开 | 每项预览与提交值一致;完成一次撤销;导出/重开一致;恢复原图只清底图处理 | 每次提交进入保存的 Canvas JSON;取消无 DB 变化 | 不影响覆盖元素,不持久化未提交预览,不用静默超范围值 | 每参数 `canvas-state.json`、`db-diff.json`、`pixel-diff.json`、`trace.zip` | +| `TDD-WP4-CAN-001-fifty-elements` | EDITOR-04 至 09、17.5、AC-27 | `FX-CANVAS-50`,稳定选择重叠 fixture | 1. 添加到 50;2. 循环选择/长按候选/框选/多选移动;3. 层级/复制/删除;4. 保存/导出;5. 添加第 51 | 前 50 可编辑保存导出;选择顺序确定;第 51 明确阻断且布局不跳 | Canvas 最多 50,成功操作各一次撤销/保存;第 51 无 state change | 不出现图层面板/隐藏/锁定/编组,不因阻断损坏已有元素 | `canvas-state.json`、`db-diff.json`、`trace.zip`、`performance.json` | +| `TDD-WP4-TXT-001-multiline-template-switch` | TEXT-01 至 06、PROJECT-04、AC-09、10 | 多行文字模板实例、固定变换 | 1. 输入含换行文字并完成;2. 切换另一模板;3. 撤销/重做;4. 重开/导出 | 换行持久;空内容按规则拒绝;切模板重置默认样式但保留位置/旋转/整体尺寸 | 每次完成一条撤销并保存最新 element snapshot | 不把切模板重置变换、不裁切内容、不保存取消编辑 | `canvas-state.json`、`db-diff.json`、`pixel-diff.json`、`trace.zip` | +| `TDD-WP4-TXT-002-font-metrics-ranges` | TEXT-07 至 14、NFR-02、AC-11、12 | 真实归档字体/缺失字体、最长文字、属性边界/步长 | 1. 等待 FontFace ready;2. 参数化字号/缩放/行距/字距/描边/颜色/背景透明度;3. 完成;4. 缺字体加载;5. 重开/导出 | 字号与控制柄同步,重新测量不裁切;范围步长精确;缺字体模板 unavailable;背景透明度不影响文字 | 完成一次撤销/保存;缺字体分支无 Canvas 新元素 | 不静默系统字体回退、不把背景透明度应用文字、不超范围取值 | `font-load.json`、`canvas-state.json`、`pixel-diff.json`、`trace.zip` | +| `TDD-WP4-TXT-003-catalog-search-recent` | TEXT-01、17.6、AC-09、32 | P0-A 32 文字模板、四分类、稳定 catalog、两个用户 | 1. 未选模板尝试加文字;2. 按显示名称搜索;3. 检查分类/顺序;4. 使用模板;5. 切换账号读最近使用 | 只能从模板添加;四类/显示名搜索/稳定顺序正确;最近使用按账号隔离 | 只在成功使用后更新 `recent_assets`;未选/搜索不写项目 | 不提供独立普通文字,不复用普通贴纸搜索,不跨账号共享最近项 | `catalog.json`、`response.json`、`db-diff.json`、`trace.zip` | +| `TDD-WP4-STK-001-transform-sticker` | EDITOR-04 至 09、PROJECT-04、AC-13、27 | 普通贴纸元素和重叠选择 fixture | 1. 移动/缩放/旋转/翻转/透明度;2. 复制/层级/多选;3. 撤销重做;4. 保存/导出重开 | 画布、属性控件、导出和重开状态一致;每次连续手势是一项撤销 | Canvas element snapshot/state_version 按提交更新 | 不改变 stable ID/resource_version,不引入隐藏/锁定/编组,不丢选择 | `canvas-state.json`、`db-diff.json`、`pixel-diff.json`、`trace.zip` | +| `TDD-WP4-COL-001-deterministic-palette` | COL-01 至 05、AC-15 P0-A 子集、16 | 固定解码底图、`mmcq-v1`、四个 P0-A 色卡 | 1. 重复提取五色;2. 调裁剪/调色/滤镜;3. 换原始底图;4. 渲染四布局;5. 监控网络 | 同图五色/顺序确定;处理不刷新;换底图刷新;四色卡消费同一五色 | 五色快照只在底图更换提交时保存;无上传文件 | 不读取处理后像素/额外图片,不联网提色,不启用白名单外色卡 | `palette.json`、`network-timeline.json`、`pixel-diff.json`、`db-diff.json` | +| `TDD-WP4-DYN-001-fixed-time` | DYN-01 至 03、AC-14 | 可控时钟、DYN001-003/007/008/011 fixture | 1. 插入/确认动态值;2. 推进墙钟;3. 重开;4. 导出 | 使用插入/确认时快照,重开/导出不随当前时间变化;结果静态不可点击 | 动态实例只保存允许字段和值快照 | 不保存定时器/外部链接,不在重开重新计算,不输出 GIF/视频 | `canvas-state.json`、`clock-trace.json`、`pixel-diff.json` | +| `TDD-WP4-DYN-002-location-consent` | DYN-04、PRIV-03、AC-17、47 | DYN004 固定坐标/高德 mock;同意、拒绝、服务暂停参数 | 1. 插入前检查 Dada 提示;2. 拒绝;3. 同意并定位/逆地理;4. 手动地点回退;5. 删除元素/注销 | 拒绝调用 0 且不插入坐标;同意后正确显示;暂停时自动定位禁用但手动地点可用 | 只在同意后把坐标/文本存实例;删除/注销按规则清理 | 前端不持高德密钥,不把坐标用于其他元素/用户,不在提示前调用 | `external-calls.json`、`canvas-state.json`、`db-diff.json`、`trace.zip` | +| `TDD-WP4-DYN-003-identity-font` | DYN-05 至 09、AC-18、19 | 用户社交 ID 含/不含 `@`;实例覆盖;DYN012/FONT081 | 1. 插入身份贴纸;2. 修改实例覆盖;3. 检查账号资料;4. 插入 DYN012;5. 重开/导出 | 最多一个前导 @;实例覆盖独立且不改账号;DYN012 使用 FONT081 并明确标注替代 | 只保存实例 snapshot;UserProfile 不变 | 不声称 DIN 字体、不静默回退、不执行 Lua/Prefab、不把覆盖写账号 | `canvas-state.json`、`db-diff.json`、`font-load.json`、`pixel-diff.json` | +| `TDD-WP4-A11Y-001-keyboard-focus` | NFR-06、AC-32 | 第 11.1 节全部 page_id,最长文案、弹层和 200% 缩放 | 1. 仅键盘走主流程;2. 检查 skip link/focus order/弹层返回;3. 触发 live region;4. 运行 axe;5. 测画布等价控件 | 所有动作可达,焦点不逃逸/不被 SSE 抢走;critical/serious 为 0;状态非仅颜色 | 无非用户触发业务写;可访问性扫描只产证据 | 不用正 tabindex、不隐藏主动作、不以缩小字体规避 200% 问题 | 每页 `axe.json`、`focus-trace.json`、`trace.zip`、`screenshots/200pct.png` | +| `TDD-WP4-VIS-001-browser-diff` | NFR-02、AC-19、23、32 | 最终 RELEASE Chrome/Edge、固定 Canvas/字体/动态值/DPR | 1. 等待资源稳定;2. 两浏览器截图/导出;3. 计算元素边界/显著像素;4. 人工复核已知替代 | 结构、字体、换行、颜色、描边、装饰在第 10.1 阈值内;替代项明确标记 | 只生成视觉证据;业务状态使用同一 fixture | 不用低保真 PNG 作像素基准,不用阈值掩盖缺字体/空画布,不冒充全 P0-B | 每场景 `pixel-diff.json`、`layout-boxes.json`、`manual-review.json`、截图 | +| `TDD-WP4-PERF-001-budget` | NFR-03、AC-27、32 | `FX-CANVAS-50`、1,407 贴纸目录、四比例导出、最终浏览器 | 1. 预热一次;2. 每预算运行五次;3. 记录 p50/p95/max/memory/DOM;4. 注入导出失败 | 第 10.2 节所有预算通过;失败不破坏 project/latest;资源面板节点不线性增长 | 只生成性能数据;失败分支 DB/latest 不变 | 不提高超时、减少元素/素材或降低尺寸掩盖失败,不用 Chromium 替代真实浏览器 | `performance.json`、`memory.json`、`dom-count.json`、`environment.json` | + +#### 6.9.15 WP-5 全部测试族规范 case + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP5-CAT-001-catalog-1407` | STATIC-01 至 04、AC-13、32 | 规范 catalog/metadata,含 3 组重复图和 part1-25 | 1. 编译/加载目录;2. 校验 ID/part/顺序/计数;3. 滚动全目录;4. 观察原图请求/DOM | 恰 1,407 项,重复图片保留不同稳定 ID;虚拟列表稳定,原图按需加载 | 只读 catalog;不复制或改写源;浏览器仅缓存允许公开项 | 不去重业务 ID、不一次下载全量、不暴露绝对路径、不线性增长 DOM | `catalog-validation.json`、`network-timeline.json`、`dom-count.json`、`source-hashes.json` | +| `TDD-WP5-MAN-001-readonly-compiler` | TEXT-01 至 TEXT-14、COL-01 至 COL-05、DYN-01 至 DYN-09、STATIC-01 至 STATIC-04、AC-32、42 | 只读规范入口与独立输出目录;Lua/Prefab/证据目录 trap | 1. 记录源 hash/mtime;2. 运行声明式转换;3. 注入尝试执行 Lua/Prefab/读取证据目录;4. 复核输出 | 只消费允许 catalog/metadata/资源;非法入口失败;输出 manifest 可重现 | 只写版本化派生输出;源 hash/mtime 零变化 | 不执行 Android runtime、不扫描证据目录、不复制约 3.57 GB 全库、不覆盖源 | `compiler-report.json`、`source-before.json`、`source-after.json`、`output-manifest.json` | +| `TDD-WP5-WHITE-001-p0a-allowlist` | TEXT-01、TEXT-04、COL-01、DYN-01、DYN-08、STATIC-01、ADMIN-07、NFR-02、NFR-07、AC-32、42、48 | 普通用户无 grant、预览用户有单批 grant、注册全量模板 | 1. 分别读取公开/预览 manifest;2. 搜索白名单外 ID;3. 浏览所有面板 | 普通用户仅 32 文字、实际字体+FONT081、4 色卡、10 动态、1,407 贴纸;预览只多授权批次 | 只读;授权不改变 role | 不向普通用户暴露白名单外 passed/internal,不提前开放 P0-B,不遗漏白名单;AC-54 为未来 P0-B,不进入本 case 的当前验收或 passed 关联 | `manifest.json`、`response.json`、`trace.zip`、`screenshots/allowlist.png` | +| `TDD-WP5-COL-001-four-layouts` | COL-01 至 05、AC-15 P0-A 子集、16、32 | COLOR001/002/008/016 与同一五色 fixture | 1. 渲染四卡;2. 改裁剪/滤镜;3. 换底图;4. 尝试访问其他色卡 | 四布局消费完全相同五色;刷新规则一致;其他色卡不可发现 | 只保存稳定 ID/version/五色 snapshot | 不启用其余 12 色卡、不各自重新提色、不联网读取图片 | `palette.json`、`pixel-diff.json`、`manifest.json` | +| `TDD-WP5-RES-001-three-access-classes` | PRIV-02、05、17.12、13、AC-42、48 | public、internal_preview、private 资源及不同主体/grant | 1. 请求三类 manifest/资源;2. 推导 stable ID/路径;3. 撤销 grant 后重取;4. 检查 headers/缓存 | public 可匿名于产品授权范围读取;preview 每次验 grant/no-store;private 仅所有者/受控 admin;越权 403/404 | 读取无业务写,访问审计仅私有完整内容规定入口产生 | 不混路由/cache header,不返回路径/internal manifest,不用公开 ID 推导私有对象 | 每主体 `response.json`、`headers.json`、`cache-enumeration.json` | +| `TDD-WP5-UPL-001-upload-metering` | ADMIN-06、17.7、17.19、AC-31、55 | PNG/WebP、坏 MIME/解码、稳定 ID 冲突;active/full/unavailable;原图+缩略图字节 | 1. multipart 上传并指定 part/order;2. 生成缩略图;3. 注入非法/冲突/容量状态;4. 重计量 | 合法上传成功并可上架;非法/冲突明确失败;full/unavailable 阻断写但已有资源可读 | 原图/缩略图分别 reservation/managed_file 并计量;失败零文件/目录项 | 不用扩展名替代解码、不漏计缩略、不部分覆盖稳定 ID、不在 full 写入 | `response.json`、`db-diff.json`、`fs-before.json`、`fs-after.json` | +| `TDD-WP5-CLN-001-reference-race` | ADMIN-06、09、17.7、17.19、AC-31、50、55 | 查询时整批文件全部无任何发布/项目/待发布引用 | 1. 查询候选并由 admin A 创建 intent;2. 参数化确认前新增各类引用/快照过期/admin 变化;3. A 确认;4. 无竞态分支确认并运行 Worker | 任一新增引用整批 409 conflict+denied 审计;stale 重新查询;无竞态才整批排队/物理删除/重测 | 冲突 bytes/状态/queue 不变;成功排队不减量,物理后同事务更新并记录全阶段审计 | 不让查询时有引用项入候选、不由 admin B 确认、不部分排队、不自动清理或提前减量 | 每参数 `response.json`、`db-diff.json`、`worker-events.json`、`fs-after.json` | +| `TDD-WP5-PREV-001-grant-lifecycle` | ADMIN-07、17.13、AC-42、48 | 普通账号,active/revoked/expired grant,已有项目引用预览版本 | 1. admin 授权批次;2. 用户读取/添加;3. 撤销/到期;4. 再读取/添加;5. 重开已有项目 | active 时只见授权项;撤销/到期立即阻断新读取/添加;已有项目按保存版本渲染 | grant 状态/审计更新;UserProfile.role 不变;项目引用版本不改写 | 不出现后台权限、不把 preview 写 public manifest/cache、不因撤销破坏既有项目 | `response.json`、`db-diff.json`、`cache-enumeration.json`、`trace.zip` | +| `TDD-WP5-CACHE-001-no-private-client-state` | NFR-07、17.14、AC-46、48 | 已访问 public/preview/private、提示词和项目;注册 SW fixture | 1. 完成各访问;2. 离线/刷新;3. 枚举 SW registrations、Cache keys/body、IndexedDB stores/records | 仅 public allowlist 元数据/资源存在;SW 不拦 preview/private;离线不能恢复私有正文/草稿 | 只允许 `public_asset_lru` 记录;业务 DB 无变化 | 不仅凭响应头判断,不缓存 no-store 内容、项目/提示词/session/验证码/未保存编辑 | `cache-enumeration.json`、`service-worker.json`、`trace.zip` | + +#### 6.9.16 WP-6 其余测试族规范 case + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP6-ADM-001-role-and-summary` | ADMIN-01、02、04、08、AC-25、49 | active/suspended super_admin、普通/预览账号,后台安全摘要 fixture | 1. 各主体请求后台页/API;2. 停用 admin 后复用旧页面;3. 浏览列表/详情;4. 检查私有默认 | 仅 active super_admin 可进入;停用立即退出;默认只见脱敏元数据,普通/预览无后台入口 | 读取无业务变化;拒绝分支无审计/私有读取;规定登录审计独立存在 | 不共享普通/后台 session,不因预览 grant 获后台,不默认返回提示词/图片/密钥 | 每主体 `response.json`、`db-access.json`、`trace.zip`、`screenshots/admin-denied.png` | +| `TDD-WP6-SVC-001-hard-quota` | ADMIN-05、08、NFR-08、17.15、AC-47 | Resend 日 79/80、月 2399/2400;高德 999/1000;provider 异常;已有 session | 1. 并发领取最后额度;2. 尝试下一次;3. 注入 provider 故障;4. 检查登录/注册/DYN004/现有 session | 最后一份已领取调用可结束,后续不调用;状态 paused_quota/provider;已有 session 继续;手动地点继续 | `external_service_usage` 事务计数/status/reason 更新;失败不创建验证码假成功 | 不发送第 81/超月/第 1001 次,不影响已有 session,不切付费/备用,不建运行时邮件质量状态 | `response.json`、`db-diff.json`、`external-calls.json`、`concurrency-trace.json` | +| `TDD-WP6-SVC-002-limit-recovery` | ADMIN-08、09、NFR-08、AC-47、52 | paused 服务;参数化下调 hard_limit、提高/付费/自动扩容、新周期/供应商恢复 | 1. 尝试各配置;2. 无确认恢复;3. 建立非敏感恢复检查;4. admin 明确确认 | 只允许不扩大能力的下调并审计;提高/付费/自动扩容拒绝;满足条件+确认后恢复 | 成功下调/恢复与 AdminOperationLog 同事务;非法请求零变化 | 不自动恢复、不保存凭据/供应商原文、不把暂停伪装成功或提高上限 | 每参数 `response.json`、`db-diff.json`、`screenshots/service-state.png` | +| `TDD-WP6-AUD-001-sensitive-operations` | ADMIN-09、17.16、AC-50 | 每类规定敏感操作 fixture,含贴纸清理各阶段和 system 配置生效 | 1. 逐类执行成功/拒绝;2. 查询 AdminOperationLog;3. 查询 PrivateContentAccessLog;4. 尝试改删/越权查看 | 每次操作同事务形成不可变、非敏感 before/after/result;两类审计分离;只有 admin 查看 | AdminOperationLog 条数/actor_type/ref/expires_at 正确;私有打开只写专表 | 不漏失败审计、不重复保存私有正文、不记录白名单/密钥/验证码/路径、不允许人工修改删除 | `operation-matrix.json`、`db-diff.json`、`redaction.json`、`trace.zip` | +| `TDD-WP6-STATE-001-three-model-states` | GEN-15、ADMIN-03、08、AC-30、51 | default 不可用、其他推荐、全不可用、恢复参数 | 1. 打开总览/模型页;2. 注入 runtime 变化;3. SSE 后 REST refetch;4. 恢复一个原因 | configured default、逐模型 runtime、recommended 三列独立;推荐可 null;UI 不暗换用户选择 | 只改 runtime/version;ModelConfig/current set 无变化 | 不合并三种状态、不把 SSE 当真相、不回写默认/enabled/priority | `response.json`、`db-diff.json`、`screenshots/model-columns.png`、`trace.zip` | +| `TDD-WP6-DIAG-001-redacted-diagnostics` | PRIV-01、02、ADMIN-08、NFR-09、AC-41、55 | 总览/服务/存储/诊断包含所有状态;注入密钥、邮箱、路径、正文 trap | 1. 请求各摘要;2. 复制诊断;3. 检查托盘诊断;4. 跑脱敏扫描 | 仅显示固定非敏感字段、逻辑位置、计量和状态;复制内容一致 | 只读;可记录非敏感诊断访问/时间,不改变服务状态 | 不含密钥/HMAC/邮箱/提示词/图片/绝对路径/供应商正文,不提供隐藏修复写入口 | `response.json`、`diagnostic.txt`、`redaction.json`、`screenshots/diagnostics.png` | + +#### 6.9.17 WP-7 全部测试族规范 case + +| case_id | 需求 / AC | fixture 与前置 | 编号操作步骤 | 预期响应 / UI | DB / 文件变化 | 禁止副作用 | 证据文件 | +| --- | --- | --- | --- | --- | --- | --- | --- | +| `TDD-WP7-REL-001-final-release-record` | NFR-01、09、AC-24、41 | 最终便携 ZIP、START-HERE、SHA-256、RELEASE,真实验收电脑 | 1. 校验制品 hash;2. 导入 Windows build/Chrome/Edge 品牌、major/full version;3. 两浏览器跑全部发布 E2E/视觉/性能;4. 比较候选基线 | RELEASE/制品/诊断/门禁值一致;任一漂移使旧视觉/性能失去发布资格并重跑 | 只生成发布记录/证据;业务 fixture 在隔离验收根 | 不缺 RELEASE、不手填假版本、不接受前一 major/Chromium、不动态换端口 | `RELEASE.json`、`environment.json`、`package-manifest.json`、`evidence.json` | +| `TDD-WP7-EXT-001-three-real-models` | GEN-13、AC-40、41 | 三模型各自真实凭据/配置,显式执行确认 | 1. 显示模型/次数/额度;2. 分别执行纯文字、参考图、四比例、sync/async/查询/响应/错误;3. 脱敏;4. 绑定 config_version | 三模型独立完整矩阵通过才解除;任一缺项保持 externally_blocked | 只写对应模型验证证据/runtime 状态和允许审计;测试任务/点数按隔离规则 | 不共享证据、不自动充值、不保留真实输入/图片/原始响应、不在普通 CI 调用 | 每模型 `contract-matrix.json`、`external-calls.json`、`redaction.json`、`manual-review.json` | +| `TDD-WP7-EXT-002-real-resend` | AUTH-01、02、07、AC-01、33、41、47、49 | 已验证发信域名、正式受控普通/admin 邮箱、免费规则记录 | 1. 核 SPF/DKIM/免费规则;2. QQ/163/至少一种企业邮箱各发 20 封;3. 统计 2 分钟送达;4. 真实完成普通/admin 认证 | 每类至少 19/20 在 2 分钟内且两类认证成功;否则阻止发布但不改 runtime service_status | 只保存人工汇总/证据 hash;不建逐封 EmailVerificationEvent | 不用预置账号/mock 冒充,不保存验证码/真实邮箱进证据,不切付费备用 | `delivery-summary.json`、`domain-check.json`、`auth-result.json`、`redaction.json` | +| `TDD-WP7-EXT-003-real-amap` | DYN-04、PRIV-03、AC-17、41、47 | 个人认证高德 Web 服务 Key、安全绑定和显式确认 | 1. 核接口/QPS/白名单/安全/免费规则;2. 执行定位/逆地理;3. 验证 1,000 硬限模拟/受控测试;4. 脱敏坐标证据 | 接口、绑定和应用硬停止通过才解除;失败保持 externally_blocked | 只写非敏感用量/状态/证据;测试坐标不关联真实项目 | 不暴露 Key/真实用户坐标,不发第 1001 次,不启用付费或自动扩容 | `amap-contract.json`、`external-calls.json`、`redaction.json`、`manual-review.json` | +| `TDD-WP7-UI-001-page-state-evidence` | UIDesign 全页、NFR-02、06、AC-24、25、32、41、55、56 | 第 11.1 节 22 page_id 与适用状态、最终 Chrome/Edge、100%/200% | 1. 逐非 N/A 单元运行 case;2. 截图/键盘/axe;3. 验证全局容量条;4. 对照 Pencil 相关 frame;5. 人工复核 | 所有 UIDesign 页面/状态有实现证据且无重叠;Canvas Index 不实现;无 frame 页面不漏测 | 只生成 UI 证据;交互 DB 变化由所属业务 case 证明 | 不用 PNG OCR 推文案、不把 frame 当页面全集、不以 N/A 逃避容量条/错误态 | 每单元 `trace.zip`、`axe.json`、`screenshots/100pct.png`、`screenshots/200pct.png`、`manual-review.json` | +| `TDD-WP7-SEC-001-artifact-leak-scan` | PRIV-01、02、NFR-09、AC-41、48、56 | ZIP、源码、Git、DB 配置、manifest、日志、截图、trace/evidence 全集合;秘密 trap | 1. 解包并扫描文本/二进制/元数据;2. 检查 Windows 用户名/绝对路径;3. 检查缓存/凭据位置;4. 人工复核命中 | 真实敏感值和硬编码用户路径零命中;凭据仅 Credential Manager;诊断通过同一扫描 | 只生成扫描报告;不修改被扫描制品 | 不把 allowlist/HMAC/验证码/session/提示词/图片/原始错误写证据,不用删除报告掩盖命中 | `scan-report.json`、`allowlist.json`、`manual-review.json` | +| `TDD-WP7-AC-001-trace-structure` | NFR-05、52 当前 AC、109 需求 ID、13 模块、19 契约、9 错误 | 冻结 allowlist、89 family 定义、117 case 定义、页面矩阵和全部 evidence manifest | 1. 运行 `pnpm validate:tdd-trace`;2. 注入缺 AC/重复主责/P0-B passed/未知需求/孤儿 family/case 缺字段/错误父族解析;3. 恢复后重跑 | 每种破坏均非零且定位;正确状态返回 0:52 AC、109 唯一 ID、89/89 family 有 case、117 case 字段齐全 | 只生成 family/trace validation manifest;不改业务 DB | 不信任手写合计、不让 AC-08/26/37/54 计 passed、不允许未知父族、删除末段式解析或空 automation/release_gate | `family-manifest.json`、`trace-validation.json`、`negative-fixtures.json` | + +## 7. 十九个产品数据契约覆盖 + +| 产品契约 | 主测试族 | 核心不变量 | +| --- | --- | --- | +| 17.1 UserProfile | `TDD-WP1-AUTH-*`、`TDD-WP6-PRIV-001` | 角色/状态/名额、点数和告知版本字段 | +| 17.2 ModelConfig | `TDD-WP3-MDL-*` | 唯一默认、唯一正整数优先级、配置与 runtime 分离 | +| 17.3 Project | `TDD-WP2-PROJ-*` | 固定比例、版本、上限、草稿、回收站 | +| 17.4 GenerationJob | `TDD-WP2-GEN-*`、`TDD-WP3-WRK-001` | 单活动任务、快照、不可逆终态、一次结算 | +| 17.5 CanvasElement | `TDD-WP4-CAN-001` | 四类型、最多 50、无 Fabric 私有字段 | +| 17.6 TemplateRegistry | `TDD-WP5-MAN-001`、`TDD-WP5-WHITE-001` | 稳定 ID/版本/状态/白名单与 full_p0 边界 | +| 17.7 StaticStickerCatalog | `TDD-WP5-CAT-001`、`TDD-WP5-CLN-001` | part/顺序/重复、来源、文件关系和引用保护 | +| 17.8 DynamicStickerData | `TDD-WP4-DYN-*` | 只提供消费字段、确认值和 DYN004 坐标 | +| 17.9 CreditAccount/CreditLedger | `TDD-WP2-CRED-*` | available/reserved、不可变流水和唯一操作键 | +| 17.10 PrivateContentAccessLog | `TDD-WP6-PRIV-002`、`TDD-WP6-AUD-001` | 每次打开独立记录、先审计后读取、180 天 | +| 17.11 AnonymousRetainedEvent | `TDD-WP1-DEL-002` | 随机断链主体、允许字段、最迟 180 天 | +| 17.12 AssetReleaseManifest | `TDD-WP5-RES-001` | immutable 版本、哈希、access_class、公开过滤 | +| 17.13 AssetPreviewGrant | `TDD-WP5-PREV-001` | 不改角色、每次校验、撤销/到期立即生效 | +| 17.14 ClientCachePolicy | `TDD-WP0-CACHE-001`、`TDD-WP5-CACHE-001` | 150 MB LRU、公开 allowlist、私有禁存 | +| 17.15 ExternalServiceUsage | `TDD-WP6-SVC-*` | 四状态、硬上限、人工恢复、零自动费用 | +| 17.16 AdminOperationLog | `TDD-WP6-AUD-001` | 两种 actor、非敏感摘要、180 天不可改删 | +| 17.17 GatewayBalanceState | `TDD-WP2-BAL-001`、`TDD-WP3-BAL-001` | model/account/unknown 影响、确认恢复、不回写配置 | +| 17.18 GenerationErrorCategory | `TDD-WP2-ERR-001` | 九项只读注册表、稳定动作与点数口径 | +| 17.19 LocalBackendStorageState | `TDD-WP0-STO-*` | 精确阈值、`>` 准入、file kind 计量、物理后重测 | + +## 8. 十三个功能模块覆盖 + +| FeatureSummary 模块 | 主测试族 | 主责 WP | +| --- | --- | --- | +| 邀请注册与邮箱登录 | `TDD-WP1-AUTH-*`、`TDD-WP7-EXT-002` | WP-1 | +| 点数与原子结算 | `TDD-WP2-CRED-*`、`TDD-WP2-GEN-*` | WP-2 | +| 三模型 AI 生图 | `TDD-WP2-GEN-*`、`TDD-WP3-ADP-*` | WP-2 / WP-3 | +| 项目、历史、保存与冲突 | `TDD-WP2-PROJ-*` | WP-2 | +| 电脑画布与底图编辑 | `TDD-WP4-BG-001`、`TDD-WP4-CAN-001` | WP-4 | +| 文字模板与字体 | `TDD-WP4-TXT-*`、`TDD-WP5-WHITE-001` | WP-4 / WP-5 | +| 25 个普通贴纸 part | `TDD-WP5-CAT-001`、`TDD-WP5-UPL-001`、`TDD-WP5-CLN-001` | WP-5 | +| 色卡与动态贴纸 | `TDD-WP4-COL-001`、`TDD-WP4-DYN-*`、`TDD-WP5-COL-001` | WP-4 / WP-5 | +| 导出 | `TDD-WP2-EXP-*`、`TDD-WP4-EXP-001` | WP-4 | +| 运营后台 | `TDD-WP6-*` | WP-6 | +| 素材发布与内部预览 | `TDD-WP5-MAN-001`、`TDD-WP5-RES-001`、`TDD-WP5-PREV-001` | WP-5 / WP-6 | +| 本机数据与资源访问 | `TDD-WP0-*` | WP-0 / WP-2 | +| 隐私、审计与免费服务边界 | `TDD-WP1-DEL-*`、`TDD-WP6-PRIV-*`、`TDD-WP6-SVC-*` | WP-1 / WP-6 | + +## 9. 九类生成错误测试矩阵 + +### 9.1 GenerationErrorCategory + +`reference_invalid` 与 `safety_rejected` 必须使用不同 fixture、不同模拟响应和不同断言。供应商安全拒绝才能映射为 `safety_rejected`;格式、大小、数量或非安全型内容不可用映射为 `reference_invalid`。 + +| category | 创建前断言 | 创建后断言 | 用户动作 | 点数 | +| --- | --- | --- | --- | --- | +| `upstream_timeout` | 不适用 | failed、无输出、保存 category | 使用原输入重试 | release 一次 | +| `upstream_failed` | 不适用 | failed、无输出、保存 category | 稍后重试 | release 一次 | +| `safety_rejected` | 不适用 | rejected、无输出、使用明确安全证据 | 修改提示词或参考图 | release 一次 | +| `model_disabled` | 不创建任务 | 不适用 | 选择其他模型或等待 | 不 reserve | +| `gateway_balance_insufficient` | 可在创建前阻断 | 已创建则 failed,并更新独立 runtime 影响 | 选择未受影响模型或联系管理员 | 无 reserve 或 release 一次 | +| `gateway_contract_invalid` | contract 非 verified 时阻断 | 已创建后契约失效则 failed | 选择其他模型或联系管理员 | 无 reserve 或 release 一次 | +| `reference_invalid` | 格式/大小/数量可在创建前阻断 | 供应商非安全型不可用时 failed | 更换或移除参考图 | 无 reserve 或 release 一次 | +| `unknown_retryable` | 不适用 | failed,保留非敏感诊断 | 稍后重试 | release 一次 | +| `unknown_non_retryable` | 不适用 | failed,不显示重复重试入口 | 联系管理员 | release 一次 | + +对每类都必须额外断言:前端、GenerationJob、后台生成记录和统计使用同一 category ID;原始错误码、正文、堆栈和内部地址不进入响应或 UI;queued、running、succeeded 的 `error_category` 为空;后台不能新增、重命名或删除分类。 + +### 9.2 稳定工程错误码 + +这些错误不扩充 GenerationErrorCategory。每项都必须验证 HTTP 状态、`error.code`、稳定 `message_key`、correlation ID、允许的 `details`、UI 动作和零敏感泄漏。 + +| code | HTTP | 主测试族 | 关键断言 | +| --- | ---: | --- | --- | +| `BROWSER_UNSUPPORTED` | 426 | `TDD-WP0-BRW-002` | 四个固定 reason;只有阻断引导,无绕过或业务副作用 | +| `MODEL_CONFIG_VERSION_CONFLICT` | 412 | `TDD-WP3-MDL-002` | 返回最新安全版本摘要,整套配置不写入,UI 刷新后重编 | +| `MODEL_DEFAULT_REPLACEMENT_REQUIRED` | 409 | `TDD-WP3-MDL-002` | 停用当前默认却未指定替代时整次失败 | +| `MODEL_DEFAULT_REPLACEMENT_INVALID` | 409 | `TDD-WP3-MDL-002` | 替代不存在/未启用/产生非唯一默认时整次失败 | +| `MODEL_RECOMMENDATION_PRIORITY_INVALID` | 400 | `TDD-WP3-MDL-002` | 缺失、浮点、零或负数定位到字段且不部分写入 | +| `MODEL_RECOMMENDATION_PRIORITY_CONFLICT` | 409 | `TDD-WP3-MDL-002` | 重复优先级标出冲突模型且不部分写入 | +| `PRIVATE_CONTENT_NOTICE_ACK_REQUIRED` | 428 | `TDD-WP6-PRIV-001` | 只返回当前告知版本/message_key,不返回区域数据 | +| `ASSET_HISTORY_REFERENCE_CONFLICT` | 409 | `TDD-WP5-CLN-001` | 任一引用使整批不排队,容量不变并记录 denied 审计 | +| `ASSET_CLEANUP_CANDIDATE_STALE` | 409 | `TDD-WP5-CLN-001` | 旧候选失效,要求重新查询和确认,不复用令牌 | +| `STORAGE_CAPACITY_EXCEEDED` | 507 | `TDD-WP0-STO-002` | full/unavailable 或预计值 `>` 上限才拒绝;等于上限不返回 507 | + +未知 `message_key` 使用 UIDesign 的安全兜底“操作未完成”、correlation ID 和接口允许的重试/返回/诊断动作;不得被映射成成功、已释放点数或允许覆盖。 + +## 10. 视觉、性能与可访问性 + +### 10.1 视觉基线 + +- 页面结构验收使用 `1920 x 1080`、DPR 1、100% 缩放;低保真画板只验证区域、控件、状态、固定文案、焦点和交互,不做像素级 gold image。 +- 200% 浏览器缩放逐页验证无文字覆盖、不可关闭弹层、不可达主动作或不连贯重叠;允许滚动,不缩小字号规避。 +- Canvas 视觉基线固定 OS、浏览器 full version、视口、DPR、字体 ready、动画时刻、背景图和动态数据。 +- Chrome/Edge 元素边界相对基准偏差不超过 2 px。 +- 任一颜色通道绝对差异超过 16/255 的像素视为显著差异,显著像素不超过画布总像素 1%。 +- 任一阈值超限必须人工复核,不能自动判定通过。 +- P0-A 中 COLOR002、COLOR008、COLOR016、DYN012 及其他已知替代/近似项无论自动差异是否通过均人工复核;DYN012 报告必须写明 FONT081 Lexend Deca 替代。 + +### 10.2 性能预算 + +在候选或最终冻结的 Windows、Chrome/Edge、1920 x 1080、DPR 1、50 个混合覆盖元素下: + +| 指标 | 门槛 | +| --- | --- | +| 连续拖动/缩放/旋转 10 秒的指针到下一画面更新 | p95 不超过 50 ms | +| 画布交互帧耗时 | p95 不超过 33 ms | +| 单个主线程长任务 | 不超过 200 ms | +| 连续无响应 | 不得达到 500 ms | +| 自动保存序列化主线程阻塞 | p95 不超过 50 ms | +| 已缓存白名单资源的编辑器重新打开到可操作 | 不超过 3 秒 | +| 1080 x 1920、50 元素导出 | 不超过 10 秒 | +| 导出页面峰值额外内存 | 不超过 1 GiB | +| 普通贴纸面板 DOM | 仅视口和两屏缓冲,不随 1,407 总数线性增长 | + +每项至少运行一次预热和五次测量,报告单次值、p50、p95、最大值、浏览器 full version 和 fixture hash。性能失败不得通过提高超时、减少元素或降低最终导出尺寸掩盖。 + +### 10.3 可访问性 + +- 关键页面运行 axe,critical 和 serious 问题均为 0。 +- 页面第一个 Tab 为“跳到主要内容”;视觉顺序与焦点顺序一致,不使用正 tabindex。 +- 按钮、图标、状态和表单具有可读名称;状态不只依赖颜色。 +- 弹层焦点被限制,关闭后回到触发点;破坏性弹层请求期间不能关闭或重复提交。 +- saving、queued、running、重计量使用 polite live region;保存失败、冲突、浏览器阻断、full/unavailable 使用 assertive。 +- 画布外提供所有关键命令的可聚焦等价控件;焦点或 SSE 更新不得抢走用户当前焦点。 + +## 11. 页面、状态与低保真映射 + +### 11.1 UIDesign 页面 × 适用状态矩阵 + +UIDesign 第“页面与入口地图”及各页面章节是产品页面覆盖全集;Pencil 不定义页面全集。下表的 22 个 coverage unit 包含产品页、身份变体和 Windows 辅助界面。每个非 `N/A` 单元格必须至少关联一个自动或人工 case,并把 `1920 x 1080`、DPR 1、100% 与 200% 缩放截图写入 `artifacts/tdd//ui///`;`N/A` 必须保留下表理由,不能用缺实现代替。内部预览账号沿用普通页面,只作为授权状态变体,不创建新角色或后台页面。 + +| page_id / 页面或入口 | 主体与入口 | 正常 | 空 / 加载 | 失败 / 禁用 | 冲突 / 容量 / 特殊状态 | 主测试落点 | +| --- | --- | --- | --- | --- | --- | --- | +| `support-gate` 浏览器不受支持引导 | 所有主体,产品门禁前 | 四种阻断 reason、支持品牌/major、无继续入口 | N/A:引导无业务空态;身份不可判定属于阻断 | bundle/API 均无法绕过;诊断仅最小字段 | N/A:不读取业务状态或容量 | `TDD-WP0-BRW-002`、`TDD-WP7-UI-001` | +| `user-auth` 登录 / 注册 | 未登录普通入口 | 登录、分阶段注册、管理员文字入口、固定本机提示 | 字段初始空;发码/验证/注册加载 | Resend、验证码、邀请、名额、告知未完成;按钮禁用 | N/A:认证不消费存储容量 | `TDD-WP1-AUTH-*`、第 6.9.2 节 | +| `workspace` 创作工作台 | active 普通/内部预览账号 | 生成表单、模型/点数/比例、最近项目 | 无项目艺术带;模型/项目加载 | 服务/参考图/生成错误;模型、点数、单任务、历史/项目上限禁用 | model config 变化重确认;warning/critical 提示;full/unavailable 阻断新增 | `TDD-WP2-GEN-*`、`TDD-WP0-STO-*` | +| `current-task` 当前生成任务 | active 普通/内部预览账号 | 真实状态、结果入口 | 无活动任务;queued/running 无假百分比 | failed/rejected 与九类固定动作;第二任务禁用 | storage 错误按任务真相;pending_manual_review 不作为用户任务状态;继承普通端全局容量条 | `TDD-WP2-GEN-*`、`TDD-WP3-WRK-001` | +| `projects` 项目列表与回收站 | active 普通/内部预览账号 | active/trashed 列表、筛选、多选 failed_empty | 无项目/筛选空;稳定卡片骨架 | 列表失败保留旧数据;20 active、恢复/批量条件禁用 | 多标签版本提示;删除排队不乐观减容量;继承普通端全局容量条 | `TDD-WP2-PROJ-001`、`TDD-WP2-PROJ-003`、`TDD-WP2-PROJ-005` | +| `project-detail` 项目详情 | 项目所有者 | 历史、固定比例、继续生成、编辑、原图/latest 下载 | 无成功图草稿;历史/成品加载 | 10 图上限、当前底图不可删、无 latest、资源读取失败 | 比例不可改;清理/容量状态不伪造资源可用性;继承普通端全局容量条 | `TDD-WP2-PROJ-*`、`TDD-WP2-EXP-002` | +| `editor` 编辑器 | 有成功底图的项目所有者 | 三栏、保存状态、画布、属性与素材 | 画布/素材加载;无成功图不能正常进入 | 保存/素材失败;第 51 元素、不可用模板禁用 | dirty/saving/saved/failed;conflicted 只读;full 可存 JSON,unavailable 保存失败 | `TDD-WP4-*`、第 6.9.8 节 | +| `export` 导出弹层 | 编辑器内项目所有者 | JPG/PNG、质量、尺寸、下载/latest 分结果 | 合成/持久化加载;无业务空态 | 合成、下载、项目保存、latest 保存分别失败;无画布/冲突次数用尽禁用 | 未提交确认;conflicted 仅一次本地导出;full/unavailable 后端失败不撤回下载 | `TDD-WP4-EXP-001`、第 6.9.9 节 | +| `credits` 点数明细 | active 普通/内部预览账号 | available/reserved、流水、关联与时间 | 无流水;分页加载 | 加载失败保留安全余额摘要 | 负 available 如实显示;无购买/充值入口;页面操作不消费容量但仍继承普通端全局容量条 | `TDD-WP2-CRED-*`、第 6.9.3 节 | +| `settings` 设置与账号注销 | active 普通/内部预览账号 | 资料、本机数据、容量摘要、固定文案、注销 | 资料/状态加载 | 保存失败;注销确认/处理中禁用重复提交 | full/unavailable 状态与允许动作;注销后返回登录 | `TDD-WP1-DEL-*`、`TDD-WP0-DATA-002` | +| `preview-user-variant` 内部预览账号普通页变体 | 有有效/撤销/过期 AssetPreviewGrant 的普通账号 | 授权批次素材显示“预览”,其余页面同普通用户 | 无授权/批次空;manifest 加载 | 撤销/过期立即阻断新读取 | 不出现后台入口、调点、邀请码、模型或私有内容;继承普通端全局容量条 | `TDD-WP5-PREV-001`、`TDD-WP5-RES-001` | +| `admin-auth` super_admin 登录 | 未登录后台入口 | 白名单邮箱验证码、独立 audience、返回普通登录 | 字段空;发码/登录中 | 非白名单发码前阻断、停用/移除白名单、Resend 错误 | N/A:不显示普通创作或容量业务 | `TDD-WP1-ADM-001`、`TDD-WP1-CFG-001` | +| `admin-overview` 后台总览 | active super_admin | 名额、任务、模型、点数、服务、容量、审计摘要 | 无近期事件;指标骨架 | 聚合失败保留旧值和时间;敏感动作按状态禁用 | default/runtime/recommended 分列;pending_manual_review 为成本核对;容量持续条 | `TDD-WP6-ADM-001`、`TDD-WP6-STATE-001`、`TDD-WP6-DIAG-001` | +| `admin-users` 用户管理 | active super_admin | 脱敏列表/详情、暂停恢复、调点 | 无用户/筛选空;表格骨架 | 操作失败、原因缺失、状态前置禁用 | 调点可使 available 为负但 reserved 不变;页面操作不消费容量但仍继承后台全局容量条 | `TDD-WP6-ADM-001`、`TDD-WP2-CRED-002` | +| `admin-invites` 邀请码 | active super_admin | 创建、停用、期限/次数、脱敏复制 | 无邀请码;表格骨架 | 名额满、停用/过期/耗尽不可当可用;请求失败 | CAS/幂等结果;页面操作不消费容量但仍继承后台全局容量条 | `TDD-WP1-AUTH-*`、`TDD-WP1-SLOT-001`、`TDD-WP6-AUD-001` | +| `admin-models` 模型 | active super_admin | 完整三模型集合、default/runtime/recommended 三层 | 初始加载骨架;无 recommended 是合法状态 | 合法替代/priority 前置禁用;契约未验证/运行时不可用 | config_set CAS 冲突、完整集合原子回滚;仍继承后台全局容量条 | `TDD-WP3-MDL-*`、第 6.9.7 节 | +| `admin-assets` 素材 | active super_admin | 普通贴纸、资源版本/发布、历史清理 | 无上传素材/无候选;列表/处理加载 | 格式/编译失败;权限、文件状态禁用 | stable ID/version 冲突;full/unavailable 阻断上传;引用冲突/排队/重计量 | `TDD-WP5-UPL-001`、`TDD-WP5-CLN-001`、`TDD-WP5-MAN-001` | +| `admin-preview` 内部预览 | active super_admin | 批次、模板状态、账号授权/撤销/到期 | 无批次/授权;表格骨架 | 非法状态转换、过期、发布校验失败 | 授权不改变角色;P0-B 全量开放不可在 P0-A 出现;继承后台全局容量条 | `TDD-WP5-PREV-001`、`TDD-WP5-WHITE-001` | +| `admin-generations` 生成记录与私有内容 | active super_admin | 默认安全摘要、告知、逐次打开 | 无记录;列表/审计写入加载 | 未确认 428、审计失败不打开、权限禁用 | 告知升版重阻断;每次打开先独立审计;页面读取不消费容量但仍继承后台全局容量条 | `TDD-WP6-PRIV-*`、第 6.9.6 节 | +| `admin-services-storage` 服务与存储 | active super_admin | Resend/高德/网关/Worker/LocalDataRoot 状态与允许动作 | 指标加载;无告警 | paused/degraded/unavailable;不合法恢复/提高上限禁用 | full/unavailable、清理排队和物理重计量;不显示绝对路径 | `TDD-WP6-SVC-001`、`TDD-WP6-SVC-002`、`TDD-WP6-DIAG-001`、`TDD-WP0-STO-*` | +| `admin-audit` 审计 | active super_admin | 后台操作与私有访问两类独立页/标签 | 无记录;游标加载 | 查询失败保留旧结果;无修改/人工删除动作 | 180 天保留;正文、图片、密钥和路径不出现;页面读取不消费容量但仍继承后台全局容量条 | `TDD-WP6-AUD-001`、`TDD-WP6-PRIV-002` | +| `system-ui` Windows 辅助系统界面 | 本机托盘/Supervisor,无产品角色 | 托盘、运行状态、打开 Dada、诊断、退出 | 启动中;N/A 业务空态 | 启动失败、端口占用、API/Worker degraded,动作严格受限 | full/unavailable 只作脱敏告警;固定端口不动态切换 | `TDD-WP0-SUP-001`、`TDD-WP0-PKG-001`、`TDD-WP0-LOG-001`、`TDD-WP7-REL-001` | + +`pnpm validate:tdd-trace` 必须把 UIDesign 页面/入口 allowlist 与上述 `page_id` 对照:缺少 UIDesign 页面、重复 page_id、把内部预览误建角色/后台、把 Canvas Index 计为产品页、适用状态无 case/evidence 或 `N/A` 无理由时返回非零退出码。 + +### 11.2 Pencil 布局参考映射 + +`.pen` 中共有 19 个顶层画板。画板尺寸 1600 x 900,索引画板为 1440 x 420;预览 PNG 外边框使图像为 1602 x 902 或 1442 x 422。实现验收仍以 UIDesign 的 1920 x 1080 为主,不把预览尺寸改成产品视口。 + +画板中的版本号、账号、点数、容量和时间均是低保真示例数据。例如辅助界面预览里的 Chrome/Edge 版本不能作为支持记录;自动化必须从当前测试 fixture 读取状态,发布验收必须从 `RELEASE.json` 读取真实版本。若 `.pen` 或预览 PNG 中的示例文案、账号、容量、时间与 UIDesign 固定文案冲突,以 UIDesign 为界面验收依据;自动化不得通过 PNG OCR 反推验收文案。 + +| frame ID | 画板 | 预览 | 主要测试落点 | +| --- | --- | --- | --- | +| `Z8p3I` | 00 Canvas Index | `Z8p3I.png` | 非产品索引,仅校验设计资产清单;不要求实现,不计页面完成率 | +| `Z0pf8` | 01A 普通用户登录 | `Z0pf8.png` | 登录字段、标签、管理员入口、固定本机提示、焦点 | +| `DVPM8` | 01B 注册展开态 | `DVPM8.png` | 邀请/邮箱只读摘要、资料、告知、注册主动作 | +| `WbDYT` | 02A 空工作台 | `WbDYT.png` | 艺术带、生成表单、推荐模型、比例和空任务 | +| `d99Lo` | 02B 生成中工作台 | `d99Lo.png` | 当前任务、冻结点数、critical 容量条和禁用提交 | +| `zXyG9` | 03A 项目列表 | 无独立 PNG | 项目/回收站、上限、failed_empty、稳定卡片 | +| `v2Qbu` | 03B 项目详情 | 无独立 PNG | 历史、固定比例、编辑/生成/下载、无成品状态 | +| `bHQnJ` | 04A 三栏编辑器 | `bHQnJ.png` | 三栏、保存状态、画布、对象属性、固定底栏 | +| `i9upg7` | 04B 导出弹层 | 无独立 PNG | JPG/PNG、质量、未提交确认、下载/持久化分结果 | +| `YlKzE` | 05A 点数明细 | 无独立 PNG | available/reserved、流水、无购买入口 | +| `Ws5E0` | 05B 设置与本机数据 | 无独立 PNG | 固定文案、容量、文件权限风险、注销 | +| `e4e2Kz` | 06A 后台总览 | `e4e2Kz.png` | 名额、任务、成本核对、服务/容量、最近审计 | +| `YVfVG` | 06B 模型配置 | 无独立 PNG | 默认/推荐/runtime 三列、完整集合和冲突 | +| `A28V3c` | 06C 素材与历史清理 | 无独立 PNG | 上传计量、候选/确认/冲突/排队/重计量 | +| `OnsiT` | 06D 生成记录与私有告知 | 无独立 PNG | 默认隐藏正文、身份+版本告知、逐次入口 | +| `L3lde2` | 06E 服务与存储 | 无独立 PNG | Resend/高德/网关/Worker/storage 状态与动作 | +| `DlCpN` | 06F 私有内容访问审计 | 无独立 PNG | 两类审计分离、不可编辑删除、无正文 | +| `u1adni` | 07A 浏览器硬阻断 | 无独立 PNG | 426、四原因、支持 major、无继续入口 | +| `awt96` | 07B Windows 辅助系统界面 | `awt96.png` | 托盘、启动失败、端口占用、degraded、诊断脱敏 | + +除 `Z8p3I` Canvas Index 外,Pencil 产品 frame 只为其映射到的第 11.1 节页面/状态提供布局参考;是否需要截图及状态数量由第 11.1 节决定,不以“18 个产品 frame”替代完整页面覆盖。UIDesign 中没有独立 Pencil frame 的后台用户、邀请码、内部预览、管理员登录等页面仍必须具备完整 UI 证据。预览缺失不阻止测试,`.pen` 不是实现范围清单;不得自行补画或改写设计文件作为测试通过手段。 + +## 12. 当前 AC 唯一主责矩阵 + +每项 AC 只有一个主责 WP。支持测试可以跨 WP,但只能由主责 WP 汇总完成,WP-7 只汇总发布证据而不夺取产品需求主责。 + +`pnpm validate:tdd-trace` 必须从冻结的 PRD 需求/AC allowlist 校验本节、第 13 节和第 6.9 节,失败时返回非零退出码:当前 AC 集合必须恰为 52 项;每项恰有一个唯一主责;AC-08、AC-26、AC-37、AC-54 不得进入当前矩阵或 `passed` 计数;第 13 节范围展开后必须恰为 109 个互不重复的已知 PRD 需求 ID,不得遗漏、重复或新增未知 ID;测试族必须恰为 89 个且 AREA 正则允许数字;117 个规范 case 必须全部按 `^(TDD-WP[0-7]-[A-Z0-9]+-[0-9]{3})-` 捕获已知父族,每个父族至少一个 case;每个 case 的 fixture、步骤、响应、DB/文件变化、禁止副作用、证据文件和第 2.2.1 节派生属性均非空。检查必须读取结构化追踪数据或确定性解析本文,不得信任手写合计值。 + +| AC | 当前范围 | 唯一主责 | 主测试族 | 必要支持 | +| --- | --- | --- | --- | --- | +| AC-01 | 全部 | WP-1 | `TDD-WP1-AUTH-001` | `TDD-WP1-NOTICE-001`、`TDD-WP7-EXT-002` | +| AC-02 | 全部 | WP-1 | `TDD-WP1-AUTH-002` | 无 | +| AC-03 | 全部 | WP-2 | `TDD-WP2-GEN-002` | `TDD-WP3-ADP-001` | +| AC-04 | 全部 | WP-2 | `TDD-WP2-GEN-002` | `TDD-WP2-ERR-001` | +| AC-05 | 全部 | WP-2 | `TDD-WP2-GEN-001` | `TDD-WP2-CRED-001` | +| AC-06 | 全部 | WP-2 | `TDD-WP2-PROJ-001` | 无 | +| AC-07 | 全部 | WP-4 | `TDD-WP4-BG-001` | `TDD-WP4-BG-002`、`TDD-WP4-COL-001` | +| AC-09 | 全部 | WP-4 | `TDD-WP4-TXT-001` | `TDD-WP4-EXP-001` | +| AC-10 | 全部 | WP-4 | `TDD-WP4-TXT-001` | 无 | +| AC-11 | P0-A 字体子范围 | WP-4 | `TDD-WP4-TXT-002` | `TDD-WP5-WHITE-001` | +| AC-12 | 全部 | WP-4 | `TDD-WP4-TXT-002` | `TDD-WP4-EXP-001` | +| AC-13 | 全部 | WP-5 | `TDD-WP5-CAT-001` | `TDD-WP5-CACHE-001` | +| AC-14 | 全部 | WP-4 | `TDD-WP4-STK-001` | 无 | +| AC-15 | 仅四种 P0-A 色卡 | WP-5 | `TDD-WP5-COL-001` | `TDD-WP4-COL-001` | +| AC-16 | 全部 | WP-4 | `TDD-WP4-DYN-001` | 无 | +| AC-17 | 全部 | WP-4 | `TDD-WP4-DYN-002` | `TDD-WP7-EXT-003` | +| AC-18 | 全部 | WP-4 | `TDD-WP4-DYN-003` | 无 | +| AC-19 | 全部 | WP-4 | `TDD-WP4-DYN-003` | `TDD-WP4-VIS-001` | +| AC-20 | 全部 | WP-2 | `TDD-WP2-PROJ-002` | `TDD-WP0-CACHE-001` | +| AC-21 | 全部 | WP-2 | `TDD-WP2-PROJ-003` | `TDD-WP0-STO-003` | +| AC-22 | 全部 | WP-1 | `TDD-WP1-DEL-001` | `TDD-WP1-DEL-002` | +| AC-23 | 仅 P0-A 四比例与同机下载 | WP-4 | `TDD-WP4-EXP-001` | `TDD-WP2-EXP-001` | +| AC-24 | 全部 | WP-0 | `TDD-WP0-BRW-001`、`TDD-WP0-BRW-002` | `TDD-WP0-BND-001` | +| AC-25 | 全部 | WP-6 | `TDD-WP6-PRIV-001`、`TDD-WP6-PRIV-002` | `TDD-WP6-AUD-001` | +| AC-27 | 全部 | WP-4 | `TDD-WP4-CAN-001` | `TDD-WP4-PERF-001` | +| AC-28 | 全部 | WP-2 | `TDD-WP2-CRED-001` | `TDD-WP2-GEN-003` | +| AC-29 | 全部 | WP-2 | `TDD-WP2-CRED-002` | `TDD-WP2-GEN-001` | +| AC-30 | 全部 | WP-3 | `TDD-WP3-MDL-002`、`TDD-WP3-MDL-003` | `TDD-WP2-GEN-003` | +| AC-31 | 全部 | WP-5 | `TDD-WP5-UPL-001`、`TDD-WP5-CLN-001` | `TDD-WP0-STO-003` | +| AC-32 | 全部 P0-A 白名单 | WP-4 | `TDD-WP4-VIS-001` | `TDD-WP4-TXT-003`、`TDD-WP5-WHITE-001`、`TDD-WP7-REL-001` | +| AC-33 | 全部 | WP-1 | `TDD-WP1-AUTH-003` | `TDD-WP7-EXT-002` | +| AC-34 | 全部 | WP-2 | `TDD-WP2-PROJ-001` | 无 | +| AC-35 | 全部 | WP-2 | `TDD-WP2-EXP-001` | `TDD-WP2-PROJ-002` | +| AC-36 | 仅同机多标签 | WP-2 | `TDD-WP2-PROJ-004` | `TDD-WP2-EXP-001` | +| AC-38 | 仅 P0-A 本机成品空状态 | WP-2 | `TDD-WP2-EXP-002` | 无 | +| AC-39 | 全部 | WP-1 | `TDD-WP1-DEL-002` | `TDD-WP6-AUD-001` | +| AC-40 | 全部 | WP-3 | `TDD-WP3-ADP-001`、`TDD-WP3-ADP-002` | `TDD-WP7-EXT-001` | +| AC-41 | 全部 | WP-7 | `TDD-WP7-REL-001`、`TDD-WP7-EXT-*` | WP-0 至 WP-6 全部 Green | +| AC-42 | 全部 | WP-5 | `TDD-WP5-PREV-001` | `TDD-WP5-RES-001` | +| AC-43 | 全部 | WP-2 | `TDD-WP2-PROJ-005` | `TDD-WP2-GEN-002` | +| AC-44 | 全部 | WP-2 | `TDD-WP2-REF-001` | `TDD-WP0-CACHE-001` | +| AC-45 | 全部 | WP-1 | `TDD-WP1-SLOT-001` | `TDD-WP5-PREV-001` | +| AC-46 | 全部 | WP-0 | `TDD-WP0-CACHE-001` | `TDD-WP5-CACHE-001` | +| AC-47 | 全部 | WP-6 | `TDD-WP6-SVC-001` | `TDD-WP7-EXT-002`、`TDD-WP7-EXT-003` | +| AC-48 | 全部 | WP-5 | `TDD-WP5-RES-001` | `TDD-WP5-PREV-001`、`TDD-WP0-SEC-001` | +| AC-49 | 全部 | WP-1 | `TDD-WP1-ADM-001`、`TDD-WP1-CFG-001` | `TDD-WP7-EXT-002` | +| AC-50 | 全部 | WP-6 | `TDD-WP6-AUD-001` | `TDD-WP5-CLN-001`、`TDD-WP6-PRIV-002` | +| AC-51 | 全部 | WP-2 | `TDD-WP2-BAL-001` | `TDD-WP3-BAL-001` | +| AC-52 | 全部 | WP-6 | `TDD-WP6-SVC-002` | `TDD-WP6-AUD-001` | +| AC-53 | 全部 | WP-2 | `TDD-WP2-ERR-001` | `TDD-WP3-ADP-001` | +| AC-55 | 全部 | WP-0 | `TDD-WP0-STO-001`、`TDD-WP0-STO-002`、`TDD-WP0-STO-003` | `TDD-WP5-UPL-001`、`TDD-WP5-CLN-001` | +| AC-56 | 全部 | WP-0 | `TDD-WP0-DATA-002` | `TDD-WP7-UI-001` | + +未来 AC-08、AC-26、AC-37、AC-54 不得出现在当前 `passed` 计数。允许编译器或内部预览为未来素材生成非发布证据,但不得扩大普通用户可见范围或阻止 P0-A 完成。 + +## 13. 109 个 PRD 需求 ID 覆盖索引 + +| 主责 WP | 需求 ID | 数量 | +| --- | --- | ---: | +| WP-0 | PRIV-01、PRIV-02、NFR-01、NFR-07、NFR-09 | 5 | +| WP-1 | AUTH-01 至 AUTH-07、PRIV-03、PRIV-04、PRIV-06、NFR-04 | 11 | +| WP-2 | CREDIT-01 至 CREDIT-06、PROJECT-01 至 PROJECT-09、GEN-03 至 GEN-06、GEN-11、GEN-12、GEN-14、GEN-16、NFR-05 | 24 | +| WP-3 | GEN-01、GEN-02、GEN-07 至 GEN-10、GEN-13、GEN-15、ADMIN-03 | 9 | +| WP-4 | EDITOR-01 至 EDITOR-09、TEXT-01 至 TEXT-14、COL-01 至 COL-05、DYN-01 至 DYN-09、EXPORT-01 至 EXPORT-06、NFR-03、NFR-06 | 45 | +| WP-5 | STATIC-01 至 STATIC-04、ADMIN-06、ADMIN-07、PRIV-05、NFR-02 | 8 | +| WP-6 | ADMIN-01、ADMIN-02、ADMIN-04、ADMIN-05、ADMIN-08、ADMIN-09、NFR-08 | 7 | +| 合计 | 不重复的当前 PRD 需求 ID | 109 | + +每个具体测试文件必须从本表选择需求 ID,不得创造未经 PRD 定义的新 ID。跨包依赖可以重复引用需求 ID,但唯一主责不变。 + +## 14. CI、隔离与外部验证 + +### 14.1 普通 CI + +- Gitea Actions 使用冻结 lockfile,全部外部服务为 mock,仅使用脱敏 fixture 和 `.invalid` 邮箱。 +- 每个 DB/文件测试使用系统临时目录和独立 SQLite;完成后关闭句柄并删除测试目录。 +- 浏览器与打包 job 并发数为 1,使用 `%RUNNER_TEMP%` 下的独立 user-data-dir,不读取或关闭真实 Dada 实例。 +- 普通 CI 使用系统分配临时回环端口;临时端口仅限测试 harness。打包、Supervisor、启动入口、诊断和发布验收必须证明产品包固定使用 `127.0.0.1:43121` 且端口占用时失败,不会动态换端口。 +- 普通 CI 不读取 Windows Credential Manager 中真实条目,不访问项目方真实 LocalDataRoot,不扫描 3.57 GB 归档。 +- flaky 重跑不能把失败改成通过。任何自动重跑都保留首轮失败,并在证据中记录;连续不稳定测试阻止所属 WP 完成。 + +### 14.2 受控真实验证 + +- `pnpm validate:external` 只能由项目方在 P0-A 验收电脑显式运行;命令从 Windows Credential Manager 按最小范围读取凭据,不接收命令行密钥。 +- 每次真实调用先显示服务、模型、预计调用数量和是否可能消耗既有额度;执行者明确确认后才开始。 +- 真实响应立即脱敏,仅保留协议字段、状态类别、耗时、MIME、尺寸、非敏感用量、证据哈希和时间。 +- AI 网关三个模型分别生成证据,不能共享“已验证”标记。 +- Resend 送达记录只保存人工统计,不建立运行时 EmailVerificationEvent;19/20、2 分钟的阻断门槛直接来自 PRD 第 23.2 节、AC-41、AC-47 和 DevelopmentPlan 第 1.4、11.1 节,不是 TDD 新增指标。 +- 高德真实测试不把测试坐标关联到真实用户项目。 +- 外部验证失败保持 externally_blocked,不自动切换付费、备用供应商、自动充值或自动扩容。 + +## 15. 工作包顺序与完成门禁 + +| WP | 依赖 | 自动完成门禁 | 仍需真实/人工门禁 | +| --- | --- | --- | --- | +| WP-0 | 无 | 单元、API、存储、Supervisor、安全、打包 Green | RELEASE 浏览器记录在 WP-7 冻结 | +| WP-1 | WP-0 | 认证状态机、事务、会话、名额、注销、审计 Green | Resend 正式认证 | +| WP-2 | WP-0、WP-1 | 项目、点数、任务、参考图、冲突、错误 Green | 真实三模型完成态依赖 WP-3 | +| WP-3 | WP-2 | 模型集合、runtime、Adapter mock、Worker 恢复 Green | 三模型独立真实契约 | +| WP-4 | WP-2 | 编辑器、导出、a11y、性能 harness Green | 最终视觉依赖 WP-5 真实白名单 | +| WP-5 | WP-0;与 WP-4 前半可并行 | 编译、目录、隔离、缓存、上传、清理 Green | 真实归档只读校验和人工视觉 | +| WP-6 | WP-1、WP-2、WP-5;模型页依赖 WP-3 | 后台、告知、审计、服务与存储 Green | 真实服务恢复和正式身份流程 | +| WP-7 | WP-0 至 WP-6 | `pnpm test:all`、52 AC 结构检查、制品扫描 Green | RELEASE、Chrome/Edge、AI、Resend、高德及人工验收全部通过 | + +任何工作包的“不能提前宣告”条件沿用 DevelopmentPlan。依赖工作包未 Green 时,下游可以编写 Red 测试和 mock 接线,但不能标记完成。 + +## 16. P0-A 测试完成定义 + +只有以下条件全部满足,`tdd.md` 所定义的 P0-A 测试才完成: + +1. 四份 Markdown 全局来源哈希与第 1.2.1 节一致;第 1.2.2 节 UI 参考资产已匹配当前哈希,或受影响页面已完成局部重读、映射更新和视觉重建,不存在未处理的 `source_changed` case。 +2. WP-0 至 WP-7 全部达到第 15 节门禁,第 6.9 节 117 个规范 case 及其参数分支均有可复现 Red 和最终 Green/Passed 证据。 +3. `pnpm validate:tdd-trace` 通过;第 12 节 52 项当前 AC 全部 passed,每项恰有一个唯一主责;AC-08、26、37、54 未混入当前完成统计;89/89 测试族至少有一个 case,117 个 case 的必填字段、派生执行属性和证据目录完整。 +4. 第 13 节 109 个互不重复且无未知项的需求 ID、十三个功能模块、十九个数据契约和九类错误均有可执行测试落点。 +5. `reference_invalid` 与 `safety_rejected` 由不同证据证明;九类错误的任务、点数、用户动作和脱敏断言全部通过。 +6. `managed_content_bytes` 的阈值、等号写入、超限无副作用、原图/缩略图计量、full/unavailable 动作和物理后重测全部通过。 +7. ModelConfig 始终一个 enabled default、唯一正整数 priority;runtime 降级不回写配置;recommended 可重新派生或为空。 +8. 私有告知按 super_admin 身份+版本跨标签、重启、重登和两浏览器持久;每次图片/完整提示词读取仍先写独立访问审计。 +9. Playwright 已实际枚举 Service Worker、Cache Storage 和 IndexedDB,确认没有 internal preview、私有内容、项目、提示词或未保存草稿。 +10. 跨用户隔离使用正常邀请/验证码/普通权限创建临时第二账号,完成后正常注销并进入规定清理路径。 +11. 第 11.1 节 UIDesign 页面 × 状态矩阵的全部适用单元格均有实现和证据;Canvas Index 未计入产品页,UIDesign 中没有独立 Pencil frame 的页面没有漏测;1920 x 1080、200% 缩放、焦点、最长文案、弹层和多状态叠加无不可用重叠。 +12. 视觉差异、50 元素性能、四比例导出、Chrome/Edge 下载与文件选择均在最终 RELEASE 版本通过。 +13. 三模型、Resend、高德真实门槛通过;未配置自动充值、收费备用或自动扩容。 +14. `RELEASE.json`、便携 ZIP、SHA-256、START-HERE 和固定端口边界一致;局域网、其他设备和不支持浏览器无法进入产品。 +15. 制品、代码、日志、DB 配置、manifest、截图和证据中不存在真实凭据、验证码、会话令牌、管理员真实邮箱、完整私有内容或硬编码用户绝对路径。 +16. 普通用户主框架和设置区持续原样显示:“测试数据仅保存在本机,不自动备份,也不会迁移到正式系统。” + +缺少任一项时保持各 case 的实际测试状态,不得标记 P0-A 测试整体完成或发布完成。