@ttmg/cli 0.4.6-vibe-beta.9 → 0.4.6-vibe-beta.11
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 -4
- package/dist/index.js +139 -113
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/scripts/verify-agent-contract.js +2 -0
- package/dist/scripts/vibe-upload-smoke.js +25 -1
- package/package.json +1 -1
- package/vibe-upload.md +16 -34
package/dist/package.json
CHANGED
|
@@ -385,6 +385,8 @@ assert.notEqual(
|
|
|
385
385
|
);
|
|
386
386
|
|
|
387
387
|
const uploadHelp = runCli(['upload', '--help']);
|
|
388
|
+
assert.doesNotMatch(uploadHelp.stdout, /--app-info/);
|
|
389
|
+
assert.match(uploadHelp.stdout.replace(/\s+/g, ' '), /only title and icon|只收集标题和头像/);
|
|
388
390
|
assertExit(uploadHelp, 0, 'upload help');
|
|
389
391
|
assert.match(uploadHelp.stdout, /--preview\b/);
|
|
390
392
|
assert.match(uploadHelp.stdout, /--serve-preview-page\b/);
|
|
@@ -99,7 +99,16 @@ function events(result) {
|
|
|
99
99
|
return result.stdout
|
|
100
100
|
.trim()
|
|
101
101
|
.split('\n')
|
|
102
|
-
.map(line =>
|
|
102
|
+
.map(line => {
|
|
103
|
+
const event = JSON.parse(line);
|
|
104
|
+
if (event.mode === 'vibe') {
|
|
105
|
+
assert.deepEqual(event.inputRequirements.requiredUserInputs, ['title', 'icon']);
|
|
106
|
+
assert.equal(event.inputRequirements.requestAdditionalMetadata, false);
|
|
107
|
+
assert.equal(event.inputRequirements.additionalMetadataSource, 'cli-defaults');
|
|
108
|
+
assert.equal(event.inputRequirements.defaultMetadataProfile, 'ppe-trial');
|
|
109
|
+
}
|
|
110
|
+
return event;
|
|
111
|
+
});
|
|
103
112
|
}
|
|
104
113
|
async function main() {
|
|
105
114
|
// Exercise the built worker IPC and new command without creating a platform task.
|
|
@@ -183,6 +192,14 @@ async function main() {
|
|
|
183
192
|
assert.equal(info.import_token, 'process-test-secret');
|
|
184
193
|
assert.equal(info.app_info.icon_uri, 'web-icon-receipt');
|
|
185
194
|
assert.equal(info.app_info.app_name, input[input.indexOf('--title') + 1]);
|
|
195
|
+
assert.deepEqual(info.app_info, {
|
|
196
|
+
description: 'DevTool PPE integration test fixture. Not a production game.',
|
|
197
|
+
category: 'Other', subcategory: 'Other',
|
|
198
|
+
terms_of_service: 'https://example.invalid/devtool-ppe-test/terms',
|
|
199
|
+
privacy_policy: 'https://example.invalid/devtool-ppe-test/privacy',
|
|
200
|
+
copyright_confirmation: true, contact_email: 'devtool-test@example.invalid',
|
|
201
|
+
app_name: input[input.indexOf('--title') + 1], icon_uri: 'web-icon-receipt',
|
|
202
|
+
}, 'CLI must send complete PPE trial defaults without asking the user for them');
|
|
186
203
|
} else {
|
|
187
204
|
assert.match(req.headers['content-type'], /^multipart\/form-data; boundary=/);
|
|
188
205
|
assert.match(body.toString(), /name="task_id"\r\n\r\n7684370037737553941\r\n/);
|
|
@@ -219,6 +236,13 @@ async function main() {
|
|
|
219
236
|
|
|
220
237
|
let bindingHtml;
|
|
221
238
|
const appInfoPath = path.join(temp, 'app-info.json');
|
|
239
|
+
const invalidLegacy = await run([...input, '--app-info', appInfoPath, '--dry-run', '--format', 'json']);
|
|
240
|
+
assert.equal(invalidLegacy.code, 1);
|
|
241
|
+
const legacyFailure = events(invalidLegacy)[0];
|
|
242
|
+
assert.equal(legacyFailure.errorCode, 'VIBE_INVALID_APP_INFO');
|
|
243
|
+
assert.equal(legacyFailure.platformWrite, false);
|
|
244
|
+
assert.match(legacyFailure.message, /Remove --app-info|移除 --app-info/);
|
|
245
|
+
assert.doesNotMatch(legacyFailure.message, /are required|需要简介/);
|
|
222
246
|
fs.writeFileSync(appInfoPath, JSON.stringify({
|
|
223
247
|
description: 'Process contract fixture', category: 'Casual', subcategory: 'Puzzle',
|
|
224
248
|
terms_of_service: 'https://example.invalid/terms', privacy_policy: 'https://example.invalid/privacy',
|
package/package.json
CHANGED
package/vibe-upload.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## 中文
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
默认资料修复已在 `0.4.6-vibe-beta.11` 发布:CLI 自动补齐此前跑通的 PPE 试用资料,用户只提供标题和头像。beta.10 仅修改了输入提示,没有自动补齐字段,真实基础信息提交会被拒绝。
|
|
6
|
+
|
|
7
|
+
本次范围:本地准备 → 授权绑定 → 上传头像 → 提交应用信息 → 上传代码包 → 上传完成。不包含预览、审核或正式发布。`--web` 使用真实 PPE 授权和上传;`--mock` 的授权与素材上传仍为模拟。网页授权后自动上传的修复已在 `0.4.6-vibe-beta.9` 发布;用户输入要求已在 `0.4.6-vibe-beta.10` 修正。
|
|
6
8
|
|
|
7
9
|
### 博华如何接入
|
|
8
10
|
|
|
@@ -26,24 +28,11 @@ ttmg upload --vibe --dir ./game --title "星环守卫" --icon ./avatar.png --dry
|
|
|
26
28
|
|
|
27
29
|
已有 ZIP 时,用 `--package ./game.zip` 替换 `--dir ./game`。名称和头像必须由开发者提供;演示脚本中的临时样本不作为产品默认素材。
|
|
28
30
|
|
|
29
|
-
###
|
|
30
|
-
|
|
31
|
-
使用 `--app-info ./app-info.json` 提供完整应用资料。CLI 将其与开发者提供的名称、上传返回的头像 URI 一起提交;不为缺失的条款、隐私链接或版权确认填默认值。该选项不改变现有 `--mock` 用法。
|
|
32
|
-
|
|
33
|
-
```sh
|
|
34
|
-
ttmg upload --vibe --package ./game.zip --title "测试游戏" --icon ./avatar.png --app-info ./app-info.json --dry-run --format json
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
JSON 文件为以下字段组成的对象,最大 64 KiB;名称由 `--title` 提供,头像 URI 由上传接口返回,不在文件中填写。
|
|
31
|
+
### 用户需要提供什么
|
|
38
32
|
|
|
39
|
-
|
|
40
|
-
| --- | --- |
|
|
41
|
-
| description、category、subcategory | 必填非空字符串;分类与子分类应使用平台分类表中的配对值,本地暂不校验分类枚举 |
|
|
42
|
-
| terms_of_service、privacy_policy | 必填 HTTP(S) 链接,不含用户名和密码;须使用游戏自己的真实条款与隐私链接 |
|
|
43
|
-
| copyright_confirmation | 必须显式为 true;只有用户已确认版权时才填写,Skill 不得代为默认确认 |
|
|
44
|
-
| apple_team_id、contact_email、region、min_sdk_version | 可选字符串;填写邮箱时检查基本格式 |
|
|
33
|
+
**只收集游戏标题和本地头像,并使用当前游戏目录或代码包。** 描述、分类、服务条款、隐私政策、版权确认及其他应用资料由 CLI 使用既有 PPE 试用默认值补齐,Skill 不向用户索要,也不生成资料表单或自行补值。
|
|
45
34
|
|
|
46
|
-
|
|
35
|
+
能力查询和上传事件均返回 `inputRequirements`:`requiredUserInputs=["title","icon"]`、`additionalMetadataSource="cli-defaults"`、`requestAdditionalMetadata=false`。`--app-info` 仅兼容旧调用,当前流程不使用。
|
|
47
36
|
|
|
48
37
|
### Skill 读取什么
|
|
49
38
|
|
|
@@ -164,9 +153,13 @@ TTMG_VIBE_BACKEND=local-http TTMG_VIBE_API=http://127.0.0.1:3100 ttmg upload --v
|
|
|
164
153
|
|
|
165
154
|
## English
|
|
166
155
|
|
|
156
|
+
The default-metadata fix ships in `0.4.6-vibe-beta.11`. CLI now 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.
|
|
157
|
+
|
|
167
158
|
### Skill entry
|
|
168
159
|
|
|
169
|
-
Scope: local preparation → authorization binding → avatar upload → app-info submission → package upload → **upload complete**. No preview, review or production release. `--web` uses real PPE authorization and uploads; `--mock` still simulates authorization and material uploads.
|
|
160
|
+
Scope: local preparation → authorization binding → avatar upload → app-info submission → package upload → **upload complete**. No preview, review or production release. `--web` uses real PPE authorization and uploads; `--mock` still simulates authorization and material uploads.
|
|
161
|
+
|
|
162
|
+
Automatic upload was fixed in `0.4.6-vibe-beta.9`; the user-input clarification ships in `0.4.6-vibe-beta.10`.
|
|
170
163
|
|
|
171
164
|
Keep the existing --mock command; no environment setup is required:
|
|
172
165
|
|
|
@@ -178,24 +171,13 @@ Use `--package ./game.zip` instead of --dir for a prepared ZIP. Use `--dry-run -
|
|
|
178
171
|
|
|
179
172
|
The Skill gathers the title and user-selected local icon in conversation. It does not call backend APIs, store credentials, poll services, or introduce a metadata form. The CLI internally connects working steps to PPE and simulates the remaining steps. Removing PPE at production launch is a CLI release change, not a Skill configuration step.
|
|
180
173
|
|
|
181
|
-
###
|
|
182
|
-
|
|
183
|
-
Use `--app-info ./app-info.json` to supply complete app information. The CLI submits it with the developer's title and the uploaded icon URI; it does not invent legal URLs or copyright consent. The existing --mock entry is unchanged.
|
|
184
|
-
|
|
185
|
-
```sh
|
|
186
|
-
ttmg upload --vibe --package ./game.zip --title "Test game" --icon ./avatar.png --app-info ./app-info.json --dry-run --format json
|
|
187
|
-
```
|
|
174
|
+
### User inputs
|
|
188
175
|
|
|
189
|
-
|
|
176
|
+
**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 request extra fields, add a form or invent values.
|
|
190
177
|
|
|
191
|
-
|
|
192
|
-
| --- | --- |
|
|
193
|
-
| description, category, subcategory | Required nonempty strings; use a valid platform category/subcategory pair. Local enum validation is not implemented yet |
|
|
194
|
-
| terms_of_service, privacy_policy | Required HTTP(S) URLs without embedded credentials; provide the game's actual legal links |
|
|
195
|
-
| copyright_confirmation | Explicit true only after the user confirms ownership; the Skill must not infer consent |
|
|
196
|
-
| apple_team_id, contact_email, region, min_sdk_version | Optional strings; email receives a basic syntax check |
|
|
178
|
+
Capabilities and upload events include `inputRequirements` with `requiredUserInputs=["title","icon"]`, `additionalMetadataSource="cli-defaults"` and `requestAdditionalMetadata=false`.
|
|
197
179
|
|
|
198
|
-
|
|
180
|
+
The `--app-info` option remains for legacy callers only; the current workflow does not use it.
|
|
199
181
|
|
|
200
182
|
Source checked on 2026-09-14: BFF enforces these icon limits and a 100 MiB Native ZIP/uncompressed-size limit. Full local ZIP-content/uncompressed-size validation is not implemented. Gateway transport, TOS access, phone OAuth and upload receipts still require real integration testing.
|
|
201
183
|
|
|
@@ -277,7 +259,7 @@ The five endpoint contracts are listed in the table above. Mock and loopback HTT
|
|
|
277
259
|
|
|
278
260
|
A business-success response requires error_info.code=0. Package completion additionally requires package_uri and a valid non-failure status; no polling until SUCCEEDED. No platform Cookies or redirects are used. Configure TTMG_VIBE_BACKEND=local-http plus TTMG_VIBE_API=http://127.0.0.1:3100, or pass --vibe-api explicitly; this option rejects remote hosts.
|
|
279
261
|
|
|
280
|
-
For internal PPE integration, set TTMG_VIBE_BACKEND=ppe and TTMG_VIBE_PPE=ppe_op_vc without changing the Skill command. This uses real creation/polling on developers.tiktok.com and encodes the QR as aweme://webview?url=<encodeURIComponent(landing_url)>. The phone must use the same lane. OAuth is not bypassed or simulated. After authorization, the CLI uploads the icon, submits
|
|
262
|
+
For internal PPE integration, set TTMG_VIBE_BACKEND=ppe and TTMG_VIBE_PPE=ppe_op_vc without changing the Skill command. This uses real creation/polling on developers.tiktok.com and encodes the QR as aweme://webview?url=<encodeURIComponent(landing_url)>. The phone must use the same lane. OAuth is not bypassed or simulated. After authorization, the CLI uploads the icon, submits the title and icon URI, and uploads the package. The CLI fills other app metadata with existing PPE trial defaults. The regular --web entry configures PPE internally and opens the system browser.
|
|
281
263
|
|
|
282
264
|
The normal --mock trial internally uses ppe_op_vc without environment variables. Task creation, QR and three polls are real; authorization, icon, app-info and package uploads are simulated with separate in-memory credentials. This changes --mock from an offline run into a PPE integration trial: platformWrite becomes true when task creation is attempted, while simulation remains true. No real material-upload endpoint is called, and real request failures still fail. --mock-scenario controls only simulated steps. Offline unit/process tests use injected transports, not a separate developer configuration.
|
|
283
265
|
|