@taptap/maker 0.0.32-beta.2 → 0.0.32
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 +3 -3
- package/dist/maker.js +484 -87
- package/docs/MAKER_MCP_CONNECTION_TROUBLESHOOTING.md +28 -5
- package/package.json +1 -1
- package/skills/taptap-maker-local/SKILL.md +6 -1
package/dist/maker.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// TapTap Maker MCP - Standalone Bundle
|
|
3
|
-
// TapTap Maker MCP version: 0.0.32
|
|
3
|
+
// TapTap Maker MCP version: 0.0.32
|
|
4
4
|
import { createRequire } from 'node:module';
|
|
5
5
|
const require = createRequire(import.meta.url);
|
|
6
6
|
const __MAKER_BUNDLE_URL__ = import.meta.url;
|
|
@@ -36591,6 +36591,10 @@ function createMakerAgentsPolicyBody() {
|
|
|
36591
36591
|
"# TapTap Maker Project Asset Tool Policy",
|
|
36592
36592
|
"",
|
|
36593
36593
|
"This is a bound TapTap Maker project.",
|
|
36594
|
+
"Do not use TapTap Developer Center documentation or docs for other TapTap game platforms",
|
|
36595
|
+
"when developing or debugging this Maker game; use Maker MCP and the project-local",
|
|
36596
|
+
"`AGENTS.md`, `engine-docs/`, `examples/`, `templates/`, `urhox-libs/`, and installed Maker",
|
|
36597
|
+
"skills as the sources of truth.",
|
|
36594
36598
|
"",
|
|
36595
36599
|
MAKER_PROJECT_POLICY_ROUTING_INDEX,
|
|
36596
36600
|
"",
|
|
@@ -36682,7 +36686,7 @@ function createMakerAgentsPolicyBody() {
|
|
|
36682
36686
|
" `mcp report --ide <client> --target-dir <project> --context-stdin --consent --json`.",
|
|
36683
36687
|
"- This preserves the configured package version and the absolute Windows node.exe/npm-cli.js.",
|
|
36684
36688
|
"- Only with a known exact installed version, fallback to",
|
|
36685
|
-
" `npx -y --package @taptap/maker@0.0.32
|
|
36689
|
+
" `npx -y --package @taptap/maker@0.0.32 taptap-maker mcp report ...`.",
|
|
36686
36690
|
"- Never use an unversioned npm package, or assume `taptap-maker`/`npx` is globally available.",
|
|
36687
36691
|
"- Never include the complete conversation, project source, other MCP server entries, PAT/token",
|
|
36688
36692
|
" values, or full environment variables. Normalize the user home path to `~`.",
|
|
@@ -36714,6 +36718,11 @@ function createMakerAgentsPolicyBody() {
|
|
|
36714
36718
|
"- `batch_generate_images` for multiple image assets.",
|
|
36715
36719
|
"- `edit_image` for modifying existing project images.",
|
|
36716
36720
|
"- `create_video_task` for game video assets or referenced image/video generation.",
|
|
36721
|
+
"- Only call `create_video_task` after the user explicitly requests video generation; do not",
|
|
36722
|
+
" generate video proactively while implementing gameplay or filling asset gaps.",
|
|
36723
|
+
'- When duration exceeds 10 seconds or `model="2.5"`, show the rough credit estimate and',
|
|
36724
|
+
" upstream-token billing disclaimer, wait for explicit confirmation, then repeat the same",
|
|
36725
|
+
" request with `user_confirmed=true`.",
|
|
36717
36726
|
"- `query_video_task` for refreshing video task status and fetching completed videos.",
|
|
36718
36727
|
"- `text_to_music` for game music.",
|
|
36719
36728
|
"- `text_to_sound_effect` for one sound effect.",
|
|
@@ -38196,7 +38205,16 @@ function getMakerGitRetryDecision(message) {
|
|
|
38196
38205
|
)) {
|
|
38197
38206
|
return { retry: true, reason: "network_or_timeout" };
|
|
38198
38207
|
}
|
|
38199
|
-
if (/
|
|
38208
|
+
if (/curl\s+92\b|HTTP\/2 stream.*not closed cleanly|HTTP\/2.{0,80}(?:not supported|unsupported)|(?:server|remote).{0,80}does not support HTTP\/2/i.test(
|
|
38209
|
+
text
|
|
38210
|
+
)) {
|
|
38211
|
+
return {
|
|
38212
|
+
retry: true,
|
|
38213
|
+
reason: "http2_transport_error",
|
|
38214
|
+
fallbackHttpVersion: "HTTP/1.1"
|
|
38215
|
+
};
|
|
38216
|
+
}
|
|
38217
|
+
if (/connection reset|connection refused|connection closed|remote end hung up|unexpected disconnect|early EOF|RPC failed|index-pack failed|SSL_ERROR_SYSCALL|curl\s+(?:18|28|35|52|55|56)/i.test(
|
|
38200
38218
|
text
|
|
38201
38219
|
)) {
|
|
38202
38220
|
return { retry: true, reason: "connection_interrupted" };
|
|
@@ -38277,10 +38295,14 @@ function pushGit(args, cwd, onProgress) {
|
|
|
38277
38295
|
});
|
|
38278
38296
|
}
|
|
38279
38297
|
function pushGitWithTransientRetry(args, cwd, onProgress) {
|
|
38280
|
-
return
|
|
38281
|
-
|
|
38282
|
-
onProgress
|
|
38283
|
-
|
|
38298
|
+
return runMakerGitNetworkOperationWithTransientRetry(
|
|
38299
|
+
args,
|
|
38300
|
+
(effectiveArgs) => pushGit(effectiveArgs, cwd, onProgress),
|
|
38301
|
+
{
|
|
38302
|
+
stage: "push",
|
|
38303
|
+
onProgress
|
|
38304
|
+
}
|
|
38305
|
+
);
|
|
38284
38306
|
}
|
|
38285
38307
|
async function resolveMakerProjectUserId(options) {
|
|
38286
38308
|
var _a3;
|
|
@@ -38730,10 +38752,15 @@ function readGit(args, cwd) {
|
|
|
38730
38752
|
});
|
|
38731
38753
|
}
|
|
38732
38754
|
async function runGitWithTransientRetry(args, options) {
|
|
38733
|
-
|
|
38734
|
-
|
|
38735
|
-
|
|
38736
|
-
|
|
38755
|
+
const stage = args[0] || "git";
|
|
38756
|
+
return runMakerGitNetworkOperationWithTransientRetry(
|
|
38757
|
+
args,
|
|
38758
|
+
(effectiveArgs) => runGit(effectiveArgs, { ...options, stage }),
|
|
38759
|
+
{
|
|
38760
|
+
stage,
|
|
38761
|
+
onProgress: options.onProgress
|
|
38762
|
+
}
|
|
38763
|
+
);
|
|
38737
38764
|
}
|
|
38738
38765
|
async function runGitCaptureWithTransientRetry(args, options = {}) {
|
|
38739
38766
|
return runWithTransientRetry(() => runGitCapture(args, options), {
|
|
@@ -38742,7 +38769,7 @@ async function runGitCaptureWithTransientRetry(args, options = {}) {
|
|
|
38742
38769
|
});
|
|
38743
38770
|
}
|
|
38744
38771
|
async function runWithTransientRetry(operation, options) {
|
|
38745
|
-
var _a3;
|
|
38772
|
+
var _a3, _b;
|
|
38746
38773
|
let retries = 0;
|
|
38747
38774
|
const maxRetries = 5;
|
|
38748
38775
|
for (; ; ) {
|
|
@@ -38758,7 +38785,8 @@ async function runWithTransientRetry(operation, options) {
|
|
|
38758
38785
|
throw appendRetryExhausted(error2, retries, decision);
|
|
38759
38786
|
}
|
|
38760
38787
|
retries += 1;
|
|
38761
|
-
(_a3 = options.
|
|
38788
|
+
(_a3 = options.onRetry) == null ? void 0 : _a3.call(options, decision);
|
|
38789
|
+
(_b = options.onProgress) == null ? void 0 : _b.call(options, {
|
|
38762
38790
|
phase: options.stage,
|
|
38763
38791
|
message: formatGitRetryProgressMessage(options.stage, decision, retries, maxRetries)
|
|
38764
38792
|
});
|
|
@@ -38766,8 +38794,25 @@ async function runWithTransientRetry(operation, options) {
|
|
|
38766
38794
|
}
|
|
38767
38795
|
}
|
|
38768
38796
|
}
|
|
38797
|
+
async function runMakerGitNetworkOperationWithTransientRetry(args, operation, options) {
|
|
38798
|
+
let fallbackHttpVersion;
|
|
38799
|
+
return runWithTransientRetry(
|
|
38800
|
+
() => operation(
|
|
38801
|
+
fallbackHttpVersion ? ["-c", `http.version=${fallbackHttpVersion}`, ...args] : [...args]
|
|
38802
|
+
),
|
|
38803
|
+
{
|
|
38804
|
+
...options,
|
|
38805
|
+
onRetry: (decision) => {
|
|
38806
|
+
fallbackHttpVersion = decision.fallbackHttpVersion || fallbackHttpVersion;
|
|
38807
|
+
}
|
|
38808
|
+
}
|
|
38809
|
+
);
|
|
38810
|
+
}
|
|
38769
38811
|
function formatGitRetryProgressMessage(stage, decision, retries, maxRetries) {
|
|
38770
38812
|
const reason = decision.reason || "temporary_remote_failure";
|
|
38813
|
+
if (reason === "http2_transport_error") {
|
|
38814
|
+
return `Maker git HTTP/2 transport failed; retrying with command-local HTTP/1.1 ${retries}/${maxRetries}. Please keep this running.`;
|
|
38815
|
+
}
|
|
38771
38816
|
const prefix = (stage === "clone" || stage === "fetch") && reason === "remote_http_5xx" ? "Maker server may still be preparing the repository" : "Maker git remote is temporarily unavailable";
|
|
38772
38817
|
return `${prefix} (${reason}); retrying ${retries}/${maxRetries}. Please keep this running.`;
|
|
38773
38818
|
}
|
|
@@ -38868,7 +38913,7 @@ function runGit(args, options) {
|
|
|
38868
38913
|
reject(
|
|
38869
38914
|
new MakerGitError(
|
|
38870
38915
|
createGitFailure({
|
|
38871
|
-
stage: args[0] || "git",
|
|
38916
|
+
stage: options.stage || args[0] || "git",
|
|
38872
38917
|
command: `${gitCommand} ${args.join(" ")}`,
|
|
38873
38918
|
exitCode: code,
|
|
38874
38919
|
stdout: options.quiet ? "" : stdout,
|
|
@@ -38882,7 +38927,7 @@ function runGit(args, options) {
|
|
|
38882
38927
|
reject(
|
|
38883
38928
|
new MakerGitError(
|
|
38884
38929
|
createGitFailure({
|
|
38885
|
-
stage: args[0] || "git",
|
|
38930
|
+
stage: options.stage || args[0] || "git",
|
|
38886
38931
|
command: `${gitCommand} ${args.join(" ")}`,
|
|
38887
38932
|
exitCode: null,
|
|
38888
38933
|
stdout: options.quiet ? "" : stdout,
|
|
@@ -39772,6 +39817,8 @@ function formatMakerSkillStatus(_options = {}) {
|
|
|
39772
39817
|
"- Follow the selected tool schema when one of these tools is used.",
|
|
39773
39818
|
"- Use generate_image, batch_generate_images, edit_image for game image assets.",
|
|
39774
39819
|
"- Use create_video_task and query_video_task for game video assets.",
|
|
39820
|
+
"- Only call create_video_task after the user explicitly requests video generation; do not generate video proactively while implementing or filling asset gaps.",
|
|
39821
|
+
'- When duration exceeds 10 seconds or model="2.5", show the rough credit estimate and upstream-token billing disclaimer, wait for explicit confirmation, then repeat the same request with user_confirmed=true.',
|
|
39775
39822
|
"- Use text_to_music for game music.",
|
|
39776
39823
|
"- Use text_to_sound_effect for one sound effect.",
|
|
39777
39824
|
"- Use batch_sound_effects for multiple sound effects.",
|
|
@@ -41477,7 +41524,7 @@ function sanitizeDiagnosticText(value) {
|
|
|
41477
41524
|
}
|
|
41478
41525
|
} catch {
|
|
41479
41526
|
}
|
|
41480
|
-
return value.replace(/\b(authorization|cookie)\b\s*:\s*[^\r\n]*/giu, "$1: <redacted>").replace(
|
|
41527
|
+
return value.replace(/\b([A-Za-z][A-Za-z0-9+.-]*:\/\/)[^/?#\s@]+@/gu, "$1<redacted>@").replace(/\b(authorization|cookie)\b\s*:\s*[^\r\n]*/giu, "$1: <redacted>").replace(
|
|
41481
41528
|
/(^|[\s,;])(--(?:[a-z0-9]+[-_])*(?:pat|token|secret|signature|sig|credential|credentials|authorization|cookie|password|passwd|passphrase|mac[-_]?key|api[-_]?key|auth[-_]?key|private[-_]?key))\s+(?:"[^"]*"|'[^']*'|(?:(?![&,;][A-Za-z][A-Za-z0-9_.-]*\s*[:=])[^\s])+)/gimu,
|
|
41482
41529
|
"$1$2 <redacted>"
|
|
41483
41530
|
).replace(
|
|
@@ -41543,6 +41590,19 @@ var RemoteProxyToolResultError = class extends Error {
|
|
|
41543
41590
|
this.result = result;
|
|
41544
41591
|
}
|
|
41545
41592
|
};
|
|
41593
|
+
var RemoteProxyToolCallError = class extends Error {
|
|
41594
|
+
constructor(toolName, executionState, error2) {
|
|
41595
|
+
const originalMessage = error2 instanceof Error ? error2.message : String(error2);
|
|
41596
|
+
super(
|
|
41597
|
+
`Remote proxy tool ${toolName} failed with execution_state=${executionState}; automatic retry is disabled. ${originalMessage}`
|
|
41598
|
+
);
|
|
41599
|
+
this.automaticRetry = false;
|
|
41600
|
+
this.name = "RemoteProxyToolCallError";
|
|
41601
|
+
this.toolName = toolName;
|
|
41602
|
+
this.executionState = executionState;
|
|
41603
|
+
this.originalError = error2;
|
|
41604
|
+
}
|
|
41605
|
+
};
|
|
41546
41606
|
function prepareRemoteProxyToolArgs(options) {
|
|
41547
41607
|
if (options.toolName === "audition_voices_for_character") {
|
|
41548
41608
|
return validateVoiceAuditionArgs(options.args);
|
|
@@ -41580,7 +41640,10 @@ function validateVoiceAuditionArgs(args) {
|
|
|
41580
41640
|
}
|
|
41581
41641
|
async function materializeRemoteProxyToolAssets(options) {
|
|
41582
41642
|
if (isRemoteProxyToolErrorResult(options.result)) {
|
|
41583
|
-
throw new RemoteProxyToolResultError(
|
|
41643
|
+
throw new RemoteProxyToolResultError(
|
|
41644
|
+
options.toolName,
|
|
41645
|
+
addRemoteProxyErrorExecutionState(options.result)
|
|
41646
|
+
);
|
|
41584
41647
|
}
|
|
41585
41648
|
if (!shouldMaterializeRemoteProxyTool(options.toolName)) {
|
|
41586
41649
|
return options.result;
|
|
@@ -41630,6 +41693,24 @@ async function materializeRemoteProxyToolAssets(options) {
|
|
|
41630
41693
|
}
|
|
41631
41694
|
return changed ? { ...options.result, content: nextContent } : options.result;
|
|
41632
41695
|
}
|
|
41696
|
+
function addRemoteProxyErrorExecutionState(result) {
|
|
41697
|
+
const resultWithStructuredContent = result;
|
|
41698
|
+
const existingStructuredContent = resultWithStructuredContent.structuredContent;
|
|
41699
|
+
const existingRecord = isRecord2(existingStructuredContent) ? existingStructuredContent : void 0;
|
|
41700
|
+
const topLevelState = result.execution_state;
|
|
41701
|
+
const explicitState = normalizeRemoteProxyExecutionState(existingRecord == null ? void 0 : existingRecord.execution_state) ?? normalizeRemoteProxyExecutionState(topLevelState);
|
|
41702
|
+
return {
|
|
41703
|
+
...result,
|
|
41704
|
+
structuredContent: {
|
|
41705
|
+
...existingRecord || (existingStructuredContent === void 0 ? {} : { remote_structured_content: existingStructuredContent }),
|
|
41706
|
+
execution_state: explicitState ?? "unknown",
|
|
41707
|
+
automatic_retry: false
|
|
41708
|
+
}
|
|
41709
|
+
};
|
|
41710
|
+
}
|
|
41711
|
+
function normalizeRemoteProxyExecutionState(value) {
|
|
41712
|
+
return value === "not_executed" || value === "unknown" ? value : void 0;
|
|
41713
|
+
}
|
|
41633
41714
|
function shouldMaterializeRemoteProxyTool(toolName) {
|
|
41634
41715
|
return [
|
|
41635
41716
|
"generate_image",
|
|
@@ -43378,9 +43459,15 @@ var MAKER_STATUS_LITE_PUBLIC_DESCRIPTION = [
|
|
|
43378
43459
|
].join(" ");
|
|
43379
43460
|
var MAKER_BUILD_CURRENT_DIRECTORY_PUBLIC_DESCRIPTION = [
|
|
43380
43461
|
"Submit and remotely build the current bound Maker project. First read maker://status or maker_status_lite and resolve exactly one bound Maker project.",
|
|
43462
|
+
"`Need to call maker_build_current_directory` is a normal project build prerequisite, not an MCP connectivity failure or issue-report trigger.",
|
|
43381
43463
|
"Use this tool for explicit Maker build, preview, submit, or push requests. Code tests and lint do not trigger this remote workflow unless the user also explicitly asks to build, run, or preview the Maker game.",
|
|
43382
43464
|
"Normal mode commits local changes when needed, pushes existing or new commits, and then starts the remote build; a clean workspace creates the required wake-up commit.",
|
|
43383
43465
|
"Unsafe remote-sync or branch states stop before commit and push. A push failure stops before build, while a build failure after a successful push means the code is already on Maker remote; follow the structured result for recovery.",
|
|
43466
|
+
"On failure, read failure_stage, code_submit_status, and remote_build_status before explaining whether project validation, code submit/push, or remote build failed.",
|
|
43467
|
+
'Known local authentication or project-context preparation failures use failure_stage="local_build_context" and remote_build_status="not_started"; follow the returned login or init recovery instead of describing a remote build failure.',
|
|
43468
|
+
'When an error explicitly reports a local PowerShell, CLI, or Git process blocked by sandbox policy, EPERM, or EACCES, ask the user to check the AI client sandbox and suggest Full Access mode ("完全访问模式") only for a trusted project. For remote Git or remote build failures, inspect the returned Git, code, and resource diagnostics first and mention sandbox access only if local commands are also blocked. Treat sandbox as a check, not a confirmed cause, for otherwise unclassified local execution failures. Follow the returned fix directly for known project-validation or project-context errors.',
|
|
43469
|
+
"If the host reports `MCP error -32001: Request timed out`, treat it only as a timeout signal: timeout alone is not evidence of a Maker server failure. Do not claim a Maker server outage without HTTP 5xx, server logs, or service-status evidence.",
|
|
43470
|
+
"Do not retry the build blindly. Run Maker doctor for the project through the active client launcher (`taptap-maker doctor --target-dir <PROJECT_DIR>` is the standalone CLI equivalent) for read-only host and project checks, then inspect the actual active client MCP command, args, cwd/Roots, session and tool registration, request timeout, and Node runtime. Doctor cannot inspect the active client configuration itself.",
|
|
43384
43471
|
"After a successful build, read runtime_logs.local_file for gameplay diagnostics and runtime_logs.state_file for watcher health when those fields are returned.",
|
|
43385
43472
|
"Do not combine Maker submission with generic branch, PR/MR, or separate commit/push workflows.",
|
|
43386
43473
|
"Set confirm_remote_build_without_submit=true only after the user explicitly requests building the already committed remote version without submitting local changes."
|
|
@@ -43405,7 +43492,10 @@ var MAKER_REMOTE_PROXY_PUBLIC_DESCRIPTIONS = {
|
|
|
43405
43492
|
"The local proxy attempts to materialize successful results into the Maker project and retain remote mapping; use returned workspace/local paths when present."
|
|
43406
43493
|
].join(" "),
|
|
43407
43494
|
create_video_task: [
|
|
43408
|
-
"Create a video generation task.
|
|
43495
|
+
"Create a video generation task only after the user explicitly requests video generation. Do not proactively or automatically generate videos while designing gameplay, implementing features, filling asset gaps, or self-improving the game.",
|
|
43496
|
+
'Estimate the intended duration before calling. The confirmation estimate is 200 credits per second for model="2.0" and 300 credits per second for model="2.5"; it is only a rough estimate, while actual billing follows upstream token usage.',
|
|
43497
|
+
'When duration exceeds 10 seconds or model="2.5" is used, show the estimate and billing disclaimer, wait for explicit user confirmation, then repeat the same request with user_confirmed=true. Default model="2.0" with omitted duration or duration=-1 does not require confirmation.',
|
|
43498
|
+
"The remote service normally performs server-side polling and waits for the final result in this call.",
|
|
43409
43499
|
"If the wait budget expires, the result returns a task_id; continue other work and use query_video_task no sooner than 120 seconds later.",
|
|
43410
43500
|
"Mode-specific inputs and limits are defined by the input schema. Image, video, and audio references may use local project files, HTTP(S) URLs, or data URLs supported by the schema.",
|
|
43411
43501
|
"Keep image references at 30 MiB or less, video references at 50 MiB or less, and audio references at 15 MiB or less.",
|
|
@@ -43488,6 +43578,11 @@ var MAKER_REMOTE_PROXY_PUBLIC_DESCRIPTIONS = {
|
|
|
43488
43578
|
"Session-log mode returns its own saved paths and progress information; use the returned result to continue when more history is available."
|
|
43489
43579
|
].join(" ")
|
|
43490
43580
|
};
|
|
43581
|
+
var MAKER_REMOTE_PROXY_RETRY_GUIDANCE = [
|
|
43582
|
+
"This tool is not retried automatically by the local Maker runtime.",
|
|
43583
|
+
"If its response is interrupted after dispatch, its execution state may be unknown.",
|
|
43584
|
+
"For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly."
|
|
43585
|
+
].join(" ");
|
|
43491
43586
|
|
|
43492
43587
|
// src/maker/server/remoteProxyToolSnapshot.json
|
|
43493
43588
|
var remoteProxyToolSnapshot_default = {
|
|
@@ -43513,7 +43608,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
43513
43608
|
tools: [
|
|
43514
43609
|
{
|
|
43515
43610
|
name: "generate_image",
|
|
43516
|
-
description: "Generate one new image asset for a Maker game. Use batch_generate_images for multiple new images and edit_image to modify an existing image. Optional reference images may guide style or content; supported sources, generation controls, and final target_size requirements are defined by the input schema. Keep each reference image supplied through local paths or data URLs at 10 MiB or less. The local proxy attempts to materialize successful results into the Maker project and retain remote mapping; use returned workspace/local paths when present.",
|
|
43611
|
+
description: "Generate one new image asset for a Maker game. Use batch_generate_images for multiple new images and edit_image to modify an existing image. Optional reference images may guide style or content; supported sources, generation controls, and final target_size requirements are defined by the input schema. Keep each reference image supplied through local paths or data URLs at 10 MiB or less. The local proxy attempts to materialize successful results into the Maker project and retain remote mapping; use returned workspace/local paths when present. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.",
|
|
43517
43612
|
inputSchema: {
|
|
43518
43613
|
type: "object",
|
|
43519
43614
|
properties: {
|
|
@@ -43569,7 +43664,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
43569
43664
|
quality: {
|
|
43570
43665
|
type: "string",
|
|
43571
43666
|
enum: ["low", "medium", "high", "auto"],
|
|
43572
|
-
description: 'Image quality
|
|
43667
|
+
description: 'Image quality. One of "low", "medium", "high", "auto" (default). GPT Image 2 uses this setting; other models may ignore it.'
|
|
43573
43668
|
},
|
|
43574
43669
|
target_dir: {
|
|
43575
43670
|
type: "string",
|
|
@@ -43581,7 +43676,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
43581
43676
|
},
|
|
43582
43677
|
{
|
|
43583
43678
|
name: "batch_generate_images",
|
|
43584
|
-
description: "Generate two or more new image assets in parallel in one call. Use generate_image for one new image and edit_image to modify an existing image. Each image request uses the fields and constraints defined by the input schema. Keep each reference image supplied through local paths or data URLs at 10 MiB or less. A batch may partially succeed; preserve successful images and report failed items with their returned errors. The local proxy attempts to materialize successful results into the Maker project and retain remote mapping; use returned workspace/local paths when present.",
|
|
43679
|
+
description: "Generate two or more new image assets in parallel in one call. Use generate_image for one new image and edit_image to modify an existing image. Each image request uses the fields and constraints defined by the input schema. Keep each reference image supplied through local paths or data URLs at 10 MiB or less. A batch may partially succeed; preserve successful images and report failed items with their returned errors. The local proxy attempts to materialize successful results into the Maker project and retain remote mapping; use returned workspace/local paths when present. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.",
|
|
43585
43680
|
inputSchema: {
|
|
43586
43681
|
type: "object",
|
|
43587
43682
|
properties: {
|
|
@@ -43643,7 +43738,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
43643
43738
|
quality: {
|
|
43644
43739
|
type: "string",
|
|
43645
43740
|
enum: ["low", "medium", "high", "auto"],
|
|
43646
|
-
description: 'Image quality
|
|
43741
|
+
description: 'Image quality. One of "low", "medium", "high", "auto" (default). GPT Image 2 uses this setting; other models may ignore it.'
|
|
43647
43742
|
}
|
|
43648
43743
|
},
|
|
43649
43744
|
required: ["prompt", "name", "target_size"]
|
|
@@ -43659,7 +43754,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
43659
43754
|
},
|
|
43660
43755
|
{
|
|
43661
43756
|
name: "edit_image",
|
|
43662
|
-
description: "Modify an existing image from text instructions. Use generate_image for one new image and batch_generate_images for multiple new images. The required original image accepts a local Maker project path, an HTTP(S) URL, or an image data URL. Additional reference images and output controls are defined by the input schema. Keep each local-path or data URL image at 10 MiB or less. The local proxy attempts to materialize successful results into the Maker project and retain remote mapping; use returned workspace/local paths when present.",
|
|
43757
|
+
description: "Modify an existing image from text instructions. Use generate_image for one new image and batch_generate_images for multiple new images. The required original image accepts a local Maker project path, an HTTP(S) URL, or an image data URL. Additional reference images and output controls are defined by the input schema. Keep each local-path or data URL image at 10 MiB or less. The local proxy attempts to materialize successful results into the Maker project and retain remote mapping; use returned workspace/local paths when present. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.",
|
|
43663
43758
|
inputSchema: {
|
|
43664
43759
|
type: "object",
|
|
43665
43760
|
properties: {
|
|
@@ -43715,7 +43810,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
43715
43810
|
quality: {
|
|
43716
43811
|
type: "string",
|
|
43717
43812
|
enum: ["low", "medium", "high", "auto"],
|
|
43718
|
-
description: 'Image quality
|
|
43813
|
+
description: 'Image quality. One of "low", "medium", "high", "auto" (default). GPT Image 2 uses this setting; other models may ignore it.'
|
|
43719
43814
|
},
|
|
43720
43815
|
target_dir: {
|
|
43721
43816
|
type: "string",
|
|
@@ -43727,7 +43822,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
43727
43822
|
},
|
|
43728
43823
|
{
|
|
43729
43824
|
name: "create_3d_asset",
|
|
43730
|
-
description: 'Manage the complete Maker 3D asset lifecycle. Use action="start" to begin, action="query" to check progress, action="get_options" to inspect step options, action="continue" after review, and action="post_process" for supported follow-up operations. Use direct generation when no review checkpoint is needed, and reviewed generation when the user needs a preview before final generation. For reviewed generation, show every returned preview and wait for explicit user approval before action="continue"; never approve a review step automatically. Supported prompt, image, strategy, quality, and post-processing fields are defined by the input schema. Local image inputs are normalized for the remote service. The local proxy attempts to materialize completed model delivery under assets/model and review images under assets/image; use local_delivery, preview_assets, and other returned local paths when present.',
|
|
43825
|
+
description: 'Manage the complete Maker 3D asset lifecycle. Use action="start" to begin, action="query" to check progress, action="get_options" to inspect step options, action="continue" after review, and action="post_process" for supported follow-up operations. Use direct generation when no review checkpoint is needed, and reviewed generation when the user needs a preview before final generation. For reviewed generation, show every returned preview and wait for explicit user approval before action="continue"; never approve a review step automatically. Supported prompt, image, strategy, quality, and post-processing fields are defined by the input schema. Local image inputs are normalized for the remote service. The local proxy attempts to materialize completed model delivery under assets/model and review images under assets/image; use local_delivery, preview_assets, and other returned local paths when present. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.',
|
|
43731
43826
|
inputSchema: {
|
|
43732
43827
|
type: "object",
|
|
43733
43828
|
properties: {
|
|
@@ -43811,7 +43906,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
43811
43906
|
},
|
|
43812
43907
|
{
|
|
43813
43908
|
name: "text_to_music",
|
|
43814
|
-
description: "Generate AI music for a Maker game, including background music or vocal tracks; do not use this tool for sound effects. The remote call polls server-side every 20 seconds and may wait up to 50 minutes. If generation is still running when the call times out, the result includes the task ID for operational tracking. Simple and custom generation controls are defined by the input schema. The local proxy attempts to materialize successful audio and metadata into the Maker project and record them for later Maker references; use returned local paths when present.",
|
|
43909
|
+
description: "Generate AI music for a Maker game, including background music or vocal tracks; do not use this tool for sound effects. The remote call polls server-side every 20 seconds and may wait up to 50 minutes. If generation is still running when the call times out, the result includes the task ID for operational tracking. Simple and custom generation controls are defined by the input schema. The local proxy attempts to materialize successful audio and metadata into the Maker project and record them for later Maker references; use returned local paths when present. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.",
|
|
43815
43910
|
inputSchema: {
|
|
43816
43911
|
type: "object",
|
|
43817
43912
|
properties: {
|
|
@@ -43861,7 +43956,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
43861
43956
|
},
|
|
43862
43957
|
{
|
|
43863
43958
|
name: "create_video_task",
|
|
43864
|
-
description:
|
|
43959
|
+
description: 'Create a video generation task only after the user explicitly requests video generation. Do not proactively or automatically generate videos while designing gameplay, implementing features, filling asset gaps, or self-improving the game. Estimate the intended duration before calling. The confirmation estimate is 200 credits per second for model="2.0" and 300 credits per second for model="2.5"; it is only a rough estimate, while actual billing follows upstream token usage. When duration exceeds 10 seconds or model="2.5" is used, show the estimate and billing disclaimer, wait for explicit user confirmation, then repeat the same request with user_confirmed=true. Default model="2.0" with omitted duration or duration=-1 does not require confirmation. The remote service normally performs server-side polling and waits for the final result in this call. If the wait budget expires, the result returns a task_id; continue other work and use query_video_task no sooner than 120 seconds later. Mode-specific inputs and limits are defined by the input schema. Image, video, and audio references may use local project files, HTTP(S) URLs, or data URLs supported by the schema. Keep image references at 30 MiB or less, video references at 50 MiB or less, and audio references at 15 MiB or less. The local proxy attempts to materialize successful video results into the Maker project; prefer returned workspace paths when present, unless the user needs an external share URL. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.',
|
|
43865
43960
|
inputSchema: {
|
|
43866
43961
|
type: "object",
|
|
43867
43962
|
properties: {
|
|
@@ -43873,7 +43968,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
43873
43968
|
model: {
|
|
43874
43969
|
type: "string",
|
|
43875
43970
|
enum: ["2.0", "2.5"],
|
|
43876
|
-
description: 'Seedance 模型版本,默认 "2.0"。\n- "2.0": Seedance 2.0 fast。duration 4-15s,参考图最多 9 张、参考视频 3 个、参考音频 3 个,音频不能单独输入。\n- "2.5": Seedance 2.5,效果与可控性更强、成本更高。duration 4-30s,参考图最多 30 张、参考视频 10 个、参考音频 10 个,支持仅传音频驱动生成。\n需要超过 15s 时长、大量参考素材或纯音频驱动时用 "2.5"
|
|
43971
|
+
description: 'Seedance 模型版本,默认 "2.0"。\n- "2.0": Seedance 2.0 fast。duration 4-15s,参考图最多 9 张、参考视频 3 个、参考音频 3 个,音频不能单独输入。\n- "2.5": Seedance 2.5,效果与可控性更强、成本更高。duration 4-30s,参考图最多 30 张、参考视频 10 个、参考音频 10 个,支持仅传音频驱动生成。\n需要超过 15s 时长、大量参考素材或纯音频驱动时用 "2.5",其余场景保持默认。使用 "2.5" 前须向开发者展示积分预估并二次确认。'
|
|
43877
43972
|
},
|
|
43878
43973
|
prompt: {
|
|
43879
43974
|
type: "string",
|
|
@@ -43952,7 +44047,11 @@ var remoteProxyToolSnapshot_default = {
|
|
|
43952
44047
|
},
|
|
43953
44048
|
duration: {
|
|
43954
44049
|
type: "integer",
|
|
43955
|
-
description: '视频时长(秒)。model="2.0" 支持 4-15,model="2.5" 支持 4-30;也可传 -1。不建议设为 -1
|
|
44050
|
+
description: '视频时长(秒)。model="2.0" 支持 4-15,model="2.5" 支持 4-30;也可传 -1。明确传入超过 10 秒时,先按档位单价向开发者展示粗估并二次确认(2.0 为 200 积分/秒,2.5 为 300 积分/秒;仅供确认参考,实际按上游 token 扣费),再设 user_confirmed=true。不建议设为 -1;模型会自主选择时长。默认 2.0 下未指定或 -1 不触发确认。\nmodel="2.5" 以参考视频做视频编辑时只接受 -1(输出时长跟随输入视频),且输入视频时长需在 4-30s 内。'
|
|
44051
|
+
},
|
|
44052
|
+
user_confirmed: {
|
|
44053
|
+
type: "boolean",
|
|
44054
|
+
description: '仅当开发者已确认本次粗估(含「实际按上游 token 扣费」说明)后设为 true。触发条件:明确传入 duration 超过 10 秒,或使用 model="2.5"。未确认时不要传 true。默认 2.0 且时长未超过 10 秒时无需此参数。'
|
|
43956
44055
|
},
|
|
43957
44056
|
return_last_frame: {
|
|
43958
44057
|
type: "boolean",
|
|
@@ -43980,7 +44079,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
43980
44079
|
},
|
|
43981
44080
|
{
|
|
43982
44081
|
name: "query_video_task",
|
|
43983
|
-
description: "Query video task status by task_id after create_video_task returns a pending task or reports a concurrency limit. If the task is still pending or running, continue other work and query again no sooner than 120 seconds later; do not poll continuously. Querying a completed task releases its task quota. The local proxy attempts to materialize successful video and last-frame results into the Maker project. Prefer workspace_video_path and workspace_last_frame_path when present; mention CDN URLs only when the user needs an external share link.",
|
|
44082
|
+
description: "Query video task status by task_id after create_video_task returns a pending task or reports a concurrency limit. If the task is still pending or running, continue other work and query again no sooner than 120 seconds later; do not poll continuously. Querying a completed task releases its task quota. The local proxy attempts to materialize successful video and last-frame results into the Maker project. Prefer workspace_video_path and workspace_last_frame_path when present; mention CDN URLs only when the user needs an external share link. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.",
|
|
43984
44083
|
inputSchema: {
|
|
43985
44084
|
type: "object",
|
|
43986
44085
|
properties: {
|
|
@@ -44002,7 +44101,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
44002
44101
|
},
|
|
44003
44102
|
{
|
|
44004
44103
|
name: "text_to_sound_effect",
|
|
44005
|
-
description: "Generate one game sound effect from a Chinese or English description with Doubao Seed Audio. Each call produces one output of at most 120 seconds. Split longer audio across multiple generations because this tool does not stitch outputs. duration_seconds is an approximate target and the actual duration may differ. The local proxy attempts to materialize successful audio in the provider original format under assets/audio/sfx and record it for later Maker references; use returned local paths when present.",
|
|
44104
|
+
description: "Generate one game sound effect from a Chinese or English description with Doubao Seed Audio. Each call produces one output of at most 120 seconds. Split longer audio across multiple generations because this tool does not stitch outputs. duration_seconds is an approximate target and the actual duration may differ. The local proxy attempts to materialize successful audio in the provider original format under assets/audio/sfx and record it for later Maker references; use returned local paths when present. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.",
|
|
44006
44105
|
inputSchema: {
|
|
44007
44106
|
type: "object",
|
|
44008
44107
|
properties: {
|
|
@@ -44035,7 +44134,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
44035
44134
|
},
|
|
44036
44135
|
{
|
|
44037
44136
|
name: "batch_sound_effects",
|
|
44038
|
-
description: "Generate multiple game sound effects with Doubao Seed Audio in one batch. Each item is an independent output of at most 120 seconds. Split longer audio across items or calls because this tool does not stitch outputs. The result preserves per-item failures while the local proxy attempts to materialize successful audio in the provider original format under assets/audio/sfx and record it for later Maker references; use returned local paths when present.",
|
|
44137
|
+
description: "Generate multiple game sound effects with Doubao Seed Audio in one batch. Each item is an independent output of at most 120 seconds. Split longer audio across items or calls because this tool does not stitch outputs. The result preserves per-item failures while the local proxy attempts to materialize successful audio in the provider original format under assets/audio/sfx and record it for later Maker references; use returned local paths when present. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.",
|
|
44039
44138
|
inputSchema: {
|
|
44040
44139
|
type: "object",
|
|
44041
44140
|
properties: {
|
|
@@ -44075,7 +44174,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
44075
44174
|
},
|
|
44076
44175
|
{
|
|
44077
44176
|
name: "text_to_dialogue",
|
|
44078
|
-
description: "Generate final character dialogue audio with ElevenLabs Eleven v3. Each character needs a confirmed ElevenLabs voice mapping in .project/elevenlabs-voice-mapping.json; when one is missing, call audition_voices_for_character and then confirm_character_voice before retrying. Use stability from 0 to 1 (default 0.5) to tune variation. Eleven v3 supports audio tags such as [sad] and [laughing] plus punctuation-based pacing. The local proxy attempts to materialize successful dialogue under assets/audio/voice; use returned local paths when present.",
|
|
44177
|
+
description: "Generate final character dialogue audio with ElevenLabs Eleven v3. Each character needs a confirmed ElevenLabs voice mapping in .project/elevenlabs-voice-mapping.json; when one is missing, call audition_voices_for_character and then confirm_character_voice before retrying. Use stability from 0 to 1 (default 0.5) to tune variation. Eleven v3 supports audio tags such as [sad] and [laughing] plus punctuation-based pacing. The local proxy attempts to materialize successful dialogue under assets/audio/voice; use returned local paths when present. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.",
|
|
44079
44178
|
inputSchema: {
|
|
44080
44179
|
type: "object",
|
|
44081
44180
|
properties: {
|
|
@@ -44121,7 +44220,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
44121
44220
|
},
|
|
44122
44221
|
{
|
|
44123
44222
|
name: "audition_voices_for_character",
|
|
44124
|
-
description: "Create 1 to 3 temporary ElevenLabs Voice Design previews for one game character. Prepare a detailed character description and an audition line of at least 100 characters that matches the character personality and speaking style. candidate_count accepts 1 to 3 and defaults to 3. Show every returned preview to the user and wait for an explicit choice before calling confirm_character_voice. Complete audition and confirmation for one character before starting another in the same project; do not run them in parallel. Preview files are temporary and are not saved as final game assets.",
|
|
44223
|
+
description: "Create 1 to 3 temporary ElevenLabs Voice Design previews for one game character. Prepare a detailed character description and an audition line of at least 100 characters that matches the character personality and speaking style. candidate_count accepts 1 to 3 and defaults to 3. Show every returned preview to the user and wait for an explicit choice before calling confirm_character_voice. Complete audition and confirmation for one character before starting another in the same project; do not run them in parallel. Preview files are temporary and are not saved as final game assets. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.",
|
|
44125
44224
|
inputSchema: {
|
|
44126
44225
|
type: "object",
|
|
44127
44226
|
properties: {
|
|
@@ -44155,7 +44254,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
44155
44254
|
},
|
|
44156
44255
|
{
|
|
44157
44256
|
name: "confirm_character_voice",
|
|
44158
|
-
description: "Confirm an ElevenLabs Voice Design selection, create the permanent voice, and persist the character voice mapping for later text_to_dialogue calls. Call this tool only after audition_voices_for_character and only after the user explicitly selects a candidate or explicitly accepts the recommended candidate. Omit selected_index only after the user explicitly accepts the recommendation; absence of a user choice is not acceptance. Confirmation consumes one ElevenLabs Voice Slot. Process one character at a time and do not call this tool in parallel for the same project.",
|
|
44257
|
+
description: "Confirm an ElevenLabs Voice Design selection, create the permanent voice, and persist the character voice mapping for later text_to_dialogue calls. Call this tool only after audition_voices_for_character and only after the user explicitly selects a candidate or explicitly accepts the recommended candidate. Omit selected_index only after the user explicitly accepts the recommendation; absence of a user choice is not acceptance. Confirmation consumes one ElevenLabs Voice Slot. Process one character at a time and do not call this tool in parallel for the same project. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.",
|
|
44159
44258
|
inputSchema: {
|
|
44160
44259
|
type: "object",
|
|
44161
44260
|
properties: {
|
|
@@ -44177,7 +44276,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
44177
44276
|
},
|
|
44178
44277
|
{
|
|
44179
44278
|
name: "generate_test_qrcode",
|
|
44180
|
-
description: "Generate a mobile test QR code only when the user explicitly requests a test QR code or scan test, or when get_ad_config reports missing app_id or developer_id and requests this recovery step. Do not call this tool automatically during initialization, build, or publish workflows. When an explicit build is needed, use maker_build_current_directory separately. Call without confirmed_screen_orientation first. Reuse an existing project orientation; only when the tool reports it missing, ask the user in a separate conversation turn to choose landscape or portrait and then retry. An existing orientation is immutable. This operation may upload a test version, create the TapTap app identity, and return a displayable QR code.",
|
|
44279
|
+
description: "Generate a mobile test QR code only when the user explicitly requests a test QR code or scan test, or when get_ad_config reports missing app_id or developer_id and requests this recovery step. Do not call this tool automatically during initialization, build, or publish workflows. When an explicit build is needed, use maker_build_current_directory separately. Call without confirmed_screen_orientation first. Reuse an existing project orientation; only when the tool reports it missing, ask the user in a separate conversation turn to choose landscape or portrait and then retry. An existing orientation is immutable. This operation may upload a test version, create the TapTap app identity, and return a displayable QR code. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.",
|
|
44181
44280
|
inputSchema: {
|
|
44182
44281
|
type: "object",
|
|
44183
44282
|
properties: {
|
|
@@ -44196,7 +44295,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
44196
44295
|
},
|
|
44197
44296
|
{
|
|
44198
44297
|
name: "add_test_whitelist",
|
|
44199
|
-
description: "Add one TapTap user to the current game test whitelist. Use this only after maker_build_current_directory has initialized the project and generate_test_qrcode has established the TapTap app identity. Call it only with the TapTap user_id explicitly provided by the user; never infer an account ID.",
|
|
44298
|
+
description: "Add one TapTap user to the current game test whitelist. Use this only after maker_build_current_directory has initialized the project and generate_test_qrcode has established the TapTap app identity. Call it only with the TapTap user_id explicitly provided by the user; never infer an account ID. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.",
|
|
44200
44299
|
inputSchema: {
|
|
44201
44300
|
type: "object",
|
|
44202
44301
|
properties: {
|
|
@@ -44214,7 +44313,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
44214
44313
|
},
|
|
44215
44314
|
{
|
|
44216
44315
|
name: "get_ad_config",
|
|
44217
|
-
description: "For any ad-related request, read maker://ads-integration-guide first. After Maker project status confirms the primary local project configs are initialized, use this as the first remote step. It is the source of truth for current ad activation and configuration, and synchronizes the result into .project/settings.json at @runtime.ad. The local preflight does not call the remote tool while project.json or settings.json is missing. Missing local configs do not authorize an automatic build. Use maker_build_current_directory only for an explicit user build, submit, or preview request, then check project status again. If configs remain missing, report the limitation and do not rebuild automatically. Do not infer ad readiness from local SDK docs, .maker-mcp/config.json, or runtime callbacks, and only implement or test ad behavior after the returned configuration is usable. If app_id or developer_id is missing, call generate_test_qrcode once and then retry this tool. If ad.status != 1, report warning and ad.url, follow the returned next_action, and retry only after the user completes that step.",
|
|
44316
|
+
description: "For any ad-related request, read maker://ads-integration-guide first. After Maker project status confirms the primary local project configs are initialized, use this as the first remote step. It is the source of truth for current ad activation and configuration, and synchronizes the result into .project/settings.json at @runtime.ad. The local preflight does not call the remote tool while project.json or settings.json is missing. Missing local configs do not authorize an automatic build. Use maker_build_current_directory only for an explicit user build, submit, or preview request, then check project status again. If configs remain missing, report the limitation and do not rebuild automatically. Do not infer ad readiness from local SDK docs, .maker-mcp/config.json, or runtime callbacks, and only implement or test ad behavior after the returned configuration is usable. If app_id or developer_id is missing, call generate_test_qrcode once and then retry this tool. If ad.status != 1, report warning and ad.url, follow the returned next_action, and retry only after the user completes that step. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.",
|
|
44218
44317
|
inputSchema: {
|
|
44219
44318
|
type: "object",
|
|
44220
44319
|
properties: {
|
|
@@ -44228,7 +44327,7 @@ var remoteProxyToolSnapshot_default = {
|
|
|
44228
44327
|
},
|
|
44229
44328
|
{
|
|
44230
44329
|
name: "get_debug_feedbacks",
|
|
44231
|
-
description: "Fetch online player feedback for the current Maker project, or query server and Lua session logs when game_session_id is provided. The default feedback mode fetches unprocessed records and marks the returned records as processed. For a read-only feedback query, set fetch_and_mark_processed=false; use the input schema to select other filters or an exact feedback record. Downloaded feedback attachments are saved in the local project. Read only the returned local_dir, local_log_paths, and local_screenshot_paths; do not treat remote attachment paths as local files. Session-log mode returns its own saved paths and progress information; use the returned result to continue when more history is available.",
|
|
44330
|
+
description: "Fetch online player feedback for the current Maker project, or query server and Lua session logs when game_session_id is provided. The default feedback mode fetches unprocessed records and marks the returned records as processed. For a read-only feedback query, set fetch_and_mark_processed=false; use the input schema to select other filters or an exact feedback record. Downloaded feedback attachments are saved in the local project. Read only the returned local_dir, local_log_paths, and local_screenshot_paths; do not treat remote attachment paths as local files. Session-log mode returns its own saved paths and progress information; use the returned result to continue when more history is available. This tool is not retried automatically by the local Maker runtime. If its response is interrupted after dispatch, its execution state may be unknown. For generation, usage, or state-changing operations, verify remote output, state, and usage before deciding whether to retry explicitly.",
|
|
44232
44331
|
inputSchema: {
|
|
44233
44332
|
type: "object",
|
|
44234
44333
|
properties: {
|
|
@@ -44325,7 +44424,7 @@ Received: ${configJson.substring(0, 100)}...`
|
|
|
44325
44424
|
return applyDefaults(config2);
|
|
44326
44425
|
}
|
|
44327
44426
|
function validateConfig(config2) {
|
|
44328
|
-
var _a3;
|
|
44427
|
+
var _a3, _b;
|
|
44329
44428
|
const errors = [];
|
|
44330
44429
|
if (!config2.server) {
|
|
44331
44430
|
errors.push("- Missing required field: server");
|
|
@@ -44373,13 +44472,23 @@ function validateConfig(config2) {
|
|
|
44373
44472
|
errors.push("- options.exposed_tools values must be non-empty strings");
|
|
44374
44473
|
}
|
|
44375
44474
|
}
|
|
44475
|
+
if (((_b = config2.options) == null ? void 0 : _b.replayable_tools) !== void 0) {
|
|
44476
|
+
const replayableTools = config2.options.replayable_tools;
|
|
44477
|
+
if (!Array.isArray(replayableTools)) {
|
|
44478
|
+
errors.push("- options.replayable_tools must be an array of tool names");
|
|
44479
|
+
} else if (!replayableTools.every(
|
|
44480
|
+
(toolName) => typeof toolName === "string" && toolName.trim().length > 0
|
|
44481
|
+
)) {
|
|
44482
|
+
errors.push("- options.replayable_tools values must be non-empty strings");
|
|
44483
|
+
}
|
|
44484
|
+
}
|
|
44376
44485
|
if (errors.length > 0) {
|
|
44377
44486
|
throw new Error("Invalid configuration:\n" + errors.join("\n"));
|
|
44378
44487
|
}
|
|
44379
44488
|
}
|
|
44380
44489
|
var DEFAULT_LOG_ROOT = "/tmp/taptap-mcp/logs";
|
|
44381
44490
|
function applyDefaults(config2) {
|
|
44382
|
-
var _a3, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
44491
|
+
var _a3, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
44383
44492
|
const verbose = ((_a3 = config2.options) == null ? void 0 : _a3.verbose) ?? false;
|
|
44384
44493
|
return {
|
|
44385
44494
|
server: {
|
|
@@ -44405,12 +44514,13 @@ function applyDefaults(config2) {
|
|
|
44405
44514
|
inject_params_per_call: ((_i = config2.options) == null ? void 0 : _i.inject_params_per_call) ?? true,
|
|
44406
44515
|
force_inject_progress_token: ((_j = config2.options) == null ? void 0 : _j.force_inject_progress_token) ?? false,
|
|
44407
44516
|
exposed_tools: (_k = config2.options) == null ? void 0 : _k.exposed_tools,
|
|
44517
|
+
replayable_tools: (_l = config2.options) == null ? void 0 : _l.replayable_tools,
|
|
44408
44518
|
log: {
|
|
44409
|
-
root: ((
|
|
44410
|
-
enabled: ((
|
|
44519
|
+
root: ((_n = (_m = config2.options) == null ? void 0 : _m.log) == null ? void 0 : _n.root) ?? DEFAULT_LOG_ROOT,
|
|
44520
|
+
enabled: ((_p = (_o = config2.options) == null ? void 0 : _o.log) == null ? void 0 : _p.enabled) ?? false,
|
|
44411
44521
|
// verbose=true 时自动使用 debug 级别
|
|
44412
|
-
level: verbose ? "debug" : ((
|
|
44413
|
-
max_days: ((
|
|
44522
|
+
level: verbose ? "debug" : ((_r = (_q = config2.options) == null ? void 0 : _q.log) == null ? void 0 : _r.level) ?? "info",
|
|
44523
|
+
max_days: ((_t = (_s = config2.options) == null ? void 0 : _s.log) == null ? void 0 : _t.max_days) ?? 7
|
|
44414
44524
|
}
|
|
44415
44525
|
}
|
|
44416
44526
|
};
|
|
@@ -44420,7 +44530,7 @@ function applyDefaults(config2) {
|
|
|
44420
44530
|
var MAKER_MCP_TRACKING_ACTION = "tapmaker_mcp_call";
|
|
44421
44531
|
var MAKER_MCP_TRACKING_SOURCE = "local_mcp";
|
|
44422
44532
|
var MAKER_MCP_TRACKING_TIMEOUT_MS = 1500;
|
|
44423
|
-
var MAKER_MCP_VERSION = "0.0.32
|
|
44533
|
+
var MAKER_MCP_VERSION = "0.0.32".trim() ? "0.0.32".trim() : "dev";
|
|
44424
44534
|
var TRACKING_ERROR_MAX_LENGTH = 500;
|
|
44425
44535
|
function buildMakerMcpTrackingPayload(event) {
|
|
44426
44536
|
var _a3, _b, _c;
|
|
@@ -44707,11 +44817,11 @@ function createMakerRemoteProxyManager(options = {}) {
|
|
|
44707
44817
|
cachedTools.set(key, tools2);
|
|
44708
44818
|
return tools2;
|
|
44709
44819
|
},
|
|
44710
|
-
async callTool(context, request, requestOptions) {
|
|
44711
|
-
return await run(
|
|
44712
|
-
|
|
44713
|
-
|
|
44714
|
-
);
|
|
44820
|
+
async callTool(context, request, requestOptions, onDispatch) {
|
|
44821
|
+
return await run(context, async (client) => {
|
|
44822
|
+
onDispatch == null ? void 0 : onDispatch();
|
|
44823
|
+
return await client.callTool(request, void 0, requestOptions);
|
|
44824
|
+
});
|
|
44715
44825
|
},
|
|
44716
44826
|
getCachedTools(context) {
|
|
44717
44827
|
return cachedTools.get(createContextKey(context));
|
|
@@ -44733,7 +44843,7 @@ function createMakerRemoteProxyManager(options = {}) {
|
|
|
44733
44843
|
}
|
|
44734
44844
|
|
|
44735
44845
|
// src/maker/server/mcp.ts
|
|
44736
|
-
var VERSION = true ? "0.0.32
|
|
44846
|
+
var VERSION = true ? "0.0.32" : "dev";
|
|
44737
44847
|
var DEFAULT_BUILD_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
44738
44848
|
var DEFAULT_PROXY_RETRY_ATTEMPTS = 5;
|
|
44739
44849
|
var DEFAULT_PROXY_RETRY_DELAY_MS = 30 * 1e3;
|
|
@@ -44982,11 +45092,23 @@ async function callRemoteProxyTool(options) {
|
|
|
44982
45092
|
const requestOptions = createRemoteProxyCallToolOptions(options.progressToken, options.extra);
|
|
44983
45093
|
const callTool = options.manager ? async () => {
|
|
44984
45094
|
proxy = createProxy();
|
|
44985
|
-
|
|
44986
|
-
|
|
44987
|
-
|
|
44988
|
-
|
|
44989
|
-
|
|
45095
|
+
let dispatched = false;
|
|
45096
|
+
try {
|
|
45097
|
+
return await options.manager.callTool(
|
|
45098
|
+
proxy,
|
|
45099
|
+
{ name: options.name, arguments: finalArgs },
|
|
45100
|
+
requestOptions,
|
|
45101
|
+
() => {
|
|
45102
|
+
dispatched = true;
|
|
45103
|
+
}
|
|
45104
|
+
);
|
|
45105
|
+
} catch (error2) {
|
|
45106
|
+
throw new RemoteProxyToolCallError(
|
|
45107
|
+
options.name,
|
|
45108
|
+
dispatched ? "unknown" : "not_executed",
|
|
45109
|
+
error2
|
|
45110
|
+
);
|
|
45111
|
+
}
|
|
44990
45112
|
} : async () => {
|
|
44991
45113
|
const transport = trackMakerChildTransport(
|
|
44992
45114
|
new StdioClientTransport({
|
|
@@ -45007,6 +45129,12 @@ async function callRemoteProxyTool(options) {
|
|
|
45007
45129
|
);
|
|
45008
45130
|
try {
|
|
45009
45131
|
await client.connect(transport);
|
|
45132
|
+
} catch (error2) {
|
|
45133
|
+
await client.close().catch(() => {
|
|
45134
|
+
});
|
|
45135
|
+
throw new RemoteProxyToolCallError(options.name, "not_executed", error2);
|
|
45136
|
+
}
|
|
45137
|
+
try {
|
|
45010
45138
|
return await client.callTool(
|
|
45011
45139
|
{
|
|
45012
45140
|
name: options.name,
|
|
@@ -45017,25 +45145,14 @@ async function callRemoteProxyTool(options) {
|
|
|
45017
45145
|
...requestOptions
|
|
45018
45146
|
}
|
|
45019
45147
|
);
|
|
45148
|
+
} catch (error2) {
|
|
45149
|
+
throw new RemoteProxyToolCallError(options.name, "unknown", error2);
|
|
45020
45150
|
} finally {
|
|
45021
45151
|
await client.close().catch(() => {
|
|
45022
45152
|
});
|
|
45023
45153
|
}
|
|
45024
45154
|
};
|
|
45025
|
-
const result = await
|
|
45026
|
-
onRetry: options.progressToken ? (event) => {
|
|
45027
|
-
options.extra.sendNotification({
|
|
45028
|
-
method: "notifications/progress",
|
|
45029
|
-
params: {
|
|
45030
|
-
progressToken: options.progressToken,
|
|
45031
|
-
progress: event.attempt,
|
|
45032
|
-
total: event.attempts,
|
|
45033
|
-
message: event.message
|
|
45034
|
-
}
|
|
45035
|
-
}).catch(() => {
|
|
45036
|
-
});
|
|
45037
|
-
} : void 0
|
|
45038
|
-
});
|
|
45155
|
+
const result = await callTool();
|
|
45039
45156
|
return await materializeRemoteProxyToolAssets({
|
|
45040
45157
|
toolName: options.name,
|
|
45041
45158
|
targetDir: proxy.projectRoot,
|
|
@@ -45793,7 +45910,8 @@ async function formatMakerProxyToolsStatusSafely(options) {
|
|
|
45793
45910
|
`- missing_tools: ${MAKER_REMOTE_PROXY_EXPOSED_TOOL_NAMES.join(", ")}`,
|
|
45794
45911
|
"- build_available: no",
|
|
45795
45912
|
`- failure_message: ${error2 instanceof Error ? error2.message : String(error2)}`,
|
|
45796
|
-
"-
|
|
45913
|
+
"- build_retry_policy: up to 5 total attempts, 30s apart",
|
|
45914
|
+
"- proxy_tool_retry_policy: single attempt; never replayed automatically",
|
|
45797
45915
|
"- next_action: Maker proxy 连接失败;远端 proxy tools 和 build 构建都不可用。请检查网络、PAT/TapTap token、Maker MCP 环境和远端服务后重试。"
|
|
45798
45916
|
].join("\n");
|
|
45799
45917
|
}
|
|
@@ -46294,7 +46412,7 @@ function formatClonePartialStateLines(targetDir) {
|
|
|
46294
46412
|
function createRemoteProxyContext(options) {
|
|
46295
46413
|
const identify = identifyMakerProject({ cwd: options.targetDir });
|
|
46296
46414
|
if (!identify.projectRoot || !identify.projectId) {
|
|
46297
|
-
throw new
|
|
46415
|
+
throw new MakerBuildContextError(
|
|
46298
46416
|
`${options.targetDir} is not bound to a Maker project. Run taptap-maker init first.`
|
|
46299
46417
|
);
|
|
46300
46418
|
}
|
|
@@ -46303,7 +46421,7 @@ function createRemoteProxyContext(options) {
|
|
|
46303
46421
|
const env = getMakerEnvironment(options.env, identify.projectRoot);
|
|
46304
46422
|
const tapAuth = loadTapAuth();
|
|
46305
46423
|
if (!tapAuth) {
|
|
46306
|
-
throw new
|
|
46424
|
+
throw new MakerBuildContextError("Tap auth not found. Run `taptap-maker login` first.");
|
|
46307
46425
|
}
|
|
46308
46426
|
let userId = projectConfig == null ? void 0 : projectConfig.user_id;
|
|
46309
46427
|
if (!userId) {
|
|
@@ -46311,7 +46429,7 @@ function createRemoteProxyContext(options) {
|
|
|
46311
46429
|
userId = jwt2 ? getUserIdFromMakerJwt(jwt2) : void 0;
|
|
46312
46430
|
}
|
|
46313
46431
|
if (!userId) {
|
|
46314
|
-
throw new
|
|
46432
|
+
throw new MakerBuildContextError(
|
|
46315
46433
|
"Cannot resolve user_id. Re-run taptap-maker init with PAT so the project config can cache user_id."
|
|
46316
46434
|
);
|
|
46317
46435
|
}
|
|
@@ -46335,7 +46453,8 @@ function createRemoteProxyContext(options) {
|
|
|
46335
46453
|
reset_timeout_on_progress: true,
|
|
46336
46454
|
force_inject_progress_token: true,
|
|
46337
46455
|
disable_standalone_sse: true,
|
|
46338
|
-
exposed_tools: options.exposedTools
|
|
46456
|
+
exposed_tools: options.exposedTools,
|
|
46457
|
+
replayable_tools: ["build"]
|
|
46339
46458
|
}
|
|
46340
46459
|
};
|
|
46341
46460
|
const proxyConfigJson = JSON.stringify(proxyCfg);
|
|
@@ -46468,6 +46587,12 @@ var RemoteBuildFailedError = class extends Error {
|
|
|
46468
46587
|
this.buildResult = buildResult;
|
|
46469
46588
|
}
|
|
46470
46589
|
};
|
|
46590
|
+
var MakerBuildContextError = class extends Error {
|
|
46591
|
+
constructor(message) {
|
|
46592
|
+
super(message);
|
|
46593
|
+
this.name = "MakerBuildContextError";
|
|
46594
|
+
}
|
|
46595
|
+
};
|
|
46471
46596
|
async function buildCurrentDirectory(options) {
|
|
46472
46597
|
var _a3;
|
|
46473
46598
|
const localChanges = await readMakerProjectLocalChanges(options.targetDir);
|
|
@@ -46519,12 +46644,23 @@ async function buildCurrentDirectory(options) {
|
|
|
46519
46644
|
try {
|
|
46520
46645
|
buildResult = await runRemoteBuildCurrentDirectory(options, localChanges.projectRoot);
|
|
46521
46646
|
} catch (error2) {
|
|
46647
|
+
const buildFailure = toMakerBuildFailure(error2);
|
|
46648
|
+
if (error2 instanceof MakerBuildContextError) {
|
|
46649
|
+
return {
|
|
46650
|
+
mode: "build_context_failed_before_remote",
|
|
46651
|
+
projectRoot: localChanges.projectRoot,
|
|
46652
|
+
projectId: (config2 == null ? void 0 : config2.project_id) || "unknown",
|
|
46653
|
+
codeSubmitStatus: "succeeded",
|
|
46654
|
+
submitResult,
|
|
46655
|
+
buildFailure
|
|
46656
|
+
};
|
|
46657
|
+
}
|
|
46522
46658
|
return {
|
|
46523
46659
|
mode: "build_failed_after_submit",
|
|
46524
46660
|
projectRoot: localChanges.projectRoot,
|
|
46525
46661
|
projectId: (config2 == null ? void 0 : config2.project_id) || "unknown",
|
|
46526
46662
|
submitResult,
|
|
46527
|
-
buildFailure
|
|
46663
|
+
buildFailure
|
|
46528
46664
|
};
|
|
46529
46665
|
}
|
|
46530
46666
|
return {
|
|
@@ -46545,6 +46681,17 @@ async function buildCurrentDirectory(options) {
|
|
|
46545
46681
|
buildFailure: toMakerBuildFailure(error2)
|
|
46546
46682
|
};
|
|
46547
46683
|
}
|
|
46684
|
+
const buildFailure = toMakerBuildFailure(error2);
|
|
46685
|
+
if (error2 instanceof MakerBuildContextError) {
|
|
46686
|
+
const identify = identifyMakerProject({ cwd: options.targetDir });
|
|
46687
|
+
return {
|
|
46688
|
+
mode: "build_context_failed_before_remote",
|
|
46689
|
+
projectRoot: identify.projectRoot || path18.resolve(options.targetDir),
|
|
46690
|
+
projectId: identify.projectId || "unknown",
|
|
46691
|
+
codeSubmitStatus: "skipped_by_user",
|
|
46692
|
+
buildFailure
|
|
46693
|
+
};
|
|
46694
|
+
}
|
|
46548
46695
|
throw error2;
|
|
46549
46696
|
}
|
|
46550
46697
|
}
|
|
@@ -47134,12 +47281,14 @@ function formatRemoteToolResult(result) {
|
|
|
47134
47281
|
}).join("\n");
|
|
47135
47282
|
}
|
|
47136
47283
|
function formatBuildResult(result, progressSummary) {
|
|
47284
|
+
var _a3;
|
|
47137
47285
|
if (result.mode === "remote_build_failed") {
|
|
47138
47286
|
return [
|
|
47139
47287
|
"✗ Remote Maker build failed",
|
|
47140
47288
|
"",
|
|
47141
47289
|
`- project_root: ${result.projectRoot}`,
|
|
47142
47290
|
`- project_id: ${result.projectId}`,
|
|
47291
|
+
...formatBuildFailureStageLines("remote_build", "skipped_by_user", "failed"),
|
|
47143
47292
|
`- maker_url: ${result.buildResult.makerUrl || formatMakerAppWebUrl(result.buildResult.projectId, result.buildResult.env)}`,
|
|
47144
47293
|
`- project_path: ${result.buildResult.projectPath}`,
|
|
47145
47294
|
`- timeout_ms: ${result.buildResult.timeoutMs}`,
|
|
@@ -47148,6 +47297,10 @@ function formatBuildResult(result, progressSummary) {
|
|
|
47148
47297
|
"",
|
|
47149
47298
|
...formatMakerBuildFailureLines(result.buildFailure),
|
|
47150
47299
|
"",
|
|
47300
|
+
...formatRemoteBuildDiagnosisLines(result.buildFailure, result.projectRoot),
|
|
47301
|
+
"",
|
|
47302
|
+
...formatBuildLocalExecutionCheckLines({ context: "remote_build" }),
|
|
47303
|
+
"",
|
|
47151
47304
|
"remote_result:",
|
|
47152
47305
|
indent2(String(sanitizeRemoteDiagnosticValue(result.buildResult.resultText)))
|
|
47153
47306
|
].filter(Boolean).join("\n");
|
|
@@ -47158,6 +47311,7 @@ function formatBuildResult(result, progressSummary) {
|
|
|
47158
47311
|
"",
|
|
47159
47312
|
`- project_root: ${result.projectRoot}`,
|
|
47160
47313
|
`- project_id: ${result.projectId}`,
|
|
47314
|
+
...formatBuildFailureStageLines("code_submit", "failed", "not_started"),
|
|
47161
47315
|
`- branch: ${result.submitResult.branch}`,
|
|
47162
47316
|
`- status: ${result.submitResult.status}`,
|
|
47163
47317
|
`- committed: ${result.submitResult.committed ? "yes" : "no"}`,
|
|
@@ -47172,8 +47326,10 @@ function formatBuildResult(result, progressSummary) {
|
|
|
47172
47326
|
"",
|
|
47173
47327
|
...formatPushRecoveryLines(result.submitResult),
|
|
47174
47328
|
"",
|
|
47175
|
-
...formatMakerFailureLines(result.submitResult.failure)
|
|
47176
|
-
|
|
47329
|
+
...formatMakerFailureLines(result.submitResult.failure),
|
|
47330
|
+
"",
|
|
47331
|
+
...formatBuildLocalExecutionCheckLines({ failure: result.submitResult.failure })
|
|
47332
|
+
] : ["", ...formatBuildLocalExecutionCheckLines()]
|
|
47177
47333
|
].filter(Boolean).join("\n");
|
|
47178
47334
|
}
|
|
47179
47335
|
if (result.mode === "settings_invalid_before_build") {
|
|
@@ -47182,6 +47338,7 @@ function formatBuildResult(result, progressSummary) {
|
|
|
47182
47338
|
"",
|
|
47183
47339
|
`- project_root: ${result.projectRoot}`,
|
|
47184
47340
|
`- project_id: ${result.projectId}`,
|
|
47341
|
+
...formatBuildFailureStageLines("project_validation", "not_started", "not_started"),
|
|
47185
47342
|
...formatProgressSummary(progressSummary),
|
|
47186
47343
|
"",
|
|
47187
47344
|
formatMakerProjectSettingsStatus(result.settingsStatus)
|
|
@@ -47193,17 +47350,41 @@ function formatBuildResult(result, progressSummary) {
|
|
|
47193
47350
|
"",
|
|
47194
47351
|
`- project_root: ${result.projectRoot}`,
|
|
47195
47352
|
`- project_id: ${result.projectId}`,
|
|
47353
|
+
...formatBuildFailureStageLines("project_validation", "not_started", "not_started"),
|
|
47196
47354
|
...formatProgressSummary(progressSummary),
|
|
47197
47355
|
"",
|
|
47198
47356
|
formatMakerProjectHealthStatus(result.projectHealth)
|
|
47199
47357
|
].filter(Boolean).join("\n");
|
|
47200
47358
|
}
|
|
47359
|
+
if (result.mode === "build_context_failed_before_remote") {
|
|
47360
|
+
return [
|
|
47361
|
+
result.codeSubmitStatus === "succeeded" ? "✗ Maker project submitted, but local build context preparation failed; remote build was not started" : "✗ Local build context preparation failed; remote build was not started",
|
|
47362
|
+
"",
|
|
47363
|
+
`- project_root: ${result.projectRoot}`,
|
|
47364
|
+
`- project_id: ${result.projectId}`,
|
|
47365
|
+
...formatBuildFailureStageLines(
|
|
47366
|
+
"local_build_context",
|
|
47367
|
+
result.codeSubmitStatus,
|
|
47368
|
+
"not_started"
|
|
47369
|
+
),
|
|
47370
|
+
result.submitResult ? `- branch: ${result.submitResult.branch}` : "",
|
|
47371
|
+
result.submitResult ? `- status: ${result.submitResult.status}` : "",
|
|
47372
|
+
result.submitResult ? `- committed: ${result.submitResult.committed ? "yes" : "no"}` : "",
|
|
47373
|
+
((_a3 = result.submitResult) == null ? void 0 : _a3.commitHash) ? `- commit_hash: ${result.submitResult.commitHash}` : "",
|
|
47374
|
+
...formatProgressSummary(progressSummary),
|
|
47375
|
+
"",
|
|
47376
|
+
...formatMakerBuildFailureLines(result.buildFailure),
|
|
47377
|
+
"",
|
|
47378
|
+
...formatLocalBuildContextDiagnosisLines(result.buildFailure)
|
|
47379
|
+
].filter(Boolean).join("\n");
|
|
47380
|
+
}
|
|
47201
47381
|
if (result.mode === "build_failed_after_submit") {
|
|
47202
47382
|
return [
|
|
47203
47383
|
"✗ Maker project submitted, but remote Maker build failed",
|
|
47204
47384
|
"",
|
|
47205
47385
|
`- project_root: ${result.projectRoot}`,
|
|
47206
47386
|
`- project_id: ${result.projectId}`,
|
|
47387
|
+
...formatBuildFailureStageLines("remote_build", "succeeded", "failed"),
|
|
47207
47388
|
`- branch: ${result.submitResult.branch}`,
|
|
47208
47389
|
`- status: ${result.submitResult.status}`,
|
|
47209
47390
|
`- committed: ${result.submitResult.committed ? "yes" : "no"}`,
|
|
@@ -47213,7 +47394,11 @@ function formatBuildResult(result, progressSummary) {
|
|
|
47213
47394
|
result.submitResult.transientRetries ? `- transient_git_retries: ${result.submitResult.transientRetries}` : "",
|
|
47214
47395
|
...formatProgressSummary(progressSummary),
|
|
47215
47396
|
"",
|
|
47216
|
-
...formatMakerBuildFailureLines(result.buildFailure)
|
|
47397
|
+
...formatMakerBuildFailureLines(result.buildFailure),
|
|
47398
|
+
"",
|
|
47399
|
+
...formatRemoteBuildDiagnosisLines(result.buildFailure, result.projectRoot),
|
|
47400
|
+
"",
|
|
47401
|
+
...formatBuildLocalExecutionCheckLines({ context: "remote_build" })
|
|
47217
47402
|
].filter(Boolean).join("\n");
|
|
47218
47403
|
}
|
|
47219
47404
|
const submitLines = result.submitResult ? [
|
|
@@ -47333,6 +47518,110 @@ ${indent2(formatDiagnosticJson(details))}` : "",
|
|
|
47333
47518
|
${indent2(String(sanitizeRemoteDiagnosticValue(failure.stack)))}` : ""
|
|
47334
47519
|
].filter(Boolean);
|
|
47335
47520
|
}
|
|
47521
|
+
function formatBuildFailureStageLines(failureStage, codeSubmitStatus, remoteBuildStatus) {
|
|
47522
|
+
return [
|
|
47523
|
+
`- failure_stage: ${failureStage}`,
|
|
47524
|
+
`- code_submit_status: ${codeSubmitStatus}`,
|
|
47525
|
+
`- remote_build_status: ${remoteBuildStatus}`
|
|
47526
|
+
];
|
|
47527
|
+
}
|
|
47528
|
+
function formatBuildLocalExecutionCheckLines(options = {}) {
|
|
47529
|
+
if (options.context === "remote_build") {
|
|
47530
|
+
return [
|
|
47531
|
+
"local_execution_check:",
|
|
47532
|
+
"- restriction_signal: not_detected",
|
|
47533
|
+
"- diagnostic_priority: remote_build_error_first",
|
|
47534
|
+
"- sandbox_check_condition: only_if_local_commands_are_also_blocked",
|
|
47535
|
+
'- fallback_check: If Windows PowerShell, CLI, Git, or MCP commands are also blocked locally, ask the user to check the AI client sandbox/access setting and enable Full Access mode ("完全访问模式") only for a trusted project.',
|
|
47536
|
+
"- evidence_rule: A remote build failure is not evidence of a local sandbox restriction."
|
|
47537
|
+
];
|
|
47538
|
+
}
|
|
47539
|
+
const restrictionSignal = options.failure ? hasLocalExecutionRestrictionSignal(options.failure) : false;
|
|
47540
|
+
if (options.failure && !restrictionSignal && isRemoteGitFailure(options.failure)) {
|
|
47541
|
+
return [
|
|
47542
|
+
"local_execution_check:",
|
|
47543
|
+
"- restriction_signal: not_detected",
|
|
47544
|
+
"- diagnostic_priority: remote_git_error_first",
|
|
47545
|
+
"- sandbox_check_condition: only_if_local_commands_are_also_blocked",
|
|
47546
|
+
'- fallback_check: If Windows PowerShell, CLI, Git, or MCP commands are also blocked locally, ask the user to check the AI client sandbox/access setting and enable Full Access mode ("完全访问模式") only for a trusted project.',
|
|
47547
|
+
"- evidence_rule: A remote Git failure is not evidence of a local sandbox restriction."
|
|
47548
|
+
];
|
|
47549
|
+
}
|
|
47550
|
+
return [
|
|
47551
|
+
"local_execution_check:",
|
|
47552
|
+
`- restriction_signal: ${restrictionSignal ? "detected" : "not_detected"}`,
|
|
47553
|
+
restrictionSignal ? "- assessment: The current error reports a sandbox or local access restriction; code execution may be blocked before Maker can complete the build workflow." : "- assessment: Maker cannot inspect the AI client access-mode setting, so the current build failure does not confirm whether local execution is restricted.",
|
|
47554
|
+
"- windows_check: Check whether the AI client is running Windows PowerShell, CLI, Git, or MCP commands in a sandbox or restricted mode.",
|
|
47555
|
+
restrictionSignal ? '- next_action: For a trusted project, enable Full Access mode ("完全访问模式") in the AI client, reconnect MCP, and retry only after confirming local commands can execute.' : '- next_action: Check the AI client sandbox/access setting. For a trusted project, enable Full Access mode ("完全访问模式"), reconnect MCP, and retry after confirming local commands can execute.',
|
|
47556
|
+
"- evidence_rule: This is a diagnostic check, not proof that sandbox restrictions caused this failure."
|
|
47557
|
+
];
|
|
47558
|
+
}
|
|
47559
|
+
function hasLocalExecutionRestrictionSignal(failure) {
|
|
47560
|
+
const localText = gitFailureSearchText(failure).split(/\r?\n/u).filter((line) => !/^\s*remote:/iu.test(line)).join("\n");
|
|
47561
|
+
const hasLocalProcessMarker = /\bPowerShell(?:\.exe)?\b|\bspawn\s+(?:(?:[^\r\n]{0,160})[\\/])?(?:git(?:\.exe)?|PowerShell(?:\.exe)?)\b/iu.test(
|
|
47562
|
+
localText
|
|
47563
|
+
);
|
|
47564
|
+
const hasRestrictionMarker = /sandbox|沙盒|blocked|disabled|not permitted|EPERM|EACCES/iu.test(
|
|
47565
|
+
localText
|
|
47566
|
+
);
|
|
47567
|
+
return hasLocalProcessMarker && hasRestrictionMarker;
|
|
47568
|
+
}
|
|
47569
|
+
function isRemoteGitFailure(failure) {
|
|
47570
|
+
return [
|
|
47571
|
+
"remote_transient",
|
|
47572
|
+
"remote_rejected",
|
|
47573
|
+
"auth",
|
|
47574
|
+
"branch_not_allowed",
|
|
47575
|
+
"forbidden_path"
|
|
47576
|
+
].includes(failure.classification) || /(?:^|\n)\s*remote:/iu.test(gitFailureSearchText(failure));
|
|
47577
|
+
}
|
|
47578
|
+
function gitFailureSearchText(failure) {
|
|
47579
|
+
return [failure.message, failure.stderr, failure.stdout].filter(Boolean).join("\n");
|
|
47580
|
+
}
|
|
47581
|
+
function formatRemoteBuildDiagnosisLines(failure, projectRoot) {
|
|
47582
|
+
const isRequestTimeout = isMcpRequestTimeoutFailure(failure);
|
|
47583
|
+
return [
|
|
47584
|
+
"remote_build_diagnosis:",
|
|
47585
|
+
isRequestTimeout ? "- failure_signal: mcp_request_timeout" : "",
|
|
47586
|
+
"- root_cause: unconfirmed",
|
|
47587
|
+
isRequestTimeout ? "- maker_server_fault_confirmed: no" : "",
|
|
47588
|
+
"- inspect_first: returned build_failure and any remote_result for code or resource diagnostics",
|
|
47589
|
+
"- diagnostic_action_modified_local_project_files: no",
|
|
47590
|
+
...isRequestTimeout ? ["", ...formatMcpTimeoutLocalDiagnosticLines(projectRoot)] : []
|
|
47591
|
+
].filter(Boolean);
|
|
47592
|
+
}
|
|
47593
|
+
function formatLocalBuildContextDiagnosisLines(failure) {
|
|
47594
|
+
return [
|
|
47595
|
+
"local_build_context_diagnosis:",
|
|
47596
|
+
"- root_cause: known_local_context",
|
|
47597
|
+
"- remote_request_status: not_started",
|
|
47598
|
+
`- next_action: ${failure.message}`
|
|
47599
|
+
];
|
|
47600
|
+
}
|
|
47601
|
+
function isMcpRequestTimeoutFailure(failure) {
|
|
47602
|
+
return /MCP error\s+-32001:\s*Request timed out/iu.test(failure.message);
|
|
47603
|
+
}
|
|
47604
|
+
function formatMcpTimeoutLocalDiagnosticLines(projectRoot) {
|
|
47605
|
+
const processCwd = process.cwd();
|
|
47606
|
+
const cwdAlignment = normalizePathForCompare2(processCwd) === normalizePathForCompare2(projectRoot) ? "same_project" : "different_from_project";
|
|
47607
|
+
return [
|
|
47608
|
+
"mcp_timeout_local_diagnostics:",
|
|
47609
|
+
"- mode: read_only",
|
|
47610
|
+
`- project_root: ${projectRoot}`,
|
|
47611
|
+
`- mcp_process_cwd: ${processCwd}`,
|
|
47612
|
+
`- cwd_alignment: ${cwdAlignment}`,
|
|
47613
|
+
`- node_version: ${process.version}`,
|
|
47614
|
+
`- platform: ${process.platform}/${process.arch}`,
|
|
47615
|
+
`- node_exec_path: ${process.execPath}`,
|
|
47616
|
+
"- active_client_config: not_checked",
|
|
47617
|
+
"- active_client_session: not_checked",
|
|
47618
|
+
"- limitation: Maker MCP cannot inspect the active AI client's command, args, workspace Roots, session, or request timeout.",
|
|
47619
|
+
"- next_action_1: Run Maker doctor for project_root through the active client launcher; standalone CLI equivalent: `taptap-maker doctor --target-dir <PROJECT_DIR>`.",
|
|
47620
|
+
"- next_action_2: Inspect the actual active client MCP command, args, cwd/Roots, session and tool registration, request timeout, and Node runtime.",
|
|
47621
|
+
"- evidence_rule: Do not claim a Maker server outage without HTTP 5xx, server logs, or service status evidence.",
|
|
47622
|
+
"- retry_rule: Do not retry the build blindly; diagnose the failed boundary first."
|
|
47623
|
+
];
|
|
47624
|
+
}
|
|
47336
47625
|
function buildFailureDiagnosticFields(failure) {
|
|
47337
47626
|
const details = {};
|
|
47338
47627
|
for (const [key, value] of Object.entries(failure)) {
|
|
@@ -47363,6 +47652,7 @@ ${indent2(failure.stdout)}` : "",
|
|
|
47363
47652
|
function formatToolException(toolName, error2) {
|
|
47364
47653
|
const message = error2 instanceof Error ? error2.message : String(error2);
|
|
47365
47654
|
const stack = error2 instanceof Error ? error2.stack : void 0;
|
|
47655
|
+
const buildLocalExecutionCheckLines = toolName === "maker_build_current_directory" && !isKnownBuildContextError(error2) ? ["", ...formatBuildLocalExecutionCheckLines()] : [];
|
|
47366
47656
|
if (error2 instanceof MakerGitNotFoundError) {
|
|
47367
47657
|
return [
|
|
47368
47658
|
"✗ Maker MCP tool stopped",
|
|
@@ -47372,7 +47662,8 @@ function formatToolException(toolName, error2) {
|
|
|
47372
47662
|
"",
|
|
47373
47663
|
message,
|
|
47374
47664
|
"",
|
|
47375
|
-
"next_action: 请只引导用户安装 Git;在 `git --version` 可用之前,不要继续调用 clone、fetch、commit 或 push。"
|
|
47665
|
+
"next_action: 请只引导用户安装 Git;在 `git --version` 可用之前,不要继续调用 clone、fetch、commit 或 push。",
|
|
47666
|
+
...buildLocalExecutionCheckLines
|
|
47376
47667
|
].join("\n");
|
|
47377
47668
|
}
|
|
47378
47669
|
if (error2 instanceof MakerCloneFailedError) {
|
|
@@ -47442,9 +47733,19 @@ function formatToolException(toolName, error2) {
|
|
|
47442
47733
|
"debug:",
|
|
47443
47734
|
stack ? indent2(stack) : indent2(message),
|
|
47444
47735
|
"",
|
|
47445
|
-
"next_action: 请把上面的完整错误反馈给开发者;如果本地已有 commit 但 push 未完成,不要重复 commit,直接重试 maker_build_current_directory。"
|
|
47736
|
+
"next_action: 请把上面的完整错误反馈给开发者;如果本地已有 commit 但 push 未完成,不要重复 commit,直接重试 maker_build_current_directory。",
|
|
47737
|
+
...buildLocalExecutionCheckLines
|
|
47446
47738
|
].join("\n");
|
|
47447
47739
|
}
|
|
47740
|
+
function isKnownBuildContextError(error2) {
|
|
47741
|
+
if (error2 instanceof MakerBuildContextError || error2 instanceof MakerProjectContextAmbiguousError) {
|
|
47742
|
+
return true;
|
|
47743
|
+
}
|
|
47744
|
+
const message = error2 instanceof Error ? error2.message : String(error2);
|
|
47745
|
+
return /target_dir must be a string when provided|is not bound to a Maker project|must be an independent Git repository before build or submit|is bound to a Maker project but is not a Git repository/iu.test(
|
|
47746
|
+
message
|
|
47747
|
+
);
|
|
47748
|
+
}
|
|
47448
47749
|
function stripNestedMcpErrorPrefixes(message) {
|
|
47449
47750
|
const prefix = /^MCP error -?\d+:\s*/i;
|
|
47450
47751
|
let concise = message.trim();
|
|
@@ -47765,6 +48066,7 @@ var SELF_RUNTIME_DIRECTORIES = [
|
|
|
47765
48066
|
"skills/update-taptap-mcp"
|
|
47766
48067
|
];
|
|
47767
48068
|
var SELF_RUNTIME_FILES = ["dist/maker.js", "docs/MAKER_MCP_CONNECTION_TROUBLESHOOTING.md"];
|
|
48069
|
+
var SELF_RUNTIME_COPY_FALLBACK_CODES = /* @__PURE__ */ new Set(["EIO", "EACCES", "EPERM"]);
|
|
47768
48070
|
function resolveMakerPackageSpec(packageName, currentVersion) {
|
|
47769
48071
|
return PUBLISHED_VERSION_PATTERN.test(currentVersion) ? `${packageName}@${currentVersion}` : packageName;
|
|
47770
48072
|
}
|
|
@@ -47793,9 +48095,10 @@ function materializeMakerSelfLauncher(options) {
|
|
|
47793
48095
|
fs18.copyFileSync(sourcePath, targetPath);
|
|
47794
48096
|
}
|
|
47795
48097
|
for (const relativePath of SELF_RUNTIME_DIRECTORIES) {
|
|
47796
|
-
|
|
47797
|
-
|
|
47798
|
-
|
|
48098
|
+
copySelfRuntimeDirectory(
|
|
48099
|
+
path19.join(sourceRoot, relativePath),
|
|
48100
|
+
path19.join(runtimeRoot, relativePath)
|
|
48101
|
+
);
|
|
47799
48102
|
}
|
|
47800
48103
|
}
|
|
47801
48104
|
const stableBundle = path19.join(runtimeRoot, "dist", "maker.js");
|
|
@@ -47806,6 +48109,29 @@ function materializeMakerSelfLauncher(options) {
|
|
|
47806
48109
|
commandAndArgs: [execPath, stableBundle]
|
|
47807
48110
|
};
|
|
47808
48111
|
}
|
|
48112
|
+
function copySelfRuntimeDirectory(sourcePath, targetPath) {
|
|
48113
|
+
try {
|
|
48114
|
+
fs18.cpSync(sourcePath, targetPath, { recursive: true });
|
|
48115
|
+
} catch (error2) {
|
|
48116
|
+
const code = typeof error2 === "object" && error2 !== null && "code" in error2 ? String(error2.code) : void 0;
|
|
48117
|
+
if (!code || !SELF_RUNTIME_COPY_FALLBACK_CODES.has(code)) {
|
|
48118
|
+
throw error2;
|
|
48119
|
+
}
|
|
48120
|
+
copyDirectoryEntries(sourcePath, targetPath);
|
|
48121
|
+
}
|
|
48122
|
+
}
|
|
48123
|
+
function copyDirectoryEntries(sourcePath, targetPath) {
|
|
48124
|
+
fs18.mkdirSync(targetPath, { recursive: true });
|
|
48125
|
+
for (const entry of fs18.readdirSync(sourcePath, { withFileTypes: true })) {
|
|
48126
|
+
const sourceEntry = path19.join(sourcePath, entry.name);
|
|
48127
|
+
const targetEntry = path19.join(targetPath, entry.name);
|
|
48128
|
+
if (entry.isDirectory()) {
|
|
48129
|
+
copyDirectoryEntries(sourceEntry, targetEntry);
|
|
48130
|
+
} else {
|
|
48131
|
+
fs18.copyFileSync(sourceEntry, targetEntry);
|
|
48132
|
+
}
|
|
48133
|
+
}
|
|
48134
|
+
}
|
|
47809
48135
|
function resolveMakerMcpLauncher(options) {
|
|
47810
48136
|
const platform = options.platform ?? process.platform;
|
|
47811
48137
|
if (platform !== "win32") {
|
|
@@ -48230,6 +48556,25 @@ function parseMakerMcpReportContext(input2) {
|
|
|
48230
48556
|
error_message: trimmed
|
|
48231
48557
|
};
|
|
48232
48558
|
}
|
|
48559
|
+
function validateMakerMcpReportContext(context) {
|
|
48560
|
+
var _a3, _b;
|
|
48561
|
+
const errorMessage = ((_a3 = context.error_message) == null ? void 0 : _a3.trim()) || "";
|
|
48562
|
+
const hasErrorCode = typeof context.error_code === "number" || typeof context.error_code === "string" && context.error_code.trim().length > 0;
|
|
48563
|
+
const hasFailedOperation = Boolean((_b = context.failed_operation) == null ? void 0 : _b.trim());
|
|
48564
|
+
if (errorMessage === "Need to call maker_build_current_directory" && !hasErrorCode) {
|
|
48565
|
+
return {
|
|
48566
|
+
ok: false,
|
|
48567
|
+
reason: "This is an expected Maker project build prerequisite, not an MCP connectivity failure."
|
|
48568
|
+
};
|
|
48569
|
+
}
|
|
48570
|
+
if (hasErrorCode || hasFailedOperation || errorMessage) {
|
|
48571
|
+
return { ok: true };
|
|
48572
|
+
}
|
|
48573
|
+
return {
|
|
48574
|
+
ok: false,
|
|
48575
|
+
reason: "Report context must include at least one of error_code, failed_operation, or error_message."
|
|
48576
|
+
};
|
|
48577
|
+
}
|
|
48233
48578
|
function extractMakerMcpServerConfig(config2, mcpName) {
|
|
48234
48579
|
const container = isRecord4(config2.mcpServers) ? config2.mcpServers : isRecord4(config2.mcp) ? config2.mcp : void 0;
|
|
48235
48580
|
const server = container == null ? void 0 : container[mcpName];
|
|
@@ -48876,7 +49221,7 @@ function redactReportText(value) {
|
|
|
48876
49221
|
).replace(
|
|
48877
49222
|
/(--(?:[a-z0-9]+[-_])*(?:pat|token|secret|signature|sig|credential|credentials|authorization|cookie|password|passwd|passphrase|mac[-_]?key|api[-_]?key|auth[-_]?key|private[-_]?key)=)([^\s]+)/giu,
|
|
48878
49223
|
"$1<redacted>"
|
|
48879
|
-
).replace(/\b([A-Za-z][A-Za-z0-9+.-]*:\/\/)([^@\s
|
|
49224
|
+
).replace(/\b([A-Za-z][A-Za-z0-9+.-]*:\/\/)([^@\s/?#]+)@/gu, "$1<redacted>@").replace(/\bgithub_pat_[A-Za-z0-9_]{20,}\b/gu, "<redacted>").replace(/\bgh[pousr]_[A-Za-z0-9]{20,}\b/gu, "<redacted>");
|
|
48880
49225
|
}
|
|
48881
49226
|
function stripControlCharacters(value) {
|
|
48882
49227
|
return Array.from(value, (character) => {
|
|
@@ -49929,7 +50274,7 @@ function formatError3(error2) {
|
|
|
49929
50274
|
}
|
|
49930
50275
|
|
|
49931
50276
|
// src/maker/cli/commands.ts
|
|
49932
|
-
var VERSION2 = true ? "0.0.32
|
|
50277
|
+
var VERSION2 = true ? "0.0.32" : "dev";
|
|
49933
50278
|
var DEFAULT_MCP_NAME = "taptap-maker";
|
|
49934
50279
|
var MAKER_NPM_PACKAGE = "@taptap/maker";
|
|
49935
50280
|
var TWO_PART_COMMANDS = /* @__PURE__ */ new Set([
|
|
@@ -50898,6 +51243,27 @@ async function runMcpReport(parsed, ctx) {
|
|
|
50898
51243
|
const targetDir = path26.resolve(stringOption(parsed, "target_dir") || process.cwd());
|
|
50899
51244
|
const contextInput = booleanOption(parsed, "context_stdin") ? await readStdinText() : "";
|
|
50900
51245
|
const context = parseMakerMcpReportContext(contextInput);
|
|
51246
|
+
const contextValidation = validateMakerMcpReportContext(context);
|
|
51247
|
+
if (!contextValidation.ok) {
|
|
51248
|
+
const payload = {
|
|
51249
|
+
status: "invalid_context",
|
|
51250
|
+
reason: contextValidation.reason,
|
|
51251
|
+
issue_url: "https://github.com/taptap/instant-games-open-mcp/issues/new"
|
|
51252
|
+
};
|
|
51253
|
+
if (ctx.json) {
|
|
51254
|
+
writeJson(payload);
|
|
51255
|
+
return;
|
|
51256
|
+
}
|
|
51257
|
+
process.stdout.write(
|
|
51258
|
+
[
|
|
51259
|
+
"Maker MCP issue report was not prepared: actionable error context is missing.",
|
|
51260
|
+
`Reason: ${payload.reason}`,
|
|
51261
|
+
`Manual issue URL: ${payload.issue_url}`,
|
|
51262
|
+
""
|
|
51263
|
+
].join("\n")
|
|
51264
|
+
);
|
|
51265
|
+
return;
|
|
51266
|
+
}
|
|
50901
51267
|
const reportRuntime = resolveMakerMcpReportRuntime({
|
|
50902
51268
|
distribution: process.env.TAPTAP_MAKER_DISTRIBUTION,
|
|
50903
51269
|
bundleUrl: typeof __MAKER_BUNDLE_URL__ !== "undefined" ? __MAKER_BUNDLE_URL__ : void 0
|
|
@@ -54203,6 +54569,17 @@ var VERSION3 = typeof __PROXY_VERSION__ !== "undefined" ? __PROXY_VERSION__ : "d
|
|
|
54203
54569
|
var LOCAL_PROXY_TAG = "local";
|
|
54204
54570
|
var DEFAULT_RECONNECT_INTERVAL_MS = 5e3;
|
|
54205
54571
|
var MAX_RECONNECT_INTERVAL_MS = 60 * 1e3;
|
|
54572
|
+
function createNonReplayableToolResult(name, executionState) {
|
|
54573
|
+
const text = executionState === "not_executed" ? `${name} was not sent because the upstream MCP connection is unavailable. It was not executed. Automatic retry is disabled; retry explicitly after the connection recovers.` : `${name} may have completed before the upstream MCP response was interrupted. Its execution state is unknown. Automatic retry is disabled; verify remote output, state, and usage before deciding whether to retry explicitly.`;
|
|
54574
|
+
return {
|
|
54575
|
+
isError: true,
|
|
54576
|
+
content: [{ type: "text", text }],
|
|
54577
|
+
structuredContent: {
|
|
54578
|
+
execution_state: executionState,
|
|
54579
|
+
automatic_retry: false
|
|
54580
|
+
}
|
|
54581
|
+
};
|
|
54582
|
+
}
|
|
54206
54583
|
function convertMcpApplicationErrorToToolResult(error2) {
|
|
54207
54584
|
if (!(error2 instanceof Error)) {
|
|
54208
54585
|
return void 0;
|
|
@@ -54445,6 +54822,11 @@ var TapTapMCPProxy = class {
|
|
|
54445
54822
|
throw new McpError(ErrorCode.MethodNotFound, `Tool is not exposed by this proxy: ${name}`);
|
|
54446
54823
|
}
|
|
54447
54824
|
}
|
|
54825
|
+
isToolReplayable(name) {
|
|
54826
|
+
var _a3;
|
|
54827
|
+
const replayableTools = (_a3 = this.config.options) == null ? void 0 : _a3.replayable_tools;
|
|
54828
|
+
return replayableTools === void 0 || replayableTools.includes(name);
|
|
54829
|
+
}
|
|
54448
54830
|
/**
|
|
54449
54831
|
* 连接到 TapTap MCP Server
|
|
54450
54832
|
*/
|
|
@@ -54757,6 +55139,10 @@ var TapTapMCPProxy = class {
|
|
|
54757
55139
|
this.log("info", `Processing ${this.pendingRequests.length} pending requests...`);
|
|
54758
55140
|
while (this.pendingRequests.length > 0) {
|
|
54759
55141
|
const req = this.pendingRequests.shift();
|
|
55142
|
+
if (!this.isToolReplayable(req.name)) {
|
|
55143
|
+
req.resolve(createNonReplayableToolResult(req.name, req.executionState ?? "unknown"));
|
|
55144
|
+
continue;
|
|
55145
|
+
}
|
|
54760
55146
|
if (now - req.timestamp > timeout) {
|
|
54761
55147
|
req.reject(new Error("Request timeout while waiting for reconnection"));
|
|
54762
55148
|
continue;
|
|
@@ -54890,6 +55276,9 @@ var TapTapMCPProxy = class {
|
|
|
54890
55276
|
}
|
|
54891
55277
|
}
|
|
54892
55278
|
if (!this.connected) {
|
|
55279
|
+
if (!this.isToolReplayable(name)) {
|
|
55280
|
+
return createNonReplayableToolResult(name, "not_executed");
|
|
55281
|
+
}
|
|
54893
55282
|
if (this.reconnecting) {
|
|
54894
55283
|
this.log("info", `⏳ Queueing request: ${name} (reconnecting...)`);
|
|
54895
55284
|
return new Promise((resolve, reject) => {
|
|
@@ -54899,6 +55288,7 @@ var TapTapMCPProxy = class {
|
|
|
54899
55288
|
resolve,
|
|
54900
55289
|
reject,
|
|
54901
55290
|
timestamp: Date.now(),
|
|
55291
|
+
executionState: "not_executed",
|
|
54902
55292
|
onprogress: callToolOptions.onprogress
|
|
54903
55293
|
});
|
|
54904
55294
|
});
|
|
@@ -54930,6 +55320,9 @@ var TapTapMCPProxy = class {
|
|
|
54930
55320
|
if (!this.reconnecting) {
|
|
54931
55321
|
this.log("info", "Triggering immediate reconnection...");
|
|
54932
55322
|
this.reconnectToServer();
|
|
55323
|
+
if (!this.isToolReplayable(name)) {
|
|
55324
|
+
return createNonReplayableToolResult(name, "unknown");
|
|
55325
|
+
}
|
|
54933
55326
|
this.log("info", `⏳ Queueing current request: ${name}`);
|
|
54934
55327
|
return new Promise((resolve, reject) => {
|
|
54935
55328
|
this.pendingRequests.push({
|
|
@@ -54938,10 +55331,14 @@ var TapTapMCPProxy = class {
|
|
|
54938
55331
|
resolve,
|
|
54939
55332
|
reject,
|
|
54940
55333
|
timestamp: Date.now(),
|
|
55334
|
+
executionState: "unknown",
|
|
54941
55335
|
onprogress: callToolOptions.onprogress
|
|
54942
55336
|
});
|
|
54943
55337
|
});
|
|
54944
55338
|
}
|
|
55339
|
+
if (!this.isToolReplayable(name)) {
|
|
55340
|
+
return createNonReplayableToolResult(name, "unknown");
|
|
55341
|
+
}
|
|
54945
55342
|
}
|
|
54946
55343
|
throw error2;
|
|
54947
55344
|
}
|