@muggleai/mcp
Advanced tools
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
+15
-8
| #!/usr/bin/env node | ||
| import { getLogger, getConfig, getQaTools, registerTools, getLocalQaTools, createUnifiedMcpServer, startStdioServer, getElectronAppVersion, getDownloadBaseUrl, getElectronAppDir, isElectronAppInstalled, getElectronAppChecksums, performLogin, performLogout, getAuthStatus, getDataDir, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, __require } from './chunk-UKMTQHS2.js'; | ||
| import { getLogger, getConfig, getQaTools, registerTools, getLocalQaTools, createUnifiedMcpServer, startStdioServer, getElectronAppVersion, getDownloadBaseUrl, getElectronAppDir, isElectronAppInstalled, getElectronAppChecksums, performLogin, performLogout, getAuthService, hasApiKey, getDataDir, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, __require } from './chunk-HOXCZIJC.js'; | ||
| import * as fs from 'fs'; | ||
@@ -240,14 +240,16 @@ import { readFileSync, existsSync, rmSync, mkdirSync, createWriteStream, readdirSync, writeFileSync, statSync } from 'fs'; | ||
| } | ||
| const authStatus = getAuthStatus(); | ||
| const authService = getAuthService(); | ||
| const authStatus = authService.getAuthStatus(); | ||
| results.push({ | ||
| name: "Authentication", | ||
| passed: authStatus.authenticated, | ||
| description: authStatus.authenticated ? `Authenticated as ${authStatus.email || "unknown"}` : "Not authenticated", | ||
| description: authStatus.authenticated ? `Authenticated as ${authStatus.email ?? "unknown"}` : "Not authenticated", | ||
| suggestion: "Run 'muggle-mcp login' to authenticate" | ||
| }); | ||
| const hasStoredApiKey = hasApiKey(); | ||
| results.push({ | ||
| name: "API Key", | ||
| passed: authStatus.hasApiKey, | ||
| description: authStatus.hasApiKey ? "API key stored" : "No API key stored", | ||
| suggestion: "Run 'muggle-mcp login' to generate an API key" | ||
| passed: hasStoredApiKey, | ||
| description: hasStoredApiKey ? "API key stored" : "No API key stored (optional)", | ||
| suggestion: "Run 'muggle-mcp login --key-name <name>' to generate an API key" | ||
| }); | ||
@@ -497,3 +499,5 @@ const credentialsPath = getCredentialsFilePath(); | ||
| console.log("=====================\n"); | ||
| const status = getAuthStatus(); | ||
| const authService = getAuthService(); | ||
| const status = authService.getAuthStatus(); | ||
| const hasStoredApiKey = hasApiKey(); | ||
| if (status.authenticated) { | ||
@@ -510,4 +514,7 @@ console.log("\u2713 Authenticated"); | ||
| console.log(` Token expires: ${expiresDate.toLocaleString()}`); | ||
| if (status.isExpired) { | ||
| console.log(" (Token expired - will refresh automatically on next API call)"); | ||
| } | ||
| } | ||
| console.log(` API Key: ${status.hasApiKey ? "Yes" : "No"}`); | ||
| console.log(` API Key: ${hasStoredApiKey ? "Yes" : "No"}`); | ||
| } else { | ||
@@ -514,0 +521,0 @@ console.log("\u2717 Not authenticated"); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAyJH;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAyBnD"} | ||
| {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAAA;;GAEG;AA4JH;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAyBnD"} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/cli/login.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCxE;AAED;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAOnD;AAED;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CA2BnD"} | ||
| {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/cli/login.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCxE;AAED;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAOnD;AAED;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAiCnD"} |
+6
-3
@@ -1,3 +0,3 @@ | ||
| import { __export, toolRequiresAuth, startDeviceCodeFlow, saveCredentials, resetLogger, resetConfig, pollDeviceCode, performLogout, performLogin, openBrowserUrl, loadCredentials, isElectronAppInstalled, isCredentialsExpired, getValidCredentials, getLogger, getElectronAppVersionSource, getElectronAppVersion, getElectronAppDir, getElectronAppChecksums, getDownloadBaseUrl, getDataDir, getCredentialsFilePath, getConfig, getCallerCredentials, getBundledElectronAppVersion, getAuthStatus, deleteCredentials, createChildLogger, createApiKeyWithToken } from './chunk-UKMTQHS2.js'; | ||
| export { createChildLogger, createUnifiedMcpServer, getConfig, getLocalQaTools, getLogger, getQaTools, local_qa_exports as localQa, qa_exports as qa, server_exports as server } from './chunk-UKMTQHS2.js'; | ||
| import { __export, toolRequiresAuth, startDeviceCodeFlow, saveCredentials, saveApiKey, resetLogger, resetConfig, pollDeviceCode, performLogout, performLogin, openBrowserUrl, loadCredentials, isElectronAppInstalled, isCredentialsExpired, hasApiKey, getValidCredentials, getLogger, getElectronAppVersionSource, getElectronAppVersion, getElectronAppDir, getElectronAppChecksums, getDownloadBaseUrl, getDataDir, getCredentialsFilePath, getConfig, getCallerCredentialsAsync, getCallerCredentials, getBundledElectronAppVersion, getApiKey, deleteCredentials, createChildLogger, createApiKeyWithToken } from './chunk-HOXCZIJC.js'; | ||
| export { createChildLogger, createUnifiedMcpServer, getConfig, getLocalQaTools, getLogger, getQaTools, local_qa_exports as localQa, qa_exports as qa, server_exports as server } from './chunk-HOXCZIJC.js'; | ||
@@ -10,5 +10,6 @@ // src/shared/index.ts | ||
| deleteCredentials: () => deleteCredentials, | ||
| getAuthStatus: () => getAuthStatus, | ||
| getApiKey: () => getApiKey, | ||
| getBundledElectronAppVersion: () => getBundledElectronAppVersion, | ||
| getCallerCredentials: () => getCallerCredentials, | ||
| getCallerCredentialsAsync: () => getCallerCredentialsAsync, | ||
| getConfig: () => getConfig, | ||
@@ -24,2 +25,3 @@ getCredentialsFilePath: () => getCredentialsFilePath, | ||
| getValidCredentials: () => getValidCredentials, | ||
| hasApiKey: () => hasApiKey, | ||
| isCredentialsExpired: () => isCredentialsExpired, | ||
@@ -34,2 +36,3 @@ isElectronAppInstalled: () => isElectronAppInstalled, | ||
| resetLogger: () => resetLogger, | ||
| saveApiKey: () => saveApiKey, | ||
| saveCredentials: () => saveCredentials, | ||
@@ -36,0 +39,0 @@ startDeviceCodeFlow: () => startDeviceCodeFlow, |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../src/shared/index.ts"],"names":[],"mappings":";;;;AAAA,IAAA,cAAA,GAAA;AAAA,QAAA,CAAA,cAAA,EAAA;AAAA,EAAA,qBAAA,EAAA,MAAA,qBAAA;AAAA,EAAA,iBAAA,EAAA,MAAA,iBAAA;AAAA,EAAA,iBAAA,EAAA,MAAA,iBAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,4BAAA,EAAA,MAAA,4BAAA;AAAA,EAAA,oBAAA,EAAA,MAAA,oBAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,sBAAA,EAAA,MAAA,sBAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,kBAAA,EAAA,MAAA,kBAAA;AAAA,EAAA,uBAAA,EAAA,MAAA,uBAAA;AAAA,EAAA,iBAAA,EAAA,MAAA,iBAAA;AAAA,EAAA,qBAAA,EAAA,MAAA,qBAAA;AAAA,EAAA,2BAAA,EAAA,MAAA,2BAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,mBAAA,EAAA,MAAA,mBAAA;AAAA,EAAA,oBAAA,EAAA,MAAA,oBAAA;AAAA,EAAA,sBAAA,EAAA,MAAA,sBAAA;AAAA,EAAA,eAAA,EAAA,MAAA,eAAA;AAAA,EAAA,cAAA,EAAA,MAAA,cAAA;AAAA,EAAA,YAAA,EAAA,MAAA,YAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,cAAA,EAAA,MAAA,cAAA;AAAA,EAAA,WAAA,EAAA,MAAA,WAAA;AAAA,EAAA,WAAA,EAAA,MAAA,WAAA;AAAA,EAAA,eAAA,EAAA,MAAA,eAAA;AAAA,EAAA,mBAAA,EAAA,MAAA,mBAAA;AAAA,EAAA,gBAAA,EAAA,MAAA;AAAA,CAAA,CAAA","file":"index.js","sourcesContent":["/**\n * Shared module exports for @muggleai/mcp.\n */\n\nexport * from \"./auth.js\";\nexport * from \"./config.js\";\nexport * from \"./credentials.js\";\nexport * from \"./logger.js\";\nexport * from \"./open-browser.js\";\nexport * from \"./types.js\";\n"]} | ||
| {"version":3,"sources":["../src/shared/index.ts"],"names":[],"mappings":";;;;AAAA,IAAA,cAAA,GAAA;AAAA,QAAA,CAAA,cAAA,EAAA;AAAA,EAAA,qBAAA,EAAA,MAAA,qBAAA;AAAA,EAAA,iBAAA,EAAA,MAAA,iBAAA;AAAA,EAAA,iBAAA,EAAA,MAAA,iBAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,4BAAA,EAAA,MAAA,4BAAA;AAAA,EAAA,oBAAA,EAAA,MAAA,oBAAA;AAAA,EAAA,yBAAA,EAAA,MAAA,yBAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,sBAAA,EAAA,MAAA,sBAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,kBAAA,EAAA,MAAA,kBAAA;AAAA,EAAA,uBAAA,EAAA,MAAA,uBAAA;AAAA,EAAA,iBAAA,EAAA,MAAA,iBAAA;AAAA,EAAA,qBAAA,EAAA,MAAA,qBAAA;AAAA,EAAA,2BAAA,EAAA,MAAA,2BAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,mBAAA,EAAA,MAAA,mBAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,oBAAA,EAAA,MAAA,oBAAA;AAAA,EAAA,sBAAA,EAAA,MAAA,sBAAA;AAAA,EAAA,eAAA,EAAA,MAAA,eAAA;AAAA,EAAA,cAAA,EAAA,MAAA,cAAA;AAAA,EAAA,YAAA,EAAA,MAAA,YAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,cAAA,EAAA,MAAA,cAAA;AAAA,EAAA,WAAA,EAAA,MAAA,WAAA;AAAA,EAAA,WAAA,EAAA,MAAA,WAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,eAAA,EAAA,MAAA,eAAA;AAAA,EAAA,mBAAA,EAAA,MAAA,mBAAA;AAAA,EAAA,gBAAA,EAAA,MAAA;AAAA,CAAA,CAAA","file":"index.js","sourcesContent":["/**\n * Shared module exports for @muggleai/mcp.\n */\n\nexport * from \"./auth.js\";\nexport * from \"./config.js\";\nexport * from \"./credentials.js\";\nexport * from \"./logger.js\";\nexport * from \"./open-browser.js\";\nexport * from \"./types.js\";\n"]} |
@@ -12,7 +12,7 @@ /** | ||
| }, "strip", z.ZodTypeAny, { | ||
| timeoutMs?: number | undefined; | ||
| waitForCompletion?: boolean | undefined; | ||
| }, { | ||
| timeoutMs?: number | undefined; | ||
| }, { | ||
| waitForCompletion?: boolean | undefined; | ||
| timeoutMs?: number | undefined; | ||
| }>; | ||
@@ -19,0 +19,0 @@ export type AuthLoginInput = z.infer<typeof AuthLoginInputSchema>; |
@@ -35,17 +35,17 @@ /** | ||
| }, "strip", z.ZodTypeAny, { | ||
| title: string; | ||
| id: string; | ||
| goal: string; | ||
| title: string; | ||
| expectedResult: string; | ||
| url?: string | undefined; | ||
| precondition?: string | undefined; | ||
| instructions?: string | undefined; | ||
| precondition?: string | undefined; | ||
| }, { | ||
| title: string; | ||
| id: string; | ||
| goal: string; | ||
| title: string; | ||
| expectedResult: string; | ||
| url?: string | undefined; | ||
| precondition?: string | undefined; | ||
| instructions?: string | undefined; | ||
| precondition?: string | undefined; | ||
| }>; | ||
@@ -69,12 +69,12 @@ export type TestCaseDetails = z.infer<typeof TestCaseDetailsSchema>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| id: string; | ||
| name: string; | ||
| id: string; | ||
| actionScript: unknown[]; | ||
| testCaseId: string; | ||
| actionScript: unknown[]; | ||
| url?: string | undefined; | ||
| }, { | ||
| id: string; | ||
| name: string; | ||
| id: string; | ||
| actionScript: unknown[]; | ||
| testCaseId: string; | ||
| actionScript: unknown[]; | ||
| url?: string | undefined; | ||
@@ -105,17 +105,17 @@ }>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| title: string; | ||
| id: string; | ||
| goal: string; | ||
| title: string; | ||
| expectedResult: string; | ||
| url?: string | undefined; | ||
| precondition?: string | undefined; | ||
| instructions?: string | undefined; | ||
| precondition?: string | undefined; | ||
| }, { | ||
| title: string; | ||
| id: string; | ||
| goal: string; | ||
| title: string; | ||
| expectedResult: string; | ||
| url?: string | undefined; | ||
| precondition?: string | undefined; | ||
| instructions?: string | undefined; | ||
| precondition?: string | undefined; | ||
| }>; | ||
@@ -131,9 +131,9 @@ /** Local URL to test against. */ | ||
| testCase: { | ||
| title: string; | ||
| id: string; | ||
| goal: string; | ||
| title: string; | ||
| expectedResult: string; | ||
| url?: string | undefined; | ||
| precondition?: string | undefined; | ||
| instructions?: string | undefined; | ||
| precondition?: string | undefined; | ||
| }; | ||
@@ -145,9 +145,9 @@ approveElectronAppLaunch: boolean; | ||
| testCase: { | ||
| title: string; | ||
| id: string; | ||
| goal: string; | ||
| title: string; | ||
| expectedResult: string; | ||
| url?: string | undefined; | ||
| precondition?: string | undefined; | ||
| instructions?: string | undefined; | ||
| precondition?: string | undefined; | ||
| }; | ||
@@ -176,12 +176,12 @@ approveElectronAppLaunch: boolean; | ||
| }, "strip", z.ZodTypeAny, { | ||
| id: string; | ||
| name: string; | ||
| id: string; | ||
| actionScript: unknown[]; | ||
| testCaseId: string; | ||
| actionScript: unknown[]; | ||
| url?: string | undefined; | ||
| }, { | ||
| id: string; | ||
| name: string; | ||
| id: string; | ||
| actionScript: unknown[]; | ||
| testCaseId: string; | ||
| actionScript: unknown[]; | ||
| url?: string | undefined; | ||
@@ -199,6 +199,6 @@ }>; | ||
| testScript: { | ||
| id: string; | ||
| name: string; | ||
| id: string; | ||
| actionScript: unknown[]; | ||
| testCaseId: string; | ||
| actionScript: unknown[]; | ||
| url?: string | undefined; | ||
@@ -211,6 +211,6 @@ }; | ||
| testScript: { | ||
| id: string; | ||
| name: string; | ||
| id: string; | ||
| actionScript: unknown[]; | ||
| testCaseId: string; | ||
| actionScript: unknown[]; | ||
| url?: string | undefined; | ||
@@ -239,7 +239,7 @@ }; | ||
| }, "strip", z.ZodTypeAny, { | ||
| cloudTestCaseId?: string | undefined; | ||
| limit?: number | undefined; | ||
| }, { | ||
| cloudTestCaseId?: string | undefined; | ||
| }, { | ||
| limit?: number | undefined; | ||
| cloudTestCaseId?: string | undefined; | ||
| }>; | ||
@@ -246,0 +246,0 @@ export type RunResultListInput = z.infer<typeof RunResultListInputSchema>; |
@@ -64,5 +64,22 @@ /** | ||
| * Get the current access token (if valid). | ||
| * Does not auto-refresh - use getValidAccessToken() for that. | ||
| */ | ||
| getAccessToken(): string | null; | ||
| /** | ||
| * Check if the access token is expired or about to expire. | ||
| * Uses a 5-minute buffer for safety. | ||
| */ | ||
| isAccessTokenExpired(): boolean; | ||
| /** | ||
| * Refresh the access token using the stored refresh token. | ||
| * @returns New access token or null if refresh failed. | ||
| */ | ||
| refreshAccessToken(): Promise<string | null>; | ||
| /** | ||
| * Get a valid access token, refreshing if necessary. | ||
| * This is the preferred method for getting an access token for API calls. | ||
| * @returns Valid access token or null if not authenticated or refresh failed. | ||
| */ | ||
| getValidAccessToken(): Promise<string | null>; | ||
| /** | ||
| * Clear stored authentication (logout). | ||
@@ -69,0 +86,0 @@ */ |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"auth-service.d.ts","sourceRoot":"","sources":["../../../src/local-qa/services/auth-service.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAM3B;;GAEG;AACH,qBAAa,WAAW;IACtB,6BAA6B;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IAEtC,4CAA4C;IAC5C,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAS;IAE/C;;OAEG;;IAUH;;OAEG;IACH,aAAa,IAAI,WAAW;IA4B5B;;OAEG;IACG,mBAAmB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IA6EzD;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAoB9B;;OAEG;IACH,oBAAoB,IAAI,MAAM,GAAG,IAAI;IAkCrC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAe9B;;OAEG;IACG,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IA6GxE;;OAEG;IACG,8BAA8B,CAAC,MAAM,EAAE;QAC3C,UAAU,EAAE,MAAM,CAAC;QACnB,eAAe,EAAE,MAAM,CAAC;Q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B,CAAC;IAiClC;;OAEG;YACW,WAAW;IA8BzB;;OAEG;YACW,SAAS;IA+BvB;;OAEG;IACH,cAAc,IAAI,WAAW,GAAG,IAAI;IAkBpC;;;OAGG;IACH,cAAc,IAAI,MAAM,GAAG,IAAI;IAiB/B;;;OAGG;IACH,oBAAoB,IAAI,OAAO;IAc/B;;;OAGG;IACG,kBAAkB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IA6ElD;;;;OAIG;IACG,mBAAmB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAyBnD;;OAEG;IACH,MAAM,IAAI,OAAO;CAmBlB;AAKD;;GAEG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAG5C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"} |
@@ -25,8 +25,8 @@ /** | ||
| }, "strip", z.ZodTypeAny, { | ||
| url: string; | ||
| description: string; | ||
| url: string; | ||
| projectName: string; | ||
| }, { | ||
| url: string; | ||
| description: string; | ||
| url: string; | ||
| projectName: string; | ||
@@ -55,9 +55,9 @@ }>; | ||
| projectId: string; | ||
| url?: string | undefined; | ||
| description?: string | undefined; | ||
| url?: string | undefined; | ||
| projectName?: string | undefined; | ||
| }, { | ||
| projectId: string; | ||
| url?: string | undefined; | ||
| description?: string | undefined; | ||
| url?: string | undefined; | ||
| projectName?: string | undefined; | ||
@@ -118,5 +118,5 @@ }>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| name: string; | ||
| url: string; | ||
| description: string; | ||
| url: string; | ||
| name: string; | ||
| projectId: string; | ||
@@ -128,5 +128,5 @@ prdFilePath: string; | ||
| }, { | ||
| name: string; | ||
| url: string; | ||
| description: string; | ||
| url: string; | ||
| name: string; | ||
| projectId: string; | ||
@@ -159,11 +159,11 @@ prdFilePath: string; | ||
| }, "strip", z.ZodTypeAny, { | ||
| name: string; | ||
| value: string; | ||
| description: string; | ||
| name: string; | ||
| projectId: string; | ||
| source?: "user" | "agent" | undefined; | ||
| }, { | ||
| name: string; | ||
| value: string; | ||
| description: string; | ||
| name: string; | ||
| projectId: string; | ||
@@ -186,10 +186,10 @@ source?: "user" | "agent" | undefined; | ||
| secretId: string; | ||
| name?: string | undefined; | ||
| value?: string | undefined; | ||
| description?: string | undefined; | ||
| name?: string | undefined; | ||
| }, { | ||
| secretId: string; | ||
| name?: string | undefined; | ||
| value?: string | undefined; | ||
| description?: string | undefined; | ||
| name?: string | undefined; | ||
| }>; | ||
@@ -340,12 +340,12 @@ export declare const SecretDeleteInputSchema: z.ZodObject<{ | ||
| }, "strip", z.ZodTypeAny, { | ||
| description: string; | ||
| url: string; | ||
| goal: string; | ||
| title: string; | ||
| expectedResult: string; | ||
| description: string; | ||
| projectId: string; | ||
| useCaseId: string; | ||
| goal: string; | ||
| expectedResult: string; | ||
| status?: "DRAFT" | "ACTIVE" | "DEPRECATED" | "ARCHIVED" | undefined; | ||
| precondition?: string | undefined; | ||
| priority?: "HIGH" | "MEDIUM" | "LOW" | undefined; | ||
| precondition?: string | undefined; | ||
| tags?: string[] | undefined; | ||
@@ -355,12 +355,12 @@ category?: string | undefined; | ||
| }, { | ||
| description: string; | ||
| url: string; | ||
| goal: string; | ||
| title: string; | ||
| expectedResult: string; | ||
| description: string; | ||
| projectId: string; | ||
| useCaseId: string; | ||
| goal: string; | ||
| expectedResult: string; | ||
| status?: "DRAFT" | "ACTIVE" | "DEPRECATED" | "ARCHIVED" | undefined; | ||
| precondition?: string | undefined; | ||
| priority?: "HIGH" | "MEDIUM" | "LOW" | undefined; | ||
| precondition?: string | undefined; | ||
| tags?: string[] | undefined; | ||
@@ -412,4 +412,4 @@ category?: string | undefined; | ||
| }, "strip", z.ZodTypeAny, { | ||
| url: string; | ||
| description: string; | ||
| url: string; | ||
| projectId: string; | ||
@@ -419,4 +419,4 @@ archiveUnapproved?: boolean | undefined; | ||
| }, { | ||
| url: string; | ||
| description: string; | ||
| url: string; | ||
| projectId: string; | ||
@@ -448,5 +448,5 @@ archiveUnapproved?: boolean | undefined; | ||
| }, "strip", z.ZodTypeAny, { | ||
| name: string; | ||
| url: string; | ||
| description: string; | ||
| url: string; | ||
| name: string; | ||
| projectId: string; | ||
@@ -456,5 +456,5 @@ useCaseId: string; | ||
| }, { | ||
| name: string; | ||
| url: string; | ||
| description: string; | ||
| url: string; | ||
| name: string; | ||
| projectId: string; | ||
@@ -476,22 +476,22 @@ useCaseId: string; | ||
| }, "strip", z.ZodTypeAny, { | ||
| name: string; | ||
| url: string; | ||
| name: string; | ||
| goal: string; | ||
| expectedResult: string; | ||
| precondition: string; | ||
| instructions: string; | ||
| testCaseId: string; | ||
| projectId: string; | ||
| useCaseId: string; | ||
| testCaseId: string; | ||
| goal: string; | ||
| precondition: string; | ||
| expectedResult: string; | ||
| workflowParams?: Record<string, unknown> | undefined; | ||
| }, { | ||
| name: string; | ||
| url: string; | ||
| name: string; | ||
| goal: string; | ||
| expectedResult: string; | ||
| precondition: string; | ||
| instructions: string; | ||
| testCaseId: string; | ||
| projectId: string; | ||
| useCaseId: string; | ||
| testCaseId: string; | ||
| goal: string; | ||
| precondition: string; | ||
| expectedResult: string; | ||
| workflowParams?: Record<string, unknown> | undefined; | ||
@@ -514,14 +514,14 @@ }>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| testScriptId: string; | ||
| name: string; | ||
| testCaseId: string; | ||
| projectId: string; | ||
| useCaseId: string; | ||
| testCaseId: string; | ||
| testScriptId: string; | ||
| workflowParams?: Record<string, unknown> | undefined; | ||
| }, { | ||
| testScriptId: string; | ||
| name: string; | ||
| testCaseId: string; | ||
| projectId: string; | ||
| useCaseId: string; | ||
| testCaseId: string; | ||
| testScriptId: string; | ||
| workflowParams?: Record<string, unknown> | undefined; | ||
@@ -543,6 +543,6 @@ }>; | ||
| intervalSec: number; | ||
| limit?: number | undefined; | ||
| useCaseId?: string | undefined; | ||
| workflowParams?: Record<string, unknown> | undefined; | ||
| namePrefix?: string | undefined; | ||
| limit?: number | undefined; | ||
| testCaseIds?: string[] | undefined; | ||
@@ -554,6 +554,6 @@ repeatPerTestCase?: number | undefined; | ||
| intervalSec: number; | ||
| limit?: number | undefined; | ||
| useCaseId?: string | undefined; | ||
| workflowParams?: Record<string, unknown> | undefined; | ||
| namePrefix?: string | undefined; | ||
| limit?: number | undefined; | ||
| testCaseIds?: string[] | undefined; | ||
@@ -736,7 +736,7 @@ repeatPerTestCase?: number | undefined; | ||
| }, "strip", z.ZodTypeAny, { | ||
| name?: string | undefined; | ||
| expiry?: "30d" | "90d" | "1y" | "never" | undefined; | ||
| }, { | ||
| name?: string | undefined; | ||
| }, { | ||
| expiry?: "30d" | "90d" | "1y" | "never" | undefined; | ||
| name?: string | undefined; | ||
| }>; | ||
@@ -765,7 +765,7 @@ export declare const ApiKeyListInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| timeoutMs?: number | undefined; | ||
| waitForCompletion?: boolean | undefined; | ||
| }, { | ||
| timeoutMs?: number | undefined; | ||
| }, { | ||
| waitForCompletion?: boolean | undefined; | ||
| timeoutMs?: number | undefined; | ||
| }>; | ||
@@ -772,0 +772,0 @@ /** |
@@ -45,6 +45,7 @@ /** | ||
| * Complete the full device code login flow. | ||
| * Starts the flow, waits for user authorization, and creates credentials. | ||
| * Starts the flow, waits for user authorization, and stores credentials. | ||
| * API key creation is optional - only created when keyName is provided. | ||
| * | ||
| * @param keyName - Optional name for the API key. | ||
| * @param keyExpiry - Expiry option for API key. | ||
| * @param keyName - Optional name for the API key. If provided, creates an API key. | ||
| * @param keyExpiry - Expiry option for API key (only used if keyName is provided). | ||
| * @param timeoutMs - Maximum time to wait for authorization. | ||
@@ -60,8 +61,9 @@ * @returns Result of the login flow. | ||
| /** | ||
| * Perform logout by clearing credentials. | ||
| * Perform logout by clearing all credentials (auth tokens and API keys). | ||
| */ | ||
| export declare function performLogout(): void; | ||
| /** | ||
| * Get caller credentials for API requests. | ||
| * Returns credentials from storage if available and valid. | ||
| * Get caller credentials for API requests (sync version). | ||
| * Checks for API key first, then falls back to access token. | ||
| * Does NOT auto-refresh - use getCallerCredentialsAsync() for that. | ||
| * @returns Caller credentials or empty object. | ||
@@ -71,2 +73,9 @@ */ | ||
| /** | ||
| * Get caller credentials for API requests (async version with auto-refresh). | ||
| * This is the preferred method - automatically refreshes expired access tokens. | ||
| * Priority: 1) API key (if explicitly set), 2) Access token (with auto-refresh) | ||
| * @returns Caller credentials or empty object. | ||
| */ | ||
| export declare function getCallerCredentialsAsync(): Promise<ICallerCredentials>; | ||
| /** | ||
| * Check if authentication is required for the given tool. | ||
@@ -73,0 +82,0 @@ * Local-only tools don't require auth. |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/shared/auth.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAIpB;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAkE5F;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,uBAAuB,CAAC,CA2ElC;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,MAAM,GAAE,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,OAAe,GAC7C,OAAO,CAAC;IACT,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,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OAAO,CAAC;IACT,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC,CAyCD;AAED;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAChC,OAAO,CAAC,EAAE,MAAM,EAChB,SAAS,GAAE,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,OAAe,EACjD,SAAS,GAAE,MAAe,GACzB,OAAO,CAAC;IACT,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,CAAC,EAAE,mBAAmB,CAAC;IACzC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CA4FD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CASpC;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,kBAAkB,CAiBzD;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAiB7E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAwD1D"} |
@@ -33,3 +33,4 @@ /** | ||
| * Get valid credentials if available. | ||
| * Returns null if no credentials or if expired. | ||
| * This is primarily used for API key storage. | ||
| * Access token authentication is handled by AuthService. | ||
| * @returns Valid credentials or null. | ||
@@ -39,12 +40,20 @@ */ | ||
| /** | ||
| * Get authentication status. | ||
| * @returns Object with authentication status information. | ||
| * Check if an API key is stored. | ||
| * @returns True if API key exists. | ||
| */ | ||
| export declare function getAuthStatus(): { | ||
| authenticated: boolean; | ||
| email?: string; | ||
| userId?: string; | ||
| expiresAt?: string; | ||
| hasApiKey: boolean; | ||
| }; | ||
| export declare function hasApiKey(): boolean; | ||
| /** | ||
| * Get stored API key if available. | ||
| * @returns API key or null. | ||
| */ | ||
| export declare function getApiKey(): string | null; | ||
| /** | ||
| * Save API key to credentials. | ||
| * @param apiKey - The API key to save. | ||
| * @param apiKeyId - The API key ID. | ||
| */ | ||
| export declare function saveApiKey(params: { | ||
| apiKey: string; | ||
| apiKeyId: string; | ||
| }): void; | ||
| //# sourceMappingURL=credentials.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../src/shared/credentials.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAKrD;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAYD;;;GAGG;AACH,wBAAgB,eAAe,IAAI,kBAAkB,GAAG,IAAI,CA0B3D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,kBAAkB,GAAG,IAAI,CAiBrE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAcxC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAO7E;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,kBAAkB,GAAG,IAAI,CAa/D;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI;IAC/B,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACpB,CAmBA"} | ||
| {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../src/shared/credentials.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAKrD;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAYD;;;GAGG;AACH,wBAAgB,eAAe,IAAI,kBAAkB,GAAG,IAAI,CA0B3D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,kBAAkB,GAAG,IAAI,CAiBrE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAcxC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAO7E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,kBAAkB,GAAG,IAAI,CAa/D;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAGnC;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,MAAM,GAAG,IAAI,CAGzC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAwB7E"} |
+1
-1
| { | ||
| "name": "@muggleai/mcp", | ||
| "version": "1.0.19", | ||
| "version": "1.0.20", | ||
| "description": "Unified MCP server for Muggle AI - Cloud QA and Local Testing tools", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
868968
2.09%10246
1.82%12
9.09%