@debugg-ai/debugg-ai-mcp 2.9.3 → 2.9.7
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/services/workflows.js +23 -10
- package/package.json +5 -1
|
@@ -15,18 +15,31 @@ const EXECUTION_TIMEOUT_MS = 10 * 60 * 1000; // 10 min
|
|
|
15
15
|
export const createWorkflowsService = (tx) => {
|
|
16
16
|
const service = {
|
|
17
17
|
async findTemplateByName(keyword) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
// Narrow server-side with `search` AND walk every page. The backend caps
|
|
19
|
+
// the page size (it ignores page_size), so reading only page 1 silently
|
|
20
|
+
// hides templates that sort later — that bug made check_app_in_browser
|
|
21
|
+
// fail in prod because "App Evaluation Workflow Template" sat on page 2.
|
|
22
|
+
// `search` collapses the candidate set to one page on backends that
|
|
23
|
+
// support it; `page` paging is the fallback for those that ignore it.
|
|
22
24
|
const needle = keyword.toLowerCase();
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
const seenNames = [];
|
|
26
|
+
const MAX_PAGES = 50; // safety valve against a backend that always returns `next`
|
|
27
|
+
for (let page = 1; page <= MAX_PAGES; page++) {
|
|
28
|
+
const response = await tx.get('api/v1/workflows/', { isTemplate: true, search: keyword, page });
|
|
29
|
+
const templates = response?.results ?? [];
|
|
30
|
+
for (const t of templates) {
|
|
31
|
+
seenNames.push(t.name);
|
|
32
|
+
if (t.name.toLowerCase().includes(needle))
|
|
33
|
+
return t;
|
|
34
|
+
}
|
|
35
|
+
if (!response?.next)
|
|
36
|
+
break;
|
|
28
37
|
}
|
|
29
|
-
|
|
38
|
+
if (seenNames.length === 0)
|
|
39
|
+
return null;
|
|
40
|
+
throw new Error(`No workflow template matching "${keyword}" found. ` +
|
|
41
|
+
`Available templates: ${seenNames.map(n => `"${n}"`).join(', ')}. ` +
|
|
42
|
+
`Ensure the backend has a template with "${keyword}" in its name.`);
|
|
30
43
|
},
|
|
31
44
|
async findEvaluationTemplate() {
|
|
32
45
|
// 'app evaluation workflow' is specific enough to skip 'App Evaluation Brain'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@debugg-ai/debugg-ai-mcp",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.7",
|
|
4
4
|
"description": "Zero-Config, Fully AI-Managed End-to-End Testing for all code gen platforms.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -48,6 +48,10 @@
|
|
|
48
48
|
],
|
|
49
49
|
"author": "Quinn Osha",
|
|
50
50
|
"license": "Apache-2.0",
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "git+https://github.com/debugg-ai/debugg-ai-mcp.git"
|
|
54
|
+
},
|
|
51
55
|
"homepage": "https://debugg.ai",
|
|
52
56
|
"bugs": "https://github.com/debugg-ai/debugg-ai-mcp/issues",
|
|
53
57
|
"changelog": "https://github.com/debugg-ai/debugg-ai-mcp/CHANGELOG.md",
|