@k-system/tickr-mcp 1.4.0 → 1.6.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.
Files changed (2) hide show
  1. package/dist/server.js +6 -7
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -96,7 +96,7 @@ export async function startServer() {
96
96
  name: "tickr",
97
97
  version: "0.1.5",
98
98
  });
99
- // Dedup cache — klíč je requestId z MCP SDK (JSON-RPC request ID)
99
+ // Dedup cache — klíč je tool name + params (zachytí duplikáty se stejnými parametry bez ohledu na requestId)
100
100
  // Druhý duplicitní call čeká na výsledek prvního místo opakovaného API volání
101
101
  const pendingOps = new Map();
102
102
  // Debug logging + dedup wrapper
@@ -108,10 +108,9 @@ export async function startServer() {
108
108
  const name = args[0];
109
109
  const originalHandler = args[handlerIndex];
110
110
  args[handlerIndex] = async (params, extra) => {
111
- // Dedup klíč: requestId z MCP SDK, fallback na tool name + params hash
112
- const requestId = extra?.requestId?.toString() ??
113
- name + ":" + JSON.stringify(params);
114
- const cached = pendingOps.get(requestId);
111
+ // Dedup klíč: tool name + params hash (primární, zachytí duplikáty se stejnými params i při různém requestId)
112
+ const dedupKey = name + ":" + JSON.stringify(params);
113
+ const cached = pendingOps.get(dedupKey);
115
114
  if (cached) {
116
115
  if (debug) {
117
116
  debugLog(name, (params ?? {}), "dedup-hit", 0);
@@ -134,9 +133,9 @@ export async function startServer() {
134
133
  throw err;
135
134
  }
136
135
  })();
137
- pendingOps.set(requestId, promise);
136
+ pendingOps.set(dedupKey, promise);
138
137
  promise.finally(() => {
139
- setTimeout(() => pendingOps.delete(requestId), 10_000);
138
+ setTimeout(() => pendingOps.delete(dedupKey), 10_000);
140
139
  });
141
140
  return promise;
142
141
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k-system/tickr-mcp",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "MCP server for Tickr project management — 56 tools + setup CLI wizard",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",