@ttmg/cli 0.4.6-vibe-beta.3 → 0.4.6-vibe-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -193,11 +193,13 @@ The upload command packages the project and creates a new Developer Platform
193
193
  version. With `--preview`, it also waits for platform processing and returns the
194
194
  preview payload.
195
195
  上传命令会打包项目并在 Developer Platform 创建新版本;增加 `--preview` 后还会等待平台处理完成并返回预览地址。
196
- The upload ZIP excludes the root `.agent`, `.claude`, and `.trae` directories.
197
- 上传 ZIP 不包含项目根目录下的 `.agent`、`.claude` 和 `.trae`。
196
+ The upload ZIP excludes the root `.agents`, `.claude`, and `.trae` directories.
197
+ 上传 ZIP 不包含项目根目录下的 `.agents`、`.claude` 和 `.trae`。
198
198
 
199
199
  ```
200
200
  ttmg upload --preview --client-key <client-key> --dir <game-dir> --format ndjson
201
+ ttmg upload --preview --serve-preview-page --client-key <client-key> --dir <game-dir> --format ndjson
202
+ ttmg upload --preview --serve-preview-page --client-key <client-key> --dir <game-dir>
201
203
  ```
202
204
 
203
205
  The NDJSON states are `precheck`, `packaging`, `uploading`,
@@ -206,7 +208,24 @@ the identical `qrPayload`, the platform version URL, and `platformWrite: true`.
206
208
  During platform processing, `platformStatus` uses readable values such as
207
209
  `waiting_for_asset`, `pending`, `processing`, `success`, and `failed`; the
208
210
  optional `platformStatusRaw` retains the original platform enum for debugging.
211
+ With `--serve-preview-page`, every successful upload returns a new
212
+ `previewPage.url`. The responsive local page guides users through test-account
213
+ authorization and preview launch with two QR codes and direct links. Its HTML
214
+ and QR images remain in memory. Repeated uploads for the same Client Key reuse
215
+ one localhost service: the new URL replaces the previous page immediately and
216
+ renews the one-hour TTL. When the page expires, its QR content is removed from
217
+ memory and the same URL shows a retry command for one more hour before the
218
+ service exits. Different Client Keys use independent services. In default text
219
+ mode the CLI prints a browser-oriented result block and opens the page in the
220
+ default browser; `--no-open` suppresses that action. JSON and NDJSON modes never
221
+ open a system browser and instead return a `presentation` contract with
222
+ `preferredAction: "open_url"` and a clickable-link fallback for Agents. Only
223
+ minimal process-coordination metadata is stored in the operating system's temp
224
+ directory; no page assets are written to the project or disk. If the local page
225
+ fails, the platform upload remains `ready` and `previewPage.status` is `failed`,
226
+ so callers must not retry the upload just to recreate the page.
209
227
  NDJSON 状态依次为 `precheck`、`packaging`、`uploading`、`processing`,最终进入 `ready` 或 `failed`。平台处理阶段的 `platformStatus` 使用 `waiting_for_asset`、`pending`、`processing`、`success`、`failed` 等可读值;可选的 `platformStatusRaw` 仅保留平台原始枚举用于排障。成功结果包含 `previewUrl`、与其一致的 `qrPayload`、平台版本地址和 `platformWrite: true`。
228
+ 增加 `--serve-preview-page` 后,每次成功上传都会返回新的 `previewPage.url`。响应式本地页面通过两个二维码和直接链接依次承接测试账号授权与预览启动;HTML 和二维码只驻留内存。同一个 Client Key 反复上传时复用同一个 localhost 服务,新地址会立即替换旧页面并重新计算 1 小时有效期;到期后清除内存中的二维码,原地址继续显示 1 小时的重新执行提示,随后服务退出。不同 Client Key 使用独立服务。默认文本模式会打印浏览器展示信息并自动打开页面,`--no-open` 可关闭自动打开;JSON 和 NDJSON 模式不会调用系统浏览器,而是返回 `preferredAction: "open_url"` 和链接降级方式供 Agent 执行。系统临时目录只保存最小进程协同信息,不写入页面资源或项目内容。如果本地页面失败,平台上传仍保持 `ready`,并通过 `previewPage.status=failed` 返回局部失败;调用方不能为重新生成页面而重复上传。
210
229
 
211
230
  - 调试 H5 小游戏:
212
231
  - To debug H5 mini-games: