@ttmg/cli 0.4.6-vibe-beta.2 → 0.4.6-vibe-beta.3

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 CHANGED
@@ -87,13 +87,15 @@ ttmg dev
87
87
  ```
88
88
 
89
89
  For Agent usage, pass the Client Key explicitly, suppress the browser, and
90
- request the session manifest plus NDJSON lifecycle events. The existing
91
- interactive `ttmg dev` flow is unchanged.
92
- Agent 调用时需显式传入 Client Key、禁止自动打开浏览器,并读取会话描述和 NDJSON 生命周期事件;原有交互式 `ttmg dev` 流程保持不变。
90
+ choose either one JSON session manifest or an NDJSON lifecycle event stream.
91
+ The two stdout modes are mutually exclusive. The existing interactive `ttmg
92
+ dev` flow is unchanged.
93
+ Agent 调用时需显式传入 Client Key、禁止自动打开浏览器,并在单份 JSON 会话描述和 NDJSON 生命周期事件流中二选一;两种 stdout 模式不能同时使用。原有交互式 `ttmg dev` 流程保持不变。
93
94
 
94
95
  ```
95
- ttmg dev --client-key <client-key> --format json --events ndjson --no-open
96
- ttmg dev --client-key <client-key> --format json --events ndjson --no-open --timeout 120
96
+ ttmg dev --client-key <client-key> --format json --no-open
97
+ ttmg dev --client-key <client-key> --events ndjson --no-open
98
+ ttmg dev --client-key <client-key> --events ndjson --no-open --timeout 120
97
99
  ```
98
100
 
99
101
  The command writes `manifest.json`, `events.ndjson`, `actions.ndjson`,
@@ -191,6 +193,8 @@ The upload command packages the project and creates a new Developer Platform
191
193
  version. With `--preview`, it also waits for platform processing and returns the
192
194
  preview payload.
193
195
  上传命令会打包项目并在 Developer Platform 创建新版本;增加 `--preview` 后还会等待平台处理完成并返回预览地址。
196
+ The upload ZIP excludes the root `.agent`, `.claude`, and `.trae` directories.
197
+ 上传 ZIP 不包含项目根目录下的 `.agent`、`.claude` 和 `.trae`。
194
198
 
195
199
  ```
196
200
  ttmg upload --preview --client-key <client-key> --dir <game-dir> --format ndjson
package/dist/index.js CHANGED
@@ -7221,6 +7221,7 @@ const messages = {
7221
7221
  'cli.command.dev.noOpen': 'Do not open the DevTool page automatically',
7222
7222
  'cli.command.dev.evidenceDir': 'Session evidence output directory',
7223
7223
  'cli.command.dev.timeout': 'Stop a structured session after this many seconds',
7224
+ 'cli.command.dev.outputConflict': 'Dev output modes cannot be combined. Use either --format json for one manifest or --events ndjson for a lifecycle event stream.',
7224
7225
  'cli.command.dev.session.desc': 'Inspect and stop local DevTool sessions',
7225
7226
  'cli.command.dev.session.inspect': 'Inspect one local DevTool session',
7226
7227
  'cli.command.dev.session.list': 'List local DevTool sessions',
@@ -7441,6 +7442,7 @@ const messages = {
7441
7442
  'cli.command.dev.noOpen': '不自动打开 DevTool 页面',
7442
7443
  'cli.command.dev.evidenceDir': '会话证据输出目录',
7443
7444
  'cli.command.dev.timeout': '在指定秒数后停止结构化调试会话',
7445
+ 'cli.command.dev.outputConflict': 'Dev 输出模式不能同时使用:请用 --format json 输出一份 manifest,或用 --events ndjson 输出生命周期事件流。',
7444
7446
  'cli.command.dev.session.desc': '查询和停止本地 DevTool 会话',
7445
7447
  'cli.command.dev.session.inspect': '查询一个本地 DevTool 会话',
7446
7448
  'cli.command.dev.session.list': '列出本地 DevTool 会话',
@@ -8226,6 +8228,9 @@ const zipCwdToBuffer = (customIgnores = [], targetDir = process.cwd()) => {
8226
8228
  const defaultIgnores = [
8227
8229
  'node_modules/**',
8228
8230
  '.git/**',
8231
+ '.agent/**',
8232
+ '.claude/**',
8233
+ '.trae/**',
8229
8234
  '.DS_Store',
8230
8235
  ttmgPack.TTMG_TEMP_DIR,
8231
8236
  `${ttmgPack.TTMG_TEMP_DIR}/**`,
@@ -15117,7 +15122,7 @@ async function authStatus(options = {}) {
15117
15122
  return result;
15118
15123
  }
15119
15124
 
15120
- var version = "0.4.6-vibe-beta.2";
15125
+ var version = "0.4.6-vibe-beta.3";
15121
15126
  var engines = {
15122
15127
  node: ">=20.19.1 <21 || >=22"
15123
15128
  };
@@ -15173,7 +15178,9 @@ function getCapabilities() {
15173
15178
  platformWrite: false,
15174
15179
  },
15175
15180
  dev: {
15176
- command: 'ttmg dev --format json --events ndjson --no-open',
15181
+ command: 'ttmg dev --format json --no-open',
15182
+ eventsCommand: 'ttmg dev --events ndjson --no-open',
15183
+ outputModesMutuallyExclusive: true,
15177
15184
  available: true,
15178
15185
  platformWrite: false,
15179
15186
  timeout: true,
@@ -15744,6 +15751,13 @@ const devCmd = program
15744
15751
  .option('--timeout <seconds>', t('cli.command.dev.timeout'));
15745
15752
  withVerboseOption(devCmd).action(async (cmd) => {
15746
15753
  const options = program.opts();
15754
+ const format = String(cmd.format || 'text').toLowerCase();
15755
+ const events = String(cmd.events || 'none').toLowerCase();
15756
+ if (format === 'json' && events === 'ndjson') {
15757
+ console.error(t('cli.command.dev.outputConflict'));
15758
+ process.exitCode = 1;
15759
+ return;
15760
+ }
15747
15761
  if (options.h5) {
15748
15762
  await dev$1();
15749
15763
  }
@@ -21905,6 +21919,9 @@ function normalizeTimeout(timeout) {
21905
21919
  async function dev(options = {}) {
21906
21920
  const format = normalizeFormat(options.format);
21907
21921
  const events = normalizeEvents(options.events);
21922
+ if (format === 'json' && events === 'ndjson') {
21923
+ throw new Error('Dev output modes cannot be combined. Use either --format json or --events ndjson.');
21924
+ }
21908
21925
  const structured = format === 'json' || events === 'ndjson';
21909
21926
  const timeoutMs = normalizeTimeout(options.timeout);
21910
21927
  if (timeoutMs > 0 && !structured) {