wopee-mcp 1.25.0 → 1.26.1

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.
@@ -1,3 +1,4 @@
1
1
  import { fetchProjectSummary } from "./fetch_project_summary/index.js";
2
2
  import { fetchTestResults } from "./fetch_test_results/index.js";
3
- export const PROMPTS = [fetchProjectSummary, fetchTestResults];
3
+ import { runTest } from "./run_test/index.js";
4
+ export const PROMPTS = [fetchProjectSummary, fetchTestResults, runTest];
@@ -0,0 +1,46 @@
1
+ import { PromptName } from "../shared/types.js";
2
+ export const runTest = {
3
+ name: PromptName.RUN_TEST,
4
+ config: {
5
+ title: "Run a test",
6
+ description: "Workflow for running a test — discovers existing suites, finds a matching test case, confirms before dispatching. Use when the user asks to run, execute, or try a test.",
7
+ },
8
+ handler: () => ({
9
+ messages: [
10
+ {
11
+ role: "user",
12
+ content: {
13
+ type: "text",
14
+ text: `The user wants to run a test. Follow the "Run a test" workflow below step by step. Do NOT ask the user for URL, login credentials, or "autonomous vs guided" up front.
15
+
16
+ ## "Run a test" workflow
17
+
18
+ Step 1 — Discover existing suites.
19
+ Call 'wopee_fetch_analysis_suites' first. The returned list is the authoritative catalog of apps/suites in this project.
20
+
21
+ Step 2 — Find a matching test case.
22
+ For suites where generatedAnalysisDataState.testCases.isGenerated === true, call 'wopee_fetch_artifact' with type 'USER_STORIES' and scan for a test case that semantically matches the user's request. Match on intent ("add to cart" ≈ "add item to shopping cart"), not literal string equality.
23
+
24
+ Step 3 — Match found → confirm and dispatch.
25
+ Reply with: suite name, test case identifier (e.g. US004:TC006), and a one-line description. End with "Run this test? (yes/no)". Wait for explicit user confirmation before proceeding. On confirmation, call 'wopee_dispatch_agent' with suiteUuid, analysisIdentifier, and the matched testCases (array of { userStoryId, testCaseId }). After dispatch completes, call 'wopee_fetch_executed_test_cases' and summarize pass/fail results plus any failure findings.
26
+
27
+ Step 4 — No match found → offer concrete options.
28
+ If suites exist but no test case matches, reply with exactly three options referencing the existing suites by name:
29
+ 1. Run full analysis on <SuiteName> (<url>) — crawl the app, generate user stories + test cases, then pick the right one. Best for broader coverage. (uses 'wopee_dispatch_analysis')
30
+ 2. Create just this one test quickly on <SuiteName> — generate APP_CONTEXT + USER_STORIES_WITH_TEST_CASES scoped to this scenario and run it. Fastest. (uses 'wopee_create_blank_suite' if needed, then 'wopee_generate_artifact' for APP_CONTEXT first, then USER_STORIES_WITH_TEST_CASES)
31
+ 3. Use a different app — tell me which URL, or say "new" to start fresh.
32
+
33
+ If the project has zero suites, skip the option list and ask for a URL (the only situation where that question is valid).
34
+
35
+ Step 5 — Never dispatch silently.
36
+ Always show the proposed suite + test case (title + identifier) and wait for explicit confirmation before calling 'wopee_dispatch_agent'. If a tool call fails, state the failure in one sentence and propose the next concrete step — do not retry silently and do not loop.
37
+
38
+ ## Ground rules
39
+ - Never re-prompt for information already present in existing suites, artifacts, or prior messages.
40
+ - State clearly which suite + test case you are about to run so the user can cancel.
41
+ - Keep responses concise — no long explanations unless the user asks.`,
42
+ },
43
+ },
44
+ ],
45
+ }),
46
+ };
@@ -2,4 +2,5 @@ export var PromptName;
2
2
  (function (PromptName) {
3
3
  PromptName["FETCH_PROJECT_SUMMARY"] = "fetch-project-summary";
4
4
  PromptName["FETCH_TEST_RESULTS"] = "fetch-test-results";
5
+ PromptName["RUN_TEST"] = "run-test";
5
6
  })(PromptName || (PromptName = {}));
@@ -5,7 +5,7 @@ export const wopeeUpdateArtifact = {
5
5
  name: ToolName.WOPEE_UPDATE_ARTIFACT,
6
6
  config: {
7
7
  title: "Update test artifacts",
8
- description: "Replace the content of a previously generated test artifact in a suite. This is a destructive overwrite — the full content is replaced, not patched. Use this after reviewing artifacts with wopee_fetch_artifact to fix incorrect user stories, refine test case steps, or edit generated Playwright code. Do NOT use this to create new artifacts use wopee_generate_artifact instead. Prerequisite: the artifact must already exist (generated via wopee_generate_artifact). On success, returns confirmation. On failure (e.g. invalid suite UUID, missing artifact), returns an error message. Idempotent: calling with the same content multiple times produces the same result.",
8
+ description: "Create or overwrite a test artifact in a suite with caller-supplied content. The full content is replaced, not patched. Use this to upload your own APP_CONTEXT (e.g. built from JIRA / Confluence), user stories, project context, or Playwright code, or to fix / refine an artifact previously authored by wopee_generate_artifact. Works on any suite, including freshly-created blank suites with no prior generation the artifact does not need to exist beforehand. Use wopee_generate_artifact instead when you want the Wopee.io AI engine to author the content from scratch. On success, returns confirmation. On failure (e.g. invalid suite UUID, storage misconfiguration), returns an error message. Idempotent: calling with the same content multiple times produces the same result.",
9
9
  inputSchema: UpdateArtifactHandlerInputSchema.shape,
10
10
  },
11
11
  handler: async (input) => await updateArtifact(input),
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "bin": {
5
5
  "wopee-mcp": "./build/index.js"
6
6
  },
7
- "version": "1.25.0",
7
+ "version": "1.26.1",
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",