@k-system/tickr-mcp 1.29.0 → 1.29.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/channel.js CHANGED
@@ -26,6 +26,38 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
26
26
  import { HubConnectionBuilder } from "@microsoft/signalr";
27
27
  import { loadConfig } from "./config.js";
28
28
  import { getDeviceGrantToken, loadSession, extractJwtClaim, } from "./device-grant.js";
29
+ // --- Helpers ---
30
+ /** Joinne SignalR project groups aby channel dostával PipelineHandoff/DevTaskQueued eventy */
31
+ async function joinProjectGroups(connection, projectFilter, apiUrl, accessTokenFactory) {
32
+ if (projectFilter) {
33
+ try {
34
+ await connection.invoke("JoinProject", projectFilter);
35
+ console.error(`[tickr-channel] Joined project group: ${projectFilter}`);
36
+ }
37
+ catch (err) {
38
+ console.error(`[tickr-channel] Failed to join project group: ${err instanceof Error ? err.message : err}`);
39
+ }
40
+ }
41
+ else {
42
+ // Bez PROJECT_FILTER — získat projekty přes API a joinovat všechny
43
+ try {
44
+ const token = await accessTokenFactory();
45
+ const resp = await fetch(`${apiUrl}/api/projects`, {
46
+ headers: { Authorization: `Bearer ${token}`, Accept: "application/json" },
47
+ });
48
+ if (resp.ok) {
49
+ const body = (await resp.json());
50
+ for (const p of body.data ?? []) {
51
+ await connection.invoke("JoinProject", p.slug).catch(() => { });
52
+ }
53
+ console.error(`[tickr-channel] Joined ${body.data?.length ?? 0} project groups`);
54
+ }
55
+ }
56
+ catch (err) {
57
+ console.error(`[tickr-channel] Failed to fetch projects for JoinProject: ${err instanceof Error ? err.message : err}`);
58
+ }
59
+ }
60
+ }
29
61
  // --- Config ---
30
62
  const config = loadConfig();
31
63
  const NO_SIGNALR = process.env.TICKR_NO_SIGNALR === "1";
@@ -225,8 +257,15 @@ if (!NO_SIGNALR) {
225
257
  connection.onreconnecting(() => {
226
258
  console.error("[tickr-channel] SignalR reconnecting...");
227
259
  });
228
- connection.onreconnected(() => {
260
+ connection.onreconnected(async () => {
229
261
  console.error("[tickr-channel] SignalR reconnected");
262
+ // Re-join project groups po reconnectu
263
+ try {
264
+ await joinProjectGroups(connection, PROJECT_FILTER, config.apiUrl, accessTokenFactory);
265
+ }
266
+ catch {
267
+ // joinProjectGroups má vlastní error handling, toto je safety net
268
+ }
230
269
  });
231
270
  connection.onclose((err) => {
232
271
  console.error("[tickr-channel] SignalR connection closed", err?.message);
@@ -234,6 +273,8 @@ if (!NO_SIGNALR) {
234
273
  try {
235
274
  await connection.start();
236
275
  console.error(`[tickr-channel] Connected to ${config.apiUrl}/hubs/board, filtering for tokenId=${tokenId}`);
276
+ // Joinni project groups aby channel dostával PipelineHandoff a DevTaskQueued eventy
277
+ await joinProjectGroups(connection, PROJECT_FILTER, config.apiUrl, accessTokenFactory);
237
278
  }
238
279
  catch (err) {
239
280
  console.error(`[tickr-channel] SignalR connection failed: ${err instanceof Error ? err.message : err}`);
package/dist/server.js CHANGED
@@ -112,7 +112,7 @@ export async function startServer() {
112
112
  }
113
113
  const server = new McpServer({
114
114
  name: "tickr",
115
- version: "1.29.0",
115
+ version: "1.29.1",
116
116
  });
117
117
  // Debug logging wrapper (dedup odstraněn — nefunkční cross-process, řeší se na API straně: TKR-ADR-0043)
118
118
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@k-system/tickr-mcp",
3
- "version": "1.29.0",
4
- "description": "MCP server for Tickr project management — 56 tools + setup CLI wizard",
3
+ "version": "1.29.1",
4
+ "description": "MCP server for Tickr project management — 74 tools + setup CLI wizard",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "bin": {