@taptap/instant-games-open-mcp 1.22.0-beta.9 → 1.23.0
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 +5 -4
- package/dist/maker.js +105 -23
- package/dist/proxy.js +1 -1
- package/dist/server.js +1 -1
- package/package.json +2 -1
- package/skills/taptap-maker-dev-kit-guide/SKILL.md +38 -0
- package/skills/taptap-maker-local/SKILL.md +51 -16
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ maker_submit_current_directory
|
|
|
73
73
|
- `maker_clone_to_current_directory` 不要求当前目录为空;clone 前会检查本地目录,忽略 `.claude`、`.mcp`、`.skill`、`.config`、`.ini` 等点开头配置项,只对普通本地文件输出提醒。clone 最终结果固定包含 `Pre-clone local directory check` 区块;已有本地文件会保留,若与 Maker 项目文件同路径冲突则失败并列出冲突文件。
|
|
74
74
|
- `maker_list_apps` 会解析 Maker `/apps` 返回的创建时间、最近会话时间、游戏类型、阶段、图标、置顶/归档/删除时间等字段,并保留原始 `raw` 数据。
|
|
75
75
|
- PAT 会保存到 `~/.taptap-maker/pat.json`,并兼容旧的 `~/.maker-pat`、`PAT` / `MAKER_PAT` 环境变量。
|
|
76
|
-
-
|
|
76
|
+
- 只有当前目录未绑定且用户要初始化或 clone 时,才通过 app 列表让用户选择并调用 clone;已绑定目录里的 app 列表只作账号项目参考,应继续当前项目,除非用户明确要求切换或重新 clone。
|
|
77
77
|
- Maker 后端地址按 `TAPTAP_MCP_ENV` 从 `src/maker/config.ts` 的环境配置表读取,本地 MCP 配置只需要切 `rnd` / `production`。
|
|
78
78
|
- 如果用户直接说“构建 / build / 重新构建游戏”,本地 Maker MCP 应调用 `maker_build_current_directory`。该工具会强制检查本地 Maker 项目是否有未提交改动。
|
|
79
79
|
- 如果构建前发现本地有改动且尚未保存自动提交偏好,工具会停止并提示用户选择:`提交本地改动并触发构建(以后都是如此)`,或明确不提交、只构建云端已有版本。
|
|
@@ -92,16 +92,17 @@ maker_submit_current_directory
|
|
|
92
92
|
|
|
93
93
|
### Maker 本地 Workflow Skills(实验中)
|
|
94
94
|
|
|
95
|
-
Maker
|
|
95
|
+
Maker 现在同时内置三个工作流 skill:
|
|
96
96
|
|
|
97
97
|
- `taptap-maker-local`:把 Maker 初始化、clone、pull、提交、推送和冲突处理交给用户本地 AI/Agent 参与判断;原有 Maker MCP tools 业务暂时保持不变。
|
|
98
|
+
- `taptap-maker-dev-kit-guide`:介绍 clone 时安装到项目目录的 AI dev kit,明确 `CLAUDE.md`、`examples/`、`templates/`、`urhox-libs/` 的用途。
|
|
98
99
|
- `update-taptap-mcp`:引导用户更新本地 npx 缓存里的 `@taptap/instant-games-open-mcp`,并提醒 Maker MCP 推荐安装到 user/global scope。
|
|
99
100
|
|
|
100
101
|
初始化流程里,PAT 验证通过、用户选择 app 后,`maker_clone_to_current_directory` 会自动准备本地 AI dev kit。
|
|
101
102
|
|
|
102
103
|
clone 工具会下载 `https://urhox-demo-platform.spark.xd.com/ai-dev-kit/pd/stable/ai-dev-kit.zip`,解压开发环境文档、引擎 API、demo 和本地 AI skills 到当前目录;会跳过 ZIP 里的顶层 `scripts` 目录并删除下载 ZIP,避免和 Maker 项目代码冲突。clone 前会先生成 `.gitignore.dev-kit-before-clone` 临时 block,clone 成功后自动合并到远端 `.gitignore`,防止这些本地开发环境文件被提交到 Maker Git。
|
|
103
104
|
|
|
104
|
-
`maker_status` 会输出已随包内置的 skill 名称和文档路径:`taptap-maker-local` 与 `update-taptap-mcp`。除此之外不做编辑器安装引导。
|
|
105
|
+
`maker_status` 会输出已随包内置的 skill 名称和文档路径:`taptap-maker-local`、`taptap-maker-dev-kit-guide` 与 `update-taptap-mcp`。除此之外不做编辑器安装引导。Maker 操作目标是用户当前项目目录;若 MCP 进程 cwd 是临时对话目录,Agent 应把用户当前项目目录作为 `target_dir` 传入,不让用户选择目录、不扫描其他项目。已绑定项目会检查 `CLAUDE.md`、`examples/`、`templates/`、`urhox-libs/`,缺失时自动恢复本地 AI dev kit 并刷新 `.gitignore` 管理块。
|
|
105
106
|
|
|
106
107
|
Git 引导:
|
|
107
108
|
|
|
@@ -360,7 +361,7 @@ maker_submit_current_directory
|
|
|
360
361
|
测试时引导用户访问当前环境的 PAT 页面新建 Maker PAT,
|
|
361
362
|
production 使用 `https://maker.taptap.cn/pat-tokens`,RND 使用 `https://fuping.agnt.xd.com/pat-tokens`,
|
|
362
363
|
再作为 `manual_pat` 传给 `maker_exchange_pat`,工具会同步获取 TapTap token。
|
|
363
|
-
APP_ID 应通过 `maker_exchange_pat` 自动返回的 app 列表让用户选择,再传给 clone
|
|
364
|
+
当前目录未绑定时,APP_ID 应通过 `maker_exchange_pat` 自动返回的 app 列表让用户选择,再传给 clone 工具;当前目录已绑定时不要再次引导 clone。
|
|
364
365
|
|
|
365
366
|
```bash
|
|
366
367
|
npm run build
|
package/dist/maker.js
CHANGED
|
@@ -28302,7 +28302,8 @@ var MAKER_ENDPOINTS = {
|
|
|
28302
28302
|
apiBase: "https://maker.taptap.cn/api/v1",
|
|
28303
28303
|
patUrl: "https://maker.taptap.cn/api/v1/user/pat-tokens",
|
|
28304
28304
|
tapTokenUrl: "https://maker.taptap.cn/api/v1/user/taptap-token",
|
|
28305
|
-
gitBase: "https://maker.taptap.cn/git"
|
|
28305
|
+
gitBase: "https://maker.taptap.cn/git",
|
|
28306
|
+
remoteMcpServerUrl: "https://maker.taptap.cn/mcp/v1"
|
|
28306
28307
|
},
|
|
28307
28308
|
rnd: {
|
|
28308
28309
|
webUrl: "https://fuping.agnt.xd.com",
|
|
@@ -28310,7 +28311,7 @@ var MAKER_ENDPOINTS = {
|
|
|
28310
28311
|
patUrl: "https://fuping.agnt.xd.com/api/v1/user/pat-tokens",
|
|
28311
28312
|
tapTokenUrl: "https://fuping.agnt.xd.com/api/v1/user/taptap-token",
|
|
28312
28313
|
gitBase: "https://fuping.agnt.xd.com/git",
|
|
28313
|
-
remoteMcpServerUrl: "
|
|
28314
|
+
remoteMcpServerUrl: "https://fuping.agnt.xd.com/mcp/v1"
|
|
28314
28315
|
}
|
|
28315
28316
|
};
|
|
28316
28317
|
var MAKER_ENV_OVERRIDES = {
|
|
@@ -28709,7 +28710,24 @@ var DEFAULT_AI_DEV_KIT_URL = "https://urhox-demo-platform.spark.xd.com/ai-dev-ki
|
|
|
28709
28710
|
var DEV_KIT_IGNORE_BEGIN = "# >>> TapTap Maker AI dev kit (local only) >>>";
|
|
28710
28711
|
var DEV_KIT_IGNORE_END = "# <<< TapTap Maker AI dev kit (local only) <<<";
|
|
28711
28712
|
var DEV_KIT_GITIGNORE_STAGING_FILE = ".gitignore.dev-kit-before-clone";
|
|
28713
|
+
var DEV_KIT_REQUIRED_ENTRIES = ["CLAUDE.md", "examples", "templates", "urhox-libs"];
|
|
28712
28714
|
var SKIPPED_TOP_LEVEL_ENTRIES = /* @__PURE__ */ new Set(["scripts", ".DS_Store", "ai-dev-kit.zip"]);
|
|
28715
|
+
function inspectAiDevKit(targetDir) {
|
|
28716
|
+
const resolvedTargetDir = path4.resolve(targetDir);
|
|
28717
|
+
const presentEntries = DEV_KIT_REQUIRED_ENTRIES.filter(
|
|
28718
|
+
(entry) => fs3.existsSync(path4.join(resolvedTargetDir, entry))
|
|
28719
|
+
);
|
|
28720
|
+
const missingEntries = DEV_KIT_REQUIRED_ENTRIES.filter(
|
|
28721
|
+
(entry) => !presentEntries.includes(entry)
|
|
28722
|
+
);
|
|
28723
|
+
return {
|
|
28724
|
+
targetDir: resolvedTargetDir,
|
|
28725
|
+
requiredEntries: [...DEV_KIT_REQUIRED_ENTRIES],
|
|
28726
|
+
presentEntries,
|
|
28727
|
+
missingEntries,
|
|
28728
|
+
ready: missingEntries.length === 0
|
|
28729
|
+
};
|
|
28730
|
+
}
|
|
28713
28731
|
async function installAiDevKit(options = {}) {
|
|
28714
28732
|
const targetDir = path4.resolve(options.targetDir || ".");
|
|
28715
28733
|
fs3.mkdirSync(targetDir, { recursive: true });
|
|
@@ -28723,7 +28741,9 @@ async function installAiDevKit(options = {}) {
|
|
|
28723
28741
|
skippedEntries.push(entry.name);
|
|
28724
28742
|
continue;
|
|
28725
28743
|
}
|
|
28726
|
-
copyEntry(path4.join(sourceDir, entry.name), path4.join(targetDir, entry.name)
|
|
28744
|
+
copyEntry(path4.join(sourceDir, entry.name), path4.join(targetDir, entry.name), {
|
|
28745
|
+
preserveExisting: options.preserveExisting
|
|
28746
|
+
});
|
|
28727
28747
|
installedEntries.push(entry.name);
|
|
28728
28748
|
}
|
|
28729
28749
|
const stagedGitignorePath = path4.join(targetDir, DEV_KIT_GITIGNORE_STAGING_FILE);
|
|
@@ -28769,7 +28789,7 @@ function finalizeStagedDevKitGitignore(targetDir) {
|
|
|
28769
28789
|
fs3.rmSync(stagedGitignorePath, { force: true });
|
|
28770
28790
|
return true;
|
|
28771
28791
|
}
|
|
28772
|
-
function copyEntry(source, target) {
|
|
28792
|
+
function copyEntry(source, target, options = {}) {
|
|
28773
28793
|
const stat = fs3.statSync(source);
|
|
28774
28794
|
if (stat.isDirectory()) {
|
|
28775
28795
|
fs3.mkdirSync(target, { recursive: true });
|
|
@@ -28777,11 +28797,14 @@ function copyEntry(source, target) {
|
|
|
28777
28797
|
if (child === ".DS_Store") {
|
|
28778
28798
|
continue;
|
|
28779
28799
|
}
|
|
28780
|
-
copyEntry(path4.join(source, child), path4.join(target, child));
|
|
28800
|
+
copyEntry(path4.join(source, child), path4.join(target, child), options);
|
|
28781
28801
|
}
|
|
28782
28802
|
return;
|
|
28783
28803
|
}
|
|
28784
28804
|
if (stat.isFile()) {
|
|
28805
|
+
if (options.preserveExisting && fs3.existsSync(target)) {
|
|
28806
|
+
return;
|
|
28807
|
+
}
|
|
28785
28808
|
fs3.mkdirSync(path4.dirname(target), { recursive: true });
|
|
28786
28809
|
fs3.copyFileSync(source, target);
|
|
28787
28810
|
}
|
|
@@ -29958,11 +29981,15 @@ import fs5 from "node:fs";
|
|
|
29958
29981
|
import path6 from "node:path";
|
|
29959
29982
|
import { fileURLToPath } from "node:url";
|
|
29960
29983
|
var MAKER_LOCAL_SKILL_NAME = "taptap-maker-local";
|
|
29984
|
+
var MAKER_DEV_KIT_GUIDE_SKILL_NAME = "taptap-maker-dev-kit-guide";
|
|
29961
29985
|
var UPDATE_TAPTAP_MCP_SKILL_NAME = "update-taptap-mcp";
|
|
29962
29986
|
var BUNDLED_SKILLS = [
|
|
29963
29987
|
{
|
|
29964
29988
|
name: MAKER_LOCAL_SKILL_NAME
|
|
29965
29989
|
},
|
|
29990
|
+
{
|
|
29991
|
+
name: MAKER_DEV_KIT_GUIDE_SKILL_NAME
|
|
29992
|
+
},
|
|
29966
29993
|
{
|
|
29967
29994
|
name: UPDATE_TAPTAP_MCP_SKILL_NAME
|
|
29968
29995
|
}
|
|
@@ -30004,7 +30031,7 @@ function getBundledSkillSourceDir(skillName) {
|
|
|
30004
30031
|
}
|
|
30005
30032
|
|
|
30006
30033
|
// src/maker/server/mcp.ts
|
|
30007
|
-
var VERSION = true ? "1.
|
|
30034
|
+
var VERSION = true ? "1.23.0" : "dev";
|
|
30008
30035
|
var DEFAULT_PROXY_PACKAGE = "@taptap/instant-games-open-mcp@1.22.0";
|
|
30009
30036
|
var DEFAULT_BUILD_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
30010
30037
|
var LONG_OPERATION_HEARTBEAT_MS = 3 * 60 * 1e3;
|
|
@@ -30025,7 +30052,7 @@ var tools = [
|
|
|
30025
30052
|
},
|
|
30026
30053
|
{
|
|
30027
30054
|
name: "maker_list_apps",
|
|
30028
|
-
description: "List Maker apps available to the cached or provided Maker PAT. Use this to
|
|
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.",
|
|
30029
30056
|
inputSchema: {
|
|
30030
30057
|
type: "object",
|
|
30031
30058
|
properties: {
|
|
@@ -30038,10 +30065,15 @@ var tools = [
|
|
|
30038
30065
|
},
|
|
30039
30066
|
{
|
|
30040
30067
|
name: "maker_status",
|
|
30041
|
-
description: "Show local Maker MCP status: Git availability, PAT/TapTap token status, project binding, bundled skill document paths, validation checklist, and available apps when PAT exists.",
|
|
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.",
|
|
30042
30069
|
inputSchema: {
|
|
30043
30070
|
type: "object",
|
|
30044
|
-
properties: {
|
|
30071
|
+
properties: {
|
|
30072
|
+
target_dir: {
|
|
30073
|
+
type: "string",
|
|
30074
|
+
description: "Optional user current working directory to inspect. Use when the MCP process cwd differs from the user project CWD."
|
|
30075
|
+
}
|
|
30076
|
+
}
|
|
30045
30077
|
}
|
|
30046
30078
|
},
|
|
30047
30079
|
{
|
|
@@ -30052,11 +30084,11 @@ var tools = [
|
|
|
30052
30084
|
properties: {
|
|
30053
30085
|
app_id: {
|
|
30054
30086
|
type: "string",
|
|
30055
|
-
description: "Maker APP_ID to clone from
|
|
30087
|
+
description: "Maker APP_ID to clone from the configured Maker git service."
|
|
30056
30088
|
},
|
|
30057
30089
|
target_dir: {
|
|
30058
30090
|
type: "string",
|
|
30059
|
-
description: "Optional target directory. Defaults to the MCP process cwd
|
|
30091
|
+
description: "Optional target directory. Defaults to the MCP process cwd. Pass the user current working directory when it differs from the MCP process cwd."
|
|
30060
30092
|
},
|
|
30061
30093
|
pat: {
|
|
30062
30094
|
type: "string",
|
|
@@ -30082,7 +30114,7 @@ var tools = [
|
|
|
30082
30114
|
},
|
|
30083
30115
|
target_dir: {
|
|
30084
30116
|
type: "string",
|
|
30085
|
-
description: "Optional target directory. Defaults to the MCP process cwd
|
|
30117
|
+
description: "Optional target directory. Defaults to the MCP process cwd. Pass the user current working directory when it differs from the MCP process cwd."
|
|
30086
30118
|
},
|
|
30087
30119
|
files: {
|
|
30088
30120
|
type: "array",
|
|
@@ -30100,7 +30132,7 @@ var tools = [
|
|
|
30100
30132
|
properties: {
|
|
30101
30133
|
target_dir: {
|
|
30102
30134
|
type: "string",
|
|
30103
|
-
description: "Optional Maker project directory. Defaults to the MCP process cwd
|
|
30135
|
+
description: "Optional Maker project directory. Defaults to the MCP process cwd. Pass the user current working directory when it differs from the MCP process cwd."
|
|
30104
30136
|
},
|
|
30105
30137
|
entry: {
|
|
30106
30138
|
type: "string",
|
|
@@ -30169,11 +30201,14 @@ async function startMakerMcpServer() {
|
|
|
30169
30201
|
const name = request.params.name;
|
|
30170
30202
|
try {
|
|
30171
30203
|
if (name === "maker_status") {
|
|
30204
|
+
const args = request.params.arguments || {};
|
|
30172
30205
|
return {
|
|
30173
30206
|
content: [
|
|
30174
30207
|
{
|
|
30175
30208
|
type: "text",
|
|
30176
|
-
text: await formatStatus(
|
|
30209
|
+
text: await formatStatus({
|
|
30210
|
+
targetDir: args.target_dir
|
|
30211
|
+
})
|
|
30177
30212
|
}
|
|
30178
30213
|
]
|
|
30179
30214
|
};
|
|
@@ -30248,7 +30283,7 @@ async function startMakerMcpServer() {
|
|
|
30248
30283
|
if (!args.app_id) {
|
|
30249
30284
|
throw new McpError(ErrorCode.InvalidParams, "app_id is required");
|
|
30250
30285
|
}
|
|
30251
|
-
const targetDir = args.target_dir
|
|
30286
|
+
const targetDir = resolveMakerToolTargetDir(args.target_dir);
|
|
30252
30287
|
const progressReporter = createToolProgressReporter(
|
|
30253
30288
|
(_a2 = request.params._meta) == null ? void 0 : _a2.progressToken,
|
|
30254
30289
|
extra,
|
|
@@ -30310,7 +30345,7 @@ async function startMakerMcpServer() {
|
|
|
30310
30345
|
}
|
|
30311
30346
|
if (name === "maker_submit_current_directory") {
|
|
30312
30347
|
const args = request.params.arguments || {};
|
|
30313
|
-
const targetDir = args.target_dir
|
|
30348
|
+
const targetDir = resolveMakerToolTargetDir(args.target_dir);
|
|
30314
30349
|
const progressReporter = createToolProgressReporter(
|
|
30315
30350
|
(_b = request.params._meta) == null ? void 0 : _b.progressToken,
|
|
30316
30351
|
extra,
|
|
@@ -30350,7 +30385,7 @@ async function startMakerMcpServer() {
|
|
|
30350
30385
|
let progressSummary;
|
|
30351
30386
|
try {
|
|
30352
30387
|
result = await buildCurrentDirectory({
|
|
30353
|
-
targetDir: args.target_dir
|
|
30388
|
+
targetDir: resolveMakerToolTargetDir(args.target_dir),
|
|
30354
30389
|
entry: args.entry,
|
|
30355
30390
|
scriptsPath: args.scriptsPath,
|
|
30356
30391
|
entryClient: args.entry_client,
|
|
@@ -30394,9 +30429,10 @@ async function startMakerMcpServer() {
|
|
|
30394
30429
|
const transport = new StdioServerTransport();
|
|
30395
30430
|
await server.connect(transport);
|
|
30396
30431
|
}
|
|
30397
|
-
async function formatStatus() {
|
|
30432
|
+
async function formatStatus(options = {}) {
|
|
30398
30433
|
var _a2;
|
|
30399
|
-
const
|
|
30434
|
+
const targetDir = resolveMakerToolTargetDir(options.targetDir);
|
|
30435
|
+
const identify = identifyMakerProject({ cwd: targetDir });
|
|
30400
30436
|
const pat = loadPat();
|
|
30401
30437
|
let tapAuth = loadTapAuth();
|
|
30402
30438
|
const makerPatTokensUrl = getMakerPatTokensUrl();
|
|
@@ -30420,7 +30456,8 @@ async function formatStatus() {
|
|
|
30420
30456
|
}
|
|
30421
30457
|
const git = checkGitEnvironment();
|
|
30422
30458
|
const projectSection = identify.projectId ? [
|
|
30423
|
-
"
|
|
30459
|
+
"目标目录已绑定 Maker 项目。",
|
|
30460
|
+
"请继续在当前绑定项目上执行状态、提交、构建等操作;不要再引导用户 clone,除非用户明确要求切换或重新拉取项目。",
|
|
30424
30461
|
"本地 Maker 工作流请优先参考 taptap-maker-local skill;MCP tools 只负责保存 PAT、列 app、clone、submit 和 build 等机器动作。"
|
|
30425
30462
|
].join("\n") : pat ? await formatAutoProjectListFromPat() : formatIdentifyHint();
|
|
30426
30463
|
return [
|
|
@@ -30429,6 +30466,7 @@ async function formatStatus() {
|
|
|
30429
30466
|
`- version: ${VERSION}`,
|
|
30430
30467
|
`- tap_auth: ${tapAuth ? "found" : "missing"} (${getTapAuthPath()})`,
|
|
30431
30468
|
`- pat: ${pat ? "found" : "missing"} (${getPatPath()})`,
|
|
30469
|
+
`- target_dir: ${targetDir}`,
|
|
30432
30470
|
`- project_source: ${identify.source}`,
|
|
30433
30471
|
`- project_id: ${identify.projectId || "(none)"}`,
|
|
30434
30472
|
identify.configPath ? `- config: ${identify.configPath}` : "",
|
|
@@ -30442,11 +30480,54 @@ async function formatStatus() {
|
|
|
30442
30480
|
"",
|
|
30443
30481
|
tapAuthRefreshText,
|
|
30444
30482
|
"",
|
|
30445
|
-
|
|
30483
|
+
identify.projectRoot ? await formatAiDevKitStatus(identify.projectRoot) : "",
|
|
30484
|
+
"",
|
|
30485
|
+
formatMakerSkillStatus({ projectRoot: identify.projectRoot || targetDir }),
|
|
30446
30486
|
"",
|
|
30447
30487
|
projectSection
|
|
30448
30488
|
].filter(Boolean).join("\n");
|
|
30449
30489
|
}
|
|
30490
|
+
function resolveMakerToolTargetDir(targetDir) {
|
|
30491
|
+
if (targetDir) {
|
|
30492
|
+
return path7.resolve(targetDir);
|
|
30493
|
+
}
|
|
30494
|
+
return process.cwd();
|
|
30495
|
+
}
|
|
30496
|
+
async function formatAiDevKitStatus(projectRoot) {
|
|
30497
|
+
const before = inspectAiDevKit(projectRoot);
|
|
30498
|
+
if (before.ready) {
|
|
30499
|
+
return formatAiDevKitStatusLines("ready", before).join("\n");
|
|
30500
|
+
}
|
|
30501
|
+
try {
|
|
30502
|
+
const installResult = await installAiDevKit({
|
|
30503
|
+
targetDir: projectRoot,
|
|
30504
|
+
preserveExisting: true
|
|
30505
|
+
});
|
|
30506
|
+
finalizeStagedDevKitGitignore(projectRoot);
|
|
30507
|
+
const after = inspectAiDevKit(projectRoot);
|
|
30508
|
+
return [
|
|
30509
|
+
...formatAiDevKitStatusLines("restored", after),
|
|
30510
|
+
`- restored_missing_entries: ${before.missingEntries.join(", ") || "(none)"}`,
|
|
30511
|
+
`- installed_entries: ${installResult.installedEntries.join(", ") || "(none)"}`
|
|
30512
|
+
].join("\n");
|
|
30513
|
+
} catch (error2) {
|
|
30514
|
+
return [
|
|
30515
|
+
...formatAiDevKitStatusLines("missing", before),
|
|
30516
|
+
`- restore_error: ${error2 instanceof Error ? error2.message : String(error2)}`,
|
|
30517
|
+
"- next_step: 请检查网络后重新调用 maker_status,或重新执行 Maker clone 初始化流程。"
|
|
30518
|
+
].join("\n");
|
|
30519
|
+
}
|
|
30520
|
+
}
|
|
30521
|
+
function formatAiDevKitStatusLines(status, devKitStatus) {
|
|
30522
|
+
return [
|
|
30523
|
+
"AI dev kit",
|
|
30524
|
+
"",
|
|
30525
|
+
`- status: ${status}`,
|
|
30526
|
+
`- required_entries: ${devKitStatus.requiredEntries.join(", ")}`,
|
|
30527
|
+
`- present_entries: ${devKitStatus.presentEntries.join(", ") || "(none)"}`,
|
|
30528
|
+
`- missing_entries: ${devKitStatus.missingEntries.join(", ") || "(none)"}`
|
|
30529
|
+
];
|
|
30530
|
+
}
|
|
30450
30531
|
function rememberBuildSubmitPreference(targetDir) {
|
|
30451
30532
|
const identify = identifyMakerProject({ cwd: targetDir });
|
|
30452
30533
|
if (!identify.projectRoot || !identify.projectId) {
|
|
@@ -30465,7 +30546,7 @@ async function formatAutoProjectListFromPat() {
|
|
|
30465
30546
|
const projects = await listMakerProjects();
|
|
30466
30547
|
return [
|
|
30467
30548
|
"本地已有 Maker PAT,当前目录尚未绑定 Maker 项目。",
|
|
30468
|
-
"
|
|
30549
|
+
"当前目录未绑定时,可从下面的 Maker Apps 中选择一个进行 clone;选择、解释和 clone 顺序请参考 taptap-maker-local skill。",
|
|
30469
30550
|
"",
|
|
30470
30551
|
formatProjectList(projects)
|
|
30471
30552
|
].join("\n");
|
|
@@ -30498,7 +30579,8 @@ function formatProjectList(projects) {
|
|
|
30498
30579
|
(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}` : ""}`
|
|
30499
30580
|
),
|
|
30500
30581
|
"",
|
|
30501
|
-
"
|
|
30582
|
+
"仅当当前目录未绑定且用户要初始化或 clone 时,才让用户选择 app 并调用 maker_clone_to_current_directory。",
|
|
30583
|
+
"如果当前目录已绑定 Maker 项目,这个列表仅作账号项目参考;请继续当前项目,除非用户明确要求切换或重新 clone。"
|
|
30502
30584
|
].join("\n");
|
|
30503
30585
|
}
|
|
30504
30586
|
function formatCloneWarnings(warnings) {
|
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.
|
|
29140
|
+
var VERSION = true ? "1.23.0" : "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.
|
|
6081
|
+
// window.MultiplayerManager = MultiplayerManager;`}]}}};var ws;ws="1.23.0";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.
|
|
3
|
+
"version": "1.23.0",
|
|
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",
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"dist/",
|
|
96
96
|
"bin/",
|
|
97
97
|
"skills/taptap-maker-local/",
|
|
98
|
+
"skills/taptap-maker-dev-kit-guide/",
|
|
98
99
|
"skills/update-taptap-mcp/"
|
|
99
100
|
],
|
|
100
101
|
"repository": {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: taptap-maker-dev-kit-guide
|
|
3
|
+
description: Explain the local TapTap Maker AI dev kit installed during Maker project clone. Use after a Maker project is cloned or bound, or when the user asks what CLAUDE.md, examples, templates, or urhox-libs are for.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TapTap Maker AI Dev Kit
|
|
7
|
+
|
|
8
|
+
Use this skill to orient the local AI/Agent after `maker_clone_to_current_directory` installs the
|
|
9
|
+
AI dev kit into a Maker project directory.
|
|
10
|
+
|
|
11
|
+
## What To Tell The Local Agent
|
|
12
|
+
|
|
13
|
+
After the Maker project is cloned, point the local AI/Agent at these local resources:
|
|
14
|
+
|
|
15
|
+
- `CLAUDE.md`: the main AI development guide entry. Read this first before changing Maker game code.
|
|
16
|
+
- `examples/`: runnable or copyable examples for common Maker development patterns.
|
|
17
|
+
- `templates/`: starter templates for creating new files or common game structures.
|
|
18
|
+
- `urhox-libs/`: engine APIs, capabilities, and local reference material for Maker runtime features.
|
|
19
|
+
|
|
20
|
+
Keep the explanation short. The goal is to help the local AI discover the installed development
|
|
21
|
+
resources, not to duplicate their contents in chat.
|
|
22
|
+
|
|
23
|
+
## Usage Guidance
|
|
24
|
+
|
|
25
|
+
When a user asks to develop or modify a Maker project after clone:
|
|
26
|
+
|
|
27
|
+
1. Check whether the current directory contains the dev-kit entries above.
|
|
28
|
+
2. Tell the local AI/Agent that `CLAUDE.md` is the first document to read.
|
|
29
|
+
3. Use `examples/` when the user asks for implementation patterns.
|
|
30
|
+
4. Use `templates/` when creating new game files or scaffolding.
|
|
31
|
+
5. Use `urhox-libs/` when engine API behavior or capability names are needed.
|
|
32
|
+
|
|
33
|
+
If these entries are missing in a bound Maker project, call `maker_status` with the actual project
|
|
34
|
+
directory as `target_dir`. The status tool will report dev-kit state and restore missing local
|
|
35
|
+
dev-kit entries when possible.
|
|
36
|
+
|
|
37
|
+
These files are local development aids. Do not submit them to Maker Git unless the user explicitly
|
|
38
|
+
asks and understands they are local environment files.
|
|
@@ -43,7 +43,7 @@ Do not reimplement Maker API calls or Git authentication in shell when a Maker M
|
|
|
43
43
|
| --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
44
44
|
| initialize / configure / continue Maker local development | Follow "Initialization Workflow". |
|
|
45
45
|
| clone / download Maker project locally | Follow "Initialization Workflow"; do not ask for app_id directly. |
|
|
46
|
-
| status / is Maker ready | Call `maker_status
|
|
46
|
+
| status / is Maker ready | Call `maker_status` for the user's current project directory, then explain missing prerequisites and dev-kit status. |
|
|
47
47
|
| submit / commit / push to Maker | Inspect local Git state, summarize changed files, then call `maker_submit_current_directory` unless blocked. |
|
|
48
48
|
| pull / update from remote | Inspect local changes first; if dirty, explain options before pulling. |
|
|
49
49
|
| conflict / merge failed | Explain why the conflict happened, list conflict files, inspect conflict hunks, propose a resolution plan, and ask before editing. |
|
|
@@ -51,7 +51,7 @@ Do not reimplement Maker API calls or Git authentication in shell when a Maker M
|
|
|
51
51
|
|
|
52
52
|
## Project Detection
|
|
53
53
|
|
|
54
|
-
A directory is a Maker project when the current directory or one of its parents contains:
|
|
54
|
+
A directory is a Maker project when the user's current project directory or one of its parents contains:
|
|
55
55
|
|
|
56
56
|
```text
|
|
57
57
|
.maker-mcp/config.json
|
|
@@ -62,6 +62,12 @@ When this file exists, explain that the directory is already bound to a Maker pr
|
|
|
62
62
|
When this file is missing and the user asks to clone, initialize, or continue Maker local
|
|
63
63
|
development, do not ask the user for an app_id directly. Follow the initialization workflow.
|
|
64
64
|
|
|
65
|
+
The user's current project directory is the business target. Do not ask the user to choose a
|
|
66
|
+
directory and do not scan unrelated Maker projects. If the MCP process cwd is a transient
|
|
67
|
+
dialogue/session directory, pass the user's current project directory as `target_dir`. If the AI
|
|
68
|
+
client does not expose that directory, say the current client did not provide the project directory
|
|
69
|
+
instead of guessing.
|
|
70
|
+
|
|
65
71
|
## Initialization Workflow
|
|
66
72
|
|
|
67
73
|
Trigger phrases include:
|
|
@@ -78,17 +84,24 @@ Trigger phrases include:
|
|
|
78
84
|
|
|
79
85
|
Workflow:
|
|
80
86
|
|
|
81
|
-
1. Call `maker_status`.
|
|
82
|
-
|
|
83
|
-
|
|
87
|
+
1. Call `maker_status`. If the MCP process cwd differs from the user's current project directory,
|
|
88
|
+
pass the user's current project directory as `target_dir`.
|
|
89
|
+
2. If `maker_status` reports the current directory is already bound to a Maker project, stop the
|
|
90
|
+
initialization/clone path. Continue with the user's current intent in that bound project. Do not
|
|
91
|
+
ask which app to clone unless the user explicitly asks to switch or re-clone.
|
|
92
|
+
3. If Git is missing, stop. Tell the user Git is required for clone/submit/build-side Git work.
|
|
93
|
+
4. If `maker_status` lists bundled skill documents, just tell the user which skills are available.
|
|
84
94
|
Do not run editor-specific CLI install commands.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
8.
|
|
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
|
+
6. When the user provides PAT, call `maker_exchange_pat(manual_pat)`.
|
|
97
|
+
7. If the current directory is still unbound, show the returned Maker app list and ask the user to
|
|
98
|
+
choose. Do not auto-select, even if there is only one app.
|
|
99
|
+
8. Run the working directory compliance check below.
|
|
100
|
+
9. After the user chooses an app, call `maker_clone_to_current_directory(app_id)`. The clone
|
|
90
101
|
tool prepares the AI dev kit automatically before project checkout.
|
|
91
|
-
|
|
102
|
+
10. After clone succeeds, call `maker_status` again or explain that `.maker-mcp/config.json` now binds the directory to the Maker project.
|
|
103
|
+
11. Tell the local AI/Agent to use the `taptap-maker-dev-kit-guide` skill for the installed dev-kit
|
|
104
|
+
resources, especially `CLAUDE.md`, `examples/`, `templates/`, and `urhox-libs/`.
|
|
92
105
|
|
|
93
106
|
Keep the user-facing explanation short:
|
|
94
107
|
|
|
@@ -102,12 +115,24 @@ Keep the user-facing explanation short:
|
|
|
102
115
|
`maker_clone_to_current_directory` prepares local development environment files in the current
|
|
103
116
|
working directory before it checks out the Maker project.
|
|
104
117
|
|
|
118
|
+
`maker_status` checks the dev-kit top-level entries for an already bound Maker project. If
|
|
119
|
+
`CLAUDE.md`, `examples/`, `templates/`, or `urhox-libs/` are missing, the tool restores the dev kit
|
|
120
|
+
without overwriting existing local files and refreshes the managed `.gitignore` block.
|
|
121
|
+
|
|
105
122
|
The clone tool downloads and installs:
|
|
106
123
|
|
|
107
124
|
```text
|
|
108
125
|
https://urhox-demo-platform.spark.xd.com/ai-dev-kit/pd/stable/ai-dev-kit.zip
|
|
109
126
|
```
|
|
110
127
|
|
|
128
|
+
After clone, use the bundled `taptap-maker-dev-kit-guide` skill to explain the installed dev-kit
|
|
129
|
+
resources to the local AI/Agent:
|
|
130
|
+
|
|
131
|
+
- `CLAUDE.md` is the AI development guide entry.
|
|
132
|
+
- `examples/` contains Maker development examples.
|
|
133
|
+
- `templates/` contains reusable templates.
|
|
134
|
+
- `urhox-libs/` contains engine APIs and capability references.
|
|
135
|
+
|
|
111
136
|
The clone tool is responsible for deterministic file operations:
|
|
112
137
|
|
|
113
138
|
- extract the ZIP into the current directory
|
|
@@ -126,7 +151,9 @@ the user wants to retry or continue without the dev kit.
|
|
|
126
151
|
## PAT Handling
|
|
127
152
|
|
|
128
153
|
If the user pastes a token-like string while the initialization flow is waiting for PAT, call
|
|
129
|
-
`maker_exchange_pat(manual_pat)` and continue
|
|
154
|
+
`maker_exchange_pat(manual_pat)` and continue only if the current directory is unbound. Do not just
|
|
155
|
+
say "received". If the directory is already bound, treat the returned app list as account reference
|
|
156
|
+
only and continue the user's current bound-project task.
|
|
130
157
|
|
|
131
158
|
If PAT exchange fails:
|
|
132
159
|
|
|
@@ -136,8 +163,15 @@ If PAT exchange fails:
|
|
|
136
163
|
|
|
137
164
|
## App Selection
|
|
138
165
|
|
|
139
|
-
|
|
140
|
-
|
|
166
|
+
Use app selection only when the current directory is unbound and the user is initializing or cloning
|
|
167
|
+
a Maker project, or when the user explicitly asks to switch or re-clone.
|
|
168
|
+
|
|
169
|
+
If the current directory is already bound, app lists from `maker_exchange_pat`, `maker_list_apps`, or
|
|
170
|
+
`maker_status` are reference only. Do not ask which app to clone. Continue operating on the current
|
|
171
|
+
bound project unless the user explicitly requests a different project.
|
|
172
|
+
|
|
173
|
+
When app selection is needed, display the app list and ask the user to choose by index, app id, or
|
|
174
|
+
name.
|
|
141
175
|
|
|
142
176
|
Do not auto-select:
|
|
143
177
|
|
|
@@ -199,8 +233,9 @@ submitted to Maker Git.
|
|
|
199
233
|
When `maker_status` reports TapTap bundled workflow skills, show the skill names and document
|
|
200
234
|
paths. Do not install or register skills automatically.
|
|
201
235
|
|
|
202
|
-
`taptap-maker-local` covers Maker local workflow. `
|
|
203
|
-
|
|
236
|
+
`taptap-maker-local` covers Maker local workflow. `taptap-maker-dev-kit-guide` explains the local
|
|
237
|
+
AI dev-kit resources installed during clone. `update-taptap-mcp` covers local TapTap MCP cache
|
|
238
|
+
updates.
|
|
204
239
|
|
|
205
240
|
Prefer user/global scope for Maker MCP installation. If a project/local config already exists,
|
|
206
241
|
do not block the workflow; just explain that user/global scope is recommended to avoid config
|