mcp4openapi 0.1.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/LICENSE.md +7 -0
- package/README.md +489 -0
- package/dist/composite-executor.d.ts +65 -0
- package/dist/composite-executor.d.ts.map +1 -0
- package/dist/composite-executor.js +147 -0
- package/dist/composite-executor.js.map +1 -0
- package/dist/constants.d.ts +36 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +36 -0
- package/dist/constants.js.map +1 -0
- package/dist/http-transport.d.ts +195 -0
- package/dist/http-transport.d.ts.map +1 -0
- package/dist/http-transport.js +760 -0
- package/dist/http-transport.js.map +1 -0
- package/dist/interceptors.d.ts +74 -0
- package/dist/interceptors.d.ts.map +1 -0
- package/dist/interceptors.js +220 -0
- package/dist/interceptors.js.map +1 -0
- package/dist/logger.d.ts +81 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +264 -0
- package/dist/logger.js.map +1 -0
- package/dist/mcp-server.d.ts +110 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +568 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/metrics.d.ts +86 -0
- package/dist/metrics.d.ts.map +1 -0
- package/dist/metrics.js +229 -0
- package/dist/metrics.js.map +1 -0
- package/dist/openapi-parser.d.ts +35 -0
- package/dist/openapi-parser.d.ts.map +1 -0
- package/dist/openapi-parser.js +160 -0
- package/dist/openapi-parser.js.map +1 -0
- package/dist/profile-loader.d.ts +25 -0
- package/dist/profile-loader.d.ts.map +1 -0
- package/dist/profile-loader.js +134 -0
- package/dist/profile-loader.js.map +1 -0
- package/dist/schema-validator.d.ts +32 -0
- package/dist/schema-validator.d.ts.map +1 -0
- package/dist/schema-validator.js +126 -0
- package/dist/schema-validator.js.map +1 -0
- package/dist/scripts/validate-profile.d.ts +9 -0
- package/dist/scripts/validate-profile.d.ts.map +1 -0
- package/dist/scripts/validate-profile.js +289 -0
- package/dist/scripts/validate-profile.js.map +1 -0
- package/dist/scripts/validate-schema.d.ts +9 -0
- package/dist/scripts/validate-schema.d.ts.map +1 -0
- package/dist/scripts/validate-schema.js +84 -0
- package/dist/scripts/validate-schema.js.map +1 -0
- package/dist/src/composite-executor.d.ts +75 -0
- package/dist/src/composite-executor.d.ts.map +1 -0
- package/dist/src/composite-executor.js +175 -0
- package/dist/src/composite-executor.js.map +1 -0
- package/dist/src/constants.d.ts +36 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/constants.js +36 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/dag-executor.d.ts +49 -0
- package/dist/src/dag-executor.d.ts.map +1 -0
- package/dist/src/dag-executor.js +138 -0
- package/dist/src/dag-executor.js.map +1 -0
- package/dist/src/errors.d.ts +47 -0
- package/dist/src/errors.d.ts.map +1 -0
- package/dist/src/errors.js +99 -0
- package/dist/src/errors.js.map +1 -0
- package/dist/src/generated-schemas.d.ts +661 -0
- package/dist/src/generated-schemas.d.ts.map +1 -0
- package/dist/src/generated-schemas.js +66 -0
- package/dist/src/generated-schemas.js.map +1 -0
- package/dist/src/http-client-factory.d.ts +62 -0
- package/dist/src/http-client-factory.d.ts.map +1 -0
- package/dist/src/http-client-factory.js +121 -0
- package/dist/src/http-client-factory.js.map +1 -0
- package/dist/src/http-transport.d.ts +194 -0
- package/dist/src/http-transport.d.ts.map +1 -0
- package/dist/src/http-transport.js +851 -0
- package/dist/src/http-transport.js.map +1 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +59 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/interceptors.d.ts +78 -0
- package/dist/src/interceptors.d.ts.map +1 -0
- package/dist/src/interceptors.js +252 -0
- package/dist/src/interceptors.js.map +1 -0
- package/dist/src/jsonrpc-validator.d.ts +27 -0
- package/dist/src/jsonrpc-validator.d.ts.map +1 -0
- package/dist/src/jsonrpc-validator.js +58 -0
- package/dist/src/jsonrpc-validator.js.map +1 -0
- package/dist/src/lib.d.ts +8 -0
- package/dist/src/lib.d.ts.map +1 -0
- package/dist/src/lib.js +7 -0
- package/dist/src/lib.js.map +1 -0
- package/dist/src/logger.d.ts +81 -0
- package/dist/src/logger.d.ts.map +1 -0
- package/dist/src/logger.js +264 -0
- package/dist/src/logger.js.map +1 -0
- package/dist/src/mcp-server.d.ts +117 -0
- package/dist/src/mcp-server.d.ts.map +1 -0
- package/dist/src/mcp-server.js +621 -0
- package/dist/src/mcp-server.js.map +1 -0
- package/dist/src/metrics.d.ts +86 -0
- package/dist/src/metrics.d.ts.map +1 -0
- package/dist/src/metrics.js +229 -0
- package/dist/src/metrics.js.map +1 -0
- package/dist/src/naming-warnings.d.ts +23 -0
- package/dist/src/naming-warnings.d.ts.map +1 -0
- package/dist/src/naming-warnings.js +83 -0
- package/dist/src/naming-warnings.js.map +1 -0
- package/dist/src/naming.d.ts +58 -0
- package/dist/src/naming.d.ts.map +1 -0
- package/dist/src/naming.js +510 -0
- package/dist/src/naming.js.map +1 -0
- package/dist/src/openapi-parser.d.ts +49 -0
- package/dist/src/openapi-parser.d.ts.map +1 -0
- package/dist/src/openapi-parser.js +216 -0
- package/dist/src/openapi-parser.js.map +1 -0
- package/dist/src/profile-loader.d.ts +77 -0
- package/dist/src/profile-loader.d.ts.map +1 -0
- package/dist/src/profile-loader.js +443 -0
- package/dist/src/profile-loader.js.map +1 -0
- package/dist/src/schema-validator.d.ts +30 -0
- package/dist/src/schema-validator.d.ts.map +1 -0
- package/dist/src/schema-validator.js +115 -0
- package/dist/src/schema-validator.js.map +1 -0
- package/dist/src/testing/fixtures.d.ts +268 -0
- package/dist/src/testing/fixtures.d.ts.map +1 -0
- package/dist/src/testing/fixtures.js +210 -0
- package/dist/src/testing/fixtures.js.map +1 -0
- package/dist/src/testing/mock-gitlab-server.d.ts +34 -0
- package/dist/src/testing/mock-gitlab-server.d.ts.map +1 -0
- package/dist/src/testing/mock-gitlab-server.js +351 -0
- package/dist/src/testing/mock-gitlab-server.js.map +1 -0
- package/dist/src/testing/mock-utils.d.ts +41 -0
- package/dist/src/testing/mock-utils.d.ts.map +1 -0
- package/dist/src/testing/mock-utils.js +59 -0
- package/dist/src/testing/mock-utils.js.map +1 -0
- package/dist/src/testing/test-http-utils.d.ts +52 -0
- package/dist/src/testing/test-http-utils.d.ts.map +1 -0
- package/dist/src/testing/test-http-utils.js +109 -0
- package/dist/src/testing/test-http-utils.js.map +1 -0
- package/dist/src/testing/test-types.d.ts +76 -0
- package/dist/src/testing/test-types.d.ts.map +1 -0
- package/dist/src/testing/test-types.js +7 -0
- package/dist/src/testing/test-types.js.map +1 -0
- package/dist/src/tool-generator.d.ts +43 -0
- package/dist/src/tool-generator.d.ts.map +1 -0
- package/dist/src/tool-generator.js +123 -0
- package/dist/src/tool-generator.js.map +1 -0
- package/dist/src/types/http-transport.d.ts +45 -0
- package/dist/src/types/http-transport.d.ts.map +1 -0
- package/dist/src/types/http-transport.js +8 -0
- package/dist/src/types/http-transport.js.map +1 -0
- package/dist/src/types/openapi.d.ts +50 -0
- package/dist/src/types/openapi.d.ts.map +1 -0
- package/dist/src/types/openapi.js +9 -0
- package/dist/src/types/openapi.js.map +1 -0
- package/dist/src/types/profile.d.ts +80 -0
- package/dist/src/types/profile.d.ts.map +1 -0
- package/dist/src/types/profile.js +9 -0
- package/dist/src/types/profile.js.map +1 -0
- package/dist/src/validation-utils.d.ts +15 -0
- package/dist/src/validation-utils.d.ts.map +1 -0
- package/dist/src/validation-utils.js +25 -0
- package/dist/src/validation-utils.js.map +1 -0
- package/dist/testing/fixtures.d.ts +186 -0
- package/dist/testing/fixtures.d.ts.map +1 -0
- package/dist/testing/fixtures.js +135 -0
- package/dist/testing/fixtures.js.map +1 -0
- package/dist/testing/http-integration.test.d.ts +7 -0
- package/dist/testing/http-integration.test.d.ts.map +1 -0
- package/dist/testing/http-integration.test.js +383 -0
- package/dist/testing/http-integration.test.js.map +1 -0
- package/dist/testing/http-multiuser.test.d.ts +10 -0
- package/dist/testing/http-multiuser.test.d.ts.map +1 -0
- package/dist/testing/http-multiuser.test.js +255 -0
- package/dist/testing/http-multiuser.test.js.map +1 -0
- package/dist/testing/integration.test.d.ts +8 -0
- package/dist/testing/integration.test.d.ts.map +1 -0
- package/dist/testing/integration.test.js +247 -0
- package/dist/testing/integration.test.js.map +1 -0
- package/dist/testing/mock-gitlab-server.d.ts +34 -0
- package/dist/testing/mock-gitlab-server.d.ts.map +1 -0
- package/dist/testing/mock-gitlab-server.js +224 -0
- package/dist/testing/mock-gitlab-server.js.map +1 -0
- package/dist/testing/test-types.d.ts +59 -0
- package/dist/testing/test-types.d.ts.map +1 -0
- package/dist/testing/test-types.js +7 -0
- package/dist/testing/test-types.js.map +1 -0
- package/dist/tool-generator.d.ts +43 -0
- package/dist/tool-generator.d.ts.map +1 -0
- package/dist/tool-generator.js +123 -0
- package/dist/tool-generator.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/http-transport.d.ts +39 -0
- package/dist/types/http-transport.d.ts.map +1 -0
- package/dist/types/http-transport.js +8 -0
- package/dist/types/http-transport.js.map +1 -0
- package/dist/types/openapi.d.ts +50 -0
- package/dist/types/openapi.d.ts.map +1 -0
- package/dist/types/openapi.js +9 -0
- package/dist/types/openapi.js.map +1 -0
- package/dist/types/profile.d.ts +76 -0
- package/dist/types/profile.d.ts.map +1 -0
- package/dist/types/profile.js +9 -0
- package/dist/types/profile.js.map +1 -0
- package/package.json +84 -0
- package/profile-schema.json +369 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composite action executor for chaining API calls
|
|
3
|
+
*
|
|
4
|
+
* Why: Reduces roundtrips by fetching related data in sequence (e.g., MR + comments).
|
|
5
|
+
* Aggregates results into single JSON structure as defined by store_as paths.
|
|
6
|
+
*/
|
|
7
|
+
import { DAGExecutor } from './dag-executor.js';
|
|
8
|
+
export class CompositeExecutor {
|
|
9
|
+
parser;
|
|
10
|
+
httpClient;
|
|
11
|
+
constructor(parser, httpClient) {
|
|
12
|
+
this.parser = parser;
|
|
13
|
+
this.httpClient = httpClient;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Execute a series of API calls and merge results
|
|
17
|
+
*
|
|
18
|
+
* Why parallel: Steps may have dependencies, but independent steps can run concurrently.
|
|
19
|
+
* Uses DAG analysis to determine safe parallelization while maintaining correctness.
|
|
20
|
+
*
|
|
21
|
+
* Supports partial results: If allowPartial=true, continues after errors and returns
|
|
22
|
+
* what was completed. Useful for composite actions where some data is better than none.
|
|
23
|
+
*/
|
|
24
|
+
async execute(steps, args, allowPartial = false, httpClient) {
|
|
25
|
+
// Analyze DAG and get execution levels
|
|
26
|
+
const executionLevels = DAGExecutor.topologicalSort(steps);
|
|
27
|
+
const result = {};
|
|
28
|
+
const errors = [];
|
|
29
|
+
let completedSteps = 0;
|
|
30
|
+
// Execute level by level (each level can run in parallel)
|
|
31
|
+
for (const level of executionLevels) {
|
|
32
|
+
// Execute all steps in current level concurrently
|
|
33
|
+
const levelPromises = level.steps.map((step, levelIndex) => this.executeStep(step, level.stepIndices[levelIndex], args, httpClient));
|
|
34
|
+
// Wait for all steps in this level to complete
|
|
35
|
+
const levelResults = await Promise.allSettled(levelPromises);
|
|
36
|
+
// Process results
|
|
37
|
+
for (let i = 0; i < levelResults.length; i++) {
|
|
38
|
+
const promiseResult = levelResults[i];
|
|
39
|
+
const step = level.steps[i];
|
|
40
|
+
const originalStepIndex = level.stepIndices[i];
|
|
41
|
+
if (promiseResult.status === 'fulfilled') {
|
|
42
|
+
// Step completed successfully
|
|
43
|
+
const response = promiseResult.value;
|
|
44
|
+
this.storeResult(result, step.store_as, response.body);
|
|
45
|
+
completedSteps++;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
// Step failed
|
|
49
|
+
const error = promiseResult.reason;
|
|
50
|
+
const stepError = {
|
|
51
|
+
step_index: originalStepIndex,
|
|
52
|
+
step_call: step.call,
|
|
53
|
+
error: error instanceof Error ? error.message : String(error),
|
|
54
|
+
timestamp: new Date().toISOString(),
|
|
55
|
+
};
|
|
56
|
+
errors.push(stepError);
|
|
57
|
+
// Store error in result for debugging
|
|
58
|
+
this.storeResult(result, `${step.store_as}_error`, stepError);
|
|
59
|
+
if (!allowPartial) {
|
|
60
|
+
throw new Error(`Composite step ${originalStepIndex + 1}/${steps.length} failed: ${stepError.error}\n` +
|
|
61
|
+
`Completed steps: ${completedSteps}\n` +
|
|
62
|
+
`Failed step: ${step.call}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
data: result,
|
|
69
|
+
completed_steps: completedSteps,
|
|
70
|
+
total_steps: steps.length,
|
|
71
|
+
errors: errors.length > 0 ? errors : undefined,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Execute single composite step (extracted for parallel execution)
|
|
76
|
+
*
|
|
77
|
+
* @param step The composite step to execute
|
|
78
|
+
* @param stepIndex Original index for error reporting
|
|
79
|
+
* @param args Arguments for parameter substitution
|
|
80
|
+
* @param httpClient Optional HTTP client override
|
|
81
|
+
* @returns Promise resolving to HTTP response
|
|
82
|
+
*/
|
|
83
|
+
async executeStep(step, stepIndex, args, httpClient) {
|
|
84
|
+
const { method, path, operation } = this.parseCall(step.call);
|
|
85
|
+
if (!operation) {
|
|
86
|
+
throw new Error(`Operation not found for call: ${step.call}`);
|
|
87
|
+
}
|
|
88
|
+
// Substitute path parameters from args
|
|
89
|
+
const resolvedPath = this.resolvePath(path, args);
|
|
90
|
+
// Execute request
|
|
91
|
+
const client = httpClient || this.httpClient;
|
|
92
|
+
if (!client) {
|
|
93
|
+
throw new Error('HTTP client not provided');
|
|
94
|
+
}
|
|
95
|
+
const response = await client.request(method, resolvedPath, {
|
|
96
|
+
params: this.extractQueryParams(operation, args),
|
|
97
|
+
operationId: operation.operationId,
|
|
98
|
+
});
|
|
99
|
+
return response;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Parse composite step call syntax
|
|
103
|
+
*
|
|
104
|
+
* Format: "GET /projects/{id}/merge_requests/{iid}"
|
|
105
|
+
*/
|
|
106
|
+
parseCall(call) {
|
|
107
|
+
const [method, path] = call.split(' ');
|
|
108
|
+
const pathInfo = this.parser.getPath(path);
|
|
109
|
+
const operation = pathInfo?.operations[method.toLowerCase()];
|
|
110
|
+
return { method, path, operation };
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Resolve path template with actual values
|
|
114
|
+
*
|
|
115
|
+
* Example: "/projects/{id}" + {id: "123"} => "/projects/123"
|
|
116
|
+
*/
|
|
117
|
+
resolvePath(template, args) {
|
|
118
|
+
return template.replace(/\{(\w+)\}/g, (_, key) => {
|
|
119
|
+
const value = args[key];
|
|
120
|
+
if (value === undefined) {
|
|
121
|
+
throw new Error(`Missing path parameter: ${key}`);
|
|
122
|
+
}
|
|
123
|
+
return String(value);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Extract query parameters from args based on operation definition
|
|
128
|
+
*/
|
|
129
|
+
extractQueryParams(operation, args) {
|
|
130
|
+
const params = {};
|
|
131
|
+
for (const param of operation.parameters) {
|
|
132
|
+
if (param.in === 'query' && args[param.name] !== undefined) {
|
|
133
|
+
const value = args[param.name];
|
|
134
|
+
// Pass arrays as-is for HttpClient serialization
|
|
135
|
+
if (Array.isArray(value)) {
|
|
136
|
+
params[param.name] = value.map(String);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
params[param.name] = String(value);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return params;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Store value at JSONPath-like location
|
|
147
|
+
*
|
|
148
|
+
* Why nested: Allows semantic structure (comments belong under merge_request object).
|
|
149
|
+
*
|
|
150
|
+
* Examples:
|
|
151
|
+
* - "merge_request" => { merge_request: value }
|
|
152
|
+
* - "merge_request.comments" => { merge_request: { comments: value } }
|
|
153
|
+
*
|
|
154
|
+
* Validates path navigation to prevent overwriting non-object values.
|
|
155
|
+
*/
|
|
156
|
+
storeResult(target, path, value) {
|
|
157
|
+
const parts = path.split('.');
|
|
158
|
+
let current = target;
|
|
159
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
160
|
+
const part = parts[i];
|
|
161
|
+
const existing = current[part];
|
|
162
|
+
// Validate we can navigate through this path
|
|
163
|
+
if (existing !== undefined && (typeof existing !== 'object' || existing === null)) {
|
|
164
|
+
throw new Error(`Cannot store at path '${path}': ` +
|
|
165
|
+
`'${parts.slice(0, i + 1).join('.')}' is ${typeof existing}, not an object`);
|
|
166
|
+
}
|
|
167
|
+
if (!current[part]) {
|
|
168
|
+
current[part] = {};
|
|
169
|
+
}
|
|
170
|
+
current = current[part];
|
|
171
|
+
}
|
|
172
|
+
current[parts[parts.length - 1]] = value;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=composite-executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composite-executor.js","sourceRoot":"","sources":["../../src/composite-executor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAE,WAAW,EAAuB,MAAM,mBAAmB,CAAC;AAgBrE,MAAM,OAAO,iBAAiB;IAElB;IACA;IAFV,YACU,MAAqB,EACrB,UAAuB;QADvB,WAAM,GAAN,MAAM,CAAe;QACrB,eAAU,GAAV,UAAU,CAAa;IAC9B,CAAC;IAEJ;;;;;;;;OAQG;IACH,KAAK,CAAC,OAAO,CACX,KAAsB,EACtB,IAA6B,EAC7B,eAAwB,KAAK,EAC7B,UAAuB;QAEvB,uCAAuC;QACvC,MAAM,eAAe,GAAG,WAAW,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAE3D,MAAM,MAAM,GAA4B,EAAE,CAAC;QAC3C,MAAM,MAAM,GAAgB,E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,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,OAAO,QAAQ,iBAAiB,CAC5E,CAAC;YACJ,CAAC;YAED,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;gBACnB,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;YACrB,CAAC;YACD,OAAO,GAAG,OAAO,CAAC,IAAI,CAA4B,CAAC;QACrD,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC3C,CAAC;CACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application constants
|
|
3
|
+
*
|
|
4
|
+
* Why: Centralized constants improve readability and maintainability.
|
|
5
|
+
* Magic numbers scattered through code are harder to understand and change.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Time conversion constants
|
|
9
|
+
*/
|
|
10
|
+
export declare const TIME: {
|
|
11
|
+
readonly MS_PER_SECOND: 1000;
|
|
12
|
+
readonly MS_PER_MINUTE: 60000;
|
|
13
|
+
readonly MS_PER_HOUR: 3600000;
|
|
14
|
+
readonly SECONDS_PER_MINUTE: 60;
|
|
15
|
+
readonly MINUTES_PER_HOUR: 60;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* HTTP status codes
|
|
19
|
+
*
|
|
20
|
+
* Why: Named constants more readable than numeric literals.
|
|
21
|
+
* Makes intent clear (STATUS_TOO_MANY_REQUESTS vs 429).
|
|
22
|
+
*/
|
|
23
|
+
export declare const HTTP_STATUS: {
|
|
24
|
+
readonly OK: 200;
|
|
25
|
+
readonly MULTIPLE_CHOICES: 300;
|
|
26
|
+
readonly BAD_REQUEST: 400;
|
|
27
|
+
readonly UNAUTHORIZED: 401;
|
|
28
|
+
readonly FORBIDDEN: 403;
|
|
29
|
+
readonly NOT_FOUND: 404;
|
|
30
|
+
readonly TOO_MANY_REQUESTS: 429;
|
|
31
|
+
readonly INTERNAL_SERVER_ERROR: 500;
|
|
32
|
+
readonly BAD_GATEWAY: 502;
|
|
33
|
+
readonly SERVICE_UNAVAILABLE: 503;
|
|
34
|
+
readonly GATEWAY_TIMEOUT: 504;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,IAAI;;;;;;CAMP,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;CAYd,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application constants
|
|
3
|
+
*
|
|
4
|
+
* Why: Centralized constants improve readability and maintainability.
|
|
5
|
+
* Magic numbers scattered through code are harder to understand and change.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Time conversion constants
|
|
9
|
+
*/
|
|
10
|
+
export const TIME = {
|
|
11
|
+
MS_PER_SECOND: 1000,
|
|
12
|
+
MS_PER_MINUTE: 60000,
|
|
13
|
+
MS_PER_HOUR: 3600000,
|
|
14
|
+
SECONDS_PER_MINUTE: 60,
|
|
15
|
+
MINUTES_PER_HOUR: 60,
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* HTTP status codes
|
|
19
|
+
*
|
|
20
|
+
* Why: Named constants more readable than numeric literals.
|
|
21
|
+
* Makes intent clear (STATUS_TOO_MANY_REQUESTS vs 429).
|
|
22
|
+
*/
|
|
23
|
+
export const HTTP_STATUS = {
|
|
24
|
+
OK: 200,
|
|
25
|
+
MULTIPLE_CHOICES: 300,
|
|
26
|
+
BAD_REQUEST: 400,
|
|
27
|
+
UNAUTHORIZED: 401,
|
|
28
|
+
FORBIDDEN: 403,
|
|
29
|
+
NOT_FOUND: 404,
|
|
30
|
+
TOO_MANY_REQUESTS: 429,
|
|
31
|
+
INTERNAL_SERVER_ERROR: 500,
|
|
32
|
+
BAD_GATEWAY: 502,
|
|
33
|
+
SERVICE_UNAVAILABLE: 503,
|
|
34
|
+
GATEWAY_TIMEOUT: 504,
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,aAAa,EAAE,IAAI;IACnB,aAAa,EAAE,KAAK;IACpB,WAAW,EAAE,OAAO;IACpB,kBAAkB,EAAE,EAAE;IACtB,gBAAgB,EAAE,EAAE;CACZ,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,EAAE,EAAE,GAAG;IACP,gBAAgB,EAAE,GAAG;IACrB,WAAW,EAAE,GAAG;IAChB,YAAY,EAAE,GAAG;IACjB,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,GAAG;IACd,iBAAiB,EAAE,GAAG;IACtB,qBAAqB,EAAE,GAAG;IAC1B,WAAW,EAAE,GAAG;IAChB,mBAAmB,EAAE,GAAG;IACxB,eAAe,EAAE,GAAG;CACZ,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DAG Execution Engine for Composite Steps
|
|
3
|
+
*
|
|
4
|
+
* Why: Enables parallel execution of independent composite steps
|
|
5
|
+
* while maintaining correct dependency order.
|
|
6
|
+
*
|
|
7
|
+
* Uses Kahn's algorithm for topological sorting - BFS-based approach
|
|
8
|
+
* that detects cycles and determines execution levels.
|
|
9
|
+
*/
|
|
10
|
+
import type { CompositeStep } from './types/profile.js';
|
|
11
|
+
/**
|
|
12
|
+
* Execution level containing steps that can run in parallel
|
|
13
|
+
*/
|
|
14
|
+
export interface ExecutionLevel {
|
|
15
|
+
steps: CompositeStep[];
|
|
16
|
+
stepIndices: number[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Topological sort result for DAG execution
|
|
20
|
+
*/
|
|
21
|
+
export interface TopologicalSortResult {
|
|
22
|
+
levels: ExecutionLevel[];
|
|
23
|
+
hasCycles: boolean;
|
|
24
|
+
errorMessage?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Execute composite steps with DAG-based parallelization
|
|
28
|
+
*
|
|
29
|
+
* Why: Some steps may depend on others (e.g., get MR ID, then fetch comments).
|
|
30
|
+
* Independent steps can run in parallel for better performance.
|
|
31
|
+
*/
|
|
32
|
+
export declare class DAGExecutor {
|
|
33
|
+
/**
|
|
34
|
+
* Sort composite steps into execution levels using Kahn's algorithm
|
|
35
|
+
*
|
|
36
|
+
* @param steps Composite steps with optional depends_on
|
|
37
|
+
* @returns Execution levels where each level can run in parallel
|
|
38
|
+
* @throws Error if cycles detected or invalid dependencies
|
|
39
|
+
*/
|
|
40
|
+
static topologicalSort(steps: CompositeStep[]): ExecutionLevel[];
|
|
41
|
+
/**
|
|
42
|
+
* Analyze DAG structure without throwing
|
|
43
|
+
*
|
|
44
|
+
* @param steps Composite steps to analyze
|
|
45
|
+
* @returns Analysis result with levels or error info
|
|
46
|
+
*/
|
|
47
|
+
static analyzeDAG(steps: CompositeStep[]): TopologicalSortResult;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=dag-executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dag-executor.d.ts","sourceRoot":"","sources":["../../src/dag-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,qBAAa,WAAW;IACtB;;;;;;OAMG;IACH,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,cAAc,EAAE;IAQhE;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,qBAAqB;CAoHjE"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DAG Execution Engine for Composite Steps
|
|
3
|
+
*
|
|
4
|
+
* Why: Enables parallel execution of independent composite steps
|
|
5
|
+
* while maintaining correct dependency order.
|
|
6
|
+
*
|
|
7
|
+
* Uses Kahn's algorithm for topological sorting - BFS-based approach
|
|
8
|
+
* that detects cycles and determines execution levels.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Execute composite steps with DAG-based parallelization
|
|
12
|
+
*
|
|
13
|
+
* Why: Some steps may depend on others (e.g., get MR ID, then fetch comments).
|
|
14
|
+
* Independent steps can run in parallel for better performance.
|
|
15
|
+
*/
|
|
16
|
+
export class DAGExecutor {
|
|
17
|
+
/**
|
|
18
|
+
* Sort composite steps into execution levels using Kahn's algorithm
|
|
19
|
+
*
|
|
20
|
+
* @param steps Composite steps with optional depends_on
|
|
21
|
+
* @returns Execution levels where each level can run in parallel
|
|
22
|
+
* @throws Error if cycles detected or invalid dependencies
|
|
23
|
+
*/
|
|
24
|
+
static topologicalSort(steps) {
|
|
25
|
+
const result = this.analyzeDAG(steps);
|
|
26
|
+
if (result.hasCycles) {
|
|
27
|
+
throw new Error(`DAG analysis failed: ${result.errorMessage}`);
|
|
28
|
+
}
|
|
29
|
+
return result.levels;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Analyze DAG structure without throwing
|
|
33
|
+
*
|
|
34
|
+
* @param steps Composite steps to analyze
|
|
35
|
+
* @returns Analysis result with levels or error info
|
|
36
|
+
*/
|
|
37
|
+
static analyzeDAG(steps) {
|
|
38
|
+
// Build dependency graph and in-degree map
|
|
39
|
+
const graph = new Map(); // node -> list of dependent nodes
|
|
40
|
+
const inDegree = new Map();
|
|
41
|
+
// Initialize all nodes
|
|
42
|
+
for (const step of steps) {
|
|
43
|
+
const node = step.store_as;
|
|
44
|
+
inDegree.set(node, 0);
|
|
45
|
+
if (!graph.has(node)) {
|
|
46
|
+
graph.set(node, []);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
// Build edges and calculate in-degrees
|
|
50
|
+
for (const step of steps) {
|
|
51
|
+
if (step.depends_on) {
|
|
52
|
+
for (const dep of step.depends_on) {
|
|
53
|
+
// Validate dependency exists
|
|
54
|
+
if (!inDegree.has(dep)) {
|
|
55
|
+
return {
|
|
56
|
+
levels: [],
|
|
57
|
+
hasCycles: true,
|
|
58
|
+
errorMessage: `Step '${step.store_as}' depends on '${dep}' but no step produces '${dep}'`
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
// Add edge: dep -> step.store_as
|
|
62
|
+
if (!graph.has(dep)) {
|
|
63
|
+
graph.set(dep, []);
|
|
64
|
+
}
|
|
65
|
+
graph.get(dep).push(step.store_as);
|
|
66
|
+
// Increase in-degree of dependent step
|
|
67
|
+
inDegree.set(step.store_as, inDegree.get(step.store_as) + 1);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// Kahn's algorithm: BFS with in-degree
|
|
72
|
+
const levels = [];
|
|
73
|
+
const queue = [];
|
|
74
|
+
// Start with nodes having in-degree 0 (no dependencies)
|
|
75
|
+
for (const [node, degree] of inDegree) {
|
|
76
|
+
if (degree === 0) {
|
|
77
|
+
queue.push(node);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
// Process queue level by level
|
|
81
|
+
while (queue.length > 0) {
|
|
82
|
+
const currentLevel = [];
|
|
83
|
+
const currentIndices = [];
|
|
84
|
+
const levelSize = queue.length;
|
|
85
|
+
// Process all nodes at current level (can run in parallel)
|
|
86
|
+
for (let i = 0; i < levelSize; i++) {
|
|
87
|
+
const node = queue.shift();
|
|
88
|
+
// Find corresponding step and add to level
|
|
89
|
+
const stepIndex = steps.findIndex(s => s.store_as === node);
|
|
90
|
+
if (stepIndex >= 0) {
|
|
91
|
+
currentLevel.push(steps[stepIndex]);
|
|
92
|
+
currentIndices.push(stepIndex);
|
|
93
|
+
}
|
|
94
|
+
// Decrease in-degree of all dependent nodes
|
|
95
|
+
const neighbors = graph.get(node) || [];
|
|
96
|
+
for (const neighbor of neighbors) {
|
|
97
|
+
const newDegree = inDegree.get(neighbor) - 1;
|
|
98
|
+
inDegree.set(neighbor, newDegree);
|
|
99
|
+
// If in-degree becomes 0, add to next level
|
|
100
|
+
if (newDegree === 0) {
|
|
101
|
+
queue.push(neighbor);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// Add level if it contains steps
|
|
106
|
+
if (currentLevel.length > 0) {
|
|
107
|
+
levels.push({ steps: currentLevel, stepIndices: currentIndices });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// Check for cycles: if not all nodes were processed
|
|
111
|
+
const processedCount = levels.reduce((sum, level) => sum + level.steps.length, 0);
|
|
112
|
+
if (processedCount !== steps.length) {
|
|
113
|
+
// Find unprocessed nodes (part of cycle)
|
|
114
|
+
const processedNodes = new Set();
|
|
115
|
+
for (const level of levels) {
|
|
116
|
+
for (const step of level.steps) {
|
|
117
|
+
processedNodes.add(step.store_as);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
const cycleNodes = [];
|
|
121
|
+
for (const step of steps) {
|
|
122
|
+
if (!processedNodes.has(step.store_as)) {
|
|
123
|
+
cycleNodes.push(step.store_as);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
levels: [],
|
|
128
|
+
hasCycles: true,
|
|
129
|
+
errorMessage: `Circular dependency detected involving: ${cycleNodes.join(', ')}`
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
levels,
|
|
134
|
+
hasCycles: false
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=dag-executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dag-executor.js","sourceRoot":"","sources":["../../src/dag-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAqBH;;;;;GAKG;AACH,MAAM,OAAO,WAAW;IACtB;;;;;;OAMG;IACH,MAAM,CAAC,eAAe,CAAC,KAAsB;QAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACtC,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,wBAAwB,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;QACjE,CAAC;QACD,OAAO,MAAM,CAAC,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,KAAsB;QACtC,2CAA2C;QAC3C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAoB,CAAC,CAAC,kCAAkC;QAC7E,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;QAE3C,uBAAuB;QACvB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC3B,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;gBACrB,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACtB,CAAC;QACH,CAAC;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G,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAClF,IAAI,cAAc,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;YACpC,yCAAyC;YACzC,MAAM,cAAc,GAAG,IAAI,GAAG,EAAU,CAAC;YACzC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;gBAC3B,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;oBAC/B,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACpC,CAAC;YACH,CAAC;YAED,MAAM,UAAU,GAAa,EAAE,CAAC;YAChC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;oBACvC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACjC,CAAC;YACH,CAAC;YAED,OAAO;gBACL,MAAM,EAAE,EAAE;gBACV,SAAS,EAAE,IAAI;gBACf,YAAY,EAAE,2CAA2C,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;aACjF,CAAC;QACJ,CAAC;QAED,OAAO;YACL,MAAM;YACN,SAAS,EAAE,KAAK;SACjB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured error types for MCP server
|
|
3
|
+
*
|
|
4
|
+
* Provides type-safe error handling with machine-readable error codes
|
|
5
|
+
* and structured error details for better debugging and client handling.
|
|
6
|
+
*/
|
|
7
|
+
export declare class MCPError extends Error {
|
|
8
|
+
code: string;
|
|
9
|
+
details?: Record<string, unknown> | undefined;
|
|
10
|
+
constructor(message: string, code: string, details?: Record<string, unknown> | undefined);
|
|
11
|
+
}
|
|
12
|
+
export declare class ValidationError extends MCPError {
|
|
13
|
+
constructor(message: string, details?: Record<string, unknown>);
|
|
14
|
+
}
|
|
15
|
+
export declare class OperationNotFoundError extends MCPError {
|
|
16
|
+
constructor(operationId: string);
|
|
17
|
+
}
|
|
18
|
+
export declare class ParameterError extends MCPError {
|
|
19
|
+
constructor(paramName: string, reason: string);
|
|
20
|
+
}
|
|
21
|
+
export declare class AuthenticationError extends MCPError {
|
|
22
|
+
constructor(message?: string, details?: Record<string, unknown>);
|
|
23
|
+
}
|
|
24
|
+
export declare class AuthorizationError extends MCPError {
|
|
25
|
+
constructor(message?: string);
|
|
26
|
+
}
|
|
27
|
+
export declare class RateLimitError extends MCPError {
|
|
28
|
+
constructor(message: string, retryAfter?: number);
|
|
29
|
+
}
|
|
30
|
+
export declare class NetworkError extends MCPError {
|
|
31
|
+
constructor(message: string, statusCode?: number, details?: Record<string, unknown>);
|
|
32
|
+
}
|
|
33
|
+
export declare class ConfigurationError extends MCPError {
|
|
34
|
+
constructor(message: string, details?: Record<string, unknown>);
|
|
35
|
+
}
|
|
36
|
+
export declare class SessionError extends MCPError {
|
|
37
|
+
constructor(message: string, sessionId?: string);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Helper function to check if an error is an MCPError
|
|
41
|
+
*/
|
|
42
|
+
export declare function isMCPError(error: unknown): error is MCPError;
|
|
43
|
+
/**
|
|
44
|
+
* Helper function to get error details for logging
|
|
45
|
+
*/
|
|
46
|
+
export declare function getErrorDetails(error: unknown): Record<string, unknown>;
|
|
47
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,qBAAa,QAAS,SAAQ,KAAK;IAGxB,IAAI,EAAE,MAAM;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CA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AG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoBvE"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured error types for MCP server
|
|
3
|
+
*
|
|
4
|
+
* Provides type-safe error handling with machine-readable error codes
|
|
5
|
+
* and structured error details for better debugging and client handling.
|
|
6
|
+
*/
|
|
7
|
+
export class MCPError extends Error {
|
|
8
|
+
code;
|
|
9
|
+
details;
|
|
10
|
+
constructor(message, code, details) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.code = code;
|
|
13
|
+
this.details = details;
|
|
14
|
+
this.name = 'MCPError';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export class ValidationError extends MCPError {
|
|
18
|
+
constructor(message, details) {
|
|
19
|
+
super(message, 'VALIDATION_ERROR', details);
|
|
20
|
+
this.name = 'ValidationError';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export class OperationNotFoundError extends MCPError {
|
|
24
|
+
constructor(operationId) {
|
|
25
|
+
super(`Operation not found: ${operationId}`, 'OPERATION_NOT_FOUND', { operationId });
|
|
26
|
+
this.name = 'OperationNotFoundError';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export class ParameterError extends MCPError {
|
|
30
|
+
constructor(paramName, reason) {
|
|
31
|
+
super(`Invalid parameter '${paramName}': ${reason}`, 'PARAMETER_ERROR', { paramName, reason });
|
|
32
|
+
this.name = 'ParameterError';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export class AuthenticationError extends MCPError {
|
|
36
|
+
constructor(message = 'Authentication required', details) {
|
|
37
|
+
super(message, 'AUTHENTICATION_ERROR', details);
|
|
38
|
+
this.name = 'AuthenticationError';
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export class AuthorizationError extends MCPError {
|
|
42
|
+
constructor(message = 'Insufficient permissions') {
|
|
43
|
+
super(message, 'AUTHORIZATION_ERROR');
|
|
44
|
+
this.name = 'AuthorizationError';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export class RateLimitError extends MCPError {
|
|
48
|
+
constructor(message, retryAfter) {
|
|
49
|
+
super(message, 'RATE_LIMIT_EXCEEDED', retryAfter ? { retryAfter } : undefined);
|
|
50
|
+
this.name = 'RateLimitError';
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export class NetworkError extends MCPError {
|
|
54
|
+
constructor(message, statusCode, details) {
|
|
55
|
+
super(message, 'NETWORK_ERROR', { statusCode, ...details });
|
|
56
|
+
this.name = 'NetworkError';
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export class ConfigurationError extends MCPError {
|
|
60
|
+
constructor(message, details) {
|
|
61
|
+
super(message, 'CONFIGURATION_ERROR', details);
|
|
62
|
+
this.name = 'ConfigurationError';
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export class SessionError extends MCPError {
|
|
66
|
+
constructor(message, sessionId) {
|
|
67
|
+
super(message, 'SESSION_ERROR', sessionId ? { sessionId } : undefined);
|
|
68
|
+
this.name = 'SessionError';
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Helper function to check if an error is an MCPError
|
|
73
|
+
*/
|
|
74
|
+
export function isMCPError(error) {
|
|
75
|
+
return error instanceof MCPError;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Helper function to get error details for logging
|
|
79
|
+
*/
|
|
80
|
+
export function getErrorDetails(error) {
|
|
81
|
+
if (isMCPError(error)) {
|
|
82
|
+
return {
|
|
83
|
+
name: error.name,
|
|
84
|
+
code: error.code,
|
|
85
|
+
message: error.message,
|
|
86
|
+
details: error.details,
|
|
87
|
+
stack: error.stack,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
if (error instanceof Error) {
|
|
91
|
+
return {
|
|
92
|
+
name: error.name,
|
|
93
|
+
message: error.message,
|
|
94
|
+
stack: error.stack,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
return { message: String(error) };
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,OAAO,QAAS,SAAQ,KAAK;IAGxB;IACA;IAHT,YACE,OAAe,EACR,IAAY,EACZ,OAAiC;QAExC,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAA0B;QAGxC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF;AAED,MAAM,OAAO,eAAgB,SAAQ,QAAQ;IAC3C,YAAY,OAAe,EAAE,OAAiC;QAC5D,KAAK,CAAC,OAAO,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;QAC5C,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED,MAAM,OAAO,sBAAuB,SAAQ,QAAQ;IAClD,YAAY,WAAmB;QAC7B,KAAK,CACH,wBAAwB,WAAW,EAAE,EACrC,qBAAqB,EACrB,EAAE,WAAW,EAAE,CAChB,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;CACF;AAED,MAAM,OAAO,cAAe,SAAQ,QAAQ;IAC1C,YAAY,SAAiB,EAAE,MAAc;QAC3C,KAAK,CACH,sBAAsB,SAAS,MAAM,MAAM,EAAE,EAC7C,iBAAiB,EACjB,EAAE,SAAS,EAAE,MAAM,EAAE,CACtB,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AAED,MAAM,OAAO,mBAAoB,SAAQ,QAAQ;IAC/C,YAAY,UAAkB,yBAAyB,EAAE,OAAiC;QACxF,KAAK,CAAC,OAAO,EAAE,sBAAsB,EAAE,OAAO,CAAC,CAAC;QAChD,IAA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