@muggleai/mcp 1.0.24 → 1.0.26
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/{chunk-RL3OCHF2.js → chunk-NMIDGHK4.js} +25 -10
- package/dist/chunk-NMIDGHK4.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +2 -2
- package/dist/local-qa/contracts/project-schemas.d.ts +8 -0
- package/dist/local-qa/contracts/project-schemas.d.ts.map +1 -1
- package/dist/local-qa/services/execution-service.d.ts +4 -0
- package/dist/local-qa/services/execution-service.d.ts.map +1 -1
- package/dist/local-qa/tools/tool-registry.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-RL3OCHF2.js.map +0 -1
|
@@ -1876,6 +1876,9 @@ async function executeElectronAppAsync(params) {
|
|
|
1876
1876
|
const mode = params.runType === "generation" ? "explore" : "engine";
|
|
1877
1877
|
const electronAppPath = getElectronAppPathOrThrow();
|
|
1878
1878
|
const spawnArgs = [mode, params.scriptFilePath, "", params.authFilePath];
|
|
1879
|
+
if (params.showUi) {
|
|
1880
|
+
spawnArgs.push("--show-ui");
|
|
1881
|
+
}
|
|
1879
1882
|
logger3.info("Spawning electron-app for local execution", {
|
|
1880
1883
|
runId: params.runId,
|
|
1881
1884
|
mode,
|
|
@@ -2023,7 +2026,8 @@ async function executeTestGeneration(params) {
|
|
|
2023
2026
|
runType: "generation",
|
|
2024
2027
|
scriptFilePath: inputFilePath,
|
|
2025
2028
|
authFilePath,
|
|
2026
|
-
timeoutMs
|
|
2029
|
+
timeoutMs,
|
|
2030
|
+
showUi: params.showUi
|
|
2027
2031
|
});
|
|
2028
2032
|
const completedAt = Date.now();
|
|
2029
2033
|
const executionTimeMs = completedAt - startedAt;
|
|
@@ -2165,7 +2169,8 @@ async function executeReplay(params) {
|
|
|
2165
2169
|
runType: "replay",
|
|
2166
2170
|
scriptFilePath: inputFilePath,
|
|
2167
2171
|
authFilePath,
|
|
2168
|
-
timeoutMs
|
|
2172
|
+
timeoutMs,
|
|
2173
|
+
showUi: params.showUi
|
|
2169
2174
|
});
|
|
2170
2175
|
const completedAt = Date.now();
|
|
2171
2176
|
const executionTimeMs = completedAt - startedAt;
|
|
@@ -5101,7 +5106,9 @@ var ExecuteTestGenerationInputSchema = z.object({
|
|
|
5101
5106
|
/** Explicit approval to launch electron-app. */
|
|
5102
5107
|
approveElectronAppLaunch: z.boolean().describe("Set to true after the user explicitly approves launching electron-app"),
|
|
5103
5108
|
/** Optional timeout. */
|
|
5104
|
-
timeoutMs: z.number().int().positive().optional().describe("Timeout in milliseconds (default: 300000 = 5 min)")
|
|
5109
|
+
timeoutMs: z.number().int().positive().optional().describe("Timeout in milliseconds (default: 300000 = 5 min)"),
|
|
5110
|
+
/** Show the electron-app UI during execution. */
|
|
5111
|
+
showUi: z.boolean().optional().describe("Show the electron-app UI during execution (default: false, runs headless)")
|
|
5105
5112
|
});
|
|
5106
5113
|
var ExecuteReplayInputSchema = z.object({
|
|
5107
5114
|
/** Test script details from qa_test_script_get. */
|
|
@@ -5111,7 +5118,9 @@ var ExecuteReplayInputSchema = z.object({
|
|
|
5111
5118
|
/** Explicit approval to launch electron-app. */
|
|
5112
5119
|
approveElectronAppLaunch: z.boolean().describe("Set to true after the user explicitly approves launching electron-app"),
|
|
5113
5120
|
/** Optional timeout. */
|
|
5114
|
-
timeoutMs: z.number().int().positive().optional().describe("Timeout in milliseconds (default: 180000 = 3 min)")
|
|
5121
|
+
timeoutMs: z.number().int().positive().optional().describe("Timeout in milliseconds (default: 180000 = 3 min)"),
|
|
5122
|
+
/** Show the electron-app UI during execution. */
|
|
5123
|
+
showUi: z.boolean().optional().describe("Show the electron-app UI during execution (default: false, runs headless)")
|
|
5115
5124
|
});
|
|
5116
5125
|
var CancelExecutionInputSchema = z.object({
|
|
5117
5126
|
runId: z.string().min(1).describe("Run ID to cancel")
|
|
@@ -5351,13 +5360,14 @@ var testScriptGetTool = {
|
|
|
5351
5360
|
};
|
|
5352
5361
|
var executeTestGenerationTool = {
|
|
5353
5362
|
name: "muggle-local-execute-test-generation",
|
|
5354
|
-
description: "Execute test script generation for a test case. First call qa_test_case_get to get test case details, then pass them here along with the localhost URL. Requires explicit approval before launching electron-app in explore mode.",
|
|
5363
|
+
description: "Execute test script generation for a test case. First call qa_test_case_get to get test case details, then pass them here along with the localhost URL. Requires explicit approval before launching electron-app in explore mode. By default runs headless; set showUi: true to display the electron-app UI.",
|
|
5355
5364
|
inputSchema: ExecuteTestGenerationInputSchema,
|
|
5356
5365
|
execute: async (ctx) => {
|
|
5357
5366
|
const logger6 = createChildLogger2(ctx.correlationId);
|
|
5358
5367
|
logger6.info("Executing muggle-local-execute-test-generation");
|
|
5359
5368
|
const input = ExecuteTestGenerationInputSchema.parse(ctx.input);
|
|
5360
5369
|
if (!input.approveElectronAppLaunch) {
|
|
5370
|
+
const uiMode = input.showUi ? "with visible UI" : "headless (no UI)";
|
|
5361
5371
|
return {
|
|
5362
5372
|
content: [
|
|
5363
5373
|
"## Electron App Launch Required",
|
|
@@ -5367,6 +5377,7 @@ var executeTestGenerationTool = {
|
|
|
5367
5377
|
"",
|
|
5368
5378
|
`**Test Case:** ${input.testCase.title}`,
|
|
5369
5379
|
`**Local URL:** ${input.localUrl}`,
|
|
5380
|
+
`**UI Mode:** ${uiMode}`,
|
|
5370
5381
|
"",
|
|
5371
5382
|
"**Note:** The electron-app will open a browser window and navigate to your test URL."
|
|
5372
5383
|
].join("\n"),
|
|
@@ -5378,7 +5389,8 @@ var executeTestGenerationTool = {
|
|
|
5378
5389
|
const result = await executeTestGeneration({
|
|
5379
5390
|
testCase: input.testCase,
|
|
5380
5391
|
localUrl: input.localUrl,
|
|
5381
|
-
timeoutMs: input.timeoutMs
|
|
5392
|
+
timeoutMs: input.timeoutMs,
|
|
5393
|
+
showUi: input.showUi
|
|
5382
5394
|
});
|
|
5383
5395
|
const content = [
|
|
5384
5396
|
"## Test Generation " + (result.status === "passed" ? "Successful" : "Failed"),
|
|
@@ -5403,13 +5415,14 @@ var executeTestGenerationTool = {
|
|
|
5403
5415
|
};
|
|
5404
5416
|
var executeReplayTool = {
|
|
5405
5417
|
name: "muggle-local-execute-replay",
|
|
5406
|
-
description: "Execute test script replay. First call qa_test_script_get to get test script details (including actionScript), then pass them here along with the localhost URL. Requires explicit approval before launching electron-app in engine mode.",
|
|
5418
|
+
description: "Execute test script replay. First call qa_test_script_get to get test script details (including actionScript), then pass them here along with the localhost URL. Requires explicit approval before launching electron-app in engine mode. By default runs headless; set showUi: true to display the electron-app UI.",
|
|
5407
5419
|
inputSchema: ExecuteReplayInputSchema,
|
|
5408
5420
|
execute: async (ctx) => {
|
|
5409
5421
|
const logger6 = createChildLogger2(ctx.correlationId);
|
|
5410
5422
|
logger6.info("Executing muggle-local-execute-replay");
|
|
5411
5423
|
const input = ExecuteReplayInputSchema.parse(ctx.input);
|
|
5412
5424
|
if (!input.approveElectronAppLaunch) {
|
|
5425
|
+
const uiMode = input.showUi ? "with visible UI" : "headless (no UI)";
|
|
5413
5426
|
return {
|
|
5414
5427
|
content: [
|
|
5415
5428
|
"## Electron App Launch Required",
|
|
@@ -5420,6 +5433,7 @@ var executeReplayTool = {
|
|
|
5420
5433
|
`**Test Script:** ${input.testScript.name}`,
|
|
5421
5434
|
`**Local URL:** ${input.localUrl}`,
|
|
5422
5435
|
`**Steps:** ${input.testScript.actionScript.length}`,
|
|
5436
|
+
`**UI Mode:** ${uiMode}`,
|
|
5423
5437
|
"",
|
|
5424
5438
|
"**Note:** The electron-app will open a browser window and execute the test steps."
|
|
5425
5439
|
].join("\n"),
|
|
@@ -5431,7 +5445,8 @@ var executeReplayTool = {
|
|
|
5431
5445
|
const result = await executeReplay({
|
|
5432
5446
|
testScript: input.testScript,
|
|
5433
5447
|
localUrl: input.localUrl,
|
|
5434
|
-
timeoutMs: input.timeoutMs
|
|
5448
|
+
timeoutMs: input.timeoutMs,
|
|
5449
|
+
showUi: input.showUi
|
|
5435
5450
|
});
|
|
5436
5451
|
const content = [
|
|
5437
5452
|
"## Test Replay " + (result.status === "passed" ? "Successful" : "Failed"),
|
|
@@ -5675,5 +5690,5 @@ function isLocalOnlyTool(toolName) {
|
|
|
5675
5690
|
}
|
|
5676
5691
|
|
|
5677
5692
|
export { __export, __require, createApiKeyWithToken, createChildLogger, createUnifiedMcpServer, deleteCredentials, getApiKey, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getConfig, getCredentialsFilePath, getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppVersion, getElectronAppVersionSource, getLocalQaTools, getLogger, getQaTools, getValidCredentials, hasApiKey, isCredentialsExpired, isElectronAppInstalled, loadCredentials, local_qa_exports, openBrowserUrl, performLogin, performLogout, pollDeviceCode, qa_exports, registerTools, resetConfig, resetLogger, saveApiKey, saveCredentials, server_exports, startDeviceCodeFlow, startStdioServer, toolRequiresAuth };
|
|
5678
|
-
//# sourceMappingURL=chunk-
|
|
5679
|
-
//# sourceMappingURL=chunk-
|
|
5693
|
+
//# sourceMappingURL=chunk-NMIDGHK4.js.map
|
|
5694
|
+
//# sourceMappingURL=chunk-NMIDGHK4.js.map
|