wopee-mcp 1.4.0 → 1.5.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.
package/README.md CHANGED
@@ -92,122 +92,40 @@ Dispatch a new analysis suite
92
92
 
93
93
  ### Generation Tools
94
94
 
95
- These tools generate various artifacts for a specific suite. All require a `suiteUuid`.
95
+ These tools generate various artifacts for a specific suite. All require a `suiteUuid` and `fileType` to generate.
96
96
 
97
- #### `wopee_generate_app_context`
97
+ #### `wopee_generate_file`
98
98
 
99
- Generates an application context markdown file for the selected suite. This provides a comprehensive overview of the application being analyzed.
100
-
101
- - **Parameters:**
102
- - `suiteUuid` - The UUID of the suite to generate context for
103
- - **Returns:** Generated output in case of successful generation
104
-
105
- **Example Usage:**
106
-
107
- ```
108
- Generate app context for suite abc-123-def-456
109
- ```
110
-
111
- #### `wopee_generate_general_user_stories`
112
-
113
- Generates general user stories markdown file for the selected suite.
99
+ Generates a specific file(artifact) for the selected suite.
114
100
 
115
101
  - **Parameters:**
116
102
  - `suiteUuid` - The UUID of the suite
117
- - **Returns:** Generated output in case of successful generation
118
-
119
- **Example Usage:**
120
-
121
- ```
122
- Generate general user stories for my latest suite
123
- ```
124
-
125
- #### `wopee_generate_user_stories`
126
-
127
- Generates detailed user stories JSON file for the selected suite.
128
-
129
- - **Parameters:**
130
- - `suiteUuid` - The UUID of the suite
131
- - **Returns:** Generated output in case of successful generation
132
-
133
- **Example Usage:**
134
-
135
- ```
136
- Generate user stories for suite abc-123-def-456
137
- ```
138
-
139
- #### `wopee_generate_test_cases`
140
-
141
- Generates test cases for the selected suite based on the analysis and user stories.
142
-
143
- - **Parameters:**
144
- - `suiteUuid` - The UUID of the suite
145
- - **Returns:** Generated output in case of successful generation
103
+ - `fileType` - `"APP_CONTEXT" | "GENERAL_USER_STORIES" | "USER_STORIES" | "TEST_CASES"`
104
+ - **Returns:** Generated output in case of successful generation.
146
105
 
147
106
  **Example Usage:**
148
107
 
149
108
  ```
150
- Generate test cases for suite abc-123-def-456
109
+ Generate app context for my most recent analysis suite
151
110
  ```
152
111
 
153
112
  ### Fetch Tools
154
113
 
155
- These tools retrieve generated artifacts for a specific suite. All require a `suiteUuid`.
114
+ These tools retrieve generated artifacts for a specific suite. All require a `suiteUuid` and `fileType`.
156
115
 
157
- #### `wopee_fetch_app_context`
116
+ #### `wopee_fetch_file`
158
117
 
159
- Fetches the application context markdown file for a suite.
118
+ Fetches the enquired file(artifact) from the selected suite.
160
119
 
161
120
  - **Parameters:**
162
121
  - `suiteUuid` - The UUID of the suite
163
- - **Returns:** The application context markdown content
164
-
165
- **Example Usage:**
166
-
167
- ```
168
- Fetch app context for my latest suite
169
- ```
170
-
171
- #### `wopee_fetch_general_user_stories`
172
-
173
- Fetches the general user stories markdown file for a suite.
174
-
175
- - **Parameters:**
176
- - `suiteUuid` - The UUID of the suite
177
- - **Returns:** The general user stories markdown content
178
-
179
- **Example Usage:**
180
-
181
- ```
182
- Fetch general user stories for suite abc-123-def-456
183
- ```
184
-
185
- #### `wopee_fetch_user_stories`
186
-
187
- Fetches the user stories JSON file for a suite.
188
-
189
- - **Parameters:**
190
- - `suiteUuid` - The UUID of the suite
191
- - **Returns:** The user stories JSON content
192
-
193
- **Example Usage:**
194
-
195
- ```
196
- Fetch user stories for suite abc-123-def-456
197
- ```
198
-
199
- #### `wopee_fetch_test_cases`
200
-
201
- Fetches the test cases JSON file for a suite.
202
-
203
- - **Parameters:**
204
- - `suiteUuid` - The UUID of the suite
205
- - **Returns:** The test cases JSON content
122
+ - `fileType` - `"APP_CONTEXT" | "GENERAL_USER_STORIES" | "USER_STORIES" | "TEST_CASES"`
123
+ - **Returns:** The file contents in case of successful fetch.
206
124
 
207
125
  **Example Usage:**
208
126
 
209
127
  ```
210
- Fetch test cases for suite abc-123-def-456
128
+ Fetch user stories for the latest suite
211
129
  ```
212
130
 
213
131
  ### Update Tools
@@ -259,9 +177,10 @@ Dispatch agent for my latest suite's user story US001 and test case TC003
259
177
 
260
178
  2. **Generate artifacts:**
261
179
 
262
- - Generate app context: `wopee_generate_app_context`
263
- - Generate user stories: `wopee_generate_user_stories` or `wopee_generate_general_user_stories`
264
- - Generate test cases: `wopee_generate_test_cases`
180
+ - Generate app context: `wopee_generate_file` with `APP_CONTEXT` and specific `suiteUuid`
181
+ - Generate general user stories: `wopee_generate_file` with `GENERAL_USER_STORIES` and specific `suiteUuid`
182
+ - Generate user stories: `wopee_generate_file` with `USER_STORIES` and specific `suiteUuid`
183
+ - Generate test cases: `wopee_generate_file` with `TEST_CASES` and specific `suiteUuid`
265
184
 
266
185
  3. **Fetch generated content:**
267
186
 
@@ -273,5 +192,5 @@ Dispatch agent for my latest suite's user story US001 and test case TC003
273
192
  ## Notes
274
193
 
275
194
  - Most tools require a `suiteUuid`. Always start by fetching or creating a suite.
276
- - `wopee_dispatch_analysis` tool will go through whole cycle of processing - crawling the application and generating all of the artifacts one by one.
195
+ - `wopee_dispatch_analysis` tool will go through whole cycle of processing - crawling the application and generating all of the files(artifacts) one by one.
277
196
  - It is advisable to use [cmd.wopee.io](https://cmd.wopee.io) for a convenient visual representation of the generated data and results of the agent runs.
@@ -1,26 +1,14 @@
1
+ import { wopeeFetchFile } from "./wopee_fetch_file/index.js";
1
2
  import { wopeeUpdateFile } from "./wopee_update_file/index.js";
3
+ import { wopeeGenerateFile } from "./wopee_generate_file/index.js";
2
4
  import { wopeeDispatchAgent } from "./wopee_dispatch_agent/index.js";
3
- import { wopeeFetchTestCases } from "./wopee_fetch_test_cases/index.js";
4
- import { wopeeFetchAppContext } from "./wopee_fetch_app_context/index.js";
5
5
  import { wopeeDispatchAnalysis } from "./wopee_dispatch_analysis/index.js";
6
- import { wopeeFetchUserStories } from "./wopee_fetch_user_stories/index.js";
7
- import { wopeeGenerateTestCases } from "./wopee_generate_test_cases/index.js";
8
- import { wopeeGenerateAppContext } from "./wopee_generate_app_context/index.js";
9
6
  import { wopeeFetchAnalysisSuites } from "./wopee_fetch_analysis_suites/index.js";
10
- import { wopeeGenerateUserStories } from "./wopee_generate_user_stories/index.js";
11
- import { wopeeFetchGeneralUserStories } from "./wopee_fetch_general_user_stories/index.js";
12
- import { wopeeGenerateGeneralUserStories } from "./wopee_generate_general_user_stories/index.js";
13
7
  export const TOOLS = [
8
+ wopeeFetchAnalysisSuites,
14
9
  wopeeDispatchAnalysis,
15
10
  wopeeDispatchAgent,
16
- wopeeGenerateAppContext,
17
- wopeeGenerateGeneralUserStories,
18
- wopeeGenerateUserStories,
19
- wopeeGenerateTestCases,
20
- wopeeFetchAnalysisSuites,
21
- wopeeFetchAppContext,
22
- wopeeFetchGeneralUserStories,
23
- wopeeFetchUserStories,
24
- wopeeFetchTestCases,
11
+ wopeeFetchFile,
25
12
  wopeeUpdateFile,
13
+ wopeeGenerateFile,
26
14
  ];
@@ -38,6 +38,6 @@ export const createUpdateFileInput = (input) => {
38
38
  bucket: input.bucket,
39
39
  projectUuid: WOPEE_PROJECT_UUID,
40
40
  suiteUuid: input.suiteUuid,
41
- [input.type === "markdown" ? "code" : "json"]: input.fileContent,
41
+ [input.outputType === "markdown" ? "code" : "json"]: input.fileContent,
42
42
  };
43
43
  };
@@ -28,7 +28,7 @@ function parseFileType(type) {
28
28
  query: GenerateAppContext,
29
29
  dataKey: "generateAppContext",
30
30
  bucket: Bucket.APP_CONTEXT,
31
- type: "markdown",
31
+ outputType: "markdown",
32
32
  description: "application's context markdown file for selected suite",
33
33
  };
34
34
  case FileType.GENERAL_USER_STORIES:
@@ -36,7 +36,7 @@ function parseFileType(type) {
36
36
  query: GenerateGeneralUserStories,
37
37
  dataKey: "generateGeneralUserStories",
38
38
  bucket: Bucket.GENERAL_USER_STORIES,
39
- type: "markdown",
39
+ outputType: "markdown",
40
40
  description: "general user stories markdown file for selected suite",
41
41
  };
42
42
  case FileType.USER_STORIES:
@@ -44,7 +44,7 @@ function parseFileType(type) {
44
44
  query: GenerateUserStories,
45
45
  dataKey: "generateUserStories",
46
46
  bucket: Bucket.USER_STORIES,
47
- type: "json",
47
+ outputType: "json",
48
48
  description: "user stories JSON file for selected suite",
49
49
  };
50
50
  case FileType.TEST_CASES:
@@ -52,7 +52,7 @@ function parseFileType(type) {
52
52
  query: GenerateTestCases,
53
53
  dataKey: "generateTestCases",
54
54
  bucket: Bucket.USER_STORIES,
55
- type: "json",
55
+ outputType: "json",
56
56
  description: "test cases for selected suite",
57
57
  };
58
58
  default:
@@ -60,14 +60,27 @@ function parseFileType(type) {
60
60
  query: null,
61
61
  dataKey: null,
62
62
  bucket: null,
63
- type: null,
63
+ outputType: null,
64
64
  description: null,
65
65
  };
66
66
  }
67
67
  }
68
68
  export async function fetchFile(input) {
69
69
  try {
70
- const fetchFileInput = createFetchFileInput(input);
70
+ const { bucket, description } = parseFileType(input.fileType);
71
+ if (!bucket || !description)
72
+ return {
73
+ content: [
74
+ {
75
+ type: "text",
76
+ text: "Failed to parse file type",
77
+ },
78
+ ],
79
+ };
80
+ const fetchFileInput = createFetchFileInput({
81
+ bucket,
82
+ suiteUuid: input.suiteUuid,
83
+ });
71
84
  const parsedInput = FetchFileInputSchema.parse(fetchFileInput);
72
85
  const result = await requestClient(FetchFile, parsedInput);
73
86
  if (!result || !result.fetchFile)
@@ -92,8 +105,8 @@ export async function fetchFile(input) {
92
105
  return parseError(error);
93
106
  }
94
107
  }
95
- export async function generateAIDataFile(type, input) {
96
- const { query, dataKey, bucket, description } = parseFileType(type);
108
+ export async function generateAIDataFile(input) {
109
+ const { query, dataKey, bucket, description } = parseFileType(input.fileType);
97
110
  if (!query || !dataKey || !description || !bucket)
98
111
  return {
99
112
  content: [
@@ -120,7 +133,7 @@ export async function generateAIDataFile(type, input) {
120
133
  };
121
134
  return await fetchFile({
122
135
  suiteUuid: parsedInput.suiteUuid,
123
- bucket,
136
+ fileType: input.fileType,
124
137
  });
125
138
  }
126
139
  catch (error) {
@@ -129,8 +142,8 @@ export async function generateAIDataFile(type, input) {
129
142
  }
130
143
  export async function updateFile(input) {
131
144
  try {
132
- const { bucket, type } = parseFileType(input.fileType);
133
- if (!bucket || !type)
145
+ const { bucket, outputType } = parseFileType(input.fileType);
146
+ if (!bucket || !outputType)
134
147
  return {
135
148
  content: [
136
149
  {
@@ -140,8 +153,8 @@ export async function updateFile(input) {
140
153
  ],
141
154
  };
142
155
  const updateFileInput = createUpdateFileInput({
143
- type,
144
156
  bucket,
157
+ outputType,
145
158
  suiteUuid: input.suiteUuid,
146
159
  fileContent: input.fileContent,
147
160
  });
@@ -15,8 +15,11 @@ export const SuiteAnalysisConfigSchema = z.object({
15
15
  additionalVariables: z.string().nullable().default(null),
16
16
  });
17
17
  export const GenerateAIDataHandlerInputSchema = z.object({
18
+ fileType: z.nativeEnum(FileType, {
19
+ description: "Chosen type of file(artifact) to generate",
20
+ }),
18
21
  suiteUuid: z
19
- .string({ description: "UUID of the suite to generate AI data for" })
22
+ .string({ description: "UUID of the suite to generate file(artifact) for" })
20
23
  .min(1, "Suite UUID is required"),
21
24
  });
22
25
  export const GenerateAIDataInputSchema = z.object({
@@ -29,6 +32,9 @@ export const GenerateAIDataInputSchema = z.object({
29
32
  continueGeneration: z.boolean().nullish().default(false),
30
33
  });
31
34
  export const FetchFileHandlerInputSchema = z.object({
35
+ fileType: z.nativeEnum(FileType, {
36
+ description: "Chosen file(artifact) to fetch",
37
+ }),
32
38
  suiteUuid: z
33
39
  .string({ description: "UUID of the suite to fetch the file from" })
34
40
  .min(1, "Suite UUID is required"),
@@ -44,10 +50,10 @@ export const FetchFileInputSchema = z.object({
44
50
  });
45
51
  export const UpdateFileHandlerInputSchema = z.object({
46
52
  fileType: z.nativeEnum(FileType, {
47
- description: "Chosen file/artifact to update",
53
+ description: "Chosen file(artifact) to update",
48
54
  }),
49
55
  fileContent: z.string({
50
- description: "Content of the file/artifact to update",
56
+ description: "Content of the file(artifact) to update",
51
57
  }),
52
58
  suiteUuid: z
53
59
  .string({ description: "UUID of the suite to update the file for" })
@@ -57,7 +63,7 @@ export const UpdateFileFactoryInputSchema = z.object({
57
63
  bucket: z.nativeEnum(Bucket),
58
64
  suiteUuid: z.string().min(1, "Suite UUID is required"),
59
65
  fileContent: z.string(),
60
- type: z.enum(["markdown", "json"]),
66
+ outputType: z.enum(["markdown", "json"]),
61
67
  });
62
68
  export const UpdateFileInputSchema = z.object({
63
69
  projectUuid: z.string().min(1, "Project UUID is required"),
@@ -1,17 +1,11 @@
1
1
  export var ToolName;
2
2
  (function (ToolName) {
3
+ ToolName["WOPEE_FETCH_ANALYSIS_SUITES"] = "wopee_fetch_analysis_suites";
3
4
  ToolName["WOPEE_DISPATCH_ANALYSIS"] = "wopee_dispatch_analysis";
4
5
  ToolName["WOPEE_DISPATCH_AGENT"] = "wopee_dispatch_agent";
5
- ToolName["WOPEE_FETCH_ANALYSIS_SUITES"] = "wopee_fetch_analysis_suites";
6
- ToolName["WOPEE_FETCH_APP_CONTEXT"] = "wopee_fetch_app_context";
7
- ToolName["WOPEE_FETCH_GENERAL_USER_STORIES"] = "wopee_fetch_general_user_stories";
8
- ToolName["WOPEE_FETCH_USER_STORIES"] = "wopee_fetch_user_stories";
9
- ToolName["WOPEE_FETCH_TEST_CASES"] = "wopee_fetch_test_cases";
10
- ToolName["WOPEE_GENERATE_APP_CONTEXT"] = "wopee_generate_app_context";
11
- ToolName["WOPEE_GENERATE_GENERAL_USER_STORIES"] = "wopee_generate_general_user_stories";
12
- ToolName["WOPEE_GENERATE_USER_STORIES"] = "wopee_generate_user_stories";
13
- ToolName["WOPEE_GENERATE_TEST_CASES"] = "wopee_generate_test_cases";
6
+ ToolName["WOPEE_FETCH_FILE"] = "wopee_fetch_file";
14
7
  ToolName["WOPEE_UPDATE_FILE"] = "wopee_update_file";
8
+ ToolName["WOPEE_GENERATE_FILE"] = "wopee_generate_file";
15
9
  })(ToolName || (ToolName = {}));
16
10
  export const Bucket = {
17
11
  APP_CONTEXT: "project-suite-app-context",
@@ -0,0 +1,12 @@
1
+ import { FetchFileHandlerInputSchema, } from "../shared/schemas.js";
2
+ import { ToolName } from "../shared/types.js";
3
+ import { fetchFile } from "../shared/handlers.js";
4
+ export const wopeeFetchFile = {
5
+ name: ToolName.WOPEE_FETCH_FILE,
6
+ config: {
7
+ title: "Fetch file(artifact)",
8
+ description: "Fetch suite's file(artifact) for selected project",
9
+ inputSchema: FetchFileHandlerInputSchema.shape,
10
+ },
11
+ handler: async (input) => await fetchFile(input),
12
+ };
@@ -0,0 +1,12 @@
1
+ import { GenerateAIDataHandlerInputSchema, } from "../shared/schemas.js";
2
+ import { ToolName } from "../shared/types.js";
3
+ import { generateAIDataFile } from "../shared/handlers.js";
4
+ export const wopeeGenerateFile = {
5
+ name: ToolName.WOPEE_GENERATE_FILE,
6
+ config: {
7
+ title: "Generate file(artifact)",
8
+ description: "Generate AI data file for selected suite",
9
+ inputSchema: GenerateAIDataHandlerInputSchema.shape,
10
+ },
11
+ handler: async (input) => await generateAIDataFile(input),
12
+ };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "bin": {
5
5
  "wopee-mcp": "./build/index.js"
6
6
  },
7
- "version": "1.4.0",
7
+ "version": "1.5.1",
8
8
  "description": "Wopee.io MCP server",
9
9
  "main": "./build/index.js",
10
10
  "scripts": {
@@ -1,15 +0,0 @@
1
- import { FetchFileHandlerInputSchema, } from "../shared/schemas.js";
2
- import { fetchFile } from "../shared/handlers.js";
3
- import { Bucket, ToolName } from "../shared/types.js";
4
- export const wopeeFetchAppContext = {
5
- name: ToolName.WOPEE_FETCH_APP_CONTEXT,
6
- config: {
7
- title: "Fetch app context",
8
- description: "Fetch suite's application context markdown file for selected project",
9
- inputSchema: FetchFileHandlerInputSchema.shape,
10
- },
11
- handler: async (input) => await fetchFile({
12
- ...input,
13
- bucket: Bucket.APP_CONTEXT,
14
- }),
15
- };
@@ -1,15 +0,0 @@
1
- import { FetchFileHandlerInputSchema, } from "../shared/schemas.js";
2
- import { fetchFile } from "../shared/handlers.js";
3
- import { Bucket, ToolName } from "../shared/types.js";
4
- export const wopeeFetchGeneralUserStories = {
5
- name: ToolName.WOPEE_FETCH_GENERAL_USER_STORIES,
6
- config: {
7
- title: "Fetch general user stories",
8
- description: "Fetch suite's general user stories markdown file for selected project",
9
- inputSchema: FetchFileHandlerInputSchema.shape,
10
- },
11
- handler: async (input) => await fetchFile({
12
- ...input,
13
- bucket: Bucket.GENERAL_USER_STORIES,
14
- }),
15
- };
@@ -1,15 +0,0 @@
1
- import { FetchFileHandlerInputSchema, } from "../shared/schemas.js";
2
- import { fetchFile } from "../shared/handlers.js";
3
- import { Bucket, ToolName } from "../shared/types.js";
4
- export const wopeeFetchTestCases = {
5
- name: ToolName.WOPEE_FETCH_TEST_CASES,
6
- config: {
7
- title: "Fetch test cases",
8
- description: "Fetch suite's test cases JSON file for selected project",
9
- inputSchema: FetchFileHandlerInputSchema.shape,
10
- },
11
- handler: async (input) => await fetchFile({
12
- ...input,
13
- bucket: Bucket.USER_STORIES,
14
- }),
15
- };
@@ -1,15 +0,0 @@
1
- import { FetchFileHandlerInputSchema, } from "../shared/schemas.js";
2
- import { fetchFile } from "../shared/handlers.js";
3
- import { Bucket, ToolName } from "../shared/types.js";
4
- export const wopeeFetchUserStories = {
5
- name: ToolName.WOPEE_FETCH_USER_STORIES,
6
- config: {
7
- title: "Fetch user stories",
8
- description: "Fetch suite's user stories JSON file for selected project",
9
- inputSchema: FetchFileHandlerInputSchema.shape,
10
- },
11
- handler: async (input) => await fetchFile({
12
- ...input,
13
- bucket: Bucket.USER_STORIES,
14
- }),
15
- };
@@ -1,12 +0,0 @@
1
- import { GenerateAIDataHandlerInputSchema, } from "../shared/schemas.js";
2
- import { FileType, ToolName } from "../shared/types.js";
3
- import { generateAIDataFile } from "../shared/handlers.js";
4
- export const wopeeGenerateAppContext = {
5
- name: ToolName.WOPEE_GENERATE_APP_CONTEXT,
6
- config: {
7
- title: "Generate app context",
8
- description: "Generate application's context markdown file for selected suite",
9
- inputSchema: GenerateAIDataHandlerInputSchema.shape,
10
- },
11
- handler: async (input) => await generateAIDataFile(FileType.APP_CONTEXT, input),
12
- };
@@ -1,12 +0,0 @@
1
- import { GenerateAIDataHandlerInputSchema, } from "../shared/schemas.js";
2
- import { FileType, ToolName } from "../shared/types.js";
3
- import { generateAIDataFile } from "../shared/handlers.js";
4
- export const wopeeGenerateGeneralUserStories = {
5
- name: ToolName.WOPEE_GENERATE_GENERAL_USER_STORIES,
6
- config: {
7
- title: "Generate general user stories",
8
- description: "Generate general user stories markdown file for selected suite",
9
- inputSchema: GenerateAIDataHandlerInputSchema.shape,
10
- },
11
- handler: async (input) => await generateAIDataFile(FileType.GENERAL_USER_STORIES, input),
12
- };
@@ -1,12 +0,0 @@
1
- import { GenerateAIDataHandlerInputSchema, } from "../shared/schemas.js";
2
- import { FileType, ToolName } from "../shared/types.js";
3
- import { generateAIDataFile } from "../shared/handlers.js";
4
- export const wopeeGenerateTestCases = {
5
- name: ToolName.WOPEE_GENERATE_TEST_CASES,
6
- config: {
7
- title: "Generate test cases",
8
- description: "Generate test cases for selected suite",
9
- inputSchema: GenerateAIDataHandlerInputSchema.shape,
10
- },
11
- handler: async (input) => await generateAIDataFile(FileType.TEST_CASES, input),
12
- };
@@ -1,12 +0,0 @@
1
- import { GenerateAIDataHandlerInputSchema, } from "../shared/schemas.js";
2
- import { FileType, ToolName } from "../shared/types.js";
3
- import { generateAIDataFile } from "../shared/handlers.js";
4
- export const wopeeGenerateUserStories = {
5
- name: ToolName.WOPEE_GENERATE_USER_STORIES,
6
- config: {
7
- title: "Generate user stories",
8
- description: "Generate user stories JSON file for selected suite",
9
- inputSchema: GenerateAIDataHandlerInputSchema.shape,
10
- },
11
- handler: async (input) => await generateAIDataFile(FileType.USER_STORIES, input),
12
- };