@taptap/maker 0.0.40-beta.2 → 0.0.40-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,6 +41,27 @@ Lua LSP/Python 状态在后台异步检查,同一时刻只执行一次;首
41
41
 
42
42
  控制台是 Maker CLI 的本机网页入口,随包分发,无需安装前端开发环境。
43
43
 
44
+ ## 其他 / UI 动效库与项目架构
45
+
46
+ 当前暂时关闭“其他”主导航入口,旧的 `?page=other` 链接回到默认项目页。
47
+ 以下功能代码保留,待完善后再开放入口。
48
+
49
+ “其他”是独立的控制台页面,左侧内部页签为“UI 动效库”和“项目架构”。
50
+ 内部切换不修改顶部主导航;离开“其他”后整个工具区隐藏。
51
+ UI 动效库随 Maker 包分发,由同源的 /ui-motion 页面承载,不依赖本机演示服务器。
52
+ 提供完整界面演示、14 种用途分类的大卡片、播放、放大、选用与 AI 指令生成。
53
+ 切换内部页签或顶部页面保留动效选择并停止播放;深浅色跟随控制台。
54
+ 演示使用网页模拟 LuaTween 配方,不调用生成接口、不修改游戏项目;
55
+ 选用后复制指令交给 AI,结合真实 UI 节点、业务和 LuaTween 源码实现并验收。
56
+
57
+ “其他 → 项目架构”保留原有的本地架构动效预览。
58
+ 当前使用明确标注的通用游戏示例,不读取项目源码、不代表当前项目架构或实时运行状态。
59
+ 只保留卡片外光、边框环绕与连线流动的网页示例,不加载原仓库视频。
60
+ 支持播放、暂停、重播、进度拖动、倍速和步骤跳转;小屏采用双列布局。
61
+ 切页、切项目或隐藏浏览器页面时暂停;切换项目后重新开始示例。
62
+ 深浅色跟随控制台;系统减少动态效果设置下默认不自动播放,仍可手动播放。
63
+ 页面不调用 AI、不写项目文件。
64
+
44
65
  ## AI 上下文检查
45
66
 
46
67
  「项目」页在项目配置与项目检查下方提供「AI 上下文检查」,默认只展示 3–4 行检查摘要,
@@ -99,6 +120,59 @@ JSON/TOML 仅基础识别,不解析完整客户端继承、覆盖或实际生
99
120
  可使用控制台地址的 page=ui-editor 和 ui=assets/相对路径直达生成的文档,保留原项目参数并 URL 编码。
100
121
  UI 编辑器只保存已有 .ui.json,不自动生成 meta、发布游戏或改加载逻辑。新文件由工作流显式生成 meta。
101
122
 
123
+ ### 画布与 UI 编辑器快捷键
124
+
125
+ 画布右下角“适配画布”旁、UI 编辑器顶部“适应”旁提供键盘图标,点击可查看当前编辑区的快捷键。
126
+ 说明按视图操作、选择与排版、编辑与保存分组,自动按系统显示 Command 或 Ctrl。
127
+ 点击浮层外、再次点击入口、点击关闭按钮或按 Esc 收起;关闭点击不会透传给底下的卡片或 UI 节点。
128
+ 浮层不自动弹出,也不写入画布或 UI 文档。
129
+
130
+ 下表 Mod 表示 macOS 的 Command、Windows/Linux 的 Ctrl。快捷键作用于当前编辑区;
131
+ 输入框、文本编辑、中文输入法组合输入和弹窗优先处理自己的按键,不触发画布编辑操作。
132
+ 保存键仍会阻止浏览器的“保存网页”;弹窗或文档切换期间不额外执行保存。
133
+
134
+ | 快捷键 | 创作画布 | UI 编辑器 |
135
+ | ------------------------- | ---------------------------------------------------- | ---------------------------- |
136
+ | 按住空格 + 左键拖动 | 临时平移,工具条高亮拖拽,松开恢复原模式 | 临时平移视图,不移动 UI 元素 |
137
+ | 鼠标中键拖动 | 平移视图 | 平移视图 |
138
+ | Mod+S | 保存(平时自动保存) | 保存当前 UI 文档 |
139
+ | Mod+Z | 撤销 | 撤销 |
140
+ | Mod+Shift+Z / Mod+Y | 重做 | 重做 |
141
+ | Mod+A | 全选卡片及分组 | 全选 |
142
+ | Mod+D | 复制所选卡片 | 复制所选节点 |
143
+ | Mod+G | 将所选卡片分组 | 分组 |
144
+ | Delete / Backspace | 删除所选卡片或选中连线 | 删除所选节点 |
145
+ | Shift+1 | 适配全部内容 | 适配画板 |
146
+ | Escape | 退出常驻拖拽模式、取消连线选择;弹窗内按弹窗规则处理 | 取消选择或取消替换图片 |
147
+ | Mod+C / Mod+X / Mod+V | 不接管系统剪贴板 | 复制 / 剪切 / 粘贴节点 |
148
+ | Mod+Shift+G | — | 取消分组 |
149
+ | F2 | — | 重命名所选节点 |
150
+ | 方向键 / Shift+方向键 | — | 移动 1 / 10 像素 |
151
+ | Enter / Shift+Enter | — | 选择子节点 / 父节点 |
152
+ | Mod+Shift+H / Mod+Shift+L | — | 切换显隐 / 锁定 |
153
+ | [ / ] | — | 下移 / 上移一层 |
154
+ | Alt+[ / Alt+] | — | 置底 / 置顶 |
155
+ | Shift+0 / Shift+2 | — | 原始比例 / 适配所选节点 |
156
+ | Mod++(或 Mod+=) / Mod+- | — | 放大 / 缩小视图 |
157
+
158
+ 空格平移在工具条按钮获得焦点后仍可使用;松键、窗口失焦或页面隐藏会清除临时平移状态,
159
+ 避免“粘住”拖拽模式。UI 节点树获得焦点时保留树的空格、回车和方向键导航。
160
+ 画布滚轮默认缩放;常驻拖拽模式下普通滚轮/双指滑动平移,Mod+滚轮缩放。
161
+ UI 编辑器滚轮缩放,两者也提供可点击的缩放与适配按钮。
162
+ 重命名统一使用 F2,不再占用 Mod+R,让浏览器刷新保留原行为。
163
+
164
+ 保留的鼠标组合操作:
165
+
166
+ | 操作 | 创作画布 | UI 编辑器 |
167
+ | ----------------------- | ----------------------------- | ----------------------------- |
168
+ | Shift+点击 / Shift+框选 | 多选 / 追加框选;Mod 也可多选 | 多选 / 追加框选 |
169
+ | Mod+点击 | 多选 | 循环选择重叠节点 |
170
+ | Alt+拖动 | — | 拖动复制节点 |
171
+ | Shift+拖动节点 | — | 约束水平或垂直移动 |
172
+ | Shift+缩放 / Alt+缩放 | — | 普通节点等比缩放 / 从中心缩放 |
173
+ | Shift+旋转 | — | 按 15° 步进旋转 |
174
+ | Alt+悬停其他节点 | — | 查看与所选节点的间距 |
175
+
102
176
  ### UI 文档 CLI
103
177
 
104
178
  同包 CLI 提供 taptap-maker ui,使用 ui capabilities 查看操作格式。
@@ -216,11 +290,10 @@ node scripts/test-maker-ui-editor.mjs(Playwright 可用时)。
216
290
  道具、种植、NPC、二合图标图集复用现有本地去底与网格切图,UI 风格裂变和角色概念设计保留完整背景;
217
291
  这些模板不增加识图或 Skill,历史画布不自动迁移。只有用户确认运行才生成,完成后使用原下载菜单。
218
292
  模板信息可通过 skills 关联 Skill,卡片数量后显示阅读链接,在新页打开控制台 Skill 阅读器。
219
- 「游戏UI制作 · Bbox预排参考图(实验)」关联 maker-ui-bbox-workflow;普通「游戏UI制作」不关联 Skill,
220
- 普通模板由原始设计稿进入去文字;按钮、图标、物品与人物引用去文字稿,背景准备先去除前景并补底,再提取面板、槽框与环境背景。去文字与背景准备使用单图 edit_image。就绪的生图分支全部并发,每张生成后立即按透明间隔切图,不等整批;环境背景保留完整画幅,不去底。
221
- 识图使用 uiRecognition.optional 保存为附加 Bbox 数据:失败、未配置或结果待查询均不阻塞拆图,去文字卡提供“生成 / 重试 Bbox”。
222
- 识图成功或切换识图开关不使已生成素材过期;有 Bbox 时随资源包导出,但不伪造素材槽位绑定。保存为自定义模板保留此行为,不依赖 Skill 或 Agent。
223
- 内置「游戏UI制作」展示完整设计稿、去文字与背景准备图、分类图集和 PNG 资源包。模板到资源包结束,
293
+ 「游戏UI制作 · Bbox预排参考图」关联 maker-ui-bbox-workflow,完成去文字、Bbox 识图、
294
+ 原尺寸预排、分离切图和可编辑 UI 组装。原「游戏UI制作」已从官方模板库移除,
295
+ 已有画布和个人模板不改写。
296
+ 内置 Bbox 模板展示完整设计稿、识图与分类素材示例,
224
297
  新添加时保留示例预览,原稿之后的处理卡和资源卡均为待处理,不将示例计为本次完成。
225
298
  选中原稿卡后使用「替换图片」,保留连线并更新下游状态;生成只引用上游,不混入旧示例图。
226
299
  替换设计稿并保存参数后,分组「完成剩余流程」一次确认,按连线接续生图及资源卡处理。
@@ -302,6 +375,12 @@ CLI 通过 pages 显式选择页面,命令绑定 pageId、canvasId 和 revisio
302
375
  分组栏改为同一提示,不保存、不启动队列或 015 运行,CLI 命令返回同一原因(inspect 的 blocked)。
303
376
  短编辑期间阻止页面输入,长任务继续使用现有任务保护和停止入口。
304
377
  领取过的命令不重新派发;结果单独确认,断线标记 unknown,刷新不恢复付费任务。
378
+ 命令历史不占用新命令配额:工作集中超过 1000 条时,将无结果正文、无有效导出缓存的
379
+ 终态记录移入本次控制台会话的轻量回执;同一 requestId 仍返回原状态,跨项目或参数不符仍拒绝。
380
+ 回执保留到控制台退出,数量随会话请求增长,不保存命令输入或大结果;不改变重启后的恢复边界。
381
+ 每个项目保留最近 20 条普通终态结果正文,过期标记 resultExpired;有效导出及 queued、running、
382
+ unknown 记录不参与回收。页面收到结果确认后释放对应心跳 ID,避免长期使用后心跳超限。
383
+ 同一页面保持单个普通操作,并为 inspect、stop 各保留一个独立在途位置;其他页面不受其历史数量影响。
305
384
  wait 是有界状态查询,不是新调度器或反调 AI。用法与首版限制见画布目录 README。
306
385
  游戏资产卡通过 preview-image-assets 返回网格 PNG data URI 和 waiting_for_confirmation;
307
386
  核对每格后用 confirm-image-assets 携带当前 reviewId/revision,复用页面裁切和保存。
@@ -75,9 +75,10 @@ Runtime,也不运行旧 dist。
75
75
 
76
76
  ## run-lua-validate 本地接入
77
77
 
78
- 验证方法、报告判读、视觉检查及修复复测使用 UrhoX ai-dev-kit 的 `run-lua-validate` Skill。
79
- Maker 只负责本地执行适配:复用预览的 Runtime 安装、项目分类、准备与资源加载,收集本轮证据。
80
- 仅支持单机;不修改引擎、不提交或远端构建、不改写游戏代码和发布配置。
78
+ 验证方法、报告判读、视觉检查及修复复测沿用 UrhoX ai-dev-kit 的 `run-lua-validate` Skill。
79
+ Maker 负责本地执行适配:复用预览的 Runtime 安装、项目分类、准备与资源加载,收集本轮证据。
80
+ 单机项目沿用 Skill 的本地 Validate;联网/server 项目使用 Maker 的显式 `--network` 路径,
81
+ 申请测试服并让本地客户端通过 WebSocket 直连。不修改引擎、不提交或远端构建、不改写游戏代码和发布配置。
81
82
 
82
83
  插件用户使用 `taptap-maker-local` 指定的当前插件 CLI;不要切换另一份全局 CLI。
83
84
  先执行 `preview status`,有活动预览须经用户同意停止,验证不会自动接管窗口。
@@ -94,6 +95,9 @@ Skill 分发由 UrhoX ai-dev-kit 维护。Maker 在安装 Skill 及执行验证
94
95
  不会把修正名单当作 Skill 已安装,不自动下载升级。配置损坏或不可写时保留告警,
95
96
  不因此阻断 Runtime 验证。
96
97
  本地调用映射由 `taptap-maker-local` 和项目 Maker 指引提供。
98
+ 准备副本失败或 Runtime 创建失败时,验证结果返回 `runtime_started: false` 和
99
+ `failure_stage: preparation | runtime_start`,保留原始错误,不追加尚不应存在的报告/截图缺失
100
+ 错误。`.cleanup-unverified` 仍阻止准备,不自动删除;资源索引失败会附带首条脱敏来源诊断。
97
101
  用户请求 Validate 但 AI 尚不可用该 Skill 时,由 AI 按 `taptap-maker-local` 先检查本地
98
102
  `skills/` 或 `.installer/skills/` 原文件,告知并解除当前平台排除,再运行项目原安装脚本。
99
103
  旧安装器未提供 Codex `.agents/skills` 时,AI 仅补齐该 Skill 的完整目录,不覆盖已有文件;
@@ -104,10 +108,17 @@ Skill 分发由 UrhoX ai-dev-kit 维护。Maker 在安装 Skill 及执行验证
104
108
 
105
109
  ```sh
106
110
  taptap-maker preview validate --target-dir "/absolute/game" --json
111
+ taptap-maker preview validate --target-dir "/absolute/network-game" --network --json
107
112
  taptap-maker preview validate --target-dir "/absolute/game" --mode both --screenshot-frame 600 --json
108
113
  taptap-maker preview validate --target-dir "/absolute/game" --validate-test check.lua --json
109
114
  ```
110
115
 
116
+ 联网项目必须显式传 `--network`。不传时不会启动 Runtime,返回 `UNSUPPORTED` 并提示使用该路径;
117
+ 传入后会沿用联网预览的 PAT 鉴权、测试服分配和 `directConnectParams`,测试服服务端运行已提交的
118
+ 远端构建版本,本地 server 修改不会自动生效。该流程会产生真实测试服存档等业务副作用,且验证结果
119
+ 只代表本地客户端在测试服上的运行结果,不能单独证明服务端源码已通过。鉴权、测试版本、连接信息
120
+ 或 Runtime 网络能力缺失时直接失败,不降级为单机。
121
+
111
122
  | 本地参数 | 对应原有 Skill / Runtime 能力 |
112
123
  | --------------------------------------------- | ------------------------------------------------------------------------------------ |
113
124
  | `--mode validate`(默认) | headless 运行,取得原始 JSON 报告与日志 |
@@ -150,7 +161,8 @@ scene_stalled/update_defined 需结合入口判断,纯 UI 或事件驱动程
150
161
  或截图时已观察到 Bootstrap 开始但尚未完成,标为 `screenshot_assessment.status=NOT_READY`,
151
162
  本轮 PNG 保留但不作为有效视觉证据;不修改原始游戏报告。
152
163
  仅本轮进程及证据收集正常、且没有实际运行错误时,等待 3 秒后用更晚的截图帧重新启动验证,
153
- 最多自动重试 2 次。后续截图帧参考已观察到的加载完成帧,并增大原截图帧;
164
+ 仅单机模式最多自动重试 2 次;联网模式保留证据并停止,避免重新分配测试服和重复业务操作,
165
+ 检查证据后须明确请求才能再次运行。后续截图帧参考已观察到的加载完成帧,并增大原截图帧;
154
166
  both 模式同时延长验证帧数,不改变入口或断言。未显式指定超时时,重试按帧数比例增加预算,
155
167
  最多 580 秒;显式 `--validate-timeout` 保持不变。按上一轮 Runtime 实际耗时估算后续所需时间,
156
168
  若已达到预算则不启动重试,保留证据并提示调整超时;估算不保证下一轮的加载速度。
@@ -311,6 +323,8 @@ AI 调试 -> 前台 Node 会话 -> Runtime -> 收集日志 -> 停止本轮游戏
311
323
  仅在持有互斥且确认记录的进程不存在时回收。进程存活、权限未知或锁内容损坏时不自动删除,
312
324
  不按文件年龄抢占;退出只删除本次创建的锁。升级前应结束旧版预览命令,不与旧版并行恢复。
313
325
  Runtime 安装锁仍沿用原有保护,不凭主进程退出推断下载辅助进程已清理。
326
+ 互斥端口因 `EACCES` 被拒绝且现有候选均不可用时,保留原始权限错误,不误报为其它操作正在运行;
327
+ `EADDRINUSE` 仍按占用阻断,不跳过可能由同一锁持有者使用的端口。
314
328
  - 新启动携带会话 ID 和 30 秒控制通道发布期限;发布前后均校验,迟到的启动进程不能接管
315
329
  替换后的会话。尚未发布 PID/端口的启动记录过期后可重新点击本地预览,状态查询不修改记录。
316
330
  旧版零 PID 启动记录缺少此校验信息,不能仅凭零 PID 判定进程已结束;
@@ -160,7 +160,7 @@ macOS/Linux:
160
160
 
161
161
  ```text
162
162
  command: npx
163
- args: ["-y", "-p", "@taptap/maker@0.0.40-beta.2", "taptap-maker"]
163
+ args: ["-y", "-p", "@taptap/maker@0.0.40-beta.3", "taptap-maker"]
164
164
  ```
165
165
 
166
166
  上面的 macOS/Linux npx 形式只是显式兼容模式;默认同样是绝对 Node + 版本化 self runtime。
@@ -265,7 +265,7 @@ stderr、尝试的编码和解码错误,不能把解码异常直接当成 Make
265
265
  例如,配置使用 Windows 绝对 Node/npm CLI 时,按相同顺序复现:
266
266
 
267
267
  ```bat
268
- "<绝对 node.exe>" "<绝对 npm-cli.js>" exec --yes --package @taptap/maker@0.0.40-beta.2 -- taptap-maker
268
+ "<绝对 node.exe>" "<绝对 npm-cli.js>" exec --yes --package @taptap/maker@0.0.40-beta.3 -- taptap-maker
269
269
  ```
270
270
 
271
271
  然后用该 CLI 执行 `mcp verify --json`;不要只用 `help` 代替 MCP 协议握手。
@@ -273,7 +273,7 @@ stderr、尝试的编码和解码错误,不能把解码异常直接当成 Make
273
273
  配置使用 macOS/Linux 标准 argv 时:
274
274
 
275
275
  ```bash
276
- npx -y -p @taptap/maker@0.0.40-beta.2 taptap-maker help
276
+ npx -y -p @taptap/maker@0.0.40-beta.3 taptap-maker help
277
277
  ```
278
278
 
279
279
  如果终端成功而客户端失败,应继续排查客户端读取的配置、信任状态、PATH、cwd 和子进程启动方式,
@@ -296,7 +296,7 @@ npx -y -p @taptap/maker@0.0.40-beta.2 taptap-maker help
296
296
  作为可选恢复方式,并先备份实际生效的配置:
297
297
 
298
298
  ```bash
299
- npx -y -p @taptap/maker@0.0.40-beta.2 taptap-maker mcp install --launcher self
299
+ npx -y -p @taptap/maker@0.0.40-beta.3 taptap-maker mcp install --launcher self
300
300
  ```
301
301
 
302
302
  Windows 如无法从 PATH 运行上述恢复命令,应使用当前可用 npm 的绝对路径启动这一次 CLI;安装器
@@ -328,7 +328,7 @@ Windows 如无法从 PATH 运行上述恢复命令,应使用当前可用 npm
328
328
  指纹打扰。用户明确同意后无需第二次确认,AI 将已脱敏的当前会话错误 JSON 通过 stdin 传入:
329
329
 
330
330
  ```text
331
- npx -y --package @taptap/maker@0.0.40-beta.2 taptap-maker mcp report --ide <client> --target-dir <project> --context-stdin --consent --json
331
+ npx -y --package @taptap/maker@0.0.40-beta.3 taptap-maker mcp report --ide <client> --target-dir <project> --context-stdin --consent --json
332
332
  ```
333
333
 
334
334
  优先原样复用当前客户端 Maker MCP 配置中的 command 和有序 args,再追加上述 `mcp report`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taptap/maker",
3
- "version": "0.0.40-beta.2",
3
+ "version": "0.0.40-beta.3",
4
4
  "type": "module",
5
5
  "description": "TapTap Maker local development CLI and MCP server",
6
6
  "main": "dist/maker.js",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: maker-ui-bbox-workflow
3
- description: 执行或复核修复 Maker「游戏UI制作 · Bbox预排参考图(实验)」及其个人副本:一次 run 由画布程序自动跑完识图、预排、分离、切图、组装、meta 与检查,AI 再逐批看图、定向修复并在 UI 编辑器验收,直到交付完整。仅要求切图时交付 PNG 资源包;普通「游戏UI制作」使用 maker-ui-workflow。
3
+ description: 执行或复核修复 Maker「游戏UI制作 · Bbox预排参考图」及其个人副本:一次 run 由画布程序自动跑完识图、预排、分离、切图、组装、meta 与检查,AI 再逐批看图、定向修复并在 UI 编辑器验收,直到交付完整。仅要求切图时交付 PNG 资源包;普通「游戏UI制作」使用 maker-ui-workflow。
4
4
  ---
5
5
 
6
6
  # Bbox 预排 UI 工作流
@@ -19,7 +19,9 @@ AI 负责最后的看图复核与定向修复,直到达到第 4 节的完成
19
19
 
20
20
  1. 目标是完整执行、从中断继续、仅切图,还是**复核修复已有交付**(用户贴来复核修复提示词时直接到第 3 节)。
21
21
  2. 用 `canvas pages / inspect` 取得 page-id、canvas-id、分组 ID 与 revision。
22
- 3. 用 `canvas ui-delivery --target-dir <项目> --canvas-id <ID> --id <UI 资源包卡ID>` 查看是否已有交付。
22
+ 3. 首次执行前提醒用户:"015 模板里的 UI 设计稿是预制示例,请先把原设计稿卡替换成你要制作的界面图,或把图片发给我;如果只是体验流程,也可以明确告诉我使用示例图。"
23
+ 尚未提供或确认原稿时,等待用户选择,不直接拆分预制示例。用户已提供目标设计稿、明确使用示例,或继续已确认原稿的任务时,不重复询问。
24
+ 4. 用 `canvas ui-delivery --target-dir <项目> --canvas-id <ID> --id <UI 资源包卡ID>` 查看是否已有交付。
23
25
 
24
26
  ## 2. 一次自动跑完
25
27
 
@@ -51,6 +53,8 @@ AI 负责最后的看图复核与定向修复,直到达到第 4 节的完成
51
53
  `recognize-ui` 重新识图(会让依赖的批次失效,需要重新 run 分组)。
52
54
  3. **重新组装**:`canvas assemble-ui --target-dir <项目> --canvas-id <ID> --id <UI 资源包卡ID> --new-version`。
53
55
  新版本的 `review` 三个列表应全部为空,meta `done`,引用检查 0 错误。
56
+ 文件名取识图返回的中文功能名/英文标识;用户指定名称或旧结果缺名时,加
57
+ `--ui-title 装备详情 --ui-name equipment_detail`。读取交付的 `uiFile`,不假定固定文件名。
54
58
  4. **编辑器验收**:`taptap-maker ui open --target-dir <项目> --file <ui 文件> --no-open --json`,
55
59
  对照同名参考图检查位置、尺寸、层级、字号、颜色、美术字、背景与按钮状态;偏差用 `ui inspect / patch`
56
60
  (先 dry-run,再带 revision)修正。先确认文件是否已被用户手工修改,不覆盖重建用户编辑过的 UI。
@@ -7,7 +7,7 @@ description: 'TapTap Maker 游戏 UI 设计稿拆解、按钮/图标/背景切
7
7
 
8
8
  Maker 是流程入口;自由画布展示分析与切图,脚本按显式布局组装,控制台 UI 编辑器负责对照和调整。
9
9
  本 Skill 不新增 MCP tool,不执行游戏构建、提交或更换游戏加载入口。
10
- 「游戏UI制作 · Bbox预排参考图(实验)」及包含 uiAtlasPrelayout 的副本使用独立
10
+ 「游戏UI制作 · Bbox预排参考图」及包含 uiAtlasPrelayout 的副本使用独立
11
11
  `maker-ui-bbox-workflow` Skill,不按本 Skill 的普通模板拆图步骤执行。
12
12
 
13
13
  ## 从用户需要的阶段开始
@@ -80,7 +80,7 @@ Server API 的 pending/unknown 先 query;提示等待恢复时,recognize-ui
80
80
  不要重新看图猜坐标或让用户换当前对话模型。已有 Bbox 时直接复用;换原稿或重新去文字后再识别。
81
81
  旧版单次清单没有文字 Bbox,需要双次识图后才能按本流程完整组装。
82
82
 
83
- 当前「游戏UI制作」模板按控件、图标、装备、面板、人物和背景分类自动分批,单张最多 5×5,
83
+ 历史分类「游戏UI制作」模板按控件、图标、装备、面板、人物和背景分类自动分批,单张最多 5×5,
84
84
  分类内按 Bbox 尺寸和长宽比合批,横长、竖长与普通素材分开;长条每批最多五格,
85
85
  续批保留元素 ID 和状态绑定,不按旧序号解释新图。duplicateOf 实例共用槽位,但保留各自的坐标和绑定。
86
86
  执行该模板时沿用自动规划,不额外改成混合分类或固定更大的网格。自定义流程的合批建议见
@@ -117,7 +117,7 @@ references/workflow.md 的「图集合批」。已有结果保留,不为了合
117
117
  明确绑定资源 ID 与元素 ID、默认/按下态,记录图片尺寸与哈希;显式调用 generate_resource_meta。
118
118
  5. 使用本 Skill 的 scripts/assemble-ui.mjs 组装到新的目录,例如 assets/ui/<界面>/assembled-v1/。
119
119
  输出目录必须不存在,保护手工编辑;多轮用新目录。脚本验证绑定、哈希、尺寸与层级,不做视觉自动匹配。
120
- 6. 在控制台「UI 编辑器」打开 assembled.ui.json,同名 assembled.reference.png 会自动作为设计稿。
120
+ 6. 在控制台「UI 编辑器」打开 <界面标识>.ui.json,同名 <界面标识>.reference.png 会自动作为设计稿。
121
121
  左右检查完整性、层级、资源选择,再重叠检查位置/尺寸;必要时按同一元素 ID 记录纠偏重新组装。
122
122
  用户已经手工编辑的文件继续在编辑器调整,不能无条件重新生成覆盖。
123
123
 
@@ -141,7 +141,7 @@ recognized 记录只有 Bbox;resources 记录才包含分类 PNG、设计稿
141
141
 
142
142
  node scripts/assemble-ui.mjs <项目绝对路径> <layout.json> <新输出目录> [corrections.json]
143
143
 
144
- 输出 assembled.ui.json、assembled.reference.png、assembly-map.json。将新资源纳入 meta 生成后,
144
+ 输出 <界面标识>.ui.json、<界面标识>.reference.png、assembly-map.json。将新资源纳入 meta 生成后,
145
145
  用当前分发的 CLI 执行 console open --target-dir <项目> --no-open --json,取得真实地址;
146
146
  保留其项目参数,追加 &page=ui-editor&ui=<URL编码的 assets/ 相对 UI 路径>,即可直达文档。
147
147
  控制台已打开时也可进入「UI 编辑器」并刷新文件列表。不要启动独立 UrhoxUIEditor 或 Python 服务。
@@ -43,10 +43,14 @@ assemble-ui.mjs 自动生成图像节点与 Label、换算父子位置,并额
43
43
 
44
44
  node <本 Skill 目录>/scripts/assemble-ui.mjs <项目根目录> <layout.json> <新输出目录> [corrections.json]
45
45
 
46
- 输出 assembled.ui.json、assembled.reference.png 和 assembly-map.json。后者记录最终位置、
46
+ 输出 <界面标识>.ui.json、<界面标识>.reference.png 和 assembly-map.json。后者记录最终位置、
47
47
  原始位置、素材引用次数与备用清单。资源仍引用原项目 assets,不重复复制全部切图。
48
48
  把 UI 导入项目后显式调用 generate_resource_meta,再用 Maker 控制台「UI 编辑器」检查和对照。
49
49
 
50
+ 输入可提供 `screen: {name: "装备详情", key: "equipment_detail"}`,优先于 `bbox.screen`。
51
+ name 为中文功能名称;key 为不带扩展名的小写英文 snake_case,最多 64 字符。
52
+ 缺失时使用“未命名界面”和原稿身份摘要,读取返回的 uiFileName/referenceFileName 获取实际文件名。
53
+
50
54
  布局 JSON 的 version=1,coordinateSpace=design-pixels,rectBasis=asset-canvas。
51
55
  design 包含 path(assets/ 相对路径)、sha256、width、height;assets 列表的每项具有这些
52
56
  图片字段及 id、role(bound 或 reserve)。素材可选 contentBounds 记录透明通道内容边界,
@@ -77,7 +81,7 @@ review 包含 designSha256 与 evidence(实际对照截图路径),adjustme
77
81
 
78
82
  ### 图集合批
79
83
 
80
- 当前官方「游戏UI制作」模板按分类自动规划,每张最多 5×5;执行时沿用模板的槽位和续批,
84
+ 历史分类「游戏UI制作」模板按分类自动规划,每张最多 5×5;执行时沿用模板的槽位和续批,
81
85
  不使用本节自定义流程建议覆盖其网格、顺序和绑定。
82
86
  自定义流程由 Agent 先通看 Bbox 清单,按预计输出尺寸、长宽比和保留/移除要求合批。
83
87
  语义分类用于素材命名和导出组织,不意味着每类必须单独调用一次模型;不固定沿用示例批次数。
@@ -18,12 +18,14 @@ export interface UiAssemblyBbox {
18
18
  version: 1;
19
19
  coordinateSpace: 'design-pixels';
20
20
  bboxFormat: 'xywh';
21
+ screen?: { name: string; key: string };
21
22
  design: UiAssemblyImage;
22
23
  cutSource: UiAssemblyImage;
23
24
  elements: Array<{ id: string; [key: string]: unknown }>;
24
25
  texts: Array<{ id: string; [key: string]: unknown }>;
25
26
  }
26
27
  export interface UiAssemblyInput {
28
+ screen?: { name: string; key: string };
27
29
  bbox: UiAssemblyBbox;
28
30
  assets: UiAssemblyAsset[];
29
31
  bindings: Array<{
@@ -39,6 +41,9 @@ export interface UiAssemblyInput {
39
41
  }
40
42
  export interface UiAssemblySummary {
41
43
  outputDirectory: string;
44
+ screen: { name: string; key: string };
45
+ uiFileName: string;
46
+ referenceFileName: string;
42
47
  elements: number;
43
48
  reserveAssets: number;
44
49
  visualReview: 'pending' | 'recorded-agent-review';
@@ -2504,6 +2504,7 @@ function layoutFromBbox(input) {
2504
2504
  coordinateSpace: "design-pixels",
2505
2505
  rectBasis: "asset-canvas",
2506
2506
  provenance: "recognition",
2507
+ ...input.screen || bbox.screen ? { screen: input.screen || bbox.screen } : {},
2507
2508
  design: { ...bbox.design },
2508
2509
  assets: input.assets,
2509
2510
  elements: [
@@ -2515,7 +2516,7 @@ function layoutFromBbox(input) {
2515
2516
  type: "Panel",
2516
2517
  render: "image",
2517
2518
  rect: [...root.rect],
2518
- props: {},
2519
+ props: { backgroundFit: "cover" },
2519
2520
  assetId: input.backgroundAssetId
2520
2521
  }
2521
2522
  ] : [],
@@ -2533,6 +2534,16 @@ function run(project, layoutFile, outputDirectory, correctionFile) {
2533
2534
  );
2534
2535
  }
2535
2536
  function assembleUiInput(project, input, outputDirectory, correction = null) {
2537
+ const screen = input.screen || input.bbox?.screen || {
2538
+ name: "\u672A\u547D\u540D\u754C\u9762",
2539
+ key: "ui_" + digest(input.bbox?.design.sha256 || input.design.sha256).slice(0, 8)
2540
+ };
2541
+ assert(
2542
+ typeof screen.name === "string" && screen.name.trim() && screen.name.trim().length <= 80 && typeof screen.key === "string" && screen.key.length <= 64 && /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/.test(screen.key) && !/^(con|prn|aux|nul|com[0-9]|lpt[0-9])$/.test(screen.key),
2543
+ "Invalid UI screen name: use a display name and a lowercase snake_case key"
2544
+ );
2545
+ const uiFileName = screen.key + ".ui.json";
2546
+ const referenceFileName = screen.key + ".reference.png";
2536
2547
  const cropped = [];
2537
2548
  if (input.bbox) {
2538
2549
  for (const asset of input.assets || []) {
@@ -2578,6 +2589,8 @@ function assembleUiInput(project, input, outputDirectory, correction = null) {
2578
2589
  const layout = input.bbox ? layoutFromBbox(input) : input;
2579
2590
  if (input.bbox) verifyImage(project, input.bbox.cutSource);
2580
2591
  const result = assemble(layout, correction);
2592
+ result.ui.name = screen.name.trim();
2593
+ result.report.screen = { name: screen.name.trim(), key: screen.key };
2581
2594
  for (const item of [layout.design, ...layout.assets])
2582
2595
  if (!cropped.some((crop) => crop.relative === item.path)) verifyImage(project, item);
2583
2596
  fs.mkdirSync(outputDirectory);
@@ -2585,7 +2598,7 @@ function assembleUiInput(project, input, outputDirectory, correction = null) {
2585
2598
  for (const crop of cropped)
2586
2599
  fs.writeFileSync(path.join(project, crop.relative), crop.bytes, { flag: "wx" });
2587
2600
  for (const [name, value] of [
2588
- ["assembled.ui.json", result.ui],
2601
+ [uiFileName, result.ui],
2589
2602
  ["assembly-map.json", result.report],
2590
2603
  ...input.bbox ? [["layout.json", layout]] : []
2591
2604
  ]) {
@@ -2595,11 +2608,14 @@ function assembleUiInput(project, input, outputDirectory, correction = null) {
2595
2608
  }
2596
2609
  fs.copyFileSync(
2597
2610
  path.join(fs.realpathSync(project), layout.design.path),
2598
- path.join(outputDirectory, "assembled.reference.png"),
2611
+ path.join(outputDirectory, referenceFileName),
2599
2612
  fs.constants.COPYFILE_EXCL
2600
2613
  );
2601
2614
  return {
2602
2615
  outputDirectory,
2616
+ screen: result.report.screen,
2617
+ uiFileName,
2618
+ referenceFileName,
2603
2619
  elements: layout.elements.length,
2604
2620
  reserveAssets: result.report.reserveAssets.length,
2605
2621
  visualReview: correction ? "recorded-agent-review" : "pending"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: taptap-maker-local
3
- description: Initialize, clone, inspect, preview, sync or submit a TapTap Maker game; open its local console (打开make mcp控制台) or diagnose Maker MCP. Not for unrelated code edits or maintenance of the Maker MCP repository itself.
3
+ description: Initialize, clone, inspect, preview, sync or submit a TapTap Maker game; open its local console (打开make mcp控制台), create/edit canvas workflows (画布、首尾帧视频、自定义模板), or diagnose Maker MCP. Not for unrelated code edits or maintenance of the Maker MCP repository itself.
4
4
  ---
5
5
 
6
6
  # TapTap Maker Local Workflow
@@ -40,6 +40,8 @@ workflow then. Do not preload other Maker or ai-dev-kit Skills just because they
40
40
  | status / workspace selection / resume after upgrade | [Project Context](references/project.md); maker://status or maker_status_lite. |
41
41
  | missing/outdated AI dev kit | [AI Dev Kit Preparation](references/dev-kit.md); existing dev-kit update workflow. |
42
42
  | open console / 打开make mcp控制台 | [Local Web Console](references/console.md); active CLI console open --target-dir <PROJECT> --json; omit target-dir only to show the project list. |
43
+ | canvas capabilities / custom workflows / templates / 画布 | [Canvas Capability Guide](references/canvas.md); query active CLI canvas capabilities, then read only the matching feature section. |
44
+ | canvas video / first-last frames / 首尾帧视频 | [Canvas Video](references/canvas-video.md); inspect mode and blockers before editing references or running. |
43
45
  | local preview / refresh / stop / preview task iteration | [Local Window Preview](references/preview.md); CLI preview, never remote build. |
44
46
  | runtime tests / screenshot acceptance / run-lua-validate | [Local Validation](references/validation.md); Maker preview validate adapter and the project's run-lua-validate Skill. |
45
47
  | Windows preview launch failure | [Windows Preview Diagnostics](references/preview-windows.md); collect evidence before environment changes. |
@@ -0,0 +1,84 @@
1
+ # Canvas Video
2
+
3
+ Read for canvas video authoring, reference-count errors or video task recovery. For page,
4
+ project, revision and operation handling, follow [Canvas Capability Guide](canvas.md).
5
+ These are canvas CLI capabilities, not a promise that every remote video tool option is
6
+ exposed by the canvas. Use the installed version's `canvas capabilities` as the parameter source.
7
+
8
+ ## Modes and prerequisites
9
+
10
+ | Mode | Image input | Canvas models |
11
+ | ----------------------- | ----------------------------------- | ------------- |
12
+ | `first_frame` | Exactly one image | `2.0`, `2.5` |
13
+ | `first_last_frame` | Exactly two images, first then last | `2.0`, `2.5` |
14
+ | `multi_modal_reference` | Up to 9 images for 2.0, 30 for 2.5 | `2.0`, `2.5` |
15
+
16
+ For model `2.5`, first-frame and first/last-frame modes require `ratio=adaptive`.
17
+ Use saved, ready image cards. Missing assets, stale upstream results and unresolved tasks
18
+ must be handled before execution. The local canvas does not expose every input type of the
19
+ remote tool; multi-reference here does not authorize inventing audio/video reference fields.
20
+
21
+ A saved `first_frame` mode still limits references to one after changing the model to 2.5.
22
+ Mode may come from the fixed template, generation draft or saved generation parameters; it
23
+ is not an immutable model/card limitation. Ordinary cards support first/last-frame generation
24
+ using `parameters.mode` and ordered references. Fixed first/last-frame templates retain
25
+ their explicit frame roles and cannot switch to another mode. Do not infer support only
26
+ from edge names or rewrite edges manually. Legacy fixed templates may require a new template
27
+ copy when the CLI explicitly reports that their video sources cannot be changed.
28
+
29
+ ## Configure first/last frames
30
+
31
+ 1. Inspect the video and its sources. Reuse the intended card, or create a `video` card with
32
+ `add-node` if the user requested a new one. Read the current mode and blockers.
33
+ 2. Use `update-nodes` with the current revision and this input (replace IDs):
34
+
35
+ ```json
36
+ {
37
+ "nodes": [
38
+ {
39
+ "id": "VIDEO_ID",
40
+ "parameters": { "model": "2.5", "mode": "first_last_frame", "ratio": "adaptive" }
41
+ }
42
+ ]
43
+ }
44
+ ```
45
+
46
+ 3. Wait for the edit's operation to succeed, inspect the new revision, then use
47
+ `set-references` with this input:
48
+
49
+ ```json
50
+ { "id": "VIDEO_ID", "sourceIds": ["FIRST_IMAGE_ID", "LAST_IMAGE_ID"] }
51
+ ```
52
+
53
+ 4. Wait and inspect again. Confirm mode, ordered references, prompt, duration and other
54
+ effective settings; use `update-nodes` for any remaining requested changes. Partial
55
+ parameter updates merge with saved settings. Setting parameters/references does not generate.
56
+ 5. Only after video-generation authorization, follow [Asset Policy](assets.md) for cost
57
+ confirmation and use `run` on the video card with `--allow-paid`. Keep the page open,
58
+ track the returned operation and inspect the actual card/task result. Do not run the
59
+ whole group unless the user requested its downstream steps as well.
60
+
61
+ Use `--input-file` with UTF-8 JSON to avoid shell quoting differences, especially on Windows.
62
+ Each edit also needs `--target-dir`, `--page-id`, `--canvas-id` and the latest `--revision`;
63
+ reuse the conversation's `--session-id`. Never reuse a revision blindly across saved edits.
64
+ If the card is already configured correctly, skip redundant edits. In the UI, select the
65
+ input mode in the video's parameter panel before selecting the two reference images.
66
+
67
+ ## Diagnose without resubmitting
68
+
69
+ - Reference limit of 1: inspect `generationDraft.parameters.mode` and
70
+ `generation.parameters.mode`. Switch from `first_frame` before attaching two images.
71
+ This error alone does not mean model 2.5 or the CLI lacks first/last-frame support.
72
+ - Unconfirmed task or unsaved draft: inspect the specific blocker. `query` may recover a
73
+ queryable original task; it does not discard drafts or acknowledge a terminal failure.
74
+ Explicitly unexecuted failures without a task ID are exempt from the corresponding task
75
+ block. Remaining failures/unknown states may need UI handling; no generic CLI unlock exists.
76
+ - Missing task ID, query timeout or unknown result: preserve the attempt/operation identity.
77
+ Do not automatically create a new canvas/card to evade the blocker and resubmit paid work.
78
+ For diagnosis, use a separate canvas for non-generating configuration checks. A new paid
79
+ attempt requires checking the original result where possible and explicit user authorization.
80
+ - Content rejection: preserve the actual upstream error. It is separate from reference
81
+ configuration. Do not promise that changing style or model will pass review, or silently
82
+ change the requested character/style and pay for another attempt.
83
+ - Operation success: inspect for the saved video asset and actual task state. A successful
84
+ query is not proof of a completed video. Export the existing result rather than regenerating.
@@ -0,0 +1,102 @@
1
+ # Canvas Capability Guide
2
+
3
+ Read this entry for canvas authoring or when resuming without prior context. Use the active
4
+ Maker CLI/bundle, not an unversioned package or another installation's documentation.
5
+
6
+ ## Discover and resume
7
+
8
+ 1. Read `canvas capabilities` for the installed version's actions, inputs, parameter schema
9
+ and limits. `actions` lists page automation actions; CLI queries also include `list`,
10
+ `pages`, `sessions`, `templates`, `model-settings`, `status`, `wait` and `models`.
11
+ 2. Use the verified project path. Follow [Local Console](console.md) for opening the page and
12
+ session coordination. `canvas pages --target-dir <PROJECT>` identifies this project's pages.
13
+ 3. Use live `inspect` (optionally `--id <NODE_OR_GROUP>`) to recover current IDs, revision,
14
+ inputs, tasks and blockers. `inspect --saved` is not live task status. Keep the page open
15
+ for editing and execution; never directly edit `.maker` files.
16
+ 4. Each edit uses the current page ID, canvas ID and revision. Wait for the returned operation
17
+ to finish with `wait`/`status`, then inspect before the next edit. `queued` is not completion.
18
+ Resume original operation/task IDs after interruption; do not replay paid generation.
19
+
20
+ ## Feature routing
21
+
22
+ Read only the matching section or guide. An unavailable provider, blocked card or missing
23
+ template search result does not establish that the whole feature is unsupported.
24
+
25
+ | User goal | UI / CLI support | Read next |
26
+ | -------------------------------------------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------- |
27
+ | Create/edit a canvas or custom workflow | Both; CLI supports advertised card types and editable fields | [Canvas editing](#canvas-editing) |
28
+ | Reuse templates, save personal templates | Both add copies; library save/replace and ZIP exchange are UI-only | [Templates](#templates) |
29
+ | Import/replace images, set references, generate images | Both, subject to the selected provider | [Images and references](#images-and-references) |
30
+ | First-frame / first-last-frame / multi-reference video | Both; mode and source order matter | [Canvas Video](canvas-video.md) |
31
+ | Extract frames, configure and export animation | Both for advertised settings/export; brush and per-frame editing are UI-only | [Sequences](#sequences) |
32
+ | Slice an atlas and export PNG resources | Both through existing resource cards; review before confirmation | [Atlases and UI](#atlases-and-ui) |
33
+ | Recognize UI, prepare Bbox batches, assemble editable UI | Existing Bbox workflow and CLI; follow linked Skills | [Atlases and UI](#atlases-and-ui) |
34
+ | Character views and 3D generation | Both; review before model confirmation | [Models](#models) |
35
+ | Query tasks, recover saving, export results | CLI supports these; no generic task/draft unlock | [Recovery and delivery](#recovery-and-delivery) |
36
+
37
+ ## Canvas editing
38
+
39
+ Use `create`, `open`, `rename`, `add-node`, `update-nodes`, `duplicate`, `group`,
40
+ `connect`, `set-references`, `disconnect`, `delete-nodes`, `save`, `undo` and `redo`.
41
+ Read `capabilities.nodeTypes`, `editable` and `inputs` for supported fields. Derived cards
42
+ require their source; specialized resource cards are not all directly addable with `add-node`.
43
+ Search suitable templates rather than inventing unsupported node types. Adding, arranging
44
+ and configuring cards does not itself authorize generation.
45
+
46
+ ## Templates
47
+
48
+ Search `canvas templates --target-dir <PROJECT> --q KEYWORD`. Check both `presets` and
49
+ `items`; `total` counts personal templates only. Try alternate keywords before concluding
50
+ there is no match. Read matched descriptions and associated Skills, then use `add-template`.
51
+ Copies can be edited independently. AI can also assemble custom workflows from supported cards.
52
+ To save one to My Templates, select at least two cards with an internal connection and use
53
+ the UI's Save as Template menu. External connections are excluded; unresolved tasks and
54
+ missing dependencies can block saving. Personal templates belong to the current project.
55
+ Library save/replace and ZIP import/export are UI-only; `canvas save` saves the canvas,
56
+ not a template. Builtin templates cannot be overwritten. Do not write template JSON directly.
57
+
58
+ ## Images and references
59
+
60
+ Read `canvas model-settings --target-dir <PROJECT>` before generation; obey the selected
61
+ provider and [Asset Policy](assets.md). Use `import --file` for a new card, `fill-slot` for an
62
+ empty image slot, or `replace-image` for an existing image. Import is not template-node completion.
63
+ `set-references` replaces the entire ordered reference list; `[]` clears it. Sources must be
64
+ saved, ready image cards with no dependency cycle. Set prompts/parameters with `update-nodes`;
65
+ these edits preserve old results but may mark them stale. Read `parameterSchema.image` for
66
+ settings; model support is checked against the selected provider. For video references, read
67
+ [Canvas Video](canvas-video.md) before changing connections.
68
+
69
+ ## Sequences
70
+
71
+ Use animation templates or create `sequence` from a ready `video-source` card and `animation`
72
+ from a ready `sequence` card. Read `parameterSchema.sequence` and `sequenceSettings` for frame range, FPS,
73
+ size and background-removal settings. Run the processing step, inspect its result, then export
74
+ `atlas` or `frames`. Brush/per-frame edits and manual duplicate removal stay in the UI;
75
+ do not claim CLI automatic duplicate removal.
76
+
77
+ ## Atlases and UI
78
+
79
+ Read `capabilities.imageAssetsWorkflow` and the matching template. On an existing resource
80
+ card use `preview-image-assets`, visually inspect the preview, then `confirm-image-assets`
81
+ with the current reviewId/revision and export. Preview completion is not final asset approval.
82
+ For editable game UI, read `maker-ui-workflow` at the path supplied by Maker status; for Bbox
83
+ prelayout read `maker-ui-bbox-workflow`. `capabilities.uiWorkflow` describes the supported
84
+ steps. Preserve text removal and source dependencies; PNG export alone is not editable UI.
85
+
86
+ ## Models
87
+
88
+ Read `capabilities.modelWorkflow`: character image -> `model-views` -> inspect every preview
89
+ -> user approval -> `confirm-model` with current reviewId -> query/export. Never use group
90
+ execution to bypass approval. `canvas models` reads saved attempts; `query` checks the original
91
+ task. Follow the existing payment and review gates.
92
+
93
+ ## Recovery and delivery
94
+
95
+ Read `capabilities.recovery` and live `inspect`. `status`/`wait` track a CLI operation; `query`
96
+ checks the original generation task where supported. Unknown is not failed. `save` retries
97
+ saving current page state without rerunning generation; it does not discard drafts or unlock
98
+ tasks. Resolve remaining UI-only blockers in the UI rather than deleting task records.
99
+ For existing results, use `export` with a supported `exportFormats` entry; `--output-dir`
100
+ must be an existing absolute directory. Use `download` for an original export operation.
101
+ Export does not itself prove that a result is installed into the game. Follow the documented
102
+ delivery paths for Bbox UI assembly and 3D models rather than moving cached files manually.