@ttmg/cli 0.4.6-vibe-beta.13 → 0.4.6-vibe-beta.14
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 +4 -0
- package/dist/index.js +658 -3
- package/dist/index.js.map +1 -1
- package/dist/package.json +4 -3
- package/dist/scripts/verify-agent-contract.js +9 -0
- package/dist/scripts/vibe-upload-smoke.js +60 -2
- package/package.json +4 -3
- package/vibe-upload.md +64 -6
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttmg/cli",
|
|
3
|
-
"version": "0.4.6-vibe-beta.
|
|
3
|
+
"version": "0.4.6-vibe-beta.14",
|
|
4
4
|
"description": "TikTok Mini Game Command Line Tool",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"bin": {
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
18
|
"demo:vibe": "npm run build && node scripts/vibe-upload-demo.js",
|
|
19
|
-
"test:
|
|
19
|
+
"test:game-categories": "node scripts/run-ts-test.js src/commands/common/game/categories.test.ts",
|
|
20
|
+
"test:vibe": "npm run test:game-categories && node scripts/run-ts-test.js src/commands/common/vibe/vibe.test.ts",
|
|
20
21
|
"test:vibe-process": "node scripts/vibe-upload-smoke.js",
|
|
21
22
|
"prepack": "npm run build && npm run verify:dist-version && npm run verify:agent-contract",
|
|
22
23
|
"build": "node scripts/build.js",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"test:wasm": "node scripts/run-ts-test.js src/commands/native/wasm/wasm.test.ts && node scripts/acceptance-fixture.test.js",
|
|
51
52
|
"test:agent-contract": "npm run test:login && npm run test:auth && npm run test:capabilities && npm run test:test-account && npm run test:upload-preview && npm run test:preview-page && npm run test:check && npm run test:check-ai && npm run test:build-structured && npm run test:doctor && npm run test:wasm && npm run test:dev-session && npm run test:dev-session-command && npm run test:dev-runtime-event && npm run test:dev-runtime-client && npm run test:dev-session-control && npm run test:dev-runtime-session-follow && npm run test:dev-client-preview-orchestrator && npm run test:dev-watch-change && npm run test:network && npm run test:vibe && npx tsc --noEmit && npm run build && npm run test:vibe-process && npm run test:preview-page-process && npm run test:preview-page-detached && npm run verify:dist-version && npm run verify:agent-contract",
|
|
52
53
|
"test:agent-contract:full": "npm run test:agent-contract && npm run test:dev-default-process && npm run test:dev-game-ready-process && npm run test:dev-client-preview-control-process && node scripts/dev-workflow-smoke.js",
|
|
53
|
-
"publish:beta": "npm publish --registry=https://registry.npmjs.org/ --access public --tag
|
|
54
|
+
"publish:beta": "npm publish --registry=https://registry.npmjs.org/ --access public --tag beta",
|
|
54
55
|
"setup": "node scripts/setup.js",
|
|
55
56
|
"reset:local-state": "node scripts/resetLocalState.js",
|
|
56
57
|
"dev:link": "npm run build && npm link",
|
|
@@ -126,6 +126,13 @@ const capabilitiesResult = runCli(['capabilities', '--format', 'json']);
|
|
|
126
126
|
assertExit(capabilitiesResult, 0, 'capabilities');
|
|
127
127
|
const capabilities = parseSingleJson(capabilitiesResult, 'capabilities');
|
|
128
128
|
assert.equal(capabilities.command, 'capabilities');
|
|
129
|
+
const gameCategories = runCli(['game', 'categories', '--format', 'json']);
|
|
130
|
+
assertExit(gameCategories, 0, 'game categories');
|
|
131
|
+
const categoryCatalog = parseSingleJson(gameCategories, 'game categories');
|
|
132
|
+
assert.equal(categoryCatalog.platformWrite, false);
|
|
133
|
+
assert.equal(categoryCatalog.categoryCount, 12);
|
|
134
|
+
assert.equal(categoryCatalog.subcategoryCount, 114);
|
|
135
|
+
assert.equal(capabilities.commands.gameCategories.catalogVersion, categoryCatalog.catalogVersion);
|
|
129
136
|
assert.match(capabilities.commands.vibeUpload.command, /--vibe --web/);
|
|
130
137
|
assert.equal(capabilities.commands.vibeUpload.skillWorkflow.keepUploadProcessRunning, true);
|
|
131
138
|
assert.equal(capabilities.commands.vibeUpload.skillWorkflow.realUploadSuccess.simulation, false);
|
|
@@ -396,6 +403,8 @@ assertExit(uploadHelp, 0, 'upload help');
|
|
|
396
403
|
assert.match(uploadHelp.stdout, /--vibe --web --dir/);
|
|
397
404
|
assert.match(uploadHelp.stdout, /authorizationOpenCommand/);
|
|
398
405
|
assert.match(uploadHelp.stdout, /simulation=false/);
|
|
406
|
+
assert.match(uploadHelp.stdout, /--category <category>/);
|
|
407
|
+
assert.match(uploadHelp.stdout, /--subcategory <subcategory>/);
|
|
399
408
|
assert.match(uploadHelp.stdout, /--preview\b/);
|
|
400
409
|
assert.match(uploadHelp.stdout, /--serve-preview-page\b/);
|
|
401
410
|
assert.match(uploadHelp.stdout, /--no-open\b/);
|
|
@@ -30,6 +30,7 @@ let failStatus = false;
|
|
|
30
30
|
let webMode = false;
|
|
31
31
|
let webPolls = 0;
|
|
32
32
|
let webFailureEndpoint;
|
|
33
|
+
let expectedWebCategory = { category: 'Other', subcategory: 'Other' };
|
|
33
34
|
const env = {
|
|
34
35
|
...process.env,
|
|
35
36
|
HOME: temp,
|
|
@@ -194,7 +195,7 @@ async function main() {
|
|
|
194
195
|
assert.equal(info.app_info.app_name, input[input.indexOf('--title') + 1]);
|
|
195
196
|
assert.deepEqual(info.app_info, {
|
|
196
197
|
description: 'DevTool PPE integration test fixture. Not a production game.',
|
|
197
|
-
|
|
198
|
+
...expectedWebCategory,
|
|
198
199
|
terms_of_service: 'https://www.tiktok.com',
|
|
199
200
|
privacy_policy: 'https://www.tiktok.com',
|
|
200
201
|
copyright_confirmation: true, contact_email: 'devtool-test@example.invalid',
|
|
@@ -261,6 +262,14 @@ async function main() {
|
|
|
261
262
|
const completeDry = await run([...input, '--app-info', appInfoPath, '--dry-run', '--format', 'json']);
|
|
262
263
|
assert.equal(completeDry.code, 0, completeDry.stderr);
|
|
263
264
|
assert.equal(events(completeDry)[0].status, 'prepared');
|
|
265
|
+
assert.equal(events(completeDry)[0].classification.category, 'Casual');
|
|
266
|
+
assert.equal(events(completeDry)[0].classification.subcategory, 'Puzzle');
|
|
267
|
+
assert.equal(events(completeDry)[0].classification.source, 'app-info');
|
|
268
|
+
const overrideDry = await run([...input, '--app-info', appInfoPath, '--category', 'Puzzle', '--subcategory', 'Physics', '--dry-run', '--format', 'json']);
|
|
269
|
+
assert.equal(overrideDry.code, 0, overrideDry.stderr);
|
|
270
|
+
assert.equal(events(overrideDry)[0].classification.category, 'Puzzle');
|
|
271
|
+
assert.equal(events(overrideDry)[0].classification.subcategory, 'Physics');
|
|
272
|
+
assert.equal(events(overrideDry)[0].classification.source, 'arguments');
|
|
264
273
|
assert.equal(requests.length, 0);
|
|
265
274
|
fs.writeFileSync(appInfoPath, '{private-token');
|
|
266
275
|
const badInfo = await run([...input, '--mock', '--app-info', appInfoPath, '--format', 'json']);
|
|
@@ -370,11 +379,32 @@ async function main() {
|
|
|
370
379
|
const legacyWeb = await run(['upload', '--web', '--format', 'json']);
|
|
371
380
|
assert.equal(events(legacyWeb)[0].errorCode, 'VIBE_OPTION_REQUIRES_VIBE');
|
|
372
381
|
assert.equal(requests.length, beforeWeb);
|
|
382
|
+
for (const [args, code] of [
|
|
383
|
+
[['--category', 'Puzzle'], 'VIBE_CATEGORY_PAIR_REQUIRED'],
|
|
384
|
+
[['--subcategory', 'Physics'], 'VIBE_CATEGORY_PAIR_REQUIRED'],
|
|
385
|
+
[['--category', 'Other', '--subcategory', 'Physics'], 'VIBE_INVALID_CATEGORY'],
|
|
386
|
+
[['--category', 'Unknown', '--subcategory', 'Other'], 'VIBE_INVALID_CATEGORY'],
|
|
387
|
+
[['--category', '', '--subcategory', ''], 'VIBE_INVALID_CATEGORY'],
|
|
388
|
+
]) {
|
|
389
|
+
const invalid = await run([...input.filter(v => v !== '--no-open'), '--web', ...args, '--format', 'json']);
|
|
390
|
+
assert.equal(invalid.code, 1);
|
|
391
|
+
const result = events(invalid)[0];
|
|
392
|
+
assert.equal(result.errorCode, code);
|
|
393
|
+
assert.equal(result.platformWrite, false);
|
|
394
|
+
assert.equal(result.taskId, undefined);
|
|
395
|
+
assert.equal(result.pageUrl, undefined);
|
|
396
|
+
}
|
|
397
|
+
assert.equal(requests.length, beforeWeb, 'Invalid classification must not create tasks or upload');
|
|
373
398
|
webMode = true;
|
|
374
399
|
for (const format of ['json', 'ndjson']) {
|
|
400
|
+
expectedWebCategory = format === 'json' ? {category: 'Other', subcategory: 'Other'} : {category: 'Puzzle', subcategory: 'Physics'};
|
|
401
|
+
const categoryArgs = format === 'json' ? [] : ['--category', 'Puzzle', '--subcategory', 'Physics'];
|
|
375
402
|
const receipt = path.join(temp, `upload-web-${format}.ndjson`);
|
|
376
403
|
const requestStart = requests.length;
|
|
377
|
-
const web = await run([...input.filter(v => v !== '--no-open'), '--web', '--format', format, '--poll-interval', '0.2'], async event => {
|
|
404
|
+
const web = await run([...input.filter(v => v !== '--no-open'), '--web', ...categoryArgs, '--format', format, '--poll-interval', '0.2'], async event => {
|
|
405
|
+
if (event.status === 'prepared') assert.deepEqual(
|
|
406
|
+
{category: event.classification.category, subcategory: event.classification.subcategory},
|
|
407
|
+
expectedWebCategory);
|
|
378
408
|
if (event.status === 'waiting_authorization') {
|
|
379
409
|
assert.equal(event.authorizationMode, 'web');
|
|
380
410
|
assert.equal(event.browserOpenRequested, true);
|
|
@@ -403,6 +433,10 @@ async function main() {
|
|
|
403
433
|
assert.equal(output.at(-1).readyForInput, true);
|
|
404
434
|
assert.equal(output.at(-1).uploadAttempted, true);
|
|
405
435
|
assert.equal(output.at(-1).uploaded, true);
|
|
436
|
+
assert.deepEqual(
|
|
437
|
+
{ category: output.at(-1).classification.category, subcategory: output.at(-1).classification.subcategory },
|
|
438
|
+
expectedWebCategory);
|
|
439
|
+
assert.equal(output.at(-1).classification.source, format === 'json' ? 'defaults' : 'arguments');
|
|
406
440
|
assert.equal(output.at(-1).taskStatusRaw, 3);
|
|
407
441
|
assert.equal(output.filter(e => e.terminal).length, 1);
|
|
408
442
|
assert.equal(webPolls, 5, 'Only true backend readiness unlocks authorization');
|
|
@@ -416,6 +450,7 @@ async function main() {
|
|
|
416
450
|
assert.ok(opens[0].args.some(arg => /^http:\/\/127\.0\.0\.1:\d+\/[a-f0-9]{48}\/authorize$/.test(arg)));
|
|
417
451
|
assert.doesNotMatch(JSON.stringify(opens) + web.stdout + web.stderr, /process-test-secret|import_token|web-icon-receipt|web-package-receipt|aweme:\/\//);
|
|
418
452
|
}
|
|
453
|
+
expectedWebCategory = {category: 'Other', subcategory: 'Other'};
|
|
419
454
|
webFailureEndpoint = '/bff/app_info/minis_import/submit_minis_import_info_for_agent/';
|
|
420
455
|
const failedStart = requests.length;
|
|
421
456
|
const webUploadFailure = await run([...input.filter(v => v !== '--no-open'), '--web', '--format', 'json'], undefined, {
|
|
@@ -552,6 +587,29 @@ async function main() {
|
|
|
552
587
|
const badMode = await run(['upload', '--title', 'x', '--format', 'json']);
|
|
553
588
|
assert.equal(badMode.code, 1);
|
|
554
589
|
assert.equal(events(badMode)[0].errorCode, 'VIBE_OPTION_REQUIRES_VIBE');
|
|
590
|
+
const badCategoryMode = await run(['upload', '--category', 'Puzzle', '--subcategory', 'Physics', '--format', 'json']);
|
|
591
|
+
assert.equal(events(badCategoryMode)[0].errorCode, 'VIBE_OPTION_REQUIRES_VIBE');
|
|
592
|
+
const beforeCatalog = requests.length;
|
|
593
|
+
const catalog = await run(['game', 'categories', '--format', 'json']);
|
|
594
|
+
assert.equal(catalog.code, 0, catalog.stderr);
|
|
595
|
+
assert.equal(events(catalog).length, 1);
|
|
596
|
+
assert.equal(events(catalog)[0].categoryCount, 12);
|
|
597
|
+
assert.equal(events(catalog)[0].subcategoryCount, 114);
|
|
598
|
+
assert.equal(events(catalog)[0].platformWrite, false);
|
|
599
|
+
const filtered = await run(['game', 'categories', '--category', 'Puzzle', '--format', 'ndjson']);
|
|
600
|
+
assert.equal(filtered.code, 0);
|
|
601
|
+
assert.deepEqual(events(filtered)[0].categories.map(item => item.value), ['Puzzle']);
|
|
602
|
+
assert.ok(events(filtered)[0].categories[0].subcategories.every(item => item.description));
|
|
603
|
+
for (const [args, code] of [
|
|
604
|
+
[['--category', 'unknown'], 'GAME_CATEGORY_UNKNOWN'],
|
|
605
|
+
[['--format', 'xml'], 'GAME_CATEGORIES_INVALID_FORMAT'],
|
|
606
|
+
]) {
|
|
607
|
+
const invalid = await run(['game', 'categories', '--format', 'json', ...args]);
|
|
608
|
+
assert.equal(invalid.code, 1);
|
|
609
|
+
assert.equal(events(invalid)[0].errorCode, code);
|
|
610
|
+
assert.equal(events(invalid)[0].platformWrite, false);
|
|
611
|
+
}
|
|
612
|
+
assert.equal(requests.length, beforeCatalog, 'Catalog commands must remain offline');
|
|
555
613
|
const help = await run(['upload', '--help']);
|
|
556
614
|
assert.equal(help.code, 0);
|
|
557
615
|
assert.match(help.stdout, /--vibe/);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttmg/cli",
|
|
3
|
-
"version": "0.4.6-vibe-beta.
|
|
3
|
+
"version": "0.4.6-vibe-beta.14",
|
|
4
4
|
"description": "TikTok Mini Game Command Line Tool",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"bin": {
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
18
|
"demo:vibe": "npm run build && node scripts/vibe-upload-demo.js",
|
|
19
|
-
"test:
|
|
19
|
+
"test:game-categories": "node scripts/run-ts-test.js src/commands/common/game/categories.test.ts",
|
|
20
|
+
"test:vibe": "npm run test:game-categories && node scripts/run-ts-test.js src/commands/common/vibe/vibe.test.ts",
|
|
20
21
|
"test:vibe-process": "node scripts/vibe-upload-smoke.js",
|
|
21
22
|
"prepack": "npm run build && npm run verify:dist-version && npm run verify:agent-contract",
|
|
22
23
|
"build": "node scripts/build.js",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"test:wasm": "node scripts/run-ts-test.js src/commands/native/wasm/wasm.test.ts && node scripts/acceptance-fixture.test.js",
|
|
51
52
|
"test:agent-contract": "npm run test:login && npm run test:auth && npm run test:capabilities && npm run test:test-account && npm run test:upload-preview && npm run test:preview-page && npm run test:check && npm run test:check-ai && npm run test:build-structured && npm run test:doctor && npm run test:wasm && npm run test:dev-session && npm run test:dev-session-command && npm run test:dev-runtime-event && npm run test:dev-runtime-client && npm run test:dev-session-control && npm run test:dev-runtime-session-follow && npm run test:dev-client-preview-orchestrator && npm run test:dev-watch-change && npm run test:network && npm run test:vibe && npx tsc --noEmit && npm run build && npm run test:vibe-process && npm run test:preview-page-process && npm run test:preview-page-detached && npm run verify:dist-version && npm run verify:agent-contract",
|
|
52
53
|
"test:agent-contract:full": "npm run test:agent-contract && npm run test:dev-default-process && npm run test:dev-game-ready-process && npm run test:dev-client-preview-control-process && node scripts/dev-workflow-smoke.js",
|
|
53
|
-
"publish:beta": "npm publish --registry=https://registry.npmjs.org/ --access public --tag
|
|
54
|
+
"publish:beta": "npm publish --registry=https://registry.npmjs.org/ --access public --tag beta",
|
|
54
55
|
"setup": "node scripts/setup.js",
|
|
55
56
|
"reset:local-state": "node scripts/resetLocalState.js",
|
|
56
57
|
"dev:link": "npm run build && npm link",
|
package/vibe-upload.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
## 中文
|
|
4
4
|
|
|
5
|
-
自 `0.4.6-vibe-beta.13` 起,默认服务条款 `terms_of_service` 与隐私政策 `privacy_policy` 均提交 `https://www.tiktok.com`,替换原占位地址。
|
|
6
|
-
|
|
7
5
|
默认资料修复已在 `0.4.6-vibe-beta.11` 发布:CLI 自动补齐此前跑通的 PPE 试用资料,用户只提供标题和头像。beta.10 仅修改了输入提示,没有自动补齐字段,真实基础信息提交会被拒绝。
|
|
8
6
|
|
|
9
7
|
本次范围:本地准备 → 授权绑定 → 上传头像 → 提交应用信息 → 上传代码包 → 上传完成。不包含预览、审核或正式发布。`--web` 使用真实 PPE 授权和上传;`--mock` 的授权与素材上传仍为模拟。网页授权后自动上传的修复已在 `0.4.6-vibe-beta.9` 发布;用户输入要求已在 `0.4.6-vibe-beta.10` 修正。
|
|
@@ -35,12 +33,42 @@ ttmg upload --vibe --web --dir ./game --title "星环守卫" --icon ./avatar.png
|
|
|
35
33
|
|
|
36
34
|
### 用户需要提供什么
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
**只向用户收集游戏标题和本地头像,并使用当前游戏目录或代码包。** 描述、服务条款、隐私政策、版权确认及其他应用资料由 CLI 使用既有 PPE 试用默认值补齐。分类可由 Skill 按下方目录选择,未选择时仍使用默认值;不向用户索要额外资料或增加填写表单。
|
|
39
37
|
|
|
40
38
|
能力查询和上传事件均返回 `inputRequirements`:`requiredUserInputs=["title","icon"]`、`additionalMetadataSource="cli-defaults"`、`requestAdditionalMetadata=false`。`--app-info` 仅兼容旧调用,当前流程不使用。
|
|
41
39
|
|
|
42
40
|
CLI 在 `app_info` 请求中自动带上 `description`、`category`、`subcategory`、`terms_of_service`、`privacy_policy`、`copyright_confirmation`、`contact_email`,再填入用户标题和真实上传头像 URI。默认资料标识为 `ppe-trial`;命令中没有这些参数,不代表请求里没传。能力查询的 `appInfoFields.defaultedByCli` 列出默认字段。
|
|
43
41
|
|
|
42
|
+
### 查询并推荐游戏分类
|
|
43
|
+
|
|
44
|
+
以下命令和参数从 `0.4.6-vibe-beta.14` 开始提供。查询离线执行,不登录、不创建任务、不写平台:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
ttmg game categories --format json
|
|
48
|
+
ttmg game categories --category Puzzle --format json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
返回 `schemaVersion="1"`、`catalogVersion`、`source=bundled`、`platformWrite=false`,以及 `categories[].value` 和 `subcategories[].value/description`。当前为 12 个类型、114 个子类型,玩法说明为英文;按精确英文值筛选。`catalogVersion` 标识随 CLI 打包的快照,不表示实时拉取线上配置。
|
|
52
|
+
|
|
53
|
+
Skill 根据生成游戏的核心玩法和胜负条件选择组合,给用户一句推荐理由;用户已指定分类时优先保留。不增加必填表单;无法匹配时可使用 Other/Other。
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
ttmg upload --vibe --web --dir ./game --title "星环守卫" --icon ./avatar.png --category Puzzle --subcategory Physics --format ndjson
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
- 两个分类参数都不传:仍为 `Other / Other`,旧 Skill 命令无需修改。
|
|
61
|
+
|
|
62
|
+
- 两个都传:校验通过后仅覆盖分类,其他默认资料继续自动补齐。
|
|
63
|
+
|
|
64
|
+
- 只传一个:`VIBE_CATEGORY_PAIR_REQUIRED`;值无效或归属不匹配:`VIBE_INVALID_CATEGORY`。均在创建任务和打开浏览器前失败,不静默改成 Other。
|
|
65
|
+
|
|
66
|
+
- 旧 `--app-info` 调用未传新参数时,保留文件分类与原校验行为;显式分类参数覆盖文件分类。新流程不需要该文件。
|
|
67
|
+
|
|
68
|
+
- `prepared` 和后续终态返回 `classification={category, subcategory, source, catalogVersion}`,来源为 `arguments / defaults / app-info`。`--dry-run` 可核对最终选值。
|
|
69
|
+
|
|
70
|
+
- 查询类型不存在:`GAME_CATEGORY_UNKNOWN`;格式无效:`GAME_CATEGORIES_INVALID_FORMAT`。返回非零退出码。
|
|
71
|
+
|
|
44
72
|
### Skill 执行顺序
|
|
45
73
|
|
|
46
74
|
1. 调用上方 `--web --format ndjson` 命令;本地预检可先加 `--dry-run`。
|
|
@@ -169,8 +197,6 @@ TTMG_VIBE_BACKEND=local-http TTMG_VIBE_API=http://127.0.0.1:3100 ttmg upload --v
|
|
|
169
197
|
|
|
170
198
|
## English
|
|
171
199
|
|
|
172
|
-
Starting with `0.4.6-vibe-beta.13`, the default `terms_of_service` and `privacy_policy` URLs are both `https://www.tiktok.com`, replacing the previous placeholders.
|
|
173
|
-
|
|
174
200
|
The default-metadata fix shipped in `0.4.6-vibe-beta.11`. The CLI fills the existing PPE trial metadata automatically; users provide only title and icon. Beta.10 changed input guidance without filling the fields, and its real app-info submission was rejected.
|
|
175
201
|
|
|
176
202
|
### Web upload entry
|
|
@@ -194,7 +220,7 @@ Start one command and keep reading its NDJSON. If the host tool returns a sessio
|
|
|
194
220
|
|
|
195
221
|
### User inputs
|
|
196
222
|
|
|
197
|
-
**Collect only the game title and local icon, using the current game directory or ZIP.** The CLI fills other app metadata with existing PPE trial defaults. Do not
|
|
223
|
+
**Collect only the game title and local icon, using the current game directory or ZIP.** The CLI fills other app metadata with existing PPE trial defaults. The Skill may select a category pair from the catalog below; omission keeps the defaults. Do not ask the user for extra fields or add a form.
|
|
198
224
|
|
|
199
225
|
Capabilities and upload events include `inputRequirements` with `requiredUserInputs=["title","icon"]`, `additionalMetadataSource="cli-defaults"` and `requestAdditionalMetadata=false`.
|
|
200
226
|
|
|
@@ -204,6 +230,38 @@ The CLI submits `description`, `category`, `subcategory`, `terms_of_service`, `p
|
|
|
204
230
|
|
|
205
231
|
Source checked on 2026-09-14: BFF enforces PNG/JPEG, 1024×1024, 5 MiB icons and a 100 MiB Native ZIP/uncompressed-size limit. Full local ZIP-content/uncompressed-size validation is not implemented. On 2026-09-15, a corrected build completed real PPE web authorization and icon, default app-info and package uploads with owned test fixtures. This does not cover every game, phone authorization or production.
|
|
206
232
|
|
|
233
|
+
### Query and recommend game categories
|
|
234
|
+
|
|
235
|
+
These commands and options are available from `0.4.6-vibe-beta.14`. Queries run offline without login, task creation or platform writes:
|
|
236
|
+
|
|
237
|
+
```sh
|
|
238
|
+
ttmg game categories --format json
|
|
239
|
+
ttmg game categories --category Puzzle --format json
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
The result includes `schemaVersion="1"`, `catalogVersion`, `source=bundled`, `platformWrite=false`, `categories[].value` and `subcategories[].value/description`.
|
|
243
|
+
|
|
244
|
+
There are 12 categories and 114 subcategories with English gameplay descriptions. Filtering uses the exact category value. The version identifies a bundled snapshot, not a live platform fetch.
|
|
245
|
+
|
|
246
|
+
The Skill selects a valid pair from the generated game's core gameplay and win conditions and gives a short reason. Preserve a user's explicit choice. Do not add a required form; use Other/Other when no category matches.
|
|
247
|
+
|
|
248
|
+
```sh
|
|
249
|
+
ttmg upload --vibe --web --dir ./game --title "My game" --icon ./avatar.png --category Puzzle --subcategory Physics --format ndjson
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
- Omit both: keep `Other / Other`; existing Skill commands work unchanged.
|
|
254
|
+
|
|
255
|
+
- Supply both: override only category fields after validation; other metadata defaults remain.
|
|
256
|
+
|
|
257
|
+
- Supply one: `VIBE_CATEGORY_PAIR_REQUIRED`. Invalid values or a mismatched pair: `VIBE_INVALID_CATEGORY`. Fail before task creation or browser opening, without a silent fallback.
|
|
258
|
+
|
|
259
|
+
- Legacy `--app-info` calls retain file values and existing validation when new options are absent. Explicit category options override file category fields. New callers need no metadata file.
|
|
260
|
+
|
|
261
|
+
- The `prepared` and subsequent terminal events return `classification={category, subcategory, source, catalogVersion}`, with source `arguments / defaults / app-info`. Use `--dry-run` to inspect the effective selection.
|
|
262
|
+
|
|
263
|
+
- Unknown query category: `GAME_CATEGORY_UNKNOWN`. Invalid format: `GAME_CATEGORIES_INVALID_FORMAT`. Both return nonzero exit codes.
|
|
264
|
+
|
|
207
265
|
### Skill execution order
|
|
208
266
|
|
|
209
267
|
1. Run the `--web --format ndjson` command above; optionally precheck with `--dry-run`.
|