wopee-mcp 1.26.1 → 1.27.0

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/README.md CHANGED
@@ -290,7 +290,7 @@ Update app context file for the most recent suite with this content: <YourMarkdo
290
290
 
291
291
  #### `wopee_dispatch_agent`
292
292
 
293
- Dispatches an autonomous testing agent to execute test cases for a selected suite.
293
+ Dispatches an autonomous testing agent to execute test cases for a selected suite. Tests run **asynchronously** (typically 1-3 minutes). This tool confirms dispatch and returns tracking info — not final results.
294
294
 
295
295
  - **Parameters:**
296
296
  - `suiteUuid` - The UUID of the suite containing the test cases
@@ -298,7 +298,7 @@ Dispatches an autonomous testing agent to execute test cases for a selected suit
298
298
  - `testCases` - Array of test case objects to execute, each containing:
299
299
  - `testCaseId` - The ID of the test case
300
300
  - `userStoryId` - The ID of the associated user story
301
- - **Returns:** Array of executed test case objects with their initial execution state (uuid, executionStatus, agentReportStatus, codeReportStatus, etc.)
301
+ - **Returns:** Dispatch confirmation with tracking info (suite UUID, analysis identifier, per-test-case execution status). Does NOT return pass/fail results — use `wopee_fetch_recent_executions` or `wopee_fetch_executed_test_cases` to check results later.
302
302
 
303
303
  **Example Usage:**
304
304
 
@@ -308,6 +308,23 @@ Dispatch agent for my latest suite's user story US001 and test case TC003
308
308
 
309
309
  ### Test Results
310
310
 
311
+ #### `wopee_fetch_recent_executions`
312
+
313
+ Fetches the most recent test case executions for the current project (up to 20, newest first). Use this to quickly check the status of recently dispatched tests without needing to remember specific suite UUIDs.
314
+
315
+ - **Parameters:** None (uses `WOPEE_PROJECT_UUID` from environment)
316
+ - **Returns:** List of recent executions with execution status (IN_PROGRESS, IN_QUEUE, FINISHED, FAILED), agent reports, and pass/fail results
317
+
318
+ **Example Usage:**
319
+
320
+ ```
321
+ What's the status of my recent test runs?
322
+ ```
323
+
324
+ ```
325
+ How did my tests go?
326
+ ```
327
+
311
328
  #### `wopee_fetch_executed_test_cases`
312
329
 
313
330
  Fetches executed test cases and their results for a given analysis suite. Use this to check the status and reports of dispatched agent runs.
@@ -348,7 +365,8 @@ Show me the executed test cases for my latest analysis suite
348
365
  - Use `wopee_dispatch_agent` to execute test cases with the autonomous testing agent
349
366
 
350
367
  5. **Check results:**
351
- - Use `wopee_fetch_executed_test_cases` to check the status and reports of dispatched agent runs
368
+ - Use `wopee_fetch_recent_executions` to quickly check status of recent test runs
369
+ - Use `wopee_fetch_executed_test_cases` to check detailed status and reports for a specific suite
352
370
  - Or use the `fetch-test-results` prompt for a formatted summary of all test results
353
371
 
354
372
  ## Available Prompts
@@ -6,6 +6,7 @@ import { wopeeDispatchAnalysis } from "./wopee_dispatch_analysis/index.js";
6
6
  import { wopeeCreateBlankSuite } from "./wopee_create_blank_suite/index.js";
7
7
  import { wopeeFetchAnalysisSuites } from "./wopee_fetch_analysis_suites/index.js";
8
8
  import { wopeeFetchExecutedTestCases } from "./wopee_fetch_executed_test_cases/index.js";
9
+ import { wopeeFetchRecentExecutions } from "./wopee_fetch_recent_executions/index.js";
9
10
  import { wopeeSendChatMessage } from "./wopee_send_chat_message/index.js";
10
11
  import { wopeeReadChatHistory } from "./wopee_read_chat_history/index.js";
11
12
  import { wopeeCreateGithubIssue } from "./wopee_create_github_issue/index.js";
@@ -13,6 +14,7 @@ export const TOOLS = [
13
14
  wopeeCreateBlankSuite,
14
15
  wopeeFetchAnalysisSuites,
15
16
  wopeeFetchExecutedTestCases,
17
+ wopeeFetchRecentExecutions,
16
18
  wopeeDispatchAnalysis,
17
19
  wopeeDispatchAgent,
18
20
  wopeeFetchArtifact,
@@ -132,7 +132,7 @@ export const GenerateGeneralUserStories = `
132
132
  `;
133
133
  export const GenerateUserStoriesWithTestCases = `
134
134
  mutation GenerateUserStoriesWithTestCases($input: GenerateAIDataInput!) {
135
- generateUserStories(input: $input)
135
+ generateUserStoriesWithTestCases(input: $input)
136
136
  }
137
137
  `;
138
138
  export const GenerateTestCases = `
@@ -249,6 +249,25 @@ export const FetchChatRoom = `
249
249
  }
250
250
  }
251
251
  `;
252
+ export const FetchRecentExecutedTestCases = `
253
+ query FetchRecentExecutedTestCases($projectUuid: ID!) {
254
+ fetchRecentExecutedTestCases(projectUuid: $projectUuid) {
255
+ uuid
256
+ suiteUuid
257
+ analysisSuiteUuid
258
+ analysisIdentifier
259
+ userStoryId
260
+ testCaseId
261
+ executionStatus
262
+ agentReport
263
+ agentReportStatus
264
+ codeReport
265
+ codeReportStatus
266
+ createdAt
267
+ updatedAt
268
+ }
269
+ }
270
+ `;
252
271
  export const CreateGitHubIssue = `
253
272
  mutation CreateGitHubIssue($projectUuid: ID!, $title: String!, $body: String!, $labels: [String!]) {
254
273
  createGitHubIssue(projectUuid: $projectUuid, title: $title, body: $body, labels: $labels) {
@@ -3,6 +3,7 @@ export var ToolName;
3
3
  ToolName["WOPEE_CREATE_BLANK_SUITE"] = "wopee_create_blank_suite";
4
4
  ToolName["WOPEE_FETCH_ANALYSIS_SUITES"] = "wopee_fetch_analysis_suites";
5
5
  ToolName["WOPEE_FETCH_EXECUTED_TEST_CASES"] = "wopee_fetch_executed_test_cases";
6
+ ToolName["WOPEE_FETCH_RECENT_EXECUTIONS"] = "wopee_fetch_recent_executions";
6
7
  ToolName["WOPEE_DISPATCH_ANALYSIS"] = "wopee_dispatch_analysis";
7
8
  ToolName["WOPEE_DISPATCH_AGENT"] = "wopee_dispatch_agent";
8
9
  ToolName["WOPEE_FETCH_ARTIFACT"] = "wopee_fetch_artifact";
@@ -5,11 +5,28 @@ import { createDispatchAgentInput } from "./factory.js";
5
5
  import { DispatchAgent } from "../shared/gql-queries.js";
6
6
  import { requestClient } from "../../utils/requestClient.js";
7
7
  import { withRetry } from "../../utils/withRetry.js";
8
+ function formatDispatchSuccess(testCases, input) {
9
+ const lines = [
10
+ "DISPATCH SUCCESSFUL — tests are now RUNNING (not yet completed).",
11
+ "",
12
+ "Tracking:",
13
+ `- Suite UUID: ${testCases[0]?.suiteUuid ?? input.suiteUuid}`,
14
+ `- Analysis Suite UUID: ${testCases[0]?.analysisSuiteUuid ?? "N/A"}`,
15
+ `- Analysis Identifier: ${testCases[0]?.analysisIdentifier ?? input.analysisIdentifier}`,
16
+ "",
17
+ "Test cases dispatched:",
18
+ ];
19
+ for (const tc of testCases) {
20
+ lines.push(`- ${tc.userStoryId}:${tc.testCaseId} → executionStatus: ${tc.executionStatus}`);
21
+ }
22
+ lines.push("", "IMPORTANT: These tests are RUNNING asynchronously. Do NOT report them as passed or failed.", "Tell the user their tests are running and results will be available shortly (typically 1-3 minutes).", "You will receive a follow-up notification in chat when tests complete with full results.");
23
+ return lines.join("\n");
24
+ }
8
25
  export const wopeeDispatchAgent = {
9
26
  name: ToolName.WOPEE_DISPATCH_AGENT,
10
27
  config: {
11
28
  title: "Dispatch autonomous testing agent",
12
- description: "Execute a specific test case by dispatching an autonomous AI agent. The agent opens a real browser, navigates the web app, follows the test case steps, captures screenshots at each step, and reports pass/fail with detailed findings. Prerequisite: test cases must exist in the suite — generate them first with wopee_generate_artifact (type USER_STORIES_WITH_TEST_CASES). Do NOT use this to analyze or crawl an app use wopee_dispatch_analysis for that. Side effects: creates execution records and screenshots on the Wopee.io platform. Rate limit: 10 seconds between dispatches per project; concurrent calls auto-retry with exponential backoff. On success, returns executed test case results. On failure (invalid suite/test case ID), returns an error message. Use wopee_fetch_executed_test_cases afterward to get full results.",
29
+ description: "Dispatch an autonomous AI agent to execute specific test cases. The agent opens a real browser, navigates the app, follows test steps, and reports results. Tests run ASYNCHRONOUSLY (1-3 minutes). This tool returns tracking info confirming dispatchNOT final results. Do NOT interpret the response as pass/fail. Results arrive later via chat notifications. Prerequisite: test cases must exist in the suite (generate with wopee_generate_artifact type USER_STORIES_WITH_TEST_CASES). Use wopee_fetch_recent_executions or wopee_fetch_executed_test_cases to check status later.",
13
30
  inputSchema: WopeeDispatchAgentInputSchema.shape,
14
31
  },
15
32
  handler: async (input) => {
@@ -24,7 +41,7 @@ export const wopeeDispatchAgent = {
24
41
  content: [
25
42
  {
26
43
  type: "text",
27
- text: "Failed to dispatch agent: no dispatch result returned",
44
+ text: "DISPATCH FAILED tests were NOT started.\nReason: No dispatch result returned from the API.\nSuggest the user try again or check that the suite and test cases exist.",
28
45
  },
29
46
  ],
30
47
  };
@@ -32,12 +49,22 @@ export const wopeeDispatchAgent = {
32
49
  content: [
33
50
  {
34
51
  type: "text",
35
- text: JSON.stringify(result.dispatchAgent, null, 2),
52
+ text: formatDispatchSuccess(result.dispatchAgent, input),
36
53
  },
37
54
  ],
38
55
  };
39
56
  }
40
57
  catch (error) {
58
+ if (error instanceof Error) {
59
+ return {
60
+ content: [
61
+ {
62
+ type: "text",
63
+ text: `DISPATCH FAILED — tests were NOT started.\nReason: ${error.message}\nThis is a dispatch/infrastructure error, not a test failure. Suggest the user try again.`,
64
+ },
65
+ ],
66
+ };
67
+ }
41
68
  return _parseError(error);
42
69
  }
43
70
  },
@@ -0,0 +1,78 @@
1
+ import { getConfig } from "../../utils/getConfig.js";
2
+ import { requestClient } from "../../utils/requestClient.js";
3
+ import { _parseError } from "../shared/helpers.js";
4
+ import { ToolName } from "../shared/types.js";
5
+ import { FetchRecentExecutedTestCases } from "../shared/gql-queries.js";
6
+ export const wopeeFetchRecentExecutions = {
7
+ name: ToolName.WOPEE_FETCH_RECENT_EXECUTIONS,
8
+ config: {
9
+ title: "Fetch recent test executions",
10
+ description: "Fetch the most recent test case executions for the current project (up to 20, newest first). Use this to check the status of recently dispatched tests without needing to remember specific suite UUIDs. Returns execution status (IN_PROGRESS, IN_QUEUE, FINISHED, FAILED), agent reports, and pass/fail results. Takes no input; uses WOPEE_PROJECT_UUID from environment. Prefer this tool when the user asks 'what's the status?' or 'how did the tests go?' and you don't have the specific suite UUID handy.",
11
+ },
12
+ handler: async () => {
13
+ try {
14
+ const { WOPEE_PROJECT_UUID } = getConfig();
15
+ if (!WOPEE_PROJECT_UUID)
16
+ return {
17
+ content: [
18
+ {
19
+ type: "text",
20
+ text: "WOPEE_PROJECT_UUID is not set",
21
+ },
22
+ ],
23
+ };
24
+ const result = await requestClient(FetchRecentExecutedTestCases, {
25
+ projectUuid: WOPEE_PROJECT_UUID,
26
+ });
27
+ if (!result?.fetchRecentExecutedTestCases)
28
+ return {
29
+ content: [
30
+ {
31
+ type: "text",
32
+ text: "No recent test executions found for this project.",
33
+ },
34
+ ],
35
+ };
36
+ const executions = result.fetchRecentExecutedTestCases;
37
+ if (executions.length === 0)
38
+ return {
39
+ content: [
40
+ {
41
+ type: "text",
42
+ text: "No recent test executions found for this project.",
43
+ },
44
+ ],
45
+ };
46
+ const lines = [
47
+ `Recent test executions (${executions.length} most recent):`,
48
+ "",
49
+ ];
50
+ for (const tc of executions) {
51
+ let status;
52
+ if (tc.executionStatus === "FINISHED") {
53
+ status = tc.agentReportStatus ?? "FINISHED";
54
+ }
55
+ else {
56
+ status = tc.executionStatus;
57
+ }
58
+ lines.push(`- ${tc.userStoryId}:${tc.testCaseId} [${tc.analysisIdentifier}] → ${status} (${tc.updatedAt})`);
59
+ if (tc.executionStatus === "FINISHED" && tc.agentReport) {
60
+ const shortReport = tc.agentReport.slice(0, 200);
61
+ lines.push(` Report: ${shortReport}${tc.agentReport.length > 200 ? "..." : ""}`);
62
+ }
63
+ }
64
+ lines.push("", `Suite UUID of most recent: ${executions[0].suiteUuid}`, `Analysis Identifier of most recent: ${executions[0].analysisIdentifier}`);
65
+ return {
66
+ content: [
67
+ {
68
+ type: "text",
69
+ text: lines.join("\n"),
70
+ },
71
+ ],
72
+ };
73
+ }
74
+ catch (error) {
75
+ return _parseError(error);
76
+ }
77
+ },
78
+ };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "bin": {
5
5
  "wopee-mcp": "./build/index.js"
6
6
  },
7
- "version": "1.26.1",
7
+ "version": "1.27.0",
8
8
  "mcpName": "io.github.Wopee-io/wopee-mcp",
9
9
  "description": "Wopee.io MCP server for autonomous testing platform",
10
10
  "main": "./build/index.js",