@taptap/instant-games-open-mcp 1.23.0 → 1.23.1
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/dist/maker.js +120 -18
- package/dist/proxy.js +1 -1
- package/dist/server.js +1 -1
- package/package.json +1 -1
- package/skills/taptap-maker-local/SKILL.md +6 -4
- package/skills/update-taptap-mcp/SKILL.md +2 -2
package/dist/maker.js
CHANGED
|
@@ -28711,6 +28711,14 @@ var DEV_KIT_IGNORE_BEGIN = "# >>> TapTap Maker AI dev kit (local only) >>>";
|
|
|
28711
28711
|
var DEV_KIT_IGNORE_END = "# <<< TapTap Maker AI dev kit (local only) <<<";
|
|
28712
28712
|
var DEV_KIT_GITIGNORE_STAGING_FILE = ".gitignore.dev-kit-before-clone";
|
|
28713
28713
|
var DEV_KIT_REQUIRED_ENTRIES = ["CLAUDE.md", "examples", "templates", "urhox-libs"];
|
|
28714
|
+
var DEV_KIT_MANAGED_ENTRY_CANDIDATES = [
|
|
28715
|
+
".emmylua",
|
|
28716
|
+
"CLAUDE.md",
|
|
28717
|
+
"engine-docs",
|
|
28718
|
+
"examples",
|
|
28719
|
+
"templates",
|
|
28720
|
+
"urhox-libs"
|
|
28721
|
+
];
|
|
28714
28722
|
var SKIPPED_TOP_LEVEL_ENTRIES = /* @__PURE__ */ new Set(["scripts", ".DS_Store", "ai-dev-kit.zip"]);
|
|
28715
28723
|
function inspectAiDevKit(targetDir) {
|
|
28716
28724
|
const resolvedTargetDir = path4.resolve(targetDir);
|
|
@@ -28728,6 +28736,12 @@ function inspectAiDevKit(targetDir) {
|
|
|
28728
28736
|
ready: missingEntries.length === 0
|
|
28729
28737
|
};
|
|
28730
28738
|
}
|
|
28739
|
+
function listPresentDevKitManagedEntries(targetDir) {
|
|
28740
|
+
const resolvedTargetDir = path4.resolve(targetDir);
|
|
28741
|
+
return DEV_KIT_MANAGED_ENTRY_CANDIDATES.filter(
|
|
28742
|
+
(entry) => fs3.existsSync(path4.join(resolvedTargetDir, entry))
|
|
28743
|
+
);
|
|
28744
|
+
}
|
|
28731
28745
|
async function installAiDevKit(options = {}) {
|
|
28732
28746
|
const targetDir = path4.resolve(options.targetDir || ".");
|
|
28733
28747
|
fs3.mkdirSync(targetDir, { recursive: true });
|
|
@@ -28824,7 +28838,7 @@ async function downloadAndExtractDevKit(url2) {
|
|
|
28824
28838
|
}
|
|
28825
28839
|
function extractZip(zipPath, targetDir) {
|
|
28826
28840
|
if (process.platform === "win32") {
|
|
28827
|
-
const
|
|
28841
|
+
const result = spawnSync2(
|
|
28828
28842
|
"powershell.exe",
|
|
28829
28843
|
[
|
|
28830
28844
|
"-NoProfile",
|
|
@@ -28838,15 +28852,52 @@ function extractZip(zipPath, targetDir) {
|
|
|
28838
28852
|
],
|
|
28839
28853
|
{ encoding: "utf8" }
|
|
28840
28854
|
);
|
|
28841
|
-
if (
|
|
28842
|
-
throw new Error(`Failed to extract AI dev kit zip: ${
|
|
28855
|
+
if (result.status !== 0) {
|
|
28856
|
+
throw new Error(`Failed to extract AI dev kit zip: ${formatSpawnFailure(result)}`);
|
|
28843
28857
|
}
|
|
28844
28858
|
return;
|
|
28845
28859
|
}
|
|
28846
|
-
const
|
|
28847
|
-
if (
|
|
28848
|
-
|
|
28860
|
+
const unzipResult = spawnSync2("unzip", ["-q", zipPath, "-d", targetDir], { encoding: "utf8" });
|
|
28861
|
+
if (unzipResult.status === 0) {
|
|
28862
|
+
return;
|
|
28863
|
+
}
|
|
28864
|
+
const pythonFailures = [];
|
|
28865
|
+
for (const pythonCommand of ["python3", "python"]) {
|
|
28866
|
+
const pythonResult = spawnSync2(
|
|
28867
|
+
pythonCommand,
|
|
28868
|
+
["-c", PYTHON_ZIP_EXTRACT_SCRIPT, zipPath, targetDir],
|
|
28869
|
+
{ encoding: "utf8" }
|
|
28870
|
+
);
|
|
28871
|
+
if (pythonResult.status === 0) {
|
|
28872
|
+
return;
|
|
28873
|
+
}
|
|
28874
|
+
pythonFailures.push(`${pythonCommand}: ${formatSpawnFailure(pythonResult)}`);
|
|
28849
28875
|
}
|
|
28876
|
+
throw new Error(
|
|
28877
|
+
[
|
|
28878
|
+
`Failed to extract AI dev kit zip: unzip: ${formatSpawnFailure(unzipResult)}`,
|
|
28879
|
+
...pythonFailures
|
|
28880
|
+
].join("; ")
|
|
28881
|
+
);
|
|
28882
|
+
}
|
|
28883
|
+
var PYTHON_ZIP_EXTRACT_SCRIPT = String.raw`
|
|
28884
|
+
import os
|
|
28885
|
+
import sys
|
|
28886
|
+
import zipfile
|
|
28887
|
+
|
|
28888
|
+
zip_path = sys.argv[1]
|
|
28889
|
+
target_dir = os.path.abspath(sys.argv[2])
|
|
28890
|
+
|
|
28891
|
+
with zipfile.ZipFile(zip_path) as archive:
|
|
28892
|
+
for member in archive.infolist():
|
|
28893
|
+
destination = os.path.abspath(os.path.join(target_dir, member.filename))
|
|
28894
|
+
if os.path.commonpath([target_dir, destination]) != target_dir:
|
|
28895
|
+
raise RuntimeError("Blocked unsafe zip entry: " + member.filename)
|
|
28896
|
+
archive.extractall(target_dir)
|
|
28897
|
+
`;
|
|
28898
|
+
function formatSpawnFailure(result) {
|
|
28899
|
+
var _a2;
|
|
28900
|
+
return ((_a2 = result.error) == null ? void 0 : _a2.message) || String(result.stderr || "").trim() || String(result.stdout || "").trim() || `exit status ${result.status ?? "unknown"}`;
|
|
28850
28901
|
}
|
|
28851
28902
|
function resolveDevKitRoot(sourceDir) {
|
|
28852
28903
|
const directEntries = fs3.existsSync(sourceDir) ? fs3.readdirSync(sourceDir) : [];
|
|
@@ -30031,14 +30082,14 @@ function getBundledSkillSourceDir(skillName) {
|
|
|
30031
30082
|
}
|
|
30032
30083
|
|
|
30033
30084
|
// src/maker/server/mcp.ts
|
|
30034
|
-
var VERSION = true ? "1.23.
|
|
30085
|
+
var VERSION = true ? "1.23.1" : "dev";
|
|
30035
30086
|
var DEFAULT_PROXY_PACKAGE = "@taptap/instant-games-open-mcp@1.22.0";
|
|
30036
30087
|
var DEFAULT_BUILD_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
30037
30088
|
var LONG_OPERATION_HEARTBEAT_MS = 3 * 60 * 1e3;
|
|
30038
30089
|
var tools = [
|
|
30039
30090
|
{
|
|
30040
30091
|
name: "maker_exchange_pat",
|
|
30041
|
-
description: "Save a Maker PAT for local Maker API, Git, and TapTap token operations. After saving PAT, this tool fetches TapTap token and
|
|
30092
|
+
description: "Save a Maker PAT for local Maker API, Git, and TapTap token operations. After saving PAT, this tool fetches TapTap token and returns a user-facing Maker app list. If the current directory is unbound, show every returned app entry to the user and ask them to choose; do not summarize the list as a count only.",
|
|
30042
30093
|
inputSchema: {
|
|
30043
30094
|
type: "object",
|
|
30044
30095
|
properties: {
|
|
@@ -30052,7 +30103,7 @@ var tools = [
|
|
|
30052
30103
|
},
|
|
30053
30104
|
{
|
|
30054
30105
|
name: "maker_list_apps",
|
|
30055
|
-
description: "List Maker apps available to the cached or provided Maker PAT. Use this for unbound Maker directory initialization or explicit app-list requests. If maker_status already reports the current directory is bound, treat this list as reference only and do not ask which app to clone unless the user explicitly wants to switch or re-clone.",
|
|
30106
|
+
description: "List Maker apps available to the cached or provided Maker PAT. Use this for unbound Maker directory initialization or explicit app-list requests. If the current directory is unbound, show every returned app entry to the user and ask them to choose; do not summarize the list as a count only. If maker_status already reports the current directory is bound, treat this list as reference only and do not ask which app to clone unless the user explicitly wants to switch or re-clone.",
|
|
30056
30107
|
inputSchema: {
|
|
30057
30108
|
type: "object",
|
|
30058
30109
|
properties: {
|
|
@@ -30065,7 +30116,7 @@ var tools = [
|
|
|
30065
30116
|
},
|
|
30066
30117
|
{
|
|
30067
30118
|
name: "maker_status",
|
|
30068
|
-
description: "Show local Maker MCP status for the user current working directory: Git availability, PAT/TapTap token status, project binding, AI dev kit status, bundled skill document paths, validation checklist, and available apps when the current directory is unbound and PAT exists. If the MCP process cwd differs from the user current working directory, pass target_dir with the user current working directory.",
|
|
30119
|
+
description: "Show local Maker MCP status for the user current working directory: Git availability, PAT/TapTap token status, project binding, AI dev kit status, bundled skill document paths, validation checklist, and available apps when the current directory is unbound and PAT exists. If the current directory is unbound and apps are returned, show every app entry to the user; do not summarize the list as a count only. If the MCP process cwd differs from the user current working directory, pass target_dir with the user current working directory.",
|
|
30069
30120
|
inputSchema: {
|
|
30070
30121
|
type: "object",
|
|
30071
30122
|
properties: {
|
|
@@ -30238,7 +30289,12 @@ async function startMakerMcpServer() {
|
|
|
30238
30289
|
let nextText;
|
|
30239
30290
|
try {
|
|
30240
30291
|
const projects = await listMakerProjects({ pat: args.manual_pat });
|
|
30241
|
-
nextText = [
|
|
30292
|
+
nextText = [
|
|
30293
|
+
"已自动列出可用 Maker Apps。",
|
|
30294
|
+
"当前目录未绑定时,请逐项展示下面完整列表,不要只总结数量;然后让用户选择编号或 app_id。",
|
|
30295
|
+
"",
|
|
30296
|
+
formatProjectList(projects)
|
|
30297
|
+
].join("\n");
|
|
30242
30298
|
} catch (error2) {
|
|
30243
30299
|
nextText = [
|
|
30244
30300
|
"自动列出 Maker Apps 失败。",
|
|
@@ -30290,7 +30346,16 @@ async function startMakerMcpServer() {
|
|
|
30290
30346
|
"Maker clone"
|
|
30291
30347
|
);
|
|
30292
30348
|
let result;
|
|
30293
|
-
let devKitResult
|
|
30349
|
+
let devKitResult = {
|
|
30350
|
+
targetDir,
|
|
30351
|
+
sourceDir: targetDir,
|
|
30352
|
+
installedEntries: [],
|
|
30353
|
+
skippedEntries: [],
|
|
30354
|
+
gitignorePath: path7.join(targetDir, ".gitignore"),
|
|
30355
|
+
stagedGitignorePath: path7.join(targetDir, DEV_KIT_GITIGNORE_STAGING_FILE)
|
|
30356
|
+
};
|
|
30357
|
+
let devKitState = "prepared";
|
|
30358
|
+
let devKitError = "";
|
|
30294
30359
|
let progressSummary;
|
|
30295
30360
|
try {
|
|
30296
30361
|
progressReporter.report({
|
|
@@ -30299,14 +30364,45 @@ async function startMakerMcpServer() {
|
|
|
30299
30364
|
phase: "dev_kit",
|
|
30300
30365
|
message: "Preparing local AI dev kit before Maker clone"
|
|
30301
30366
|
});
|
|
30302
|
-
|
|
30303
|
-
|
|
30304
|
-
|
|
30367
|
+
const devKitStatus = inspectAiDevKit(targetDir);
|
|
30368
|
+
if (devKitStatus.ready) {
|
|
30369
|
+
const presentManagedEntries = listPresentDevKitManagedEntries(targetDir);
|
|
30370
|
+
writeDevKitStagedGitignore(
|
|
30371
|
+
path7.join(targetDir, DEV_KIT_GITIGNORE_STAGING_FILE),
|
|
30372
|
+
presentManagedEntries
|
|
30373
|
+
);
|
|
30374
|
+
devKitState = "already_ready";
|
|
30375
|
+
devKitResult = {
|
|
30376
|
+
targetDir,
|
|
30377
|
+
sourceDir: targetDir,
|
|
30378
|
+
installedEntries: presentManagedEntries,
|
|
30379
|
+
skippedEntries: [],
|
|
30380
|
+
gitignorePath: path7.join(targetDir, ".gitignore"),
|
|
30381
|
+
stagedGitignorePath: path7.join(targetDir, DEV_KIT_GITIGNORE_STAGING_FILE)
|
|
30382
|
+
};
|
|
30383
|
+
} else {
|
|
30384
|
+
try {
|
|
30385
|
+
devKitResult = await installAiDevKit({
|
|
30386
|
+
targetDir
|
|
30387
|
+
});
|
|
30388
|
+
} catch (error2) {
|
|
30389
|
+
const presentManagedEntries = listPresentDevKitManagedEntries(targetDir);
|
|
30390
|
+
if (presentManagedEntries.length > 0) {
|
|
30391
|
+
writeDevKitStagedGitignore(
|
|
30392
|
+
path7.join(targetDir, DEV_KIT_GITIGNORE_STAGING_FILE),
|
|
30393
|
+
presentManagedEntries
|
|
30394
|
+
);
|
|
30395
|
+
}
|
|
30396
|
+
devKitState = "failed_non_blocking";
|
|
30397
|
+
devKitError = error2 instanceof Error ? error2.message : String(error2);
|
|
30398
|
+
devKitResult.installedEntries = presentManagedEntries;
|
|
30399
|
+
}
|
|
30400
|
+
}
|
|
30305
30401
|
progressReporter.report({
|
|
30306
30402
|
progress: 5,
|
|
30307
30403
|
total: 100,
|
|
30308
30404
|
phase: "dev_kit",
|
|
30309
|
-
message: "Local AI dev kit prepared"
|
|
30405
|
+
message: devKitState === "failed_non_blocking" ? "Local AI dev kit preparation failed; continuing Maker clone" : "Local AI dev kit prepared"
|
|
30310
30406
|
});
|
|
30311
30407
|
result = await cloneMakerProject({
|
|
30312
30408
|
appId: args.app_id,
|
|
@@ -30333,7 +30429,11 @@ async function startMakerMcpServer() {
|
|
|
30333
30429
|
`- target_dir: ${result.targetDir}`,
|
|
30334
30430
|
`- status: ${result.status}`,
|
|
30335
30431
|
`- retried_with_new_pat: ${result.retriedWithNewPat ? "yes" : "no"}`,
|
|
30336
|
-
|
|
30432
|
+
`- ai_dev_kit: ${devKitState}`,
|
|
30433
|
+
...devKitError ? [
|
|
30434
|
+
`- ai_dev_kit_error: ${devKitError}`,
|
|
30435
|
+
"- ai_dev_kit_next_step: run maker_status after clone to retry dev kit restoration"
|
|
30436
|
+
] : [],
|
|
30337
30437
|
`- ai_dev_kit_installed_entries: ${devKitResult.installedEntries.join(", ") || "(none)"}`,
|
|
30338
30438
|
`- ai_dev_kit_skipped_entries: ${devKitResult.skippedEntries.join(", ") || "(none)"}`,
|
|
30339
30439
|
...formatProgressSummary(progressSummary),
|
|
@@ -30546,7 +30646,7 @@ async function formatAutoProjectListFromPat() {
|
|
|
30546
30646
|
const projects = await listMakerProjects();
|
|
30547
30647
|
return [
|
|
30548
30648
|
"本地已有 Maker PAT,当前目录尚未绑定 Maker 项目。",
|
|
30549
|
-
"
|
|
30649
|
+
"当前目录未绑定时,必须逐项展示下面完整 Maker Apps 列表,不要只总结数量;选择、解释和 clone 顺序请参考 taptap-maker-local skill。",
|
|
30550
30650
|
"",
|
|
30551
30651
|
formatProjectList(projects)
|
|
30552
30652
|
].join("\n");
|
|
@@ -30575,6 +30675,8 @@ function formatProjectList(projects) {
|
|
|
30575
30675
|
return [
|
|
30576
30676
|
"Maker apps",
|
|
30577
30677
|
"",
|
|
30678
|
+
"请把下面每一个 app 条目展示给用户,不要只说共有多少个。",
|
|
30679
|
+
"",
|
|
30578
30680
|
...projects.map(
|
|
30579
30681
|
(project, index) => `${index + 1}. ${project.id}${project.name ? ` ${project.name}` : ""}${project.user_id ? ` user_id=${project.user_id}` : ""}${project.gameType ? ` gameType=${project.gameType}` : ""}${project.stage ? ` stage=${project.stage}` : ""}${project.createdAt ? ` createdAt=${project.createdAt}` : ""}${project.lastConversationAt ? ` lastConversationAt=${project.lastConversationAt}` : ""}`
|
|
30580
30682
|
),
|
package/dist/proxy.js
CHANGED
|
@@ -29137,7 +29137,7 @@ var LogWriter = class {
|
|
|
29137
29137
|
};
|
|
29138
29138
|
|
|
29139
29139
|
// src/mcp-proxy/proxy.ts
|
|
29140
|
-
var VERSION = true ? "1.23.
|
|
29140
|
+
var VERSION = true ? "1.23.1" : "dev";
|
|
29141
29141
|
var TapTapMCPProxy = class {
|
|
29142
29142
|
constructor(config2) {
|
|
29143
29143
|
this.connected = false;
|
package/dist/server.js
CHANGED
|
@@ -6078,7 +6078,7 @@ class MultiplayerManager {
|
|
|
6078
6078
|
// 导出
|
|
6079
6079
|
// export default MultiplayerManager;
|
|
6080
6080
|
// module.exports = MultiplayerManager;
|
|
6081
|
-
// window.MultiplayerManager = MultiplayerManager;`}]}}};var ws;ws="1.23.
|
|
6081
|
+
// window.MultiplayerManager = MultiplayerManager;`}]}}};var ws;ws="1.23.1";async function MRe(){return Go(Rm,"api_event_relations")}async function NRe(){return Go(Rm,"protocol_template")}async function SD(){return Go(Rm,"complete_example")}async function jRe(){return`# TapTap 多人联机集成指南
|
|
6082
6082
|
|
|
6083
6083
|
---
|
|
6084
6084
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taptap/instant-games-open-mcp",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "TapTap Open API MCP Server - Documentation and Management APIs for TapTap Minigame and H5 Games (Leaderboard, and more features coming)",
|
|
6
6
|
"main": "dist/server.js",
|
|
@@ -94,8 +94,9 @@ Workflow:
|
|
|
94
94
|
Do not run editor-specific CLI install commands.
|
|
95
95
|
5. If PAT is missing, ask the user to open the PAT page shown by `maker_status`, create a PAT, and send it back.
|
|
96
96
|
6. When the user provides PAT, call `maker_exchange_pat(manual_pat)`.
|
|
97
|
-
7. If the current directory is still unbound, show
|
|
98
|
-
choose. Do not
|
|
97
|
+
7. If the current directory is still unbound, show every returned Maker app entry to the user and
|
|
98
|
+
ask the user to choose. Do not summarize the list as only a count, category, or stage. Do not
|
|
99
|
+
auto-select, even if there is only one app.
|
|
99
100
|
8. Run the working directory compliance check below.
|
|
100
101
|
9. After the user chooses an app, call `maker_clone_to_current_directory(app_id)`. The clone
|
|
101
102
|
tool prepares the AI dev kit automatically before project checkout.
|
|
@@ -170,8 +171,9 @@ If the current directory is already bound, app lists from `maker_exchange_pat`,
|
|
|
170
171
|
`maker_status` are reference only. Do not ask which app to clone. Continue operating on the current
|
|
171
172
|
bound project unless the user explicitly requests a different project.
|
|
172
173
|
|
|
173
|
-
When app selection is needed, display
|
|
174
|
-
name.
|
|
174
|
+
When app selection is needed, display every app entry from the tool result and ask the user to
|
|
175
|
+
choose by index, app id, or name. Do not replace the list with a summary such as "10 apps are
|
|
176
|
+
available".
|
|
175
177
|
|
|
176
178
|
Do not auto-select:
|
|
177
179
|
|
|
@@ -104,7 +104,7 @@ Get-ChildItem $NpxDir -Directory -ErrorAction SilentlyContinue | ForEach-Object
|
|
|
104
104
|
$env:TAPTAP_MCP_ENV = 'rnd'
|
|
105
105
|
$log = Join-Path $env:TEMP 'taptap-mcp-warmup.log'
|
|
106
106
|
$proc = Start-Process -FilePath npx `
|
|
107
|
-
-ArgumentList '-y','
|
|
107
|
+
-ArgumentList '-y','-p','@taptap/instant-games-open-mcp@beta','taptap-maker' `
|
|
108
108
|
-RedirectStandardOutput $log -RedirectStandardError "$log.err" `
|
|
109
109
|
-WindowStyle Hidden -PassThru
|
|
110
110
|
Start-Sleep -Seconds 25
|
|
@@ -189,7 +189,7 @@ done
|
|
|
189
189
|
根据用户 MCP 配置选默认 bin 或指定 bin(`taptap-maker`)。下例以 `taptap-maker` 为例,默认 bin 去掉 `-p ... taptap-maker`,直接写 `@taptap/instant-games-open-mcp@beta`。
|
|
190
190
|
|
|
191
191
|
```bash
|
|
192
|
-
TAPTAP_MCP_ENV=rnd npx -y
|
|
192
|
+
TAPTAP_MCP_ENV=rnd npx -y -p @taptap/instant-games-open-mcp@beta taptap-maker \
|
|
193
193
|
< /dev/null > /tmp/taptap-mcp-warmup.log 2>&1 &
|
|
194
194
|
PID=$!; sleep 25; kill $PID 2>/dev/null; wait 2>/dev/null
|
|
195
195
|
```
|