@exaudeus/workrail 0.0.10 → 0.0.12
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/application/services/enhanced-error-service.d.ts +81 -0
- package/dist/application/services/enhanced-error-service.d.ts.map +1 -0
- package/dist/application/services/enhanced-error-service.js +215 -0
- package/dist/application/services/enhanced-error-service.js.map +1 -0
- package/dist/application/use-cases/validate-workflow-json.d.ts.map +1 -1
- package/dist/application/use-cases/validate-workflow-json.js +2 -43
- package/dist/application/use-cases/validate-workflow-json.js.map +1 -1
- package/dist/application/validation.d.ts.map +1 -1
- package/dist/application/validation.js +2 -1
- package/dist/application/validation.js.map +1 -1
- package/dist/mcp-server.js +94 -7
- package/dist/mcp-server.js.map +1 -1
- package/dist/types/session-types.d.ts +354 -0
- package/dist/types/session-types.d.ts.map +1 -0
- package/dist/types/session-types.js +89 -0
- package/dist/types/session-types.js.map +1 -0
- package/package.json +1 -1
- package/workflows/systemic-bug-investigation.json +190 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ErrorObject } from 'ajv';
|
|
2
|
+
/**
|
|
3
|
+
* Enhanced Error Service
|
|
4
|
+
*
|
|
5
|
+
* Transforms AJV error objects into extremely specific, user-friendly error messages
|
|
6
|
+
* that provide exact field names, locations, and actionable guidance.
|
|
7
|
+
*
|
|
8
|
+
* Based on comprehensive error structure analysis confirming:
|
|
9
|
+
* - 100% of additionalProperties errors provide exact field names
|
|
10
|
+
* - 82% of errors have meaningful instance paths for location tracking
|
|
11
|
+
* - Complete parameter information for all error types
|
|
12
|
+
*/
|
|
13
|
+
export declare class EnhancedErrorService {
|
|
14
|
+
/**
|
|
15
|
+
* Transform AJV errors into enhanced, user-friendly messages
|
|
16
|
+
* @param errors Array of AJV ErrorObject instances
|
|
17
|
+
* @returns Array of enhanced error messages with specific details
|
|
18
|
+
*/
|
|
19
|
+
static enhanceErrors(errors: ErrorObject[]): string[];
|
|
20
|
+
/**
|
|
21
|
+
* Prioritize errors by severity and importance
|
|
22
|
+
* Critical: additionalProperties, required fields
|
|
23
|
+
* High: type mismatches, pattern violations
|
|
24
|
+
* Medium: array/object constraints
|
|
25
|
+
* Low: schema composition errors
|
|
26
|
+
*/
|
|
27
|
+
private static prioritizeErrors;
|
|
28
|
+
/**
|
|
29
|
+
* Transform a single AJV error into an enhanced message
|
|
30
|
+
*/
|
|
31
|
+
private static transformError;
|
|
32
|
+
/**
|
|
33
|
+
* Convert instancePath to human-readable location description
|
|
34
|
+
*/
|
|
35
|
+
private static getLocationDescription;
|
|
36
|
+
/**
|
|
37
|
+
* Handle additionalProperties errors - our primary target
|
|
38
|
+
* These provide exact field names via params.additionalProperty
|
|
39
|
+
*/
|
|
40
|
+
private static handleAdditionalProperties;
|
|
41
|
+
/**
|
|
42
|
+
* Handle required field errors
|
|
43
|
+
* These provide missing field names via params.missingProperty
|
|
44
|
+
*/
|
|
45
|
+
private static handleRequired;
|
|
46
|
+
/**
|
|
47
|
+
* Handle type mismatch errors
|
|
48
|
+
* These provide expected type via params.type
|
|
49
|
+
*/
|
|
50
|
+
private static handleType;
|
|
51
|
+
/**
|
|
52
|
+
* Handle pattern validation errors
|
|
53
|
+
* These provide the regex pattern via params.pattern
|
|
54
|
+
*/
|
|
55
|
+
private static handlePattern;
|
|
56
|
+
/**
|
|
57
|
+
* Handle minimum items array errors
|
|
58
|
+
*/
|
|
59
|
+
private static handleMinItems;
|
|
60
|
+
/**
|
|
61
|
+
* Handle maximum items array errors
|
|
62
|
+
*/
|
|
63
|
+
private static handleMaxItems;
|
|
64
|
+
/**
|
|
65
|
+
* Handle enum validation errors
|
|
66
|
+
*/
|
|
67
|
+
private static handleEnum;
|
|
68
|
+
/**
|
|
69
|
+
* Handle oneOf schema composition errors
|
|
70
|
+
*/
|
|
71
|
+
private static handleOneOf;
|
|
72
|
+
/**
|
|
73
|
+
* Handle anyOf schema composition errors
|
|
74
|
+
*/
|
|
75
|
+
private static handleAnyOf;
|
|
76
|
+
/**
|
|
77
|
+
* Handle generic/unknown error types
|
|
78
|
+
*/
|
|
79
|
+
private static handleGeneric;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=enhanced-error-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enhanced-error-service.d.ts","sourceRoot":"","sources":["../../../src/application/services/enhanced-error-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAElC;;;;;;;;;;GAUG;AACH,qBAAa,oBAAoB;IAC/B;;;;OAIG;WACW,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,EAAE;IAW5D;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAsB/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IA2B7B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAsCrC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,0BAA0B;IASzC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAS7B;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;IASzB;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAS5B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAS7B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAS7B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;IASzB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAI1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAI1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;CAG7B"}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnhancedErrorService = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Enhanced Error Service
|
|
6
|
+
*
|
|
7
|
+
* Transforms AJV error objects into extremely specific, user-friendly error messages
|
|
8
|
+
* that provide exact field names, locations, and actionable guidance.
|
|
9
|
+
*
|
|
10
|
+
* Based on comprehensive error structure analysis confirming:
|
|
11
|
+
* - 100% of additionalProperties errors provide exact field names
|
|
12
|
+
* - 82% of errors have meaningful instance paths for location tracking
|
|
13
|
+
* - Complete parameter information for all error types
|
|
14
|
+
*/
|
|
15
|
+
class EnhancedErrorService {
|
|
16
|
+
/**
|
|
17
|
+
* Transform AJV errors into enhanced, user-friendly messages
|
|
18
|
+
* @param errors Array of AJV ErrorObject instances
|
|
19
|
+
* @returns Array of enhanced error messages with specific details
|
|
20
|
+
*/
|
|
21
|
+
static enhanceErrors(errors) {
|
|
22
|
+
if (!errors || errors.length === 0) {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
// Sort errors by priority: Critical -> High -> Medium -> Low
|
|
26
|
+
const prioritizedErrors = this.prioritizeErrors(errors);
|
|
27
|
+
return prioritizedErrors.map(error => this.transformError(error));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Prioritize errors by severity and importance
|
|
31
|
+
* Critical: additionalProperties, required fields
|
|
32
|
+
* High: type mismatches, pattern violations
|
|
33
|
+
* Medium: array/object constraints
|
|
34
|
+
* Low: schema composition errors
|
|
35
|
+
*/
|
|
36
|
+
static prioritizeErrors(errors) {
|
|
37
|
+
const priority = {
|
|
38
|
+
additionalProperties: 1, // Critical - exact field name available
|
|
39
|
+
required: 1, // Critical - missing required field
|
|
40
|
+
type: 2, // High - type mismatch
|
|
41
|
+
pattern: 2, // High - pattern violation
|
|
42
|
+
minItems: 3, // Medium - array constraints
|
|
43
|
+
maxItems: 3, // Medium - array constraints
|
|
44
|
+
minProperties: 3, // Medium - object constraints
|
|
45
|
+
maxProperties: 3, // Medium - object constraints
|
|
46
|
+
oneOf: 4, // Low - schema composition
|
|
47
|
+
anyOf: 4, // Low - schema composition
|
|
48
|
+
allOf: 4, // Low - schema composition
|
|
49
|
+
};
|
|
50
|
+
return errors.sort((a, b) => {
|
|
51
|
+
const aPriority = priority[a.keyword] || 5;
|
|
52
|
+
const bPriority = priority[b.keyword] || 5;
|
|
53
|
+
return aPriority - bPriority;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Transform a single AJV error into an enhanced message
|
|
58
|
+
*/
|
|
59
|
+
static transformError(error) {
|
|
60
|
+
const location = this.getLocationDescription(error.instancePath);
|
|
61
|
+
switch (error.keyword) {
|
|
62
|
+
case 'additionalProperties':
|
|
63
|
+
return this.handleAdditionalProperties(error, location);
|
|
64
|
+
case 'required':
|
|
65
|
+
return this.handleRequired(error, location);
|
|
66
|
+
case 'type':
|
|
67
|
+
return this.handleType(error, location);
|
|
68
|
+
case 'pattern':
|
|
69
|
+
return this.handlePattern(error, location);
|
|
70
|
+
case 'minItems':
|
|
71
|
+
return this.handleMinItems(error, location);
|
|
72
|
+
case 'maxItems':
|
|
73
|
+
return this.handleMaxItems(error, location);
|
|
74
|
+
case 'enum':
|
|
75
|
+
return this.handleEnum(error, location);
|
|
76
|
+
case 'oneOf':
|
|
77
|
+
return this.handleOneOf(error, location);
|
|
78
|
+
case 'anyOf':
|
|
79
|
+
return this.handleAnyOf(error, location);
|
|
80
|
+
default:
|
|
81
|
+
return this.handleGeneric(error, location);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Convert instancePath to human-readable location description
|
|
86
|
+
*/
|
|
87
|
+
static getLocationDescription(instancePath) {
|
|
88
|
+
if (!instancePath || instancePath === '') {
|
|
89
|
+
return 'at root level';
|
|
90
|
+
}
|
|
91
|
+
// Remove leading slash
|
|
92
|
+
const path = instancePath.startsWith('/') ? instancePath.slice(1) : instancePath;
|
|
93
|
+
// Convert paths to human-readable descriptions
|
|
94
|
+
if (path === 'name')
|
|
95
|
+
return "in field 'name'";
|
|
96
|
+
if (path === 'description')
|
|
97
|
+
return "in field 'description'";
|
|
98
|
+
if (path === 'version')
|
|
99
|
+
return "in field 'version'";
|
|
100
|
+
if (path === 'steps')
|
|
101
|
+
return "in 'steps' array";
|
|
102
|
+
// Handle array indices: /steps/0 -> "in step 1"
|
|
103
|
+
const stepMatch = path.match(/^steps\/(\d+)$/);
|
|
104
|
+
if (stepMatch && stepMatch[1]) {
|
|
105
|
+
return `in step ${parseInt(stepMatch[1]) + 1}`;
|
|
106
|
+
}
|
|
107
|
+
// Handle nested step properties: /steps/0/name -> "in step 1, field 'name'"
|
|
108
|
+
const stepFieldMatch = path.match(/^steps\/(\d+)\/(.+)$/);
|
|
109
|
+
if (stepFieldMatch && stepFieldMatch[1] && stepFieldMatch[2]) {
|
|
110
|
+
const stepNumber = parseInt(stepFieldMatch[1]) + 1;
|
|
111
|
+
const fieldPath = stepFieldMatch[2];
|
|
112
|
+
// Handle validation criteria paths
|
|
113
|
+
if (fieldPath.startsWith('validationCriteria/')) {
|
|
114
|
+
return `in step ${stepNumber}, validation criteria`;
|
|
115
|
+
}
|
|
116
|
+
return `in step ${stepNumber}, field '${fieldPath}'`;
|
|
117
|
+
}
|
|
118
|
+
// Fallback: return cleaned path
|
|
119
|
+
return `at '${path.replace(/\//g, '.')}'`;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Handle additionalProperties errors - our primary target
|
|
123
|
+
* These provide exact field names via params.additionalProperty
|
|
124
|
+
*/
|
|
125
|
+
static handleAdditionalProperties(error, location) {
|
|
126
|
+
const fieldName = error.params?.['additionalProperty'];
|
|
127
|
+
if (!fieldName) {
|
|
128
|
+
return `Unexpected property found ${location}. Please check the workflow schema for allowed properties.`;
|
|
129
|
+
}
|
|
130
|
+
return `Unexpected property '${fieldName}' found ${location}. This property is not defined in the workflow schema. Please remove it or check for typos.`;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Handle required field errors
|
|
134
|
+
* These provide missing field names via params.missingProperty
|
|
135
|
+
*/
|
|
136
|
+
static handleRequired(error, location) {
|
|
137
|
+
const missingField = error.params?.['missingProperty'];
|
|
138
|
+
if (!missingField) {
|
|
139
|
+
return `Missing required field ${location}. Please check the workflow schema for required properties.`;
|
|
140
|
+
}
|
|
141
|
+
return `Missing required field '${missingField}' ${location}. This field is mandatory and must be provided.`;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Handle type mismatch errors
|
|
145
|
+
* These provide expected type via params.type
|
|
146
|
+
*/
|
|
147
|
+
static handleType(error, location) {
|
|
148
|
+
const expectedType = error.params?.['type'];
|
|
149
|
+
if (!expectedType) {
|
|
150
|
+
return `Invalid data type ${location}. Please check the expected type in the workflow schema.`;
|
|
151
|
+
}
|
|
152
|
+
return `Invalid data type ${location}. Expected '${expectedType}' but received a different type.`;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Handle pattern validation errors
|
|
156
|
+
* These provide the regex pattern via params.pattern
|
|
157
|
+
*/
|
|
158
|
+
static handlePattern(error, location) {
|
|
159
|
+
const pattern = error.params?.['pattern'];
|
|
160
|
+
if (!pattern) {
|
|
161
|
+
return `Value ${location} does not match the required pattern format.`;
|
|
162
|
+
}
|
|
163
|
+
return `Value ${location} does not match the required pattern: ${pattern}`;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Handle minimum items array errors
|
|
167
|
+
*/
|
|
168
|
+
static handleMinItems(error, location) {
|
|
169
|
+
const minItems = error.params?.['limit'];
|
|
170
|
+
if (minItems === undefined) {
|
|
171
|
+
return `Array ${location} has too few items.`;
|
|
172
|
+
}
|
|
173
|
+
return `Array ${location} must contain at least ${minItems} item(s).`;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Handle maximum items array errors
|
|
177
|
+
*/
|
|
178
|
+
static handleMaxItems(error, location) {
|
|
179
|
+
const maxItems = error.params?.['limit'];
|
|
180
|
+
if (maxItems === undefined) {
|
|
181
|
+
return `Array ${location} has too many items.`;
|
|
182
|
+
}
|
|
183
|
+
return `Array ${location} must contain no more than ${maxItems} item(s).`;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Handle enum validation errors
|
|
187
|
+
*/
|
|
188
|
+
static handleEnum(error, location) {
|
|
189
|
+
const allowedValues = error.params?.['allowedValues'];
|
|
190
|
+
if (!allowedValues || !Array.isArray(allowedValues)) {
|
|
191
|
+
return `Value ${location} is not one of the allowed values.`;
|
|
192
|
+
}
|
|
193
|
+
return `Value ${location} must be one of: ${allowedValues.map(v => `'${v}'`).join(', ')}`;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Handle oneOf schema composition errors
|
|
197
|
+
*/
|
|
198
|
+
static handleOneOf(_error, location) {
|
|
199
|
+
return `Value ${location} must match exactly one of the allowed schema patterns. Please check the workflow schema for valid formats.`;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Handle anyOf schema composition errors
|
|
203
|
+
*/
|
|
204
|
+
static handleAnyOf(_error, location) {
|
|
205
|
+
return `Value ${location} must match at least one of the allowed schema patterns. Please check the workflow schema for valid formats.`;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Handle generic/unknown error types
|
|
209
|
+
*/
|
|
210
|
+
static handleGeneric(error, location) {
|
|
211
|
+
return `Validation error ${location}: ${error.message || 'Unknown validation error'}`;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
exports.EnhancedErrorService = EnhancedErrorService;
|
|
215
|
+
//# sourceMappingURL=enhanced-error-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enhanced-error-service.js","sourceRoot":"","sources":["../../../src/application/services/enhanced-error-service.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;GAUG;AACH,MAAa,oBAAoB;IAC/B;;;;OAIG;IACI,MAAM,CAAC,aAAa,CAAC,MAAqB;QAC/C,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE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@
|
|
|
1
|
-
{"version":3,"file":"validate-workflow-json.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/validate-workflow-json.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,KAEtC,cAAc,MAAM,KACnB,OAAO,CAAC,4BAA4B,CAAC,
|
|
1
|
+
{"version":3,"file":"validate-workflow-json.d.ts","sourceRoot":"","sources":["../../../src/application/use-cases/validate-workflow-json.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,KAEtC,cAAc,MAAM,KACnB,OAAO,CAAC,4BAA4B,CAAC,CA2DzC;AAiDD;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,4BAA4B,CAAC,CAEvC"}
|
|
@@ -50,10 +50,8 @@ function createValidateWorkflowJson() {
|
|
|
50
50
|
const issues = [];
|
|
51
51
|
const suggestions = [];
|
|
52
52
|
if (!validationResult.valid) {
|
|
53
|
-
//
|
|
54
|
-
validationResult.errors
|
|
55
|
-
issues.push(enhanceErrorMessage(error));
|
|
56
|
-
});
|
|
53
|
+
// Validation errors are already enhanced by the EnhancedErrorService
|
|
54
|
+
issues.push(...validationResult.errors);
|
|
57
55
|
// Add general suggestions based on common validation errors
|
|
58
56
|
suggestions.push(...generateSuggestions(validationResult.errors));
|
|
59
57
|
}
|
|
@@ -64,45 +62,6 @@ function createValidateWorkflowJson() {
|
|
|
64
62
|
};
|
|
65
63
|
};
|
|
66
64
|
}
|
|
67
|
-
/**
|
|
68
|
-
* Enhance error messages to be more user-friendly for LLM consumption
|
|
69
|
-
*/
|
|
70
|
-
function enhanceErrorMessage(error) {
|
|
71
|
-
// Handle common AJV error patterns and make them more descriptive
|
|
72
|
-
if (error.includes('must have required property')) {
|
|
73
|
-
const match = error.match(/must have required property '(.+)'/);
|
|
74
|
-
if (match) {
|
|
75
|
-
const property = match[1];
|
|
76
|
-
return `Missing required field '${property}'. This field is mandatory for all workflows.`;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
if (error.includes('must be string')) {
|
|
80
|
-
return `${error} - Expected a text value enclosed in quotes.`;
|
|
81
|
-
}
|
|
82
|
-
if (error.includes('must be array')) {
|
|
83
|
-
return `${error} - Expected a list of items enclosed in square brackets [].`;
|
|
84
|
-
}
|
|
85
|
-
if (error.includes('must be object')) {
|
|
86
|
-
return `${error} - Expected a JSON object enclosed in curly braces {}.`;
|
|
87
|
-
}
|
|
88
|
-
if (error.includes('must match pattern')) {
|
|
89
|
-
return `${error} - The value does not match the required format or pattern.`;
|
|
90
|
-
}
|
|
91
|
-
if (error.includes('must NOT have additional properties')) {
|
|
92
|
-
return `Unexpected property found. Remove this property or check for typos.`;
|
|
93
|
-
}
|
|
94
|
-
if (error.includes('additionalProperties')) {
|
|
95
|
-
return `${error} - Remove any unexpected properties or check for typos.`;
|
|
96
|
-
}
|
|
97
|
-
if (error.includes('must be >= 1')) {
|
|
98
|
-
return `${error} - Value must be at least 1.`;
|
|
99
|
-
}
|
|
100
|
-
if (error.includes('must be <= ')) {
|
|
101
|
-
return `${error} - Value exceeds the maximum allowed length.`;
|
|
102
|
-
}
|
|
103
|
-
// Return original error if no specific enhancement is available
|
|
104
|
-
return error;
|
|
105
|
-
}
|
|
106
65
|
/**
|
|
107
66
|
* Generate actionable suggestions based on validation errors
|
|
108
67
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-workflow-json.js","sourceRoot":"","sources":["../../../src/application/use-cases/validate-workflow-json.ts"],"names":[],"mappings":";;AAeA,
|
|
1
|
+
{"version":3,"file":"validate-workflow-json.js","sourceRoot":"","sources":["../../../src/application/use-cases/validate-workflow-json.ts"],"names":[],"mappings":";;AAeA,gEA8DC;AAqDD,oDAIC;AAtID,8CAA2E;AAW3E;;;GAGG;AACH,SAAgB,0BAA0B;IACxC,OAAO,KAAK,EACV,YAAoB,EACmB,EAAE;QACzC,8CAA8C;QAC9C,IAAI,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,SAAS,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE,CAAC;YAC5F,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,CAAC,yDAAyD,CAAC;gBACnE,WAAW,EAAE,CAAC,8CAA8C,CAAC;aAC9D,CAAC;QACJ,CAAC;QAED,qCAAqC;QACrC,MAAM,WAAW,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC;QACxC,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,CAAC,iCAAiC,CAAC;gBAC3C,WAAW,EAAE,CAAC,8CAA8C,CAAC;aAC9D,CAAC;QACJ,CAAC;QAED,0CAA0C;QAC1C,IAAI,cAAuB,CAAC;QAC5B,IAAI,CAAC;YACH,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAC3C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,4BAA4B,CAAC;YAC3F,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,CAAC,wBAAwB,YAAY,EAAE,CAAC;gBAChD,WAAW,EAAE;oBACX,4DAA4D;oBAC5D,yCAAyC;oBACzC,uDAAuD;oBACvD,8DAA8D;iBAC/D;aAC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AAC;IAED,IAAI,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAChC,WAAW,CAAC,IAAI,CAAC,8EAA8E,CAAC,CAAC;IACnG,CAAC;IAED,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/B,WAAW,CAAC,IAAI,CAAC,mEAAmE,CAAC,CAAC;IACxF,CAAC;IAED,IAAI,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAClC,WAAW,CAAC,IAAI,CAAC,qEAAqE,CAAC,CAAC;IAC1F,CAAC;IAED,yDAAyD;IACzD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,WAAW,CAAC,IAAI,CAAC,gFAAgF,CAAC,CAAC;QACnG,WAAW,CAAC,IAAI,CAAC,oEAAoE,CAAC,CAAC;IACzF,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,oBAAoB,CACxC,YAAoB;IAEpB,OAAO,0BAA0B,EAAE,CAAC,YAAY,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/application/validation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/application/validation.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,OAAO,GAAG,wBAAwB,CAM5E"}
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
6
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
7
|
const ajv_1 = tslib_1.__importDefault(require("ajv"));
|
|
8
|
+
const enhanced_error_service_1 = require("./services/enhanced-error-service");
|
|
8
9
|
const schemaPath = path_1.default.resolve(__dirname, '../../spec/workflow.schema.json');
|
|
9
10
|
const schema = JSON.parse(fs_1.default.readFileSync(schemaPath, 'utf-8'));
|
|
10
11
|
const ajv = new ajv_1.default({ allErrors: true, strict: false });
|
|
@@ -13,7 +14,7 @@ function validateWorkflow(workflow) {
|
|
|
13
14
|
const ok = validate(workflow);
|
|
14
15
|
return {
|
|
15
16
|
valid: Boolean(ok),
|
|
16
|
-
errors: ok ? [] : (validate.errors || [])
|
|
17
|
+
errors: ok ? [] : enhanced_error_service_1.EnhancedErrorService.enhanceErrors(validate.errors || [])
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
//# sourceMappingURL=validation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/application/validation.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/application/validation.ts"],"names":[],"mappings":";;AAeA,4CAMC;;AArBD,oDAAoB;AACpB,wDAAwB;AACxB,sDAAsB;AACtB,8EAAyE;AAEzE,MAAM,UAAU,GAAG,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,iCAAiC,CAAC,CAAC;AAC9E,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAE,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;AAChE,MAAM,GAAG,GAAG,IAAI,aAAG,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AACxD,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAOrC,SAAgB,gBAAgB,CAAC,QAAiB;IAChD,MAAM,EAAE,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC9B,OAAO;QACL,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC;QAClB,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,6CAAoB,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,IAAI,EAAE,CAAC;KAC5E,CAAC;AACJ,CAAC"}
|
package/dist/mcp-server.js
CHANGED
|
@@ -54,7 +54,10 @@ class WorkflowOrchestrationServer {
|
|
|
54
54
|
result = { workflows };
|
|
55
55
|
break;
|
|
56
56
|
case 'workflow_get':
|
|
57
|
-
|
|
57
|
+
// Import and use the get workflow use case to handle mode parameter
|
|
58
|
+
const { createGetWorkflow } = await Promise.resolve().then(() => __importStar(require('./application/use-cases/get-workflow.js')));
|
|
59
|
+
const getWorkflowUseCase = createGetWorkflow(workflowService);
|
|
60
|
+
result = await getWorkflowUseCase(params.id, params.mode);
|
|
58
61
|
break;
|
|
59
62
|
case 'workflow_next':
|
|
60
63
|
result = await workflowService.getNextStep(params.workflowId, params.completedSteps || [], params.context);
|
|
@@ -127,6 +130,64 @@ class WorkflowOrchestrationServer {
|
|
|
127
130
|
};
|
|
128
131
|
}
|
|
129
132
|
}
|
|
133
|
+
async getWorkflowSchema() {
|
|
134
|
+
try {
|
|
135
|
+
// Import fs and path for schema loading
|
|
136
|
+
const fs = await Promise.resolve().then(() => __importStar(require('fs')));
|
|
137
|
+
const path = await Promise.resolve().then(() => __importStar(require('path')));
|
|
138
|
+
// Load the workflow schema
|
|
139
|
+
const schemaPath = path.resolve(__dirname, '../spec/workflow.schema.json');
|
|
140
|
+
const schemaContent = fs.readFileSync(schemaPath, 'utf-8');
|
|
141
|
+
const schema = JSON.parse(schemaContent);
|
|
142
|
+
// Add helpful metadata
|
|
143
|
+
const result = {
|
|
144
|
+
schema,
|
|
145
|
+
metadata: {
|
|
146
|
+
version: '1.0.0',
|
|
147
|
+
description: 'Complete JSON schema for workflow files',
|
|
148
|
+
usage: 'This schema defines the structure, required fields, and validation rules for workflow JSON files',
|
|
149
|
+
lastUpdated: new Date().toISOString(),
|
|
150
|
+
schemaPath: 'spec/workflow.schema.json'
|
|
151
|
+
},
|
|
152
|
+
commonPatterns: {
|
|
153
|
+
basicWorkflow: {
|
|
154
|
+
id: 'string (required): Unique identifier using lowercase letters, numbers, and hyphens',
|
|
155
|
+
name: 'string (required): Human-readable workflow name',
|
|
156
|
+
description: 'string (required): Detailed description of the workflow purpose',
|
|
157
|
+
version: 'string (required): Semantic version (e.g., "1.0.0")',
|
|
158
|
+
steps: 'array (required): List of workflow steps, minimum 1 item'
|
|
159
|
+
},
|
|
160
|
+
stepStructure: {
|
|
161
|
+
id: 'string (required): Unique step identifier',
|
|
162
|
+
title: 'string (required): Human-readable step title',
|
|
163
|
+
prompt: 'string (required): Instructions for the step',
|
|
164
|
+
agentRole: 'string (required): Role description for the agent',
|
|
165
|
+
validationCriteria: 'array (optional): Validation rules for step output'
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
return {
|
|
170
|
+
content: [{
|
|
171
|
+
type: "text",
|
|
172
|
+
text: JSON.stringify(result, null, 2)
|
|
173
|
+
}]
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
catch (error) {
|
|
177
|
+
console.error(`Workflow schema retrieval failed:`, error);
|
|
178
|
+
return {
|
|
179
|
+
content: [{
|
|
180
|
+
type: "text",
|
|
181
|
+
text: JSON.stringify({
|
|
182
|
+
error: error instanceof Error ? error.message : String(error),
|
|
183
|
+
method: 'workflow_get_schema',
|
|
184
|
+
suggestion: 'Ensure the workflow schema file exists at spec/workflow.schema.json'
|
|
185
|
+
}, null, 2)
|
|
186
|
+
}],
|
|
187
|
+
isError: true
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
}
|
|
130
191
|
}
|
|
131
192
|
// Define the workflow orchestration tools
|
|
132
193
|
const WORKFLOW_LIST_TOOL = {
|
|
@@ -150,7 +211,7 @@ const WORKFLOW_GET_TOOL = {
|
|
|
150
211
|
inputSchema: {
|
|
151
212
|
type: "object",
|
|
152
213
|
properties: {
|
|
153
|
-
|
|
214
|
+
id: {
|
|
154
215
|
type: "string",
|
|
155
216
|
description: "The unique identifier of the workflow to retrieve",
|
|
156
217
|
pattern: "^[A-Za-z0-9_-]+$"
|
|
@@ -162,7 +223,7 @@ const WORKFLOW_GET_TOOL = {
|
|
|
162
223
|
default: "preview"
|
|
163
224
|
}
|
|
164
225
|
},
|
|
165
|
-
required: ["
|
|
226
|
+
required: ["id"],
|
|
166
227
|
additionalProperties: false
|
|
167
228
|
}
|
|
168
229
|
};
|
|
@@ -250,6 +311,29 @@ const WORKFLOW_VALIDATE_JSON_TOOL = {
|
|
|
250
311
|
additionalProperties: false
|
|
251
312
|
}
|
|
252
313
|
};
|
|
314
|
+
const WORKFLOW_GET_SCHEMA_TOOL = {
|
|
315
|
+
name: "workflow_get_schema",
|
|
316
|
+
description: `Retrieves the complete workflow JSON schema for reference and development purposes. Use this tool when you need to understand the structure, required fields, and validation rules for workflows.
|
|
317
|
+
|
|
318
|
+
This tool provides:
|
|
319
|
+
- Complete JSON schema definition with all properties and constraints
|
|
320
|
+
- Field descriptions and validation rules
|
|
321
|
+
- Examples of valid patterns and formats
|
|
322
|
+
- Schema version and metadata information
|
|
323
|
+
- Comprehensive reference for workflow structure
|
|
324
|
+
|
|
325
|
+
Example usage:
|
|
326
|
+
- Understanding workflow structure before creating new workflows
|
|
327
|
+
- Checking required fields and their types
|
|
328
|
+
- Verifying validation rules and constraints
|
|
329
|
+
- Reference during workflow development and debugging
|
|
330
|
+
- Learning about available workflow features and options`,
|
|
331
|
+
inputSchema: {
|
|
332
|
+
type: "object",
|
|
333
|
+
properties: {},
|
|
334
|
+
additionalProperties: false
|
|
335
|
+
}
|
|
336
|
+
};
|
|
253
337
|
// Create and configure the MCP server
|
|
254
338
|
const server = new index_js_1.Server({
|
|
255
339
|
name: "workflow-orchestration-server",
|
|
@@ -267,7 +351,8 @@ server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => ({
|
|
|
267
351
|
WORKFLOW_GET_TOOL,
|
|
268
352
|
WORKFLOW_NEXT_TOOL,
|
|
269
353
|
WORKFLOW_VALIDATE_TOOL,
|
|
270
|
-
WORKFLOW_VALIDATE_JSON_TOOL
|
|
354
|
+
WORKFLOW_VALIDATE_JSON_TOOL,
|
|
355
|
+
WORKFLOW_GET_SCHEMA_TOOL
|
|
271
356
|
],
|
|
272
357
|
}));
|
|
273
358
|
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
@@ -276,13 +361,13 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
|
276
361
|
case "workflow_list":
|
|
277
362
|
return await workflowServer.listWorkflows();
|
|
278
363
|
case "workflow_get":
|
|
279
|
-
if (!args?.['
|
|
364
|
+
if (!args?.['id']) {
|
|
280
365
|
return {
|
|
281
|
-
content: [{ type: "text", text: "Error:
|
|
366
|
+
content: [{ type: "text", text: "Error: id parameter is required" }],
|
|
282
367
|
isError: true
|
|
283
368
|
};
|
|
284
369
|
}
|
|
285
|
-
return await workflowServer.getWorkflow(args['
|
|
370
|
+
return await workflowServer.getWorkflow(args['id'], args['mode']);
|
|
286
371
|
case "workflow_next":
|
|
287
372
|
if (!args?.['workflowId']) {
|
|
288
373
|
return {
|
|
@@ -307,6 +392,8 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
|
307
392
|
};
|
|
308
393
|
}
|
|
309
394
|
return await workflowServer.validateWorkflowJson(args['workflowJson']);
|
|
395
|
+
case "workflow_get_schema":
|
|
396
|
+
return await workflowServer.getWorkflowSchema();
|
|
310
397
|
default:
|
|
311
398
|
return {
|
|
312
399
|
content: [{ type: "text", text: `Unknown tool: ${name}` }],
|
package/dist/mcp-server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,w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