@ttmg/cli 0.4.6-vibe-beta.22 → 0.4.6-vibe-beta.23

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,522 @@
1
+ {
2
+ "catalogVersion": "sha256:f1d67b08cfbfb9396cba1ec246a84a4c1b6b2c9f077e236498c42e9c154b6900",
3
+ "source": "bundled",
4
+ "categories": [
5
+ {
6
+ "value": "Action",
7
+ "subcategories": [
8
+ {
9
+ "value": "Artillery Shooter",
10
+ "description": "Turn based tactics game in which players aim and shoot other players"
11
+ },
12
+ {
13
+ "value": "Asymmetric Battle",
14
+ "description": "Game in which different players have different roles and capabilities as well as win condition (e.g. Identity 5)"
15
+ },
16
+ {
17
+ "value": "Brawl",
18
+ "description": "Multiplayer battle where player controls a character in team deathmatch battle without aiming a gun"
19
+ },
20
+ {
21
+ "value": "Fighting",
22
+ "description": "A game where the player controls a character to fight against other characters"
23
+ },
24
+ {
25
+ "value": "MOBA",
26
+ "description": "Multiplayer battle arena where the player controls a character on a team to destroy an enemy base"
27
+ },
28
+ {
29
+ "value": "Music & Rhythm",
30
+ "description": "Games that feature music as the primary gameplay driver"
31
+ },
32
+ {
33
+ "value": "Open World",
34
+ "description": "Action game in which players can explore the world and attempt objectives freely"
35
+ },
36
+ {
37
+ "value": "Platformer",
38
+ "description": "A game where players complete stages by avoiding obstacles and jumping between platforms"
39
+ },
40
+ {
41
+ "value": "Royale Battle",
42
+ "description": "Battle royale game (many players compete but with a single winner) that is action based and not a shooter"
43
+ },
44
+ {
45
+ "value": "Run & Gun Platformer",
46
+ "description": "Action games similar to side-scrolling platformers, but players are typically battling an onslaught of enemies appearing in front or behind them"
47
+ },
48
+ {
49
+ "value": "Runner",
50
+ "description": "A game where the player automatically progresses and must avoid obstacles to continue"
51
+ },
52
+ {
53
+ "value": "Shark",
54
+ "description": "Game in which the player eats other objects in the game to grow or stay alive"
55
+ },
56
+ {
57
+ "value": "Shoot'em Up",
58
+ "description": "A game where a lone unit (usually a spaceship) shoots projectiles against a large number of other enemies. Generally in a 2D movement space"
59
+ },
60
+ {
61
+ "value": "Slicing (Slasher)",
62
+ "description": "Game in which the main objective is to cut objects into pieces using a swiping motion"
63
+ },
64
+ {
65
+ "value": "Stealth",
66
+ "description": "Game where the player attempts to sneak around a game world and achieve objectives or escape"
67
+ },
68
+ {
69
+ "value": "Adventure",
70
+ "description": "Focuses on the actions themselves (shooting, twitch combat, etc.) or exploration of the world instead (finding non-gameplay collectables, solving puzzles, etc.) - Super Mario"
71
+ },
72
+ {
73
+ "value": "Beat 'em up",
74
+ "description": "Featuring hand-to-hand combat between the protagonist and an improbably large number of opponents."
75
+ },
76
+ {
77
+ "value": "Other Action",
78
+ "description": "Other general action gameplay or games that feature arcade-style gameplay"
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "value": "Match",
84
+ "subcategories": [
85
+ {
86
+ "value": "Blast-Meta",
87
+ "description": "Blast-style game with a heavy emphasis on an investable meta game system"
88
+ },
89
+ {
90
+ "value": "Blast-Saga",
91
+ "description": "Game where primary mechanic involves blasting/removing adjacent like items with saga based progression"
92
+ },
93
+ {
94
+ "value": "Bubble Shooter",
95
+ "description": "Game where bubbles are shot at different angles clearing groups of bubbles arranged on top of screen"
96
+ },
97
+ {
98
+ "value": "Connect Tiles",
99
+ "description": "Game in which two like tiles are linked via a pathway on a board and removed from the board"
100
+ },
101
+ {
102
+ "value": "Line-Saga",
103
+ "description": "Game where a line is created between like items to remove them from the board with saga based progression"
104
+ },
105
+ {
106
+ "value": "M3-Meta",
107
+ "description": "Match 3 swapping game with a focus on some form of building in its meta game"
108
+ },
109
+ {
110
+ "value": "M3-Saga",
111
+ "description": "Primary gameplay mechanism is matching 3 items on screen and swapping matched items"
112
+ },
113
+ {
114
+ "value": "Merge-Saga",
115
+ "description": "Game with focus on merging like items to create more powerful units or items and utilizing saga based progression"
116
+ },
117
+ {
118
+ "value": "Other-Meta",
119
+ "description": "Other match style game with a heavy emphasis on an investable meta game system"
120
+ },
121
+ {
122
+ "value": "Other Match",
123
+ "description": "Other kind of matching game"
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "value": "Puzzle",
129
+ "subcategories": [
130
+ {
131
+ "value": "Block Puzzle",
132
+ "description": "Game in which players need to fit different shaped block pieces to fit onto a game board efficiently"
133
+ },
134
+ {
135
+ "value": "Brain Puzzle",
136
+ "description": "Knowledge or intelligence-based puzzle games"
137
+ },
138
+ {
139
+ "value": "Brick-crusher",
140
+ "description": "A bubble shooter game featuring many balls shot, high action, and real time (not turn based) gameplay"
141
+ },
142
+ {
143
+ "value": "Detective",
144
+ "description": "Game in which players must solve puzzles based on various clues and involves solving a narrative arc"
145
+ },
146
+ {
147
+ "value": "Hidden Object",
148
+ "description": "Games where the primary objective is identifying visual elements"
149
+ },
150
+ {
151
+ "value": "Hybrid Puzzle",
152
+ "description": "Puzzle game involving multiple types of puzzles instead of focusing on just one"
153
+ },
154
+ {
155
+ "value": "Jigsaw",
156
+ "description": "Jigsaw puzzle game"
157
+ },
158
+ {
159
+ "value": "Klotski",
160
+ "description": "A sliding block puzzle game"
161
+ },
162
+ {
163
+ "value": "Maze",
164
+ "description": "Game in which players must determine paths out of a maze"
165
+ },
166
+ {
167
+ "value": "Minesweeper",
168
+ "description": "Games similar to the classic Minesweeper game"
169
+ },
170
+ {
171
+ "value": "Nonogram",
172
+ "description": "Game in which cells in a grid are colored or left blank according to numbers on the side of a grid to reveal a hidden picture"
173
+ },
174
+ {
175
+ "value": "Physics",
176
+ "description": "Games that utilize a physics engine-based primary gameplay mechanism"
177
+ },
178
+ {
179
+ "value": "Room Escape",
180
+ "description": "Puzzles focused on progressing a player to escape from a room or building"
181
+ },
182
+ {
183
+ "value": "Spot the Difference",
184
+ "description": "Matching images and determining the difference between the images"
185
+ },
186
+ {
187
+ "value": "Sudoku",
188
+ "description": "Sudoku based game"
189
+ },
190
+ {
191
+ "value": "Tile-Matching",
192
+ "description": "Game in which tiles are matched to remove them from the game board (like Tetris)"
193
+ },
194
+ {
195
+ "value": "Word",
196
+ "description": "Word Games"
197
+ },
198
+ {
199
+ "value": "Other Puzzle",
200
+ "description": "Puzzle-based games that do not fall into the above categories"
201
+ }
202
+ ]
203
+ },
204
+ {
205
+ "value": "Racing",
206
+ "subcategories": [
207
+ {
208
+ "value": "Arcade Racing",
209
+ "description": "Casual and fun racing arcade type of game"
210
+ },
211
+ {
212
+ "value": "Competitive Racing",
213
+ "description": "PVP Racing that can use a variety of control schemes"
214
+ },
215
+ {
216
+ "value": "Simulation Racing",
217
+ "description": "Simulated game of realistic racing"
218
+ }
219
+ ]
220
+ },
221
+ {
222
+ "value": "RPG",
223
+ "subcategories": [
224
+ {
225
+ "value": "Empire Simulation RPG",
226
+ "description": "RPG game in which the player rules an empire or kingdom of some kind"
227
+ },
228
+ {
229
+ "value": "Idle RPG",
230
+ "description": "Squad based RPG that includes idle progression mechanics"
231
+ },
232
+ {
233
+ "value": "Location RPG",
234
+ "description": "Game where location plays a critical component in the core gameplay"
235
+ },
236
+ {
237
+ "value": "MMORPG",
238
+ "description": "Massively multiplayer online role-playing game typically featuring worlds or servers with hundreds or thousands of players online simultaneously"
239
+ },
240
+ {
241
+ "value": "Open World RPG",
242
+ "description": "RPG game where players traverse an open world relatively freely"
243
+ },
244
+ {
245
+ "value": "Puzzle RPG",
246
+ "description": "RPG games that utilize a puzzle system as the primary combat mechanism"
247
+ },
248
+ {
249
+ "value": "Roguelike ARPG",
250
+ "description": "ARPG with roguelike (sub-genre of role-playing games characterized by the exploration of randomly-generated dungeons and permanent death) gameplay elements (e.g. Hades)"
251
+ },
252
+ {
253
+ "value": "Survival",
254
+ "description": "RPG based game with a strong focus on crafting mechanics"
255
+ },
256
+ {
257
+ "value": "Tactics",
258
+ "description": "RPG game involving turn based movement of different characters on a tile-based map"
259
+ },
260
+ {
261
+ "value": "Team Battle",
262
+ "description": "RPG where you control multiple characters to advance the gameplay and story"
263
+ },
264
+ {
265
+ "value": "Tower Defense RPG",
266
+ "description": "Tower defense game with a strong emphasis on character collection and stateful upgrading"
267
+ },
268
+ {
269
+ "value": "Other RPG",
270
+ "description": "Other RPG Game"
271
+ }
272
+ ]
273
+ },
274
+ {
275
+ "value": "Shooting",
276
+ "subcategories": [
277
+ {
278
+ "value": "Battle Royale",
279
+ "description": "Shooter game in which battle royale is the primary game mode"
280
+ },
281
+ {
282
+ "value": "Cover-fire",
283
+ "description": "Shooting game where the player takes cover and shoots out of cover"
284
+ },
285
+ {
286
+ "value": "PvE Shooting",
287
+ "description": "Shooter game in which players primarily battle against computer generated, player-vs-environment enemies"
288
+ },
289
+ {
290
+ "value": "Sniper",
291
+ "description": "Shooting game focused on small number of accurate shots through a scope"
292
+ },
293
+ {
294
+ "value": "Team Deathmatch",
295
+ "description": "Shooter game in which team deathmatch is the primary gameplay mode"
296
+ }
297
+ ]
298
+ },
299
+ {
300
+ "value": "Simulation",
301
+ "subcategories": [
302
+ {
303
+ "value": "Animal Avatar",
304
+ "description": "Game in which players take the form and play as an animal in a virtual world"
305
+ },
306
+ {
307
+ "value": "Avatar Life",
308
+ "description": "Simulated life based on avatars in an alternate reality world"
309
+ },
310
+ {
311
+ "value": "Build Breed",
312
+ "description": "Games in which the player grows a city used to breed creatures for combat"
313
+ },
314
+ {
315
+ "value": "Building",
316
+ "description": "Games focused on building up a city with limited/no focus on combat"
317
+ },
318
+ {
319
+ "value": "Creative Sandbox",
320
+ "description": "Players have tools to create user generated levels or games shared with the overall game community"
321
+ },
322
+ {
323
+ "value": "Dress Up & Lifestyle",
324
+ "description": "Games built around dressing up avatars and simulated life-like experiences with emphasis on lifestyle"
325
+ },
326
+ {
327
+ "value": "Driving",
328
+ "description": "Games where the primary gameplay loop is centered around simulating driving or parking (non-competitive)."
329
+ },
330
+ {
331
+ "value": "Farming",
332
+ "description": "Farming-based simulation titles"
333
+ },
334
+ {
335
+ "value": "Home Design",
336
+ "description": "Games involving decorating homes"
337
+ },
338
+ {
339
+ "value": "Idle",
340
+ "description": "Games where game progression continues even when a player leaves the game session"
341
+ },
342
+ {
343
+ "value": "Idol Training Sim",
344
+ "description": "Game in which players train and level up Japanese style idols against different types of activities or professions"
345
+ },
346
+ {
347
+ "value": "Life Simulator",
348
+ "description": "Simulation of a virtual character from birth to death in which the player makes different life choices"
349
+ },
350
+ {
351
+ "value": "Manager",
352
+ "description": "Games simulating the management of a team or business"
353
+ },
354
+ {
355
+ "value": "Pet",
356
+ "description": "Games where the primary gameplay loop is centered around raising a pet (non-combat)"
357
+ },
358
+ {
359
+ "value": "Time Management",
360
+ "description": "Simulation games where players are challenged to complete tasks or quests within a specific (usually short) time frame"
361
+ },
362
+ {
363
+ "value": "Weapon Simulator",
364
+ "description": "Video game that focuses on simulating the experience of using various weapons. These games aim to provide players with a realistic or immersive representation of different types of firearms, melee weapons, or other tools used in combat"
365
+ },
366
+ {
367
+ "value": "Other Sim",
368
+ "description": "Other Sim/Management games"
369
+ }
370
+ ]
371
+ },
372
+ {
373
+ "value": "Sports",
374
+ "subcategories": [
375
+ {
376
+ "value": "Arcade Sports",
377
+ "description": "Sports games where gameplay focuses on non-realistic simulation of gameplay"
378
+ },
379
+ {
380
+ "value": "Simulation Sports",
381
+ "description": "Sports games where the gameplay focuses on realistic simulation of gameplay"
382
+ },
383
+ {
384
+ "value": "Team Manager",
385
+ "description": "Sports games where the player focuses on manage a team"
386
+ },
387
+ {
388
+ "value": "Other Sports",
389
+ "description": "Other Sports Games"
390
+ }
391
+ ]
392
+ },
393
+ {
394
+ "value": "Strategy",
395
+ "subcategories": [
396
+ {
397
+ "value": "4X March-Battle",
398
+ "description": "Games where player grows a city, builds an army that attacks through timed marches on a map"
399
+ },
400
+ {
401
+ "value": "Auto Chess",
402
+ "description": "Tactical strategy game with drafting and in which play is conducted PVP in multiple rounds"
403
+ },
404
+ {
405
+ "value": "Build-Battle",
406
+ "description": "Games focused on building troops that attack enemies and can be lost. City building is usually used to upgrade troops."
407
+ },
408
+ {
409
+ "value": "CCG-Battle",
410
+ "description": "Strategy game based on card decks typically associated with mana costs to play"
411
+ },
412
+ {
413
+ "value": "Lane-Battle",
414
+ "description": "Strategy game involving multiple lanes where units are sent down a specific lane to battle"
415
+ },
416
+ {
417
+ "value": "Legion Battle",
418
+ "description": "Game with a focus on building different types of army units and battling other players' armies"
419
+ },
420
+ {
421
+ "value": "Summon-Battle",
422
+ "description": "Games where units are summoned via some means (e.g., cards or mana) and then auto-battle"
423
+ },
424
+ {
425
+ "value": "Tower Defense Strategy",
426
+ "description": "Games where players establish defenses against NPC enemies that attack the player at regular intervals"
427
+ },
428
+ {
429
+ "value": "RTS",
430
+ "description": "Real-time Strategy is a strategy game that allow all users to play simultaneously instead of processing incrementally in turns"
431
+ },
432
+ {
433
+ "value": "Other Strategy",
434
+ "description": "Other strategy games"
435
+ }
436
+ ]
437
+ },
438
+ {
439
+ "value": "Party",
440
+ "subcategories": [
441
+ {
442
+ "value": "Guess Something",
443
+ "description": "Social game in which players must guess what another player has in mind from different kinds of hints or drawings"
444
+ },
445
+ {
446
+ "value": "Karaoke",
447
+ "description": "A Karaoke game is a type of video or computer game that simulates the experience of karaoke singing"
448
+ },
449
+ {
450
+ "value": "Dancing",
451
+ "description": "Video game that involves gameplay elements centered around dance and rhythm. These games often require players to mimic dance moves or follow on-screen prompts in synchronization with music."
452
+ },
453
+ {
454
+ "value": "Mafia/Betrayal",
455
+ "description": "Mafia based game"
456
+ },
457
+ {
458
+ "value": "Mini Games Collection",
459
+ "description": "Multiplayer social game in which players can choose to play from a collection of multiple minigames"
460
+ },
461
+ {
462
+ "value": "Party Royale",
463
+ "description": "Party based battle royale game"
464
+ },
465
+ {
466
+ "value": "Quiz",
467
+ "description": "Game involving trivia or quizzes"
468
+ },
469
+ {
470
+ "value": "Other Party",
471
+ "description": "Other party game"
472
+ }
473
+ ]
474
+ },
475
+ {
476
+ "value": "Tabletop",
477
+ "subcategories": [
478
+ {
479
+ "value": "Board Game",
480
+ "description": "Board game is a game that involves the movement of counters or other objects round a board."
481
+ },
482
+ {
483
+ "value": "Card Games",
484
+ "description": "[Non gambling] A card game is any game using playing cards as the primary device with which the game is played, be they traditional or game-specific"
485
+ },
486
+ {
487
+ "value": "Chess",
488
+ "description": "Chess is a board game for two players, called White and Black. It is sometimes called international chess or Western chess"
489
+ },
490
+ {
491
+ "value": "Dice",
492
+ "description": "Dice games are games that use or incorporate one or more dice as their sole or central component, usually as a random device"
493
+ },
494
+ {
495
+ "value": "Ludo",
496
+ "description": "Ludo is a strategy board game for two to four players, in which the players race their four tokens from start to finish according to the rolls of a single die"
497
+ },
498
+ {
499
+ "value": "Othello",
500
+ "description": "Game based on the classic Othello game"
501
+ },
502
+ {
503
+ "value": "Solitaire",
504
+ "description": "Solitaire games are card based games that can be played by a single player."
505
+ },
506
+ {
507
+ "value": "Other Tabletop",
508
+ "description": "Other tabletop game"
509
+ }
510
+ ]
511
+ },
512
+ {
513
+ "value": "Other",
514
+ "subcategories": [
515
+ {
516
+ "value": "Other",
517
+ "description": "Game that doesn't fit in any of the other categories"
518
+ }
519
+ ]
520
+ }
521
+ ]
522
+ }
package/vibe-upload.md CHANGED
@@ -1,10 +1,9 @@
1
- # Vibe Upload and Preview
1
+ # Vibe 扫码授权与上传
2
2
 
3
- `ttmg upload --vibe` 将本地小游戏上传到 TikTok Mini Games。用户提供游戏标题和头像,在手机 TikTok 扫码授权后,CLI 自动完成头像、应用资料和代码包上传。Skill 负责准备工程、调用命令和读取结果;CLI 负责素材校验、打包、授权轮询及上传。
4
3
 
5
- `0.4.6-vibe-beta.22` 支持手机授权、自动上传、同任务轮询和双二维码预览,并兼容后端返回的 TikTok 客户端授权地址。NDJSON 模式下,即使 Skill 将 stdout 保存到文件,控制台仍会在扫码页就绪时显示 `page: <url>`。左侧保留原码用于「查看进度」,右侧从加载态切换为「扫码预览」。页面按浏览器语言显示中英文。当前为 PPE 测试链路,上传完成不代表审核通过或正式发布。
4
+ `ttmg upload --vibe` 将本地小游戏上传到 TikTok Mini Games。用户提供游戏标题和头像,在手机 TikTok 扫码授权后,CLI 自动完成头像、应用资料和代码包上传。Skill 负责准备工程、调用命令和读取结果;CLI 负责素材校验、打包、授权轮询及上传。
6
5
 
7
- Version `0.4.6-vibe-beta.22` supports phone authorization, automatic upload, same-task polling and two QR codes, including TikTok client authorization URLs returned by the backend. In NDJSON mode, the console shows `page: <url>` when the scan page is ready, even if the Skill saves stdout to a file. Check progress remains on the left, and the preview loader or QR appears on the right. This is a PPE trial; upload success is not review approval or production release.
6
+ `0.4.6-vibe-beta.17` 支持手机授权、上传后持续轮询和扫码预览。Snow Crew 已在 PPE 完成真实上传并取得预览链接,用户确认扫码预览跑通。正式环境未开放,上传完成不代表审核通过或正式发布。
8
7
 
9
8
  ## Quick Start
10
9
 
@@ -24,24 +23,18 @@ ttmg upload --vibe --dir ./game --title "星环守卫" --icon ./avatar.png --for
24
23
 
25
24
  3. CLI 自动上传头像、应用资料和代码包,页面展示进度与结果。
26
25
 
27
- 4. 上传成功后短暂显示成功提示,随后左侧保留原二维码、右侧展示预览加载态;CLI 持续查询同一任务,兼容状态 9(等待提交代码审核)。拿到有效 `previewUrl` 后,右侧加载态切换为预览码,左侧原码保留为「查看进度」,无需重复上传。
26
+ 4. 上传后保持原进程运行,CLI 继续查询同一任务;拿到 `previewUrl` 后,原页面自动显示游戏预览二维码,使用手机 TikTok 扫码预览。
28
27
 
29
- 5. Skill 收到 `terminal=true`、`status=uploaded`、`uploaded=true`、`previewReady=true`、`simulation=false` 且退出码为 0 后,提示用户扫码预览。主码的 `qrPurpose` 为 `game_preview` 或 `tool_preview`。
28
+ 5. Skill 收到 `terminal=true`、`status=uploaded`、`uploaded=true`、`previewReady=true`、`simulation=false` 且退出码为 0 后,报告上传完成且可扫码预览。
30
29
 
31
30
  已有 ZIP 时,用 `--package ./game.zip` 替换 `--dir ./game`。无需预先执行 `ttmg login` 或配置 PPE 环境。描述和分类可省略,CLI 使用默认资料;完整参数见下文。
32
31
 
33
32
  ## 安装与本地预检
34
33
 
35
- ### Tool PPE 试用
36
-
37
- 使用 `--minis-type MINI_TOOL`,省略时仍上传小游戏。首轮使用 Native 工程或 ZIP,固定 `EFFICIENCY_AND_OFFICE` 分类、`region=US` 和 `min_sdk_version=1.0.0`,不传游戏子类型。暂不接受分类和旧 `--app-info` 覆盖;描述仍可用 `--description` 设置。此试用尚未代表真机预览或审核通过,也不包含 H5 包支持。
38
-
39
- 在独立 Tool 工程目录调用:`ttmg upload --vibe --minis-type MINI_TOOL --dir ./tool --title "Focus Timer" --icon ./icon.png --format ndjson`。工程身份首次创建后固定类型,不要复用小游戏的 `.ttmg/vibe-project.json`。
40
-
41
- 安装后确认版本为 `0.4.6-vibe-beta.22`。能力声明中 `authorizationMode=qr`、`previewQr=true`,预览主码用途为 `game_preview`(Tool 为 `tool_preview`),原码仍保留。支持 Node.js 20.19.1–20.x 或 22 及以上版本。
34
+ 安装后确认版本为 `0.4.6-vibe-beta.17`,能力查询中 `authorizationMode` 为 `qr`、`previewQr` 为 `true`。支持 Node.js 20.19.1–20.x 或 22 及以上版本。
42
35
 
43
36
  ```sh
44
- npm install -g @ttmg/cli@0.4.6-vibe-beta.22
37
+ npm install -g @ttmg/cli@0.4.6-vibe-beta.17
45
38
  ttmg --version
46
39
  ttmg capabilities --format json
47
40
  ```
@@ -126,11 +119,11 @@ ttmg upload --vibe --dir ./game --title "星环守卫" --icon ./avatar.png --cat
126
119
  3. 收到 `uploading`,按 `uploadStep` 展示 `avatar`、`app_info`、`package` 进度。授权轮询和上传由 CLI 完成。
127
120
 
128
121
  4. 收到 `waiting_preview` 时,素材已上传,保持原进程运行。CLI 使用同一任务继续查询;状态已完成但尚无预览链接时也继续等待。
129
- 5. 终态仍为 `status=uploaded`。`previewReady=true` 表示后端预览链接已返回,主码使用该地址,`qrPurpose` 为 `game_preview` 或 `tool_preview`。等待失败时保留 `uploaded=true`,同时返回错误和 `nextAction=check_task`,不要重新上传。
122
+ 5. 终态仍为 `status=uploaded`。`previewReady=true`、`qrPurpose=game_preview` 表示预览二维码已就绪,`previewUrl` 是二维码内容,`pageUrl` 是展示二维码的本地页面。等待失败时保留 `uploaded=true`,同时返回错误和 `nextAction=check_task`,不要重新上传。
130
123
 
131
124
  ## 扫码授权与自动上传
132
125
 
133
- CLI 使用内置 `ppe_op_vc` 创建任务,在执行机打开二维码页并持续查询绑定状态。二维码直接编码后端返回的 `landing_url`,包括 TikTok 客户端协议地址;CLI 不要求它是 http(s) 网页地址,也不包装应用协议。用户在手机 TikTok 完成授权,服务端返回 `ready_for_input=true` 后,原进程依次上传头像、应用信息和代码包。
126
+ CLI 使用内置 `ppe_op_vc` 创建任务,在执行机打开二维码页并持续查询绑定状态。二维码直接编码后端返回的 `landing_url`,不包装应用协议。用户在手机 TikTok 完成授权,服务端返回 `ready_for_input=true` 后,原进程依次上传头像、应用信息和代码包。
134
127
 
135
128
  等待事件返回 `authorizationMode=qr`、`nextAction=scan_qr`、`pageUrl` 和 `browserOpenRequested`。页面展示本次提交的标题、头像、描述、类型和子类型;默认值与自定义值均以实际提交资料为准。
136
129
 
@@ -152,6 +145,8 @@ ttmg auth open --page-url <pageUrl> --format json
152
145
 
153
146
  输出 schema 为 `"2"`。每行 NDJSON 是同一 `operationId` 的状态快照;只有最后一行 `terminal=true`。`--format ndjson` 在 `waiting_authorization` 时另向 stderr 输出一行 `page: <url>`,即使 stdout 重定向到文件也能在控制台看到本地二维码页地址。`--format json` 仅在结束时向 stdout 输出一个对象,等待授权的本地页面地址写到 stderr。不要解析中文/英文文案判断状态。
154
147
 
148
+ 排查平台请求时可增加 `--verbose`。CLI 会向 stderr 逐行输出 JSON 格式的 `http_request`、`http_response` 或 `http_error` 记录,包括请求序号、方法、URL、请求头、入参、状态码、返回值和耗时;stdout 的 JSON/NDJSON 协议保持不变。token、Cookie、Authorization、邮箱及 URL 中的 token 会显示为 `[REDACTED]`,上传文件只显示类型、文件名和字节数。
149
+
155
150
  - `precheck / packaging / prepared`:正在检查或准备素材;dry-run 的 prepared 为终态。
156
151
 
157
152
  - `creating_task`:正在准备授权绑定。
@@ -161,7 +156,7 @@ ttmg auth open --page-url <pageUrl> --format json
161
156
  - `uploading`:根据 uploadStep 显示 avatar、app_info、package 的进度,不再询问授权。
162
157
 
163
158
  - `waiting_preview`:uploaded=true、terminal=false,正在查询后端处理结果,等待预览链接。
164
- - `uploaded`:terminal=true、uploaded=true、simulation=false 且退出码 0 表示上传完成;previewReady=true 时页面展示预览码并保留进度码,不代表审核通过或正式发布。
159
+ - `uploaded`:terminal=true、uploaded=true、simulation=false 且退出码 0:上传完成,previewReady=true 时可扫码预览;不是审核通过或正式发布。
165
160
 
166
161
  - `failed / cancelled`:根据 errorCode、message 和 nextAction 提示处理,不自动重传。
167
162
 
@@ -170,7 +165,7 @@ ttmg auth open --page-url <pageUrl> --format json
170
165
 
171
166
  从真实创建任务请求发起前开始 `platformWrite=true`,表示已尝试平台写入,不代表创建或上传成功。只有内部离线测试、本机 HTTP 和 dry-run 保持 `platformWrite=false`。
172
167
 
173
- 按阶段补充:`taskId`(字符串,禁止转成 JS Number)、`pollIntervalSeconds`、`readyForInput`、`taskStatusRaw`(仅诊断)、`uploadStep`、`loadedBytes`、`totalBytes`、`pageUrl`、`qrPurpose`(授权/等待时为 authorization_binding,预览时为 game_preview 或 tool_preview)、素材大小和包 SHA256。代码包字节进度达到 100% 不代表成功,必须等待最终上传回执。
168
+ 按阶段补充:`taskId`(字符串,禁止转成 JS Number)、`pollIntervalSeconds`、`readyForInput`、`taskStatusRaw`(仅诊断)、`uploadStep`、`loadedBytes`、`totalBytes`、`pageUrl`、`qrPurpose=authorization_binding`、素材大小和包 SHA256。代码包字节进度达到 100% 不代表成功,必须等待最终上传回执。
174
169
 
175
170
  `nextAction` 取值:`wait`、`scan_qr`、`fix_input`、`restart_authorization`、`check_task`、`none`。已开始上传后发生失败/超时,先检查 task,不能直接再次创建并重传。预览等待超时返回 `VIBE_PREVIEW_TIMEOUT`;查询失败、取消或页面失败均保留 `uploaded=true`,并返回错误及 `nextAction=check_task`。
176
171
 
@@ -178,23 +173,19 @@ ttmg auth open --page-url <pageUrl> --format json
178
173
 
179
174
  退出码:成功/dry-run 为 0,失败为 1,Ctrl+C 为 130。进程或宿主意外终止导致没有终态时,不得认定上传成功。
180
175
 
181
- 轮询间隔使用创建任务返回的 `poll_interval_seconds`。本版本将 `--timeout`(包括授权、上传和等待预览的整体超时)延长为默认 1800 秒,最大 3600 秒。不自动重试写接口、不实现跨进程续传。
182
-
183
- `--timeout` covers authorization, upload and preview polling. It defaults to 1800 seconds and supports up to 3600 seconds. Write requests are not automatically retried; cross-process resume is not supported.
176
+ 轮询间隔使用创建任务返回的 `poll_interval_seconds`。`--timeout` 是包括授权、上传和等待预览的整体超时,默认 300 秒。不自动重试写接口、不实现跨进程续传。
184
177
 
185
178
  ## 页面与素材
186
179
 
187
- 页面展示本次标题、头像、描述及分类,按浏览器语言显示中英文。后台更新变化内容,不整页刷新;上传期间保留原二维码,上传成功后短暂提示,再显示预览加载态。返回有效 preview_url 后,以真实预览码替换占位,原码保留为「查看进度」;双码实际图案均为 160×160,外部白边一致。预览就绪或查询结束后停止等待动画。重新打开 pageUrl 直接显示当前状态,不会创建新任务或重新上传。
188
-
189
- 页面只监听 127.0.0.1,二维码才由手机扫描,手机不访问 pageUrl。本版本在任务进行中保持页面可用,CLI 结束或意外退出后再保留 30 分钟,内容驻留内存;测试可设置 `TTMG_VIBE_PAGE_TTL_MS`(1—1800000)。上传前主动取消会立即关闭页面;成功、上传后取消及可显示的失败页面保留至到期。页面保留时间不会延长后端二维码的有效期。不要分享本地页面地址。
180
+ 本地页在扫码、上传、等待预览、成功或失败时均展示本次资料。后台查询状态,只更新变化内容,不整页刷新;预览就绪或终态失败后停止查询。授权完成后移除授权二维码;preview_url 就绪后显示游戏预览二维码,直接使用后端 URL。Skill 可用 `pageUrl` 重新打开同一页面。
190
181
 
191
- the page listens only on 127.0.0.1 and stays available while the CLI is running, then for 30 minutes after it finishes or exits unexpectedly. Cancelling before upload closes the page immediately. The retention window does not extend backend QR validity.
182
+ 页面只监听 127.0.0.1,二维码才由手机扫描,手机不访问 pageUrl。默认 15 分钟后关闭,内容驻留内存;测试可设置 `TTMG_VIBE_PAGE_TTL_MS`(1—900000)。取消进程会关闭页面;成功与可显示的失败页面保留至到期。不要分享本地页面地址。
192
183
 
193
184
  CLI 执行本地项目检查和 ZIP 打包,并按 PNG/JPEG、1024×1024、5 MiB 校验上传头像。文件头检查不等于完整图像解码;ZIP 非空、大小和文件头检查不等于完整内容、解压总大小校验或平台审核。
194
185
 
195
186
  准备完成后固定本次素材字节,授权期间不会重新读取。打包排除 .ttmg、.env\*、PEM 和 KEY 等文件,但不保证识别所有业务秘密。
196
187
 
197
- CLI 在工程目录的 `.ttmg/vibe-project.json` 保存并复用非敏感 source_project_id;使用 --package 时保存在 ZIP 所在目录。不要将多个独立游戏的 ZIP 放在同一身份目录。dry-run 不创建此文件。每次运行使用新的 task_idempotency_id,当前不支持中断续传。凭证只驻留进程内存,不进入事件、文件、日志或错误信息。
188
+ CLI 在工程目录的 `.ttmg/vibe-project.json` 保存并复用非敏感 source_project_id;使用 --package 时保存在 ZIP 所在目录。不要将多个独立游戏的 ZIP 放在同一身份目录。dry-run 不创建此文件。同一游戏再次上传时保留 source_project_id,但每次创建任务前单独生成新的 task_idempotency_id;平台返回本次 task_id 后,本次轮询和素材上传只使用该 task_id。task_id 由平台生成,CLI 不自行指定,当前不支持中断续传。凭证只驻留进程内存,不进入事件、文件、日志或错误信息。
198
189
 
199
190
  ## HTTP 适配边界
200
191
 
@@ -221,7 +212,7 @@ TTMG_VIBE_BACKEND=local-http TTMG_VIBE_API=http://127.0.0.1:3100 ttmg upload --v
221
212
 
222
213
  **v1 → v2 兼容性变化**:旧 UUID 换 Token 的三接口协议废弃,`--vibe-authorize-url` 返回明确错误;授权地址来自 landing_url。不再输出旧 preview_ready 状态、uploadId、reviewStatus。
223
214
 
224
- beta.19 保留 waiting_preview 状态、uploaded 终态和 schemaVersion=2,兼容状态 9。与 beta.18 相比,previewQr=true,主码使用 previewUrl,qrPurpose 为 game_preview 或 tool_preview,原码以「查看进度」保留。Skill 应按 qrPurpose 判断用途。普通不带 --vibe 的 upload 不变。
215
+ 当前版本新增 waiting_preview 状态,终态保留 uploaded;game_preview 作为预览二维码用途。Skill 必须校验 schemaVersion=2,并按终态、previewReady 和 errorCode 处理。普通不带 --vibe 的 upload 不变。
225
216
 
226
217
  2026-09-14 已核对 BFF 源码:头像 PNG/JPEG、1024×1024、5 MiB;Native ZIP 和解压总大小上限 100 MiB。本地暂未实现完整 ZIP 内容及解压总大小校验。2026-09-16 本地构建使用自有测试素材跑通真实 PPE 手机扫码授权、头像、默认资料和代码包上传。该验证不覆盖全部游戏或正式环境。后端接口调整留在适配层处理;若用户动作或成功语义改变,应协商升级 CLI schema。
227
218