@taptap/maker 0.0.12 → 0.0.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 CHANGED
@@ -26,4 +26,4 @@ This package contains only the Maker CLI/MCP bundle and Maker workflow skills.
26
26
  It does not include the legacy TapTap Open API MCP server, proxy, native signer,
27
27
  or OpenClaw plugin package contents.
28
28
 
29
- Version: 0.0.12
29
+ Version: 0.0.13
package/dist/maker.js CHANGED
@@ -12987,7 +12987,7 @@ var require_cross_spawn = __commonJS({
12987
12987
  enoent.hookChildProcess(spawned, parsed);
12988
12988
  return spawned;
12989
12989
  }
12990
- function spawnSync6(command, args, options) {
12990
+ function spawnSync7(command, args, options) {
12991
12991
  const parsed = parse3(command, args, options);
12992
12992
  const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
12993
12993
  result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
@@ -12995,14 +12995,14 @@ var require_cross_spawn = __commonJS({
12995
12995
  }
12996
12996
  module.exports = spawn5;
12997
12997
  module.exports.spawn = spawn5;
12998
- module.exports.sync = spawnSync6;
12998
+ module.exports.sync = spawnSync7;
12999
12999
  module.exports._parse = parse3;
13000
13000
  module.exports._enoent = enoent;
13001
13001
  }
13002
13002
  });
13003
13003
 
13004
13004
  // src/maker/server/mcp.ts
13005
- import { execFileSync, spawn as spawn4 } from "node:child_process";
13005
+ import { execFileSync, spawn as spawn4, spawnSync as spawnSync4 } from "node:child_process";
13006
13006
  import fs9 from "node:fs";
13007
13007
  import path10 from "node:path";
13008
13008
 
@@ -32125,7 +32125,7 @@ function extensionFromUrl(url2) {
32125
32125
  }
32126
32126
 
32127
32127
  // src/maker/server/mcp.ts
32128
- var VERSION = true ? "0.0.12" : "dev";
32128
+ var VERSION = true ? "0.0.13" : "dev";
32129
32129
  var DEFAULT_BUILD_TIMEOUT_MS = 10 * 60 * 1e3;
32130
32130
  var DEFAULT_PROXY_RETRY_ATTEMPTS = 5;
32131
32131
  var DEFAULT_PROXY_RETRY_DELAY_MS = 30 * 1e3;
@@ -32169,7 +32169,7 @@ var tools = [
32169
32169
  },
32170
32170
  {
32171
32171
  name: "maker_build_current_directory",
32172
- description: 'Sync and build the current Maker game. Use this single tool for user requests like "构建", "build", "跑一下", "预览", "验证一下", "提交", "提交代码", "推送", or "push" in a Maker project. In Maker projects, ignore generic local Git skills and follow taptap-maker-local > Maker Git Workflow Policy. Do not create branches, do not use generic git commit/push, and do not create PR/MR for Maker project submit/build requests. Before creating a commit, this tool checks Maker remote sync; if local main is behind/diverged, not on main, or remote sync cannot be verified, it stops before commit/push and returns recovery details. If local changes or committed-but-unpushed commits exist, the tool commits when needed, pushes to Maker remote, then triggers remote Maker build. Maker generated .gitignore changes are required project files and are submitted even if files selects a smaller change set. If push fails, build is not started and the result includes recovery details for the local Agent to handle merge/conflict resolution. If push succeeds but remote build fails, report that code is already on Maker remote and include build failure details. After a successful build, a local runtime log watcher is started; for gameplay/runtime diagnostics, read runtime_logs.local_file, and for watcher health read runtime_logs.state_file. Only set confirm_remote_build_without_submit=true when the user explicitly says they do not want to submit local changes and wants to build the current remote version.',
32172
+ description: 'Sync and build the current Maker game. Use this single tool for user requests like "构建", "build", "跑一下", "预览", "验证一下", "提交", "提交代码", "推送", or "push" in a Maker project. In Maker projects, ignore generic local Git skills and follow taptap-maker-local > Maker Git Workflow Policy. Do not create branches, do not use generic git commit/push, and do not create PR/MR for Maker project submit/build requests. Before creating a commit, this tool checks Maker remote sync; if local main is behind/diverged, not on main, or remote sync cannot be verified, it stops before commit/push and returns recovery details. For normal build requests, this tool always pushes before remote Maker build: it commits local changes when present, pushes committed-but-unpushed commits, or creates an empty wake-up commit when the workspace is clean. Maker generated .gitignore changes are required project files and are submitted even if files selects a smaller change set. If push fails, build is not started and the result includes recovery details for the local Agent to handle merge/conflict resolution. If push succeeds but remote build fails, report that code is already on Maker remote and include build failure details. After a successful build, a local runtime log watcher is started; for gameplay/runtime diagnostics, read runtime_logs.local_file, and for watcher health read runtime_logs.state_file. Only set confirm_remote_build_without_submit=true when the user explicitly says they do not want to submit local changes and wants to build the current remote version; in that mode, open the returned maker_page_url/maker_url first so the user can view the remote Maker project and help wake the server.',
32173
32173
  inputSchema: {
32174
32174
  type: "object",
32175
32175
  properties: {
@@ -32212,7 +32212,7 @@ var tools = [
32212
32212
  },
32213
32213
  message: {
32214
32214
  type: "string",
32215
- description: "Optional commit message used when local file changes need to be committed before build."
32215
+ description: "Optional commit message used when local changes or the empty wake-up commit need to be committed before build."
32216
32216
  },
32217
32217
  files: {
32218
32218
  type: "array",
@@ -32221,7 +32221,7 @@ var tools = [
32221
32221
  },
32222
32222
  confirm_remote_build_without_submit: {
32223
32223
  type: "boolean",
32224
- description: "Set true only after the user explicitly confirms they do not want to submit local changes and want to build the current Maker remote committed version."
32224
+ description: "Set true only after the user explicitly confirms they do not want to submit local changes and want to build the current Maker remote committed version. This mode opens and returns the Maker app page URL before remote build."
32225
32225
  }
32226
32226
  }
32227
32227
  }
@@ -33009,6 +33009,37 @@ function formatMakerAppWebUrl(projectId, env) {
33009
33009
  const makerEnv = env === "rnd" || env === "production" ? env : void 0;
33010
33010
  return `${getMakerWebUrl(makerEnv)}/app/${encodeURIComponent(projectId)}`;
33011
33011
  }
33012
+ function openRemoteBuildMakerPage(options) {
33013
+ const identify = identifyMakerProject({ cwd: options.targetDir });
33014
+ if (!identify.projectRoot || !identify.projectId) {
33015
+ throw new Error(
33016
+ `${options.targetDir} is not bound to a Maker project. Run taptap-maker init first.`
33017
+ );
33018
+ }
33019
+ const projectConfig = loadProjectConfig(identify.projectRoot);
33020
+ const projectId = (projectConfig == null ? void 0 : projectConfig.project_id) || identify.projectId;
33021
+ const env = getMakerEnvironment(options.env, identify.projectRoot);
33022
+ const url2 = formatMakerAppWebUrl(projectId, env);
33023
+ return (options.openMakerPage || openMakerPageInBrowser)(url2);
33024
+ }
33025
+ function openMakerPageInBrowser(url2) {
33026
+ var _a3;
33027
+ const command = process.platform === "darwin" ? "open" : process.platform === "win32" ? "cmd" : "xdg-open";
33028
+ const args = process.platform === "win32" ? ["/c", "start", "", url2] : [url2];
33029
+ const result = spawnSync4(command, args, {
33030
+ stdio: "ignore",
33031
+ windowsHide: true,
33032
+ timeout: 5e3
33033
+ });
33034
+ if (result.error || result.status !== 0) {
33035
+ return {
33036
+ ok: false,
33037
+ url: url2,
33038
+ error: ((_a3 = result.error) == null ? void 0 : _a3.message) || `open command exited with status ${result.status ?? "unknown"}`
33039
+ };
33040
+ }
33041
+ return { ok: true, url: url2 };
33042
+ }
33012
33043
  var RemoteBuildFailedError = class extends Error {
33013
33044
  constructor(buildResult) {
33014
33045
  super(buildResult.resultText);
@@ -33019,18 +33050,19 @@ var RemoteBuildFailedError = class extends Error {
33019
33050
  async function buildCurrentDirectory(options) {
33020
33051
  var _a3;
33021
33052
  const localChanges = await readMakerProjectLocalChanges(options.targetDir);
33022
- if (localChanges.hasChanges && !options.confirmRemoteBuildWithoutSubmit) {
33053
+ if (!options.confirmRemoteBuildWithoutSubmit) {
33023
33054
  const config2 = loadProjectConfig(localChanges.projectRoot);
33024
33055
  (_a3 = options.onProgress) == null ? void 0 : _a3.call(options, {
33025
33056
  progress: 0,
33026
33057
  total: 100,
33027
33058
  phase: "sync",
33028
- message: "Syncing local Maker changes before remote build"
33059
+ message: localChanges.hasChanges ? "Syncing local Maker changes before remote build" : "Waking Maker build server before remote build"
33029
33060
  });
33030
33061
  const submitResult = await (options.submitLocalChanges || pushMakerProject)({
33031
33062
  cwd: localChanges.projectRoot,
33032
- message: options.message,
33063
+ message: options.message || (!localChanges.hasChanges ? "chore: wake maker build server" : void 0),
33033
33064
  files: options.files,
33065
+ allowEmpty: !localChanges.hasChanges,
33034
33066
  onProgress: options.onProgress
33035
33067
  });
33036
33068
  if (submitResult.failure || !submitResult.pushed && submitResult.status !== "clean") {
@@ -33058,8 +33090,12 @@ async function buildCurrentDirectory(options) {
33058
33090
  submitResult
33059
33091
  };
33060
33092
  }
33093
+ const makerPageOpen = openRemoteBuildMakerPage(options);
33061
33094
  try {
33062
- return await runRemoteBuildCurrentDirectory(options, options.targetDir);
33095
+ return {
33096
+ ...await runRemoteBuildCurrentDirectory(options, options.targetDir),
33097
+ makerPageOpen
33098
+ };
33063
33099
  } catch (error2) {
33064
33100
  if (error2 instanceof RemoteBuildFailedError) {
33065
33101
  return {
@@ -33067,7 +33103,8 @@ async function buildCurrentDirectory(options) {
33067
33103
  projectRoot: error2.buildResult.projectRoot,
33068
33104
  projectId: error2.buildResult.projectId,
33069
33105
  buildResult: error2.buildResult,
33070
- buildFailure: toMakerBuildFailure(error2)
33106
+ buildFailure: toMakerBuildFailure(error2),
33107
+ makerPageOpen
33071
33108
  };
33072
33109
  }
33073
33110
  throw error2;
@@ -33640,6 +33677,7 @@ function formatBuildResult(result, progressSummary) {
33640
33677
  "",
33641
33678
  `- project_root: ${result.projectRoot}`,
33642
33679
  `- project_id: ${result.projectId}`,
33680
+ ...formatMakerPageOpenLines(result.makerPageOpen),
33643
33681
  `- maker_url: ${result.buildResult.makerUrl || formatMakerAppWebUrl(result.buildResult.projectId, result.buildResult.env)}`,
33644
33682
  `- project_path: ${result.buildResult.projectPath}`,
33645
33683
  `- server_url: ${result.buildResult.serverUrl}`,
@@ -33713,6 +33751,7 @@ function formatBuildResult(result, progressSummary) {
33713
33751
  `- project_root: ${result.projectRoot}`,
33714
33752
  `- project_id: ${result.projectId}`,
33715
33753
  `- maker_url: ${result.makerUrl || formatMakerAppWebUrl(result.projectId, result.env)}`,
33754
+ ...formatMakerPageOpenLines(result.makerPageOpen),
33716
33755
  `- project_path: ${result.projectPath}`,
33717
33756
  `- server_url: ${result.serverUrl}`,
33718
33757
  `- env: ${result.env}`
@@ -33743,6 +33782,17 @@ function formatPreviewRefreshLines(result) {
33743
33782
  result.error ? `- preview_refresh_error: ${result.error}` : ""
33744
33783
  ].filter(Boolean);
33745
33784
  }
33785
+ function formatMakerPageOpenLines(result) {
33786
+ if (!result) {
33787
+ return [];
33788
+ }
33789
+ return [
33790
+ `- maker_page_open: ${result.ok ? "ok" : "failed"}`,
33791
+ `- maker_page_url: ${result.url}`,
33792
+ result.error ? `- maker_page_error: ${result.error}` : "",
33793
+ "- next_action: 已按“不提交,只构建云端版本”打开 Maker 远端页面;如果没有自动弹出,请手动打开 maker_page_url 后再查看构建结果。"
33794
+ ].filter(Boolean);
33795
+ }
33746
33796
  function formatRuntimeLogWatchNextActionLines(result) {
33747
33797
  var _a3, _b, _c, _d, _e, _f, _g, _h, _i, _j;
33748
33798
  const command = formatLocalShellCommand([
@@ -33880,7 +33930,7 @@ function indent(value) {
33880
33930
  }
33881
33931
 
33882
33932
  // src/maker/cli/commands.ts
33883
- import { spawnSync as spawnSync5 } from "node:child_process";
33933
+ import { spawnSync as spawnSync6 } from "node:child_process";
33884
33934
  import crypto2 from "node:crypto";
33885
33935
  import fs10 from "node:fs";
33886
33936
  import os4 from "node:os";
@@ -33889,7 +33939,7 @@ import readline from "node:readline/promises";
33889
33939
  import { stdin as input, stdout as output } from "node:process";
33890
33940
 
33891
33941
  // src/maker/auth/cliLogin.ts
33892
- import { spawnSync as spawnSync4 } from "node:child_process";
33942
+ import { spawnSync as spawnSync5 } from "node:child_process";
33893
33943
  import crypto from "node:crypto";
33894
33944
  var DEFAULT_TIMEOUT_MS = 10 * 60 * 1e3;
33895
33945
  var DEFAULT_POLL_INTERVAL_MS = 1e3;
@@ -34008,7 +34058,7 @@ async function readJsonResponse(response) {
34008
34058
  function openBrowser(url2) {
34009
34059
  const command = process.platform === "darwin" ? "open" : process.platform === "win32" ? "cmd" : "xdg-open";
34010
34060
  const args = process.platform === "win32" ? ["/c", "start", "", url2] : [url2];
34011
- const result = spawnSync4(command, args, {
34061
+ const result = spawnSync5(command, args, {
34012
34062
  stdio: "ignore",
34013
34063
  windowsHide: true
34014
34064
  });
@@ -34381,7 +34431,7 @@ async function runMcpVerify(parsed, ctx) {
34381
34431
  rejectPackageOption(parsed);
34382
34432
  const mode = mcpVerifyModeOption(parsed);
34383
34433
  const command = mode === "npx" ? getNpxCliCommand(MAKER_NPM_PACKAGE) : getCurrentCliCommand();
34384
- const result = spawnSync5(command.command, [...command.args, "help"], {
34434
+ const result = spawnSync6(command.command, [...command.args, "help"], {
34385
34435
  encoding: "utf8"
34386
34436
  });
34387
34437
  const failureType = classifyMcpVerifyFailure(result);
@@ -34912,7 +34962,7 @@ function normalizeCodexMcpTablePath(tablePath, mcpName) {
34912
34962
  }
34913
34963
  function tryClaudeMcpAdd(options) {
34914
34964
  const command = process.platform === "win32" ? "claude.cmd" : "claude";
34915
- const result = spawnSync5(
34965
+ const result = spawnSync6(
34916
34966
  command,
34917
34967
  [
34918
34968
  "mcp",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taptap/maker",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "type": "module",
5
5
  "description": "TapTap Maker local development CLI and MCP server",
6
6
  "main": "dist/maker.js",
@@ -415,7 +415,10 @@ unless the user asks. Summaries should be understandable to non-programmers:
415
415
  - why these files are being submitted
416
416
  - whether any generated or suspicious files are included
417
417
 
418
- If there are no local changes, do not create an empty commit unless the user explicitly asks.
418
+ For normal build/preview/verify requests, a clean workspace still goes through
419
+ `maker_build_current_directory`; Maker MCP creates and pushes an empty
420
+ `chore: wake maker build server` commit before remote build to wake the Maker server.
421
+ Only skip submit/push when the user explicitly asks to build the committed remote version.
419
422
 
420
423
  ## Submit And Push
421
424
 
@@ -473,6 +476,11 @@ unavailable, do not run a manual generic `git push`. Fix the reported cause if n
473
476
  `maker_build_current_directory`. Maker MCP will detect committed-but-unpushed local commits and push
474
477
  them before build.
475
478
 
479
+ If the user explicitly asks "不提交", "直接构建", or "构建云端版本", call
480
+ `maker_build_current_directory` with `confirm_remote_build_without_submit=true`. In that mode, Maker
481
+ MCP opens the Maker app page before remote build and returns `maker_page_url`; show that URL to the
482
+ user if the browser did not open automatically.
483
+
476
484
  For push failures, use the returned `classification`, `retryable`, `retry_reason`, and
477
485
  `retry_attempts` fields. Temporary 5xx/network/timeout failures may be retried with the Maker build
478
486
  tool; `remote_rejected` means remote updates require pull/rebase first; `auth` means refreshing PAT;