@taptap/instant-games-open-mcp 1.21.0 → 1.22.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 CHANGED
@@ -103,6 +103,7 @@ npx @taptap/instant-games-open-mcp
103
103
  - **路径处理**:设置 `TAPTAP_MCP_WORKSPACE_ROOT` 环境变量可以正确解析相对路径(推荐)
104
104
  - 如果不设置,相对路径会基于用户 HOME 目录(可能不符合预期)
105
105
  - 建议使用绝对路径,或配置 `TAPTAP_MCP_WORKSPACE_ROOT`
106
+ - **Windows 启动报 `Received protocol 'c:'`**:这是旧版本 Windows ESM 动态导入路径兼容问题,请升级到包含该修复的最新版本。
106
107
 
107
108
  #### OpenHands(推荐 SSE 模式)
108
109
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  import { join, dirname } from 'node:path';
11
11
  import { existsSync, readdirSync } from 'node:fs';
12
- import { fileURLToPath } from 'node:url';
12
+ import { fileURLToPath, pathToFileURL } from 'node:url';
13
13
 
14
14
  // Get current directory in ESM
15
15
  const __filename = fileURLToPath(import.meta.url);
@@ -20,6 +20,7 @@ const packageRoot = join(__dirname, '..');
20
20
 
21
21
  // Check if compiled version exists
22
22
  const distPath = join(packageRoot, 'dist', 'server.js');
23
+ const distUrl = pathToFileURL(distPath).href;
23
24
  const nativePath = join(packageRoot, 'dist', 'native');
24
25
 
25
26
  if (!existsSync(distPath)) {
@@ -52,7 +53,7 @@ if (!existsSync(nativePath)) {
52
53
  }
53
54
 
54
55
  // Start server
55
- import(distPath).catch(error => {
56
+ import(distUrl).catch(error => {
56
57
  console.error('');
57
58
  console.error('❌ Failed to start server:', error.message);
58
59
  console.error('');
@@ -9,7 +9,7 @@
9
9
 
10
10
  import { join, dirname } from 'node:path';
11
11
  import { existsSync } from 'node:fs';
12
- import { fileURLToPath } from 'node:url';
12
+ import { fileURLToPath, pathToFileURL } from 'node:url';
13
13
 
14
14
  // Get current directory in ESM
15
15
  const __filename = fileURLToPath(import.meta.url);
@@ -20,10 +20,11 @@ const packageRoot = join(__dirname, '..');
20
20
 
21
21
  // Check if bundled version exists
22
22
  const distPath = join(packageRoot, 'dist', 'proxy.js');
23
+ const distUrl = pathToFileURL(distPath).href;
23
24
 
24
25
  if (existsSync(distPath)) {
25
26
  // Use dynamic import for ES Module
26
- import(distPath).catch(error => {
27
+ import(distUrl).catch(error => {
27
28
  console.error('❌ Failed to start MCP Proxy:', error);
28
29
  process.exit(1);
29
30
  });
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.21.0" : "dev";
29140
+ var VERSION = true ? "1.22.0" : "dev";
29141
29141
  var TapTapMCPProxy = class {
29142
29142
  constructor(config2) {
29143
29143
  this.connected = false;
@@ -29646,7 +29646,7 @@ var TapTapMCPProxy = class {
29646
29646
  return result;
29647
29647
  });
29648
29648
  this.server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
29649
- var _a3, _b, _c, _d, _e;
29649
+ var _a3, _b, _c, _d, _e, _f, _g;
29650
29650
  const { name, arguments: args } = request.params;
29651
29651
  const shouldInjectParams = ((_a3 = this.config.options) == null ? void 0 : _a3.inject_params_per_call) ?? true;
29652
29652
  const finalArgs = shouldInjectParams ? this.injectPrivateParams(args) : args;
@@ -29658,6 +29658,7 @@ var TapTapMCPProxy = class {
29658
29658
  timeout: ((_d = this.config.options) == null ? void 0 : _d.tool_call_timeout) ?? 3e5,
29659
29659
  resetTimeoutOnProgress: ((_e = this.config.options) == null ? void 0 : _e.reset_timeout_on_progress) ?? true
29660
29660
  };
29661
+ const forceInjectProgressToken = ((_f = this.config.options) == null ? void 0 : _f.force_inject_progress_token) ?? false;
29661
29662
  if (progressToken !== void 0) {
29662
29663
  callToolOptions.onprogress = (progress) => {
29663
29664
  extra.sendNotification({
@@ -29666,6 +29667,15 @@ var TapTapMCPProxy = class {
29666
29667
  }).catch(() => {
29667
29668
  });
29668
29669
  };
29670
+ } else if (forceInjectProgressToken) {
29671
+ callToolOptions.onprogress = () => {
29672
+ };
29673
+ if ((_g = this.config.options) == null ? void 0 : _g.verbose) {
29674
+ this.log(
29675
+ "debug",
29676
+ `Sentinel onprogress registered for outbound progressToken injection: tool=${name}`
29677
+ );
29678
+ }
29669
29679
  }
29670
29680
  if (!this.connected) {
29671
29681
  if (this.reconnecting) {
@@ -29820,7 +29830,7 @@ function validateConfig(config2) {
29820
29830
  }
29821
29831
  var DEFAULT_LOG_ROOT = "/tmp/taptap-mcp/logs";
29822
29832
  function applyDefaults(config2) {
29823
- var _a3, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
29833
+ var _a3, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
29824
29834
  const verbose = ((_a3 = config2.options) == null ? void 0 : _a3.verbose) ?? false;
29825
29835
  return {
29826
29836
  server: {
@@ -29843,12 +29853,14 @@ function applyDefaults(config2) {
29843
29853
  reset_timeout_on_progress: ((_e = config2.options) == null ? void 0 : _e.reset_timeout_on_progress) ?? true,
29844
29854
  health_check_interval: ((_f = config2.options) == null ? void 0 : _f.health_check_interval) ?? 3e4,
29845
29855
  enable_cookie_sticky: ((_g = config2.options) == null ? void 0 : _g.enable_cookie_sticky) ?? true,
29856
+ inject_params_per_call: ((_h = config2.options) == null ? void 0 : _h.inject_params_per_call) ?? true,
29857
+ force_inject_progress_token: ((_i = config2.options) == null ? void 0 : _i.force_inject_progress_token) ?? false,
29846
29858
  log: {
29847
- root: ((_i = (_h = config2.options) == null ? void 0 : _h.log) == null ? void 0 : _i.root) ?? DEFAULT_LOG_ROOT,
29848
- enabled: ((_k = (_j = config2.options) == null ? void 0 : _j.log) == null ? void 0 : _k.enabled) ?? false,
29859
+ root: ((_k = (_j = config2.options) == null ? void 0 : _j.log) == null ? void 0 : _k.root) ?? DEFAULT_LOG_ROOT,
29860
+ enabled: ((_m = (_l = config2.options) == null ? void 0 : _l.log) == null ? void 0 : _m.enabled) ?? false,
29849
29861
  // verbose=true 时自动使用 debug 级别
29850
- level: verbose ? "debug" : ((_m = (_l = config2.options) == null ? void 0 : _l.log) == null ? void 0 : _m.level) ?? "info",
29851
- max_days: ((_o = (_n = config2.options) == null ? void 0 : _n.log) == null ? void 0 : _o.max_days) ?? 7
29862
+ level: verbose ? "debug" : ((_o = (_n = config2.options) == null ? void 0 : _n.log) == null ? void 0 : _o.level) ?? "info",
29863
+ max_days: ((_q = (_p = config2.options) == null ? void 0 : _p.log) == null ? void 0 : _q.max_days) ?? 7
29852
29864
  }
29853
29865
  }
29854
29866
  };
package/dist/server.js CHANGED
@@ -6039,7 +6039,7 @@ class MultiplayerManager {
6039
6039
  // 导出
6040
6040
  // export default MultiplayerManager;
6041
6041
  // module.exports = MultiplayerManager;
6042
- // window.MultiplayerManager = MultiplayerManager;`}]}}};var ws;ws="1.21.0";async function ORe(){return Go(Rm,"api_event_relations")}async function MRe(){return Go(Rm,"protocol_template")}async function SD(){return Go(Rm,"complete_example")}async function NRe(){return`# TapTap 多人联机集成指南
6042
+ // window.MultiplayerManager = MultiplayerManager;`}]}}};var ws;ws="1.22.0";async function ORe(){return Go(Rm,"api_event_relations")}async function MRe(){return Go(Rm,"protocol_template")}async function SD(){return Go(Rm,"complete_example")}async function NRe(){return`# TapTap 多人联机集成指南
6043
6043
 
6044
6044
  ---
6045
6045
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taptap/instant-games-open-mcp",
3
- "version": "1.21.0",
3
+ "version": "1.22.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",