@debugg-ai/debugg-ai-mcp 1.0.44 → 1.0.45

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.
@@ -47,26 +47,30 @@ export class DebuggAIServerClient {
47
47
  this.tunnels = createTunnelsService(this.tx);
48
48
  }
49
49
  /**
50
- * Look up a project by repo name. Uses ?search= then client-side filters
51
- * on repo.name (which is "owner/repo-name" format).
52
- * Returns the first match or null.
50
+ * Look up a project by repo name.
51
+ * Accepts "owner/repo" or bare "repo" — searches with the short name
52
+ * (more likely to match project names) then ranks results by match quality.
53
53
  */
54
54
  async findProjectByRepoName(repoName) {
55
55
  if (!this.tx)
56
56
  throw new Error('Client not initialized — call init() first');
57
- const response = await this.tx.get('api/v1/projects/', { search: repoName });
57
+ // "debugg-ai/react-web-app" short = "react-web-app"
58
+ const short = repoName.includes('/') ? repoName.split('/').pop() : repoName;
59
+ const response = await this.tx.get('api/v1/projects/', { search: short });
58
60
  const projects = response?.results ?? [];
59
61
  if (projects.length === 0)
60
62
  return null;
61
- // Exact match on project name or slug first
62
- const exact = projects.find(p => p.name === repoName || p.slug === repoName);
63
+ // Exact match on full "owner/repo" or short name against project name/slug
64
+ const exact = projects.find(p => p.name === repoName || p.name === short
65
+ || p.slug === repoName || p.slug === short);
63
66
  if (exact)
64
67
  return exact;
65
- // Match on repo.name (owner/repo-name check if it ends with /repoName)
66
- const repoMatch = projects.find(p => p.repo?.name === repoName || p.repo?.name?.endsWith(`/${repoName}`));
68
+ // Match on repo.name — backend may store "owner/repo" or just "repo"
69
+ const repoMatch = projects.find(p => p.repo?.name === repoName || p.repo?.name === short
70
+ || p.repo?.name?.endsWith(`/${short}`));
67
71
  if (repoMatch)
68
72
  return repoMatch;
69
- // Fallback to first result from search
73
+ // Fallback to first search result
70
74
  return projects[0];
71
75
  }
72
76
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@debugg-ai/debugg-ai-mcp",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "Zero-Config, Fully AI-Managed End-to-End Testing for all code gen platforms.",
5
5
  "type": "module",
6
6
  "bin": {