@taptap/maker 0.0.33-beta.1 → 0.0.34-beta.1

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.
@@ -0,0 +1,158 @@
1
+ # Maker 本地控制台
2
+
3
+ 控制台是 Maker CLI 的本机网页入口,随包分发,无需安装前端开发环境。
4
+
5
+ ## 使用
6
+
7
+ 在游戏项目对话中说“打开控制台”,或运行:
8
+
9
+ ```sh
10
+ taptap-maker console open --target-dir <游戏项目绝对路径>
11
+ taptap-maker console status --json
12
+ taptap-maker console stop --json
13
+ ```
14
+
15
+ `open` 自动打开浏览器;加 `--no-open --json` 只返回地址。不指定项目时展示项目列表,
16
+ 不自动选择。相同 Maker 版本从 Codex、WorkBuddy 或独立 CLI 重复打开时复用同一个用户级服务;
17
+ 切换版本前先停止旧控制台。
18
+ 仅支持本机访问,不支持局域网或 SSH 转发。会话地址含访问凭证,不要分享。
19
+
20
+ - 项目列表登记已绑定的本地目录,不扫描磁盘。init/clone 成功后自动登记,
21
+ 已有项目可手动添加;移除记录不删除游戏。
22
+ - 项目页顶部展示本机 Runtime 和独立 maker-lua-lsp 安装状态(是否安装、版本)。Runtime
23
+ 在 `~/.taptap-maker/runtime/` 登记并由所有项目共用,切换项目不会要求重复安装;旧项目级安装
24
+ 会自动登记为本机安装。Lua LSP 未安装不影响控制台连接。已安装 Runtime 时优先显示版本,
25
+ 没有版本时显示安装时间,未安装时可进入现有 Runtime 安装流程。
26
+ - 构建页提供独立“Lua 检查”按钮,检查当前项目 scripts。构建按钮旁默认勾选“构建前检查 Lua”,
27
+ 勾选后先检查,发现 Lua 错误则停止提交和远端构建;取消勾选可直接构建。LSP 未安装时提示
28
+ 环境问题,不把安装缺失当成代码错误。勾选状态保存在本机浏览器。
29
+ - 项目页的构建和本地预览快捷操作会先切换到“构建与测试”。构建调用现有 CLI,可能提交并推送
30
+ 代码;页面显示真实阶段及该阶段的进度,没有有效比例时显示不定进度,不拼接虚假的总进度。
31
+ Git 提交失败和服务端返回的错误默认展开,包含分类、命令、stderr 和下一步,不要求先打开
32
+ 任务详情。最近构建详情和 Runtime 日志使用整行宽度,结果未知时先核实,不自动重试。
33
+ - 本地预览的安装、启动和刷新见[预览指南](MAKER_LOCAL_PREVIEW.md)。
34
+ 预览状态使用中文展示;Runtime 进程仍存活但日志出现资源等错误时,页面保持“运行中”并单独
35
+ 标记日志错误数量,用户可直接查看运行日志。会话 ID、Runtime PID 等技术字段收纳在折叠的
36
+ 诊断信息中,不占用主要状态区域。
37
+ - Lua 检查结果以构建页的检查摘要和问题列表为主;对应失败任务不自动展开,也不重复展示与
38
+ 结构化结果相同的原始输出。完整原始结果仍保留在折叠详情中供排查。
39
+ - Git 页只读展示提交关系、日期和差异;浅克隆的历史不完整,不提供分支或回退操作。
40
+
41
+ ## 控制台插件与 FrameCrate
42
+
43
+ ### 2026-09-16 集成纠正
44
+
45
+ 用户已否定另开浏览器标签的启动器方案。本轮目标是**通用插件注册表 + 持久内嵌完整
46
+ FrameCrate 标签页**;本轮本地验证与独立复核已完成,5 项集成 findings 全部关闭。
47
+ Maker 7 套件 139 项、FrameCrate 46 套件 665 项、两仓库构建及实际内嵌浏览器 9 步通过。
48
+ 控制台 Web 32 项、Russell Maker 83 项及 FrameCrate 61 项通过,无剩余高置信度阻塞问题。
49
+ Maker 全仓 tsc 仍有 287 项基线错误,控制台范围无诊断;FrameCrate 保留既有大 chunk 警告。
50
+ 真实 AI、计价、付费生成和 Windows 仍未验收,不以本地通过替代这些边界。
51
+
52
+ - `src/maker/console/plugins.ts` 维护类型化的可信插件注册表;
53
+ `integrations/framecrate.ts` 只实现 FrameCrate 启动与进程适配,不承载编辑或 AI 业务。
54
+ - `GET /api/state` 的 `plugins` 提供公开插件元数据,不含 Studio token、启动命令或私有环境。
55
+ 页面按元数据展示插件标签,而非硬编码 FrameCrate 专属启动按钮。
56
+ - `POST /api/projects/:key/plugins/:id/open` 只打开注册表中的可信插件,复用 Host、Origin、
57
+ Bearer 校验,并在每次打开或复用前检查登记项目的 realpath 和 Maker 绑定。
58
+ 浏览器不能提交启动命令、安装路径或任意目标 URL;不增加 MCP tool。
59
+
60
+ ### 配置与会话
61
+
62
+ 在启动控制台的进程环境中显式设置 `FRAMECRATE_STUDIO_DIR`,指向已安装依赖并构建前端的
63
+ framepacker Studio 根目录绝对路径。控制台按项目打开内嵌标签,不弹出新窗口。
64
+ 未配置或目录不完整时显示不可用原因;本轮不做安装器、ZIP 下载、插件市场或自动更新。
65
+
66
+ FrameCrate 子进程启动契约为:
67
+
68
+ ```text
69
+ <process.execPath> --import <FRAMECRATE_STUDIO_DIR>/node_modules/tsx/dist/loader.mjs
70
+ <FRAMECRATE_STUDIO_DIR>/server/main.ts --project <已校验的项目 realpath>
71
+ --host-origin <控制台精确 loopback origin>
72
+ ```
73
+
74
+ 这是同一条命令,使用明确 Node、`shell: false` 和 Studio 根目录作为 `cwd`;
75
+ 继承受信启动环境,不从游戏目录解析 Studio 模块,不触发生成、构建、提交或发布。
76
+ `--host-origin` 必须是当前控制台的精确本机 HTTP origin(含端口,无路径),
77
+ 不能替换成通配符、另一端口或仅因同属 loopback 就信任的地址。
78
+
79
+ Studio 就绪 JSON 交付本机 URL 和匹配的 `projectPath`,URL fragment 使用 Studio 自有 token。
80
+ 控制台仅将经校验地址交给对应 iframe,不共享控制台 Bearer 或 PAT;不将 token/URL 写入
81
+ 任务历史、`/api/state` 或 MCP 配置。stderr 仅消费,不转发凭证。Studio 仍独立运行本地服务;
82
+ 内嵌模式的 CSP `frame-ancestors` 仅允许 `--host-origin` 指定宿主,独立启动不开放被嵌入权限。
83
+
84
+ ### 内嵌协议与生命周期
85
+
86
+ - 消息固定使用 `protocolVersion: 1`:宿主发送 `maker-console:connect`,
87
+ 主题变化发送 `maker-console:theme`,子页面回应 `maker-console:plugin-ready`,
88
+ 真实用户活动通知为 `maker-console:plugin-activity`。连接和主题消息携带 `light`/`dark`,
89
+ 插件跟随控制台主题且不维护独立主题状态。
90
+ 双方校验精确 `origin`、窗口 `source`、消息类型与版本,发送时指定目标 origin;
91
+ 消息不传 token,也不是生成、保存、任意命令或自动重试通道。
92
+ - iframe 使用 `sandbox="allow-scripts allow-same-origin allow-downloads allow-modals"`,
93
+ 不允许 popup 或 top navigation;保留本地导入、编辑、导出、工程保存恢复及完整 AI 工作流。
94
+ - 页面按项目与插件标识保留 iframe map,最多 8 个工作区。切换项目或标签只隐藏页面,
95
+ 不删除 DOM、不重写 `src`,不静默淘汰旧工作区。达到上限应拒绝新增并提示先保存。
96
+ 需要重连时由用户明确操作并提示可能丢失未保存编辑,不因超时自动重建 iframe。
97
+ - 同项目复用本控制台拥有的存活子进程;启动中或存活时不得被控制台自动空闲退出误杀。
98
+ 真实插件活动参与有界续期;插件轮询、握手和定时消息不能伪造用户活动。
99
+ 控制台宿主页自身通过有界页面租约保活,不能由 iframe 绕过宿主生命周期。
100
+ 最后一个子进程退出后恢复空闲计时;显式停止仅回收本实例启动的进程,不影响独立 Studio、
101
+ IDE MCP 或 Runtime,也不等于取消已提交的远端视频。
102
+ - ready 子进程正常关闭等待 graceful drain,无强制超时;若它永久挂起,关闭会持续等待,
103
+ 这是避免截断写入的安全取舍,不承诺限时退出。未完成启动的回收仍可强制终止。
104
+
105
+ ### 本轮本地验收(已完成)
106
+
107
+ - 注册表元数据及通用打开路由覆盖合法、未知插件和失效项目;拒绝任意命令/路径。
108
+ - 精确宿主 CSP、独立 token、消息 origin/source/版本校验及 sandbox 权限均有负向测试。
109
+ - 桌面与窄屏真实浏览器中验证完整编辑及 AI 页面;跨标签、跨项目保留未保存编辑、
110
+ 8 个会话容量与超限行为,无弹窗、静默淘汰或自动重新生成。
111
+ - 启动失败、断连、显式重连、空闲及关闭的归属清理已完成本轮回归与独立复核。
112
+ 付费生成仍需单独预算确认;测试桩不得冒充真实 AI 验收。
113
+
114
+ 实际内嵌浏览器证据持久保存在
115
+ `/Users/liangdong/Documents/MakerTools/framecrate-review-evidence/console-plugin-20260916/report.json`,
116
+ 报告 9 步全部通过,包含自刷新 200、重连、项目隔离、PNG/工程输出及窄屏验证;
117
+ 外部请求、生成请求和付费调用均为 0。独立工作台追加 smoke 的 1 次 fixture 提交不是付费生成。
118
+
119
+ ## 生命周期与恢复
120
+
121
+ 服务自动分配空闲端口。控制台页面存活时每分钟续期,重新获得焦点或恢复可见时立即续期;
122
+ 普通状态轮询和健康检查不续期。页面关闭、浏览器退出或租约停止后,无任务时约 30 分钟退出,
123
+ 任务结束后重新计时。关闭浏览器不会终止任务,`stop` 在任务执行中拒绝退出。
124
+ 停止控制台不停止独立 Runtime。
125
+
126
+ Windows 上 `console open` 通过本机 PowerShell/CIM 系统代理创建服务进程,不依赖短命令的
127
+ Node 子进程在 AI IDE 任务树中继续存活。系统代理只传递控制台需要的非敏感环境变量;PAT、
128
+ MAC token、client secret 等凭证不进入启动命令。macOS/Linux 保持 detached Node 启动。
129
+
130
+ 启动锁恢复使用短期 loopback socket 互斥,进程退出后由操作系统释放,不增加额外磁盘互斥锁。
131
+ 已有 `.recovery` 文件仅在持有互斥且确认所属进程不存在时回收;空文件需超过 2 秒。
132
+ 存活、权限不明或内容损坏的非空锁保持拒绝接管。互斥端口被占用时不会干预占用者。
133
+ 升级测试前应结束旧版启动命令;旧版不参与 socket 互斥,无法保证与新版同时恢复空锁的安全性。
134
+
135
+ 断连后重新运行 `console open` 获取新会话地址,旧端口和凭证可能失效。
136
+ 网页不能自行启动已退出的 Node 服务,不设常驻唤醒进程。
137
+ 任务历史和输出有上限,不作永久归档;异常退出时未完成的任务标为“结果待确认”。
138
+ Git 401/403 应检查凭证和项目权限,BLACKLISTED 需管理员解除账号限制。
139
+
140
+ ## 维护约束
141
+
142
+ - 浏览器 `project` 参数是本地登记标识,每次操作显式携带,由服务端解析并验证 realpath
143
+ 与 Maker 绑定,不使用全局当前项目。不同 checkout 分别登记;目录迁移或重绑后需重新添加。
144
+ - 服务仅监听 `127.0.0.1`,校验 Host、Origin 和 Bearer;PAT 不进入网页,
145
+ 会话凭证不写入项目。只开放固定 CLI 操作,不提供任意 shell 或文件浏览。
146
+ - 控制台 Bearer 保留在 URL fragment 中,避免浏览器恢复或新标签重建时因
147
+ `sessionStorage` 隔离而丢失会话。fragment 不会随 HTTP 请求或 Referrer 发送;页面保持
148
+ `no-store`、无远程依赖,并继续执行 Host、Origin 与 Bearer 校验。
149
+ - 项目登记统一使用 Maker user home 的 `projects.json`;写事务加跨进程锁并原子替换。
150
+ 旧控制台列表只迁移一次,登记失败不改变 init/clone 结果。
151
+ 遗留登记锁不能按时间抢占,确认写入进程已停止后才处理提示的 `.lock` 目录。
152
+ - 查询、任务、输出和历史均设上限;退出清理连接、定时器和本实例状态。
153
+ 只清理已确认所有权的进程,不按名称终止。生命周期和存储实现分别见
154
+ `src/maker/console/`、`src/maker/projectRegistry.ts`。
155
+ - macOS/Linux 的 CLI 进程组守卫是 best-effort;同步阻塞可能延迟父进程退出后的回收。
156
+ Windows 控制台服务使用系统代理脱离 AI IDE 任务树;该启动链路仍需 Windows 实机验收。
157
+ 控制台执行的直接 CLI 子进程已覆盖终止测试,辅助进程清理仍需实机验证。
158
+ 固定 Runtime 安装器另有清理确认机制,不能据此推断所有 CLI 子进程均已回收。
@@ -0,0 +1,78 @@
1
+ # Maker 本地窗口预览
2
+
3
+ 本地预览使用官方 Runtime 和随包 ProjectBuilder,在受管理源码副本生成新产物。
4
+ 不提交、不上传、不远端构建,不修改游戏原目录,也不要求安装引擎源码。
5
+ 公共资源由 Runtime 下载和缓存,首次可能下载公共整包。
6
+
7
+ Runtime 按本机安装并由所有 Maker 项目共用,安装记录和新下载版本保存在
8
+ `~/.taptap-maker/runtime/`。项目哈希目录只保存该项目的会话、准备产物、日志和运行缓存。
9
+ 升级前已经安装在项目哈希目录中的有效 Runtime 会自动登记为本机 Runtime,不重复下载,
10
+ 也不会移动或删除可能仍在使用的旧文件。
11
+
12
+ 安装完成和每次启动已登记 Runtime 前,Maker 会补齐 `Data/LuaScripts`、`Data/Fonts`、
13
+ `CoreData`,并在缺少 `Data/Fonts/MiSans-Regular.ttf` 时从 macOS 或 Windows 系统字体中复制
14
+ 一个中文兜底字体。已有同名字体不会被覆盖;找不到可用系统字体时预览仍可启动,但会返回警告。
15
+ 这是本机 Runtime 的通用兜底,不会把任一项目的字体复制进共享 Runtime。各项目自己的字体仍放在
16
+ 项目 `assets/Fonts`,通过项目独立的受管理预览副本加载。显式 `--runtime` 指向的外部 Runtime
17
+ 不会被自动修改。
18
+
19
+ ## 使用
20
+
21
+ `<PROJECT>` 为已绑定 Maker 游戏的绝对目录。插件用户使用当前插件内 CLI。
22
+
23
+ ```sh
24
+ taptap-maker preview install --target-dir <PROJECT> --json
25
+ taptap-maker preview status --target-dir <PROJECT> --json
26
+ taptap-maker preview start --target-dir <PROJECT> --json
27
+ taptap-maker preview refresh --target-dir <PROJECT> --json
28
+ taptap-maker preview logs --target-dir <PROJECT> --json
29
+ taptap-maker preview check --target-dir <PROJECT> --json
30
+ taptap-maker preview stop --target-dir <PROJECT> --json
31
+ ```
32
+
33
+ 安装使用 Python/curl,遵循宿主授权。已有 Runtime 可在 start 时传
34
+ `--runtime <绝对可执行文件路径>`。start/refresh 自动 prepare;
35
+ 单独排查产物可运行 `preview prepare --target-dir <PROJECT> --json`。
36
+ prepare 需要标准 `.project/project.json`,不支持 JSONC/旧根目录配置或外部 `asset_dirs`。
37
+
38
+ 刷新会先关闭旧窗口,重新准备并启动,丢失内存状态;prepare 失败不运行旧 dist。
39
+ 停止或手动关闭后不自动复活。`process_alive=true` 只证明进程存活,`check` 不代表玩法通过。
40
+ 截图、输入脚本、Server/云模拟和游戏存档隔离尚不支持,停止也不保证保存游戏。
41
+
42
+ ## 平台与排障
43
+
44
+ - macOS 通过会话内本机只读资源服务,将本轮 client manifest 交给 Runtime 的 `game_url`;
45
+ Windows 使用本地 manifest 入口,仍需 Windows 实机验收。
46
+ - Windows 预览 supervisor 与控制台复用 PowerShell/CIM 后台启动器,避免依赖 AI IDE
47
+ 短命令的进程生命周期;macOS/Linux 保留 detached 启动。状态中的 `supervisor_log_path`
48
+ 指向项目预览目录下的 supervisor 错误日志。
49
+ - 失败先查看 status、logs 和返回的 `log_path`;Runtime 原始日志位于安装目录
50
+ `logs/game`、`logs/lua`,需按本轮时间判断。进程启动不能代替资源、画面或云能力验收。
51
+ - 安装取消、超时或 CLI 断连后,守卫停止并等待下载辅助进程。无法确认退出时保留带
52
+ `.cleanup-unverified` 标记的安装临时目录并阻止再次安装/更新;确认相关进程已退出后才移除提示的
53
+ 单个目录,不清空 Maker 数据目录。已有可用 Runtime 仍可复用。
54
+ - 失败且 Runtime 已退出时,supervisor 保存原因后退出;显式 start 可重新创建会话。
55
+ 报错但仍存活的 Runtime 不自动关闭;身份未知时不按历史 PID 强制终止。
56
+ - supervisor 意外退出后,只有会话证据身份匹配且记录的 supervisor、Runtime PID 均确认不存在,
57
+ 才将状态判定为已失败且可重新启动。status 保持只读,显式 start 在项目操作锁内替换旧会话;
58
+ stop/check 不要求预先执行 status。任一进程仍存活、权限不足或证据缺失时不自动重启。
59
+
60
+ ## 维护约束
61
+
62
+ - Builder 快照由 `scripts/snapshot-maker-preview-builder.js <UrhoX绝对目录>` 生成。
63
+ 来源版本以 `src/maker/preview/builderSource.ts` 和返回的 `builder_commit` 为准,
64
+ 不在文档重复维护 commit。生成器逐字节核对固定 Git 输入,拒绝修改、未跟踪、
65
+ 忽略、删除及符号链接输入。不要直接修改快照或复制公共资源补丁。
66
+ - 执行 Builder 前校验标准配置和版本路径:版本须为跨平台安全的单个目录名,
67
+ 允许 `{x}` 模板,禁止路径跳转和 Windows 保留名;不得允许配置回退绕过校验。
68
+ 只对受管理副本执行构建及输出清理,保留原项目 UUID 和资源引用语义。
69
+ - macOS 资源服务归独立 supervisor 管理,使用动态 loopback 端口、随机访问路径及
70
+ client manifest 文件白名单,校验 Host 并拒绝浏览器跨源请求,不暴露源码和 server 产物。
71
+ 停止、刷新、启动失败或窗口退出时关闭,不依赖控制台存活。
72
+ - 缓存只清理 Maker 管理且已确认无活跃引用的目录,不跟随链接、不清理外部 Runtime
73
+ 或公共缓存。独立 prepare 保留最近 3 份;本机 Runtime 安装保留当前与上一份,
74
+ 被任一项目活跃会话引用的版本额外保留;
75
+ 证据保留最近 3 个会话、每会话 5 轮。活跃引用和清理未确认目录额外保留。
76
+ 这是数量限制,不是磁盘配额。
77
+ - 强杀 supervisor 可能遗留 Runtime 和下载缓存,不在所有权未知时强行清理。
78
+ Windows 安装器的取消测试不能替代实机辅助进程回收验证。
@@ -160,7 +160,7 @@ macOS/Linux:
160
160
 
161
161
  ```text
162
162
  command: npx
163
- args: ["-y", "-p", "@taptap/maker@0.0.33-beta.1", "taptap-maker"]
163
+ args: ["-y", "-p", "@taptap/maker@0.0.34-beta.1", "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.33-beta.1 -- taptap-maker
268
+ "<绝对 node.exe>" "<绝对 npm-cli.js>" exec --yes --package @taptap/maker@0.0.34-beta.1 -- 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.33-beta.1 taptap-maker help
276
+ npx -y -p @taptap/maker@0.0.34-beta.1 taptap-maker help
277
277
  ```
278
278
 
279
279
  如果终端成功而客户端失败,应继续排查客户端读取的配置、信任状态、PATH、cwd 和子进程启动方式,
@@ -296,7 +296,7 @@ npx -y -p @taptap/maker@0.0.33-beta.1 taptap-maker help
296
296
  作为可选恢复方式,并先备份实际生效的配置:
297
297
 
298
298
  ```bash
299
- npx -y -p @taptap/maker@0.0.33-beta.1 taptap-maker mcp install --launcher self
299
+ npx -y -p @taptap/maker@0.0.34-beta.1 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.33-beta.1 taptap-maker mcp report --ide <client> --target-dir <project> --context-stdin --consent --json
331
+ npx -y --package @taptap/maker@0.0.34-beta.1 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.33-beta.1",
3
+ "version": "0.0.34-beta.1",
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: taptap-maker-local
3
- description: Guide TapTap Maker local development workflows. Use when a user asks to initialize Maker local development, clone/download a Maker project, continue a Maker project, inspect local Maker status, diagnose or report Maker MCP connection/proxy failures, pull, submit, push, or resolve Git conflicts.
3
+ description: Guide TapTap Maker local development workflows, including the official trigger “打开make mcp控制台”, local web console, local preview, and automatic refresh after each related code-edit batch. Use for Maker initialization, clone, project status, console, preview start/refresh/stop and evidence, MCP diagnostics, pull, submit, push, or Git conflicts.
4
4
  ---
5
5
 
6
6
  # TapTap Maker Local Workflow
@@ -26,8 +26,10 @@ This skill covers:
26
26
  - push local commits
27
27
  - explain and resolve conflicts with user approval
28
28
 
29
- Build, submit, push, preview, and verify behavior belongs to the single Maker MCP build tool. The
30
- post-build runtime log polling loop belongs to the local Maker CLI watcher.
29
+ Build, submit, push, and explicitly remote Web preview belong to the Maker MCP build tool.
30
+ Local window preview belongs to the existing Maker CLI, not new MCP tools. Its logs are separate
31
+ from the post-build remote runtime log watcher. Bare preview/run requests must be disambiguated
32
+ using context or a question; they never silently authorize commit/push.
31
33
 
32
34
  Do not infer or set a service environment from preview, build, test, or local-development intent.
33
35
  Do not add environment parameters to Maker tool calls or user MCP config; use the default Maker
@@ -78,18 +80,82 @@ active plugin's marketplace instead of installing or upgrading a standalone Make
78
80
 
79
81
  ## Main Intent Table
80
82
 
81
- | User intent | Required workflow |
82
- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
83
- | initialize / configure / continue Maker local development | Run the Maker CLI initialization workflow. |
84
- | clone / download Maker project locally | Follow "Initialization Workflow"; do not ask for app_id directly. |
85
- | status / is Maker ready | Read `maker://status`, call `maker_status_lite` if resources are unavailable, then follow `AGENTS.md` and `Maker remote sync` hints if present. |
86
- | upgrade Maker MCP / old project policy | Follow the active distribution's update skill. Plugin users update through the active plugin's marketplace; standalone MCP users run `taptap-maker upgrade` for the current project only. |
87
- | submit / commit / push to Maker | Inspect local Git state, summarize changed files, then call `maker_build_current_directory` unless blocked. |
88
- | pull / update from remote | Inspect local changes first; if dirty, explain options before pulling. |
89
- | conflict / merge failed | Explain why the conflict happened, list conflict files, inspect conflict hunks, propose a resolution plan, and ask before editing. |
90
- | build / preview / run / check game result | Use `maker_build_current_directory`; it starts the local runtime log watcher after a successful remote build result. |
91
- | generic code validation / tests / lint | Do not use Maker remote build unless the user explicitly asks to build, run, or preview the Maker game. |
92
- | MCP unavailable / proxy timeout / unexpected server error | Diagnose first; offer one consent-gated GitHub issue report when the evidence suggests an MCP, proxy, client integration, or service defect. |
83
+ | User intent | Required workflow |
84
+ | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
85
+ | open console / 打开控制台 / 打开make mcp控制台 | Run the active distribution's CLI `console open --target-dir <CURRENT_GAME_ABSOLUTE_PATH> --json`. Without a known game directory, omit target-dir to show the project list; never guess or choose the first project. |
86
+ | initialize / configure / continue Maker local development | Run the Maker CLI initialization workflow. |
87
+ | clone / download Maker project locally | Follow "Initialization Workflow"; do not ask for app_id directly. |
88
+ | status / is Maker ready | Read `maker://status`, call `maker_status_lite` if resources are unavailable, then follow `AGENTS.md` and `Maker remote sync` hints if present. |
89
+ | upgrade Maker MCP / old project policy | Follow the active distribution's update skill. Plugin users update through the active plugin's marketplace; standalone MCP users run `taptap-maker upgrade` for the current project only. |
90
+ | submit / commit / push to Maker | Inspect local Git state, summarize changed files, then call `maker_build_current_directory` unless blocked. |
91
+ | pull / update from remote | Inspect local changes first; if dirty, explain options before pulling. |
92
+ | conflict / merge failed | Explain why the conflict happened, list conflict files, inspect conflict hunks, propose a resolution plan, and ask before editing. |
93
+ | build / submit / push / explicitly remote Web preview | Use `maker_build_current_directory`; preserve its original authorization and remote log watcher. |
94
+ | local preview / refresh preview / stop preview | Follow Local Window Preview below; use CLI with explicit project path, never remote build. |
95
+ | finish a related code-edit batch | Query real local preview status; automatically refresh only a live session, then collect evidence. |
96
+ | bare preview / run / check game result | Resolve local vs remote from explicit context; if ambiguous ask, never silently commit. |
97
+ | generic code validation / tests / lint | Do not use Maker remote build without an explicit remote build request. |
98
+ | MCP unavailable / proxy timeout / unexpected server error | Diagnose first; offer one consent-gated GitHub issue report when the evidence suggests an MCP, proxy, client integration, or service defect. |
99
+
100
+ ## Local Web Console
101
+
102
+ Use the active Maker CLI/bundle for `console open`, not an unversioned npm package.
103
+ Opening the console only starts/reuses a loopback service, registers the explicit project
104
+ directory and opens its page. It does not authorize build, push, Runtime installation or preview.
105
+ Do not call init, build or preview just to open it. A missing/invalid directory is a selection
106
+ problem, not permission to clone a game.
107
+
108
+ The user selects the operation in the console. Each operation passes the selected project's
109
+ absolute target directory to the CLI. `console status --json` inspects the service;
110
+ `console stop --json` stops it only when no task is active. If a different Maker bundle owns
111
+ the running service, ask before stopping it. Never expose PAT or copy local session credentials
112
+ into project files. Console errors retain the CLI result; unknown results require verification,
113
+ not an automatic retry.
114
+
115
+ ## Local Window Preview
116
+
117
+ Use the active distribution's Maker CLI and the current real Maker project absolute path as
118
+ `--target-dir`; never guess a business project from the dialogue directory. Every command supports
119
+ `--json`. Local preview does not require Git clean, commit, push, PAT, or remote build.
120
+
121
+ 1. For an explicit local-preview request, run `taptap-maker preview status --target-dir <PROJECT> --json`.
122
+ If Runtime is missing, follow host approval for downloading/installing with
123
+ `taptap-maker preview install --target-dir <PROJECT> --json`, then start. Installation requires
124
+ Python and curl; do not install dependencies or bypass client approval silently.
125
+ Explain that preparation and Runtime may download public indexes/assets. Start/refresh prepare
126
+ a managed copy automatically; `preview prepare` diagnoses preparation alone. Platform support,
127
+ installation recovery and cache behavior are documented in `docs/MAKER_LOCAL_PREVIEW.md`.
128
+
129
+ 2. Run `taptap-maker preview start --target-dir <PROJECT> --json`. Report process launch only,
130
+ not game readiness. Never substitute validate/headless mode or remote build.
131
+ 3. After **each batch of related code/resource changes**, actually run preview status again.
132
+ If `process_alive=true`, automatically run preview refresh and collect logs/check.
133
+ This includes a failed-but-live Runtime after Lua fixes. Do not merely remind the user to refresh.
134
+ If stopped, missing, or ownership is unknown, do not start or revive the session.
135
+ 4. Explicit refresh also only refreshes an active session. Tell the user it is a restart and loses
136
+ in-memory state. Merge related edits into batches; do not restart on every file save. The CLI
137
+ coalesces overlapping refreshes, with stop/cancel taking priority. No default file watcher exists;
138
+ edits from other editors/agents need explicit refresh unless they follow this same rule.
139
+ 5. For stop, run `taptap-maker preview stop --target-dir <PROJECT> --json`. Manual window close
140
+ is detected by status. Never kill by process name or trust a stored PID alone.
141
+ 6. Fetch current evidence with `preview logs` and `preview check`, each with
142
+ the same `--target-dir`. Incremental logs use the returned `--session-id`, `--reload-id`,
143
+ `--cursor` and optionally `--limit` (1–500). Reset cursor after a reload. Keep local evidence
144
+ separate from `.maker/logs/runtime/`, which belongs to the remote watcher.
145
+
146
+ Process launch and clean logs do not prove gameplay or visual correctness. Do not promise
147
+ screenshots, input automation or cloud/server emulation; these are not supported.
148
+
149
+ Only an AI authorized to modify the game may fix it. Bound automatic fixes to two attempts and an
150
+ agreed time budget, permit cancellation, refresh after each attempt, and return remaining failures
151
+ and evidence. Without modification authorization only report.
152
+
153
+ Runtime preflight must prove that the client can run independently from project configuration,
154
+ entry and dependencies. Server-required or unknown dependencies block local preview. There is no
155
+ local Server, cloud mock, or supported local-client/remote-server bridge. Preserve
156
+ remote build for the full Server experience. Do not classify shared scripts by filename suffix,
157
+ inject stubs, delete old dist/manifest files, copy whole resource libraries, or silently fetch
158
+ official-res/uuid assets. Explain missing references/cache state and seek approval for retrieval.
93
159
 
94
160
  ## Create New Maker Project Intent
95
161
 
@@ -134,10 +200,10 @@ This policy overrides generic local Git skills and generic Git workflows wheneve
134
200
  directory is a Maker project, which means `.maker-mcp/config.json` exists in the project or one of
135
201
  its parents.
136
202
 
137
- Use `maker_build_current_directory` for submit, push, build, preview, run, and game result
203
+ Use `maker_build_current_directory` for submit, push, build, explicitly remote Web preview, and remote game result
138
204
  verification requests in a bound Maker project.
139
205
  Do not treat generic code checks like "验证代码", "跑测试", "lint", or "检查实现" as Maker
140
- remote build unless the user explicitly asks to build, run, or preview the Maker game.
206
+ remote build unless the user explicitly asks for the remote build workflow. Local preview uses CLI.
141
207
  Do not create feature branches, task branches, PR/MR. Do not create task-id based Git flows for
142
208
  Maker project submit/build work. Do not run generic Git commit/push helpers as a replacement for
143
209
  the Maker MCP tool.
@@ -199,8 +265,9 @@ supports it. Follow the selected tool schema when one of these tools is used.
199
265
  document before editing ad code or testing ad behavior.
200
266
  - Do not infer ad readiness from local SDK docs, `.maker-mcp/config.json`, or runtime callbacks.
201
267
  If the primary local project configs are missing, keep ad config unavailable and do not call the
202
- remote tool. Build only for an explicit user build/submit/preview request. If a successful build
268
+ remote tool. Build only for an explicit user build/submit/remote Web preview request. If a successful build
203
269
  still leaves local configs missing, explain the known limitation and do not automatically rebuild.
270
+ - Local window preview uses CLI and does not authorize commit or push.
204
271
  - If `get_ad_config` reports missing `app_id` or `developer_id`, call `generate_test_qrcode` once
205
272
  to generate test QR code metadata, then call `get_ad_config` again. Do not use publish-only tools
206
273
  for this recovery path.
@@ -393,7 +460,7 @@ request/correlation ID, reproduction steps, visible Maker tools, client version,
393
460
  Do not include the complete conversation. Send that JSON through stdin, never argv, while running:
394
461
 
395
462
  ```text
396
- npx -y --package @taptap/maker@0.0.33-beta.1 taptap-maker mcp report --ide <client> --target-dir <project> --context-stdin --consent --json
463
+ npx -y --package @taptap/maker@0.0.34-beta.1 taptap-maker mcp report --ide <client> --target-dir <project> --context-stdin --consent --json
397
464
  ```
398
465
 
399
466
  Prefer the active client's exact Maker MCP `command` plus ordered `args`, then append the `mcp
@@ -719,7 +786,7 @@ unless the user asks. Summaries should be understandable to non-programmers:
719
786
  - why these files are being submitted
720
787
  - whether any generated or suspicious files are included
721
788
 
722
- For normal build/preview/game-result verification requests, a clean workspace still goes through
789
+ For normal remote build/Web-preview/game-result verification requests, a clean workspace still goes through
723
790
  `maker_build_current_directory`; Maker MCP creates and pushes an empty
724
791
  `chore: wake maker build server` commit before remote build to wake the Maker server.
725
792
  Only skip submit/push when the user explicitly asks to build the committed remote version.