@ttmg/cli 0.4.6-vibe-beta.11 → 0.4.6-vibe-beta.13
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 +20 -11
- package/dist/index.js +161 -111
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/scripts/verify-agent-contract.js +8 -0
- package/dist/scripts/vibe-upload-smoke.js +2 -2
- package/package.json +1 -1
- package/vibe-upload.md +48 -16
package/dist/package.json
CHANGED
|
@@ -126,6 +126,11 @@ 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
|
+
assert.match(capabilities.commands.vibeUpload.command, /--vibe --web/);
|
|
130
|
+
assert.equal(capabilities.commands.vibeUpload.skillWorkflow.keepUploadProcessRunning, true);
|
|
131
|
+
assert.equal(capabilities.commands.vibeUpload.skillWorkflow.realUploadSuccess.simulation, false);
|
|
132
|
+
assert.equal(capabilities.commands.vibeUpload.appInfoFields.defaultedByCli.includes('privacy_policy'), true);
|
|
133
|
+
assert.equal(packageJson.files.includes('vibe-upload.md'), true);
|
|
129
134
|
assert.equal(capabilities.structuredOutput.stdoutProtocolOnly, true);
|
|
130
135
|
assert.equal(capabilities.commands.check.platformWrite, false);
|
|
131
136
|
assert.equal(capabilities.commands.check.ai.option, '--ai');
|
|
@@ -388,6 +393,9 @@ const uploadHelp = runCli(['upload', '--help']);
|
|
|
388
393
|
assert.doesNotMatch(uploadHelp.stdout, /--app-info/);
|
|
389
394
|
assert.match(uploadHelp.stdout.replace(/\s+/g, ' '), /only title and icon|只收集标题和头像/);
|
|
390
395
|
assertExit(uploadHelp, 0, 'upload help');
|
|
396
|
+
assert.match(uploadHelp.stdout, /--vibe --web --dir/);
|
|
397
|
+
assert.match(uploadHelp.stdout, /authorizationOpenCommand/);
|
|
398
|
+
assert.match(uploadHelp.stdout, /simulation=false/);
|
|
391
399
|
assert.match(uploadHelp.stdout, /--preview\b/);
|
|
392
400
|
assert.match(uploadHelp.stdout, /--serve-preview-page\b/);
|
|
393
401
|
assert.match(uploadHelp.stdout, /--no-open\b/);
|
|
@@ -195,8 +195,8 @@ async function main() {
|
|
|
195
195
|
assert.deepEqual(info.app_info, {
|
|
196
196
|
description: 'DevTool PPE integration test fixture. Not a production game.',
|
|
197
197
|
category: 'Other', subcategory: 'Other',
|
|
198
|
-
terms_of_service: 'https://
|
|
199
|
-
privacy_policy: 'https://
|
|
198
|
+
terms_of_service: 'https://www.tiktok.com',
|
|
199
|
+
privacy_policy: 'https://www.tiktok.com',
|
|
200
200
|
copyright_confirmation: true, contact_email: 'devtool-test@example.invalid',
|
|
201
201
|
app_name: input[input.indexOf('--title') + 1], icon_uri: 'web-icon-receipt',
|
|
202
202
|
}, 'CLI must send complete PPE trial defaults without asking the user for them');
|
package/package.json
CHANGED
package/vibe-upload.md
CHANGED
|
@@ -2,28 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
## 中文
|
|
4
4
|
|
|
5
|
+
自 `0.4.6-vibe-beta.13` 起,默认服务条款 `terms_of_service` 与隐私政策 `privacy_policy` 均提交 `https://www.tiktok.com`,替换原占位地址。
|
|
6
|
+
|
|
5
7
|
默认资料修复已在 `0.4.6-vibe-beta.11` 发布:CLI 自动补齐此前跑通的 PPE 试用资料,用户只提供标题和头像。beta.10 仅修改了输入提示,没有自动补齐字段,真实基础信息提交会被拒绝。
|
|
6
8
|
|
|
7
9
|
本次范围:本地准备 → 授权绑定 → 上传头像 → 提交应用信息 → 上传代码包 → 上传完成。不包含预览、审核或正式发布。`--web` 使用真实 PPE 授权和上传;`--mock` 的授权与素材上传仍为模拟。网页授权后自动上传的修复已在 `0.4.6-vibe-beta.9` 发布;用户输入要求已在 `0.4.6-vibe-beta.10` 修正。
|
|
8
10
|
|
|
9
|
-
###
|
|
11
|
+
### Web 上传入口
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
真实授权和上传使用 `--web`。安装 `vibe-beta` 标签对应的版本,再用 `ttmg --version` 核对实际执行版本。`beta` 是另一个发布标签,不能用它判断 Web 链路是否包含最新修复。无需设置 PPE 环境变量或预先执行 `ttmg login`;用户在本次浏览器授权页完成授权。
|
|
12
14
|
|
|
13
15
|
Skill 只引导开发者准备游戏名称、本地头像和工程,然后调用 CLI、读取结构化状态。不调用平台接口、不保存 Token、不自行轮询、不增加名称头像表单。
|
|
14
16
|
|
|
15
17
|
Skill 固定调用:
|
|
16
18
|
|
|
17
19
|
```sh
|
|
18
|
-
|
|
20
|
+
npm install -g @ttmg/cli@vibe-beta
|
|
21
|
+
ttmg --version
|
|
22
|
+
ttmg capabilities --format json
|
|
23
|
+
ttmg upload --vibe --web --dir ./game --title "星环守卫" --icon ./avatar.png --format ndjson
|
|
19
24
|
```
|
|
20
25
|
|
|
21
|
-
|
|
26
|
+
Skill 启动一次命令并持续读取 NDJSON。宿主工具返回会话 ID 时,继续读取同一进程;等待用户授权期间不终止、不重启,也不再调用第二次上传。`--web` 全程使用真实授权和上传;`--mock` 仅用于下方单独列出的演示。
|
|
22
27
|
|
|
23
28
|
可先检查素材,不创建 task、不打开页面:
|
|
24
29
|
|
|
25
30
|
```sh
|
|
26
|
-
ttmg upload --vibe --dir ./game --title "星环守卫" --icon ./avatar.png --dry-run --format json
|
|
31
|
+
ttmg upload --vibe --web --dir ./game --title "星环守卫" --icon ./avatar.png --dry-run --format json
|
|
27
32
|
```
|
|
28
33
|
|
|
29
34
|
已有 ZIP 时,用 `--package ./game.zip` 替换 `--dir ./game`。名称和头像必须由开发者提供;演示脚本中的临时样本不作为产品默认素材。
|
|
@@ -34,6 +39,15 @@ ttmg upload --vibe --dir ./game --title "星环守卫" --icon ./avatar.png --dry
|
|
|
34
39
|
|
|
35
40
|
能力查询和上传事件均返回 `inputRequirements`:`requiredUserInputs=["title","icon"]`、`additionalMetadataSource="cli-defaults"`、`requestAdditionalMetadata=false`。`--app-info` 仅兼容旧调用,当前流程不使用。
|
|
36
41
|
|
|
42
|
+
CLI 在 `app_info` 请求中自动带上 `description`、`category`、`subcategory`、`terms_of_service`、`privacy_policy`、`copyright_confirmation`、`contact_email`,再填入用户标题和真实上传头像 URI。默认资料标识为 `ppe-trial`;命令中没有这些参数,不代表请求里没传。能力查询的 `appInfoFields.defaultedByCli` 列出默认字段。
|
|
43
|
+
|
|
44
|
+
### Skill 执行顺序
|
|
45
|
+
|
|
46
|
+
1. 调用上方 `--web --format ndjson` 命令;本地预检可先加 `--dry-run`。
|
|
47
|
+
2. 收到 `waiting_authorization`,提示用户在系统浏览器完成授权,保持原进程运行。
|
|
48
|
+
3. 收到 `uploading`,按 `uploadStep` 展示 `avatar`、`app_info`、`package` 进度。授权轮询和上传由 CLI 完成。
|
|
49
|
+
4. 收到 `terminal=true`、`status=uploaded`、`uploaded=true`、`simulation=false`,确认真实上传完成。`failed`、`cancelled` 或进程中断按下方失败说明处理。
|
|
50
|
+
|
|
37
51
|
### Skill 读取什么
|
|
38
52
|
|
|
39
53
|
#### 上传时直接使用网页授权
|
|
@@ -58,6 +72,8 @@ ttmg auth open --page-url <pageUrl> --format json
|
|
|
58
72
|
|
|
59
73
|
命令通过临时本地页面跳转到后端原始 `landing_url`,不使用 `aweme://`,不新建任务或上传文件。凭证只留在上传进程与页面服务中,不输出到 Skill 或放进命令参数。原上传进程继续轮询,授权成功与否以其 `readyForInput` 为准。
|
|
60
74
|
|
|
75
|
+
`pageUrl` 是本机绑定/上传进度页,不是平台原始授权页。`authorizationOpenCommand` 是重新打开同一任务授权页的入口;正常情况下 `--web` 已经自动打开,无需重复执行。`browserOpenRequested=true` 只代表发起打开浏览器,不能据此判定授权成功。两种页面入口都依赖原上传进程,不能把本机链接发给另一台电脑使用。
|
|
76
|
+
|
|
61
77
|
成功返回 `status=open_requested`、`browserOpenRequested=true`、`platformWrite=false`,只表示已请求系统浏览器打开。页面过期、流程结束或没有可用真实授权地址时,返回 `VIBE_AUTH_PAGE_UNAVAILABLE`;URL 输入错误返回 `VIBE_INVALID_PAGE_URL`,浏览器启动失败返回 `VIBE_BROWSER_OPEN_FAILED`。不得因打开失败而自动创建新任务。
|
|
62
78
|
|
|
63
79
|
命令在 CLI 所在电脑执行;远程机器不会打开开发者电脑的浏览器。二维码原路径和 `--mock` 自动推进逻辑保持不变;真实网页授权与上传使用 `--web`。
|
|
@@ -105,13 +121,13 @@ ttmg upload --vibe --package ./game.zip --title "测试游戏" --icon ./avatar.p
|
|
|
105
121
|
| icon-failed / info-failed / upload-failed | 在对应上传步骤失败,uploadStep 指明位置 |
|
|
106
122
|
| processing | 包已上传,后端状态仍为 PROCESSING;CLI 返回 uploaded,不等 SUCCEEDED |
|
|
107
123
|
|
|
108
|
-
Mock 的 denied
|
|
124
|
+
Mock 的 denied 是交互测试场景,真实端内拒绝授权如何映射错误仍待后端确认。独立离线测试通过注入传输实现;用户执行的 `--mock` 会真实创建并查询 PPE 任务,但不调用真实素材上传接口。
|
|
109
125
|
|
|
110
126
|
轮询间隔使用创建任务返回的 `poll_interval_seconds`,第三次真实查询后模拟授权。`--poll-interval` 仅用于覆盖测试间隔。`--timeout` 是整体超时,默认 300 秒。不自动重试写接口、不实现跨进程续传。
|
|
111
127
|
|
|
112
128
|
### 页面与素材
|
|
113
129
|
|
|
114
|
-
|
|
130
|
+
同一电脑本地页显示绑定状态、上传进度、上传完成;二维码模式显示授权绑定码,Web 模式在系统浏览器完成授权。失败时清除授权码并显示失败原因。`--web` 在 text、JSON、NDJSON 格式下均自动打开授权页;其他模式只有 text 默认打开本地页,可用 `--no-open` 关闭。Skill 可用 `pageUrl` 展示本地进度页。
|
|
115
131
|
|
|
116
132
|
页面只监听 127.0.0.1,二维码才由手机扫描,手机不访问 pageUrl。默认 15 分钟后关闭,内容驻留内存;测试可设置 `TTMG_VIBE_PAGE_TTL_MS`(1—900000)。取消进程会关闭页面;成功与可显示的失败页面保留至到期。不要分享本地页面地址。
|
|
117
133
|
|
|
@@ -143,7 +159,7 @@ TTMG_VIBE_BACKEND=local-http TTMG_VIBE_API=http://127.0.0.1:3100 ttmg upload --v
|
|
|
143
159
|
|
|
144
160
|
**v1 → v2 兼容性变化**:旧 UUID 换 Token 的三接口协议废弃,`--vibe-authorize-url` 返回明确错误;授权地址来自 landing_url。不再输出 preview_ready、game_preview、uploadId、reviewStatus。Skill 必须校验 schemaVersion=2,并按新终态处理。普通不带 --vibe 的 upload 不变。
|
|
145
161
|
|
|
146
|
-
2026-09-14 已核对 BFF 源码:头像 PNG/JPEG、1024×1024、5 MiB;Native ZIP 和解压总大小上限 100 MiB。本地暂未实现完整 ZIP
|
|
162
|
+
2026-09-14 已核对 BFF 源码:头像 PNG/JPEG、1024×1024、5 MiB;Native ZIP 和解压总大小上限 100 MiB。本地暂未实现完整 ZIP 内容及解压总大小校验。2026-09-15 修复构建使用自有测试素材跑通真实 PPE 网页授权、头像、默认资料和代码包上传;该验证不覆盖全部游戏、手机授权或正式环境。后端接口调整留在适配层处理;若用户动作或成功语义改变,应协商升级 CLI schema。
|
|
147
163
|
|
|
148
164
|
### 验证
|
|
149
165
|
|
|
@@ -153,23 +169,28 @@ TTMG_VIBE_BACKEND=local-http TTMG_VIBE_API=http://127.0.0.1:3100 ttmg upload --v
|
|
|
153
169
|
|
|
154
170
|
## English
|
|
155
171
|
|
|
156
|
-
|
|
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.
|
|
157
173
|
|
|
158
|
-
|
|
174
|
+
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
|
+
|
|
176
|
+
### Web upload entry
|
|
159
177
|
|
|
160
178
|
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
179
|
|
|
162
180
|
Automatic upload was fixed in `0.4.6-vibe-beta.9`; the user-input clarification ships in `0.4.6-vibe-beta.10`.
|
|
163
181
|
|
|
164
|
-
|
|
182
|
+
Use `--web` for real authorization and upload. Install `vibe-beta` and check the executable with `ttmg --version`. The separate `beta` tag does not identify the latest Web fixes. No PPE environment variables or prior `ttmg login` are required; the user authorizes in the browser for this task.
|
|
165
183
|
|
|
166
184
|
```sh
|
|
167
|
-
|
|
185
|
+
npm install -g @ttmg/cli@vibe-beta
|
|
186
|
+
ttmg --version
|
|
187
|
+
ttmg capabilities --format json
|
|
188
|
+
ttmg upload --vibe --web --dir ./game --title "My game" --icon ./avatar.png --format ndjson
|
|
168
189
|
```
|
|
169
190
|
|
|
170
|
-
Use `--package ./game.zip` instead of
|
|
191
|
+
Use `--package ./game.zip` instead of `--dir` for an existing ZIP. Add `--dry-run --format json` to the Web command for local preparation only; it creates no task and opens no browser.
|
|
171
192
|
|
|
172
|
-
|
|
193
|
+
Start one command and keep reading its NDJSON. If the host tool returns a session ID, keep reading that same process while the user authorizes. Do not stop, restart or launch another upload. `--web` uses real authorization and uploads throughout; `--mock` is the separate demo mode below. The Skill does not call platform APIs, store credentials or add a metadata form.
|
|
173
194
|
|
|
174
195
|
### User inputs
|
|
175
196
|
|
|
@@ -179,7 +200,16 @@ Capabilities and upload events include `inputRequirements` with `requiredUserInp
|
|
|
179
200
|
|
|
180
201
|
The `--app-info` option remains for legacy callers only; the current workflow does not use it.
|
|
181
202
|
|
|
182
|
-
|
|
203
|
+
The CLI submits `description`, `category`, `subcategory`, `terms_of_service`, `privacy_policy`, `copyright_confirmation` and `contact_email` inside `app_info`, together with the user title and uploaded icon URI. The profile is `ppe-trial`; missing command-line arguments do not mean missing request fields. Capabilities list the defaults under `appInfoFields.defaultedByCli`.
|
|
204
|
+
|
|
205
|
+
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
|
+
|
|
207
|
+
### Skill execution order
|
|
208
|
+
|
|
209
|
+
1. Run the `--web --format ndjson` command above; optionally precheck with `--dry-run`.
|
|
210
|
+
2. At `waiting_authorization`, ask the user to authorize in the system browser and keep the process running.
|
|
211
|
+
3. At `uploading`, display `uploadStep`: `avatar`, `app_info`, then `package`. The CLI owns polling and uploads.
|
|
212
|
+
4. Confirm real completion only when `terminal=true`, `status=uploaded`, `uploaded=true`, `simulation=false`. Handle failure, cancellation or interruption as described below.
|
|
183
213
|
|
|
184
214
|
### Output and decisions
|
|
185
215
|
|
|
@@ -210,6 +240,8 @@ Credentials stay inside the uploader/page worker, not in Skill output or command
|
|
|
210
240
|
arguments. The original uploader keeps polling; its `readyForInput` determines
|
|
211
241
|
authorization readiness.
|
|
212
242
|
|
|
243
|
+
`pageUrl` is the local binding/upload-progress page, not the original platform authorization URL. To reopen authorization for the same task, execute `authorizationOpenCommand`. Normally `--web` has already opened it. `browserOpenRequested=true` only confirms the open request, not authorization. Both page entry points depend on the original uploader and the CLI computer; do not send localhost links to another computer.
|
|
244
|
+
|
|
213
245
|
Success reports `status=open_requested`, `browserOpenRequested=true`, and
|
|
214
246
|
`platformWrite=false`; it does not mean authorization succeeded. Expired,
|
|
215
247
|
completed, or unavailable authorization pages return `VIBE_AUTH_PAGE_UNAVAILABLE`;
|
|
@@ -265,4 +297,4 @@ The normal --mock trial internally uses ppe_op_vc without environment variables.
|
|
|
265
297
|
|
|
266
298
|
Schema-v1 UUID endpoints, --vibe-authorize-url, preview_ready, game_preview, uploadId and reviewStatus are retired. The deprecated option returns an explicit error. Ordinary upload without --vibe is unchanged.
|
|
267
299
|
|
|
268
|
-
Unconfirmed:
|
|
300
|
+
Unconfirmed: token expiry/retry rules, actual denial mapping and in-client PPE Cookie behavior. Run test:vibe, built test:vibe-process, and test:agent-contract. Local contract tests do not establish real platform or device results; the PPE test-fixture result above is recorded separately.
|