@taptap/instant-games-open-mcp 1.21.1 → 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/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.1" : "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.1";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.1",
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",