@debugg-ai/debugg-ai-mcp 1.0.38 → 1.0.40

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.
@@ -32,13 +32,7 @@ const configSchema = z.object({
32
32
  tokenType: z.enum(['token', 'bearer']).default('token'),
33
33
  baseUrl: z.string().url().default('https://api.debugg.ai'),
34
34
  }),
35
- defaults: z.object({
36
- localPort: z.number().int().min(1).max(65535).optional(),
37
- repoName: z.string().optional(),
38
- branchName: z.string().optional(),
39
- repoPath: z.string().optional(),
40
- filePath: z.string().optional(),
41
- }),
35
+ defaults: z.object({}),
42
36
  logging: z.object({
43
37
  level: z.enum(['error', 'warn', 'info', 'debug']).default('info'),
44
38
  format: z.enum(['json', 'simple']).default('simple'),
@@ -60,13 +54,7 @@ export function loadConfig() {
60
54
  tokenType: process.env.DEBUGGAI_TOKEN_TYPE || 'token',
61
55
  baseUrl: process.env.DEBUGGAI_API_URL || 'https://api.debugg.ai',
62
56
  },
63
- defaults: {
64
- localPort: process.env.DEBUGGAI_LOCAL_PORT ? parseInt(process.env.DEBUGGAI_LOCAL_PORT, 10) : undefined,
65
- repoName: process.env.DEBUGGAI_LOCAL_REPO_NAME || undefined,
66
- branchName: process.env.DEBUGGAI_LOCAL_BRANCH_NAME || undefined,
67
- repoPath: process.env.DEBUGGAI_LOCAL_REPO_PATH || undefined,
68
- filePath: process.env.DEBUGGAI_LOCAL_FILE_PATH || undefined,
69
- },
57
+ defaults: {},
70
58
  logging: {
71
59
  level: process.env.LOG_LEVEL || 'info',
72
60
  format: process.env.LOG_FORMAT || 'simple',
@@ -10,9 +10,9 @@ import { fetchImageAsBase64, imageContentBlock } from '../utils/imageUtils.js';
10
10
  import { DebuggAIServerClient } from '../services/index.js';
11
11
  import { resolveTargetUrl, buildContext, findExistingTunnel, ensureTunnel, sanitizeResponseUrls, touchTunnelById, } from '../utils/tunnelContext.js';
12
12
  const logger = new Logger({ module: 'testPageChangesHandler' });
13
- // Cache the template UUID and project UUID within a server session to avoid re-fetching
13
+ // Cache the template UUID and project UUIDs within a server session to avoid re-fetching
14
14
  let cachedTemplateUuid = null;
15
- let cachedProjectUuid = null;
15
+ const projectUuidCache = new Map();
16
16
  export async function testPageChangesHandler(input, context, progressCallback) {
17
17
  const startTime = Date.now();
18
18
  logger.toolStart('check_app_in_browser', input);
@@ -79,28 +79,33 @@ export async function testPageChangesHandler(input, context, progressCallback) {
79
79
  logger.info(`Using workflow template: ${template.name} (${template.uuid})`);
80
80
  }
81
81
  // --- Resolve project UUID (best-effort, non-blocking) ---
82
- if (!cachedProjectUuid && config.defaults.repoName) {
83
- try {
84
- const project = await client.findProjectByRepoName(config.defaults.repoName);
85
- if (project) {
86
- cachedProjectUuid = project.uuid;
87
- logger.info(`Resolved project: ${project.name} (${project.uuid})`);
82
+ let projectUuid;
83
+ if (input.repoName) {
84
+ projectUuid = projectUuidCache.get(input.repoName);
85
+ if (!projectUuid) {
86
+ try {
87
+ const project = await client.findProjectByRepoName(input.repoName);
88
+ if (project) {
89
+ projectUuid = project.uuid;
90
+ projectUuidCache.set(input.repoName, projectUuid);
91
+ logger.info(`Resolved project: ${project.name} (${project.uuid})`);
92
+ }
93
+ else {
94
+ logger.info(`No project found for repo "${input.repoName}" — proceeding without project_id`);
95
+ }
88
96
  }
89
- else {
90
- logger.info(`No project found for repo "${config.defaults.repoName}" — proceeding without project_id`);
97
+ catch (err) {
98
+ logger.warn(`Failed to look up project for repo "${input.repoName}": ${err}`);
91
99
  }
92
100
  }
93
- catch (err) {
94
- logger.warn(`Failed to look up project for repo "${config.defaults.repoName}": ${err}`);
95
- }
96
101
  }
97
- // --- Build context data (targetUrl is the tunnel URL for localhost, original URL otherwise) ---
102
+ // --- Build context data (camelCase here axiosTransport auto-converts to snake_case) ---
98
103
  const contextData = {
99
104
  targetUrl: ctx.targetUrl ?? originalUrl,
100
- goal: input.description,
105
+ question: input.description,
101
106
  };
102
- if (cachedProjectUuid) {
103
- contextData.projectId = cachedProjectUuid;
107
+ if (projectUuid) {
108
+ contextData.projectId = projectUuid;
104
109
  }
105
110
  // --- Build env (credentials/environment) ---
106
111
  const env = {};
@@ -115,6 +120,7 @@ export async function testPageChangesHandler(input, context, progressCallback) {
115
120
  if (input.password)
116
121
  env.password = input.password;
117
122
  // --- Execute ---
123
+ logger.info('Sending contextData', { contextData, env: Object.keys(env).length > 0 ? env : undefined });
118
124
  if (progressCallback) {
119
125
  await progressCallback({ progress: 3, total: TOTAL_STEPS, message: 'Queuing workflow execution...' });
120
126
  }
@@ -43,6 +43,10 @@ export const testPageChangesTool = {
43
43
  type: "string",
44
44
  description: "Password to log in with (used together with username)"
45
45
  },
46
+ repoName: {
47
+ type: "string",
48
+ description: "GitHub repository name (e.g. 'my-org/my-repo' or 'my-repo'). Used to link this test to a DebuggAI project for tracking and history."
49
+ },
46
50
  },
47
51
  required: ["description", "url"],
48
52
  additionalProperties: false
@@ -15,6 +15,7 @@ export const TestPageChangesInputSchema = z.object({
15
15
  credentialRole: z.string().optional(),
16
16
  username: z.string().optional(),
17
17
  password: z.string().optional(),
18
+ repoName: z.string().optional(),
18
19
  });
19
20
  /**
20
21
  * Error types
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@debugg-ai/debugg-ai-mcp",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
4
4
  "description": "Zero-Config, Fully AI-Managed End-to-End Testing for all code gen platforms.",
5
5
  "type": "module",
6
6
  "bin": {