@ttmg/cli 0.4.6-vibe-beta.9 → 0.4.6-vibe-beta.10
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 +30 -17
- 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 +18 -1
- package/package.json +1 -1
- package/vibe-upload.md +12 -34
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
### @ttmg/cli
|
|
2
2
|
|
|
3
|
-
Vibe 真实网页授权与上传:`ttmg upload --vibe --web --dir ./game --title "My game" --icon ./avatar.png --format ndjson
|
|
3
|
+
Vibe 真实网页授权与上传:`ttmg upload --vibe --web --dir ./game --title "My game" --icon ./avatar.png --format ndjson`。只向用户收集标题和本地头像,并使用游戏目录或代码包;其他应用资料由平台默认处理,不需要用户填写。网页授权后,CLI 自动继续上传。见 [Vibe 接入说明](vibe-upload.md)。
|
|
4
4
|
|
|
5
|
-
Vibe real web authorization and upload: use `--web`
|
|
5
|
+
Vibe real web authorization and upload: use `--web` with the title, local icon and game directory or ZIP. Collect only the title and icon from the user; the platform defaults all other app metadata. Upload continues after browser authorization. See [Vibe integration](vibe-upload.md).
|
|
6
6
|
|
|
7
7
|
`ttmg` is a command-line tool designed for managing and developing mini-game projects. It supports initialization, development, debugging, and packaging for both H5 and native mini-games.
|
|
8
8
|
`ttmg` 是一款专为小游戏项目管理与开发设计的命令行工具,支持 H5 小游戏和原生小游戏的初始化、开发调试及打包构建。
|
|
@@ -69,8 +69,8 @@ simulated. See [Vibe binding/upload](vibe-upload.md) for schema-v2 results.
|
|
|
69
69
|
`--mock` now creates real PPE tasks, not a fully offline run. Real request failures
|
|
70
70
|
still fail. Production routing is a future CLI release change, not Skill configuration.
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
当前上传只需要标题、头像和游戏目录或代码包,其他应用资料由平台默认处理。Skill 读取 `inputRequirements`,不向用户索要额外资料;本地预检使用 `--dry-run`。
|
|
73
|
+
Current uploads need only the title, icon and game directory or ZIP. The platform defaults other metadata. Read `inputRequirements` and do not request extra fields. Use `--dry-run` for local preparation.
|
|
74
74
|
|
|
75
75
|
For the existing authenticated platform workflow, log in first; this does not apply to the local Vibe prototype above.
|
|
76
76
|
原有需要平台鉴权的流程仍先登录;上述 Vibe 本地原型不需要此步骤。
|
package/dist/index.js
CHANGED
|
@@ -7435,9 +7435,9 @@ const messages = {
|
|
|
7435
7435
|
'cli.command.upload.servePreviewPage': 'Serve a temporary local preview page with test-account and preview QR codes',
|
|
7436
7436
|
'cli.command.upload.noOpen': 'Do not open the local preview page in the default browser',
|
|
7437
7437
|
'cli.command.upload.format': 'Output format: text | json | ndjson',
|
|
7438
|
-
'cli.command.upload.vibe': '
|
|
7438
|
+
'cli.command.upload.vibe': 'Binding and upload: collect only title and icon; other app metadata uses platform defaults (schema v2)',
|
|
7439
7439
|
'cli.command.upload.vibeTitle': 'Game title supplied by the Skill (--vibe)',
|
|
7440
|
-
'cli.command.upload.vibeAppInfo': '
|
|
7440
|
+
'cli.command.upload.vibeAppInfo': 'Legacy metadata file compatibility; not needed for current uploads and must not be requested from users',
|
|
7441
7441
|
'cli.command.upload.vibeIcon': 'Local PNG/JPEG/WebP selected by the user (--vibe)',
|
|
7442
7442
|
'cli.command.upload.vibePackage': 'Prepared ZIP instead of --dir (--vibe)',
|
|
7443
7443
|
'cli.command.upload.vibeDryRun': 'Validate and package locally without authorization or upload (--vibe)',
|
|
@@ -7848,8 +7848,8 @@ const messages = {
|
|
|
7848
7848
|
'cli.command.upload.servePreviewPage': '启动包含测试账号与预览二维码的临时本地页面',
|
|
7849
7849
|
'cli.command.upload.noOpen': '不使用默认浏览器打开本地预览页面',
|
|
7850
7850
|
'cli.command.upload.format': '输出格式:text | json | ndjson',
|
|
7851
|
-
'cli.command.upload.vibe': '
|
|
7852
|
-
'cli.command.upload.vibeAppInfo': '
|
|
7851
|
+
'cli.command.upload.vibe': '绑定上传:只收集标题和头像,其他应用资料由平台默认处理(schema v2)',
|
|
7852
|
+
'cli.command.upload.vibeAppInfo': '仅兼容旧资料文件;当前上传无需此参数,不应向用户索要',
|
|
7853
7853
|
'cli.command.upload.vibeTitle': 'Skill 提供的游戏标题(--vibe)',
|
|
7854
7854
|
'cli.command.upload.vibeIcon': '用户指定的本地 PNG/JPEG/WebP 图片(--vibe)',
|
|
7855
7855
|
'cli.command.upload.vibePackage': '已准备的 ZIP,与 --dir 二选一(--vibe)',
|
|
@@ -16308,7 +16308,7 @@ async function authStatus(options = {}) {
|
|
|
16308
16308
|
return result;
|
|
16309
16309
|
}
|
|
16310
16310
|
|
|
16311
|
-
var version = "0.4.6-vibe-beta.
|
|
16311
|
+
var version = "0.4.6-vibe-beta.10";
|
|
16312
16312
|
var engines = {
|
|
16313
16313
|
node: ">=20.19.1 <21 || >=22"
|
|
16314
16314
|
};
|
|
@@ -16317,6 +16317,20 @@ var pkg = {
|
|
|
16317
16317
|
engines: engines
|
|
16318
16318
|
};
|
|
16319
16319
|
|
|
16320
|
+
// Skill-facing v2 contract. Backend credentials never cross this boundary.
|
|
16321
|
+
const VIBE_INPUT_REQUIREMENTS = {
|
|
16322
|
+
requiredUserInputs: ['title', 'icon'],
|
|
16323
|
+
codeSource: ['dir', 'package'],
|
|
16324
|
+
additionalMetadataSource: 'platform-defaults',
|
|
16325
|
+
requestAdditionalMetadata: false,
|
|
16326
|
+
};
|
|
16327
|
+
class VibeError extends Error {
|
|
16328
|
+
constructor(code) {
|
|
16329
|
+
super(code);
|
|
16330
|
+
this.code = code;
|
|
16331
|
+
}
|
|
16332
|
+
}
|
|
16333
|
+
|
|
16320
16334
|
function getCapabilities() {
|
|
16321
16335
|
return {
|
|
16322
16336
|
schemaVersion: '1',
|
|
@@ -16358,12 +16372,17 @@ function getCapabilities() {
|
|
|
16358
16372
|
uploadSteps: ['avatar', 'app_info', 'package'],
|
|
16359
16373
|
sourceProjectIdentity: '.ttmg/vibe-project.json',
|
|
16360
16374
|
metadataInputs: ['title', 'icon', 'dir|package'],
|
|
16375
|
+
inputRequirements: VIBE_INPUT_REQUIREMENTS,
|
|
16361
16376
|
webAuthorization: { option: '--web', backend: 'ppe', defaultLane: 'ppe_op_vc', simulation: false, opensSystemBrowser: true, continuesPolling: true, formatIndependent: true, conflictsWith: ['--mock', '--mock-scenario', '--vibe-api', '--no-open'], mockBehaviorUnchanged: true, materialUploadEnabled: true },
|
|
16362
16377
|
optionalMetadataFile: '--app-info',
|
|
16363
16378
|
appInfoFields: {
|
|
16364
|
-
required: [
|
|
16365
|
-
optional: [
|
|
16379
|
+
required: [],
|
|
16380
|
+
optional: [],
|
|
16366
16381
|
suppliedByCli: ['app_name', 'icon_uri'],
|
|
16382
|
+
additionalMetadataSource: 'platform-defaults',
|
|
16383
|
+
requestFromUser: false,
|
|
16384
|
+
legacyFileOption: '--app-info',
|
|
16385
|
+
legacyFileOptionRecommended: false,
|
|
16367
16386
|
},
|
|
16368
16387
|
appInfoPreflight: {
|
|
16369
16388
|
titleMaxCharacters: 30,
|
|
@@ -17125,7 +17144,7 @@ withVerboseOption(program
|
|
|
17125
17144
|
// Vibe v2 backend selection (including opt-in ppe-mock) stays outside the Skill workflow.
|
|
17126
17145
|
.option('--title <title>', t('cli.command.upload.vibeTitle'))
|
|
17127
17146
|
.option('--icon <path>', t('cli.command.upload.vibeIcon'))
|
|
17128
|
-
.
|
|
17147
|
+
.addOption(new commander.Option('--app-info <path>', t('cli.command.upload.vibeAppInfo')).hideHelp())
|
|
17129
17148
|
.option('--package <path>', t('cli.command.upload.vibePackage'))
|
|
17130
17149
|
.option('--dry-run', t('cli.command.upload.vibeDryRun'))
|
|
17131
17150
|
.option('--mock', t('cli.command.upload.vibeMock'))
|
|
@@ -17575,13 +17594,6 @@ else {
|
|
|
17575
17594
|
program.parse(process.argv);
|
|
17576
17595
|
}
|
|
17577
17596
|
|
|
17578
|
-
class VibeError extends Error {
|
|
17579
|
-
constructor(code) {
|
|
17580
|
-
super(code);
|
|
17581
|
-
this.code = code;
|
|
17582
|
-
}
|
|
17583
|
-
}
|
|
17584
|
-
|
|
17585
17597
|
// Only the backend-owned authorization page can be a browser redirect target.
|
|
17586
17598
|
// Never return its import_token to Skill stdout or put it in a CLI argument.
|
|
17587
17599
|
function browserLandingUrl(value) {
|
|
@@ -18854,6 +18866,7 @@ async function executeVibeUpload(options, onEvent = () => { }, dependencies = {}
|
|
|
18854
18866
|
schemaVersion: '2',
|
|
18855
18867
|
command: 'upload',
|
|
18856
18868
|
mode: 'vibe',
|
|
18869
|
+
inputRequirements: VIBE_INPUT_REQUIREMENTS,
|
|
18857
18870
|
operationId: `vibe_${crypto.randomUUID()}`,
|
|
18858
18871
|
ts: Date.now(),
|
|
18859
18872
|
status: 'precheck',
|
|
@@ -19166,8 +19179,8 @@ async function executeVibeUpload(options, onEvent = () => { }, dependencies = {}
|
|
|
19166
19179
|
VIBE_TITLE_REQUIRED: ['请提供游戏名称。', 'Provide a game title.'],
|
|
19167
19180
|
VIBE_TITLE_TOO_LONG: ['游戏名称不能超过 30 个字符。', 'The game title must not exceed 30 characters.'],
|
|
19168
19181
|
VIBE_INVALID_APP_INFO: [
|
|
19169
|
-
'
|
|
19170
|
-
'
|
|
19182
|
+
'旧 --app-info 文件无效。当前上传只需标题和头像,其他资料由平台默认处理;移除 --app-info 后重试,不要向用户索要额外资料。',
|
|
19183
|
+
'Invalid legacy --app-info file. Current uploads need only title and icon; the platform defaults other metadata. Remove --app-info and retry without requesting extra fields from the user.',
|
|
19171
19184
|
],
|
|
19172
19185
|
VIBE_PLATFORM_ICON_INVALID: [
|
|
19173
19186
|
'平台头像要求 PNG/JPEG、1024×1024,且不超过 5 MiB,请重新选择本地图片。',
|