@kya-os/mcp-i 0.1.0-alpha.3.1 → 0.1.0-alpha.3.2
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/cjs/logger.js +17 -4
- package/dist/cjs/registry/knowthat.js +0 -6
- package/dist/cjs/transport.js +103 -14
- package/dist/esm/logger.d.ts.map +1 -1
- package/dist/esm/logger.js +20 -4
- package/dist/esm/logger.js.map +1 -1
- package/dist/esm/registry/knowthat.d.ts.map +1 -1
- package/dist/esm/registry/knowthat.js +1 -6
- package/dist/esm/registry/knowthat.js.map +1 -1
- package/dist/esm/transport.d.ts.map +1 -1
- package/dist/esm/transport.js +119 -14
- package/dist/esm/transport.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/logger.js
CHANGED
|
@@ -22,22 +22,35 @@ class ConsoleLogger {
|
|
|
22
22
|
}
|
|
23
23
|
debug(message, ...args) {
|
|
24
24
|
if (this.shouldLog('debug')) {
|
|
25
|
-
console.log(
|
|
25
|
+
console.log(`${this.prefix} [DEBUG]`, message, ...args);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
info(message, ...args) {
|
|
29
29
|
if (this.shouldLog('info')) {
|
|
30
|
-
console.log(
|
|
30
|
+
console.log(`${this.prefix} [INFO]`, message, ...args);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
warn(message, ...args) {
|
|
34
34
|
if (this.shouldLog('warn')) {
|
|
35
|
-
console.warn(
|
|
35
|
+
console.warn(`${this.prefix} [WARN]`, message, ...args);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
error(message, ...args) {
|
|
39
39
|
if (this.shouldLog('error')) {
|
|
40
|
-
|
|
40
|
+
if (args.length > 0 && args[0] instanceof Error) {
|
|
41
|
+
const error = args[0];
|
|
42
|
+
console.error(`${this.prefix} [ERROR]`, message);
|
|
43
|
+
console.error(`${this.prefix} [ERROR] Message:`, error.message);
|
|
44
|
+
if (this.level === 'debug' && error.stack) {
|
|
45
|
+
console.error(`${this.prefix} [ERROR] Stack:`, error.stack);
|
|
46
|
+
}
|
|
47
|
+
if (args.length > 1) {
|
|
48
|
+
console.error(`${this.prefix} [ERROR] Additional info:`, ...args.slice(1));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
console.error(`${this.prefix} [ERROR]`, message, ...args);
|
|
53
|
+
}
|
|
41
54
|
}
|
|
42
55
|
}
|
|
43
56
|
}
|
|
@@ -38,12 +38,6 @@ class KnowThatRegistry {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
catch (error) {
|
|
41
|
-
if (error.message?.includes('Rate limit exceeded')) {
|
|
42
|
-
return {
|
|
43
|
-
success: false,
|
|
44
|
-
error: 'Rate limit exceeded. Please try again later.'
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
41
|
return {
|
|
48
42
|
success: false,
|
|
49
43
|
error: error.message || 'Failed to register with KnowThat.ai'
|
package/dist/cjs/transport.js
CHANGED
|
@@ -18,8 +18,31 @@ class FetchTransport {
|
|
|
18
18
|
});
|
|
19
19
|
clearTimeout(timeoutId);
|
|
20
20
|
if (!response.ok) {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
let errorMessage = '';
|
|
22
|
+
let errorData = null;
|
|
23
|
+
try {
|
|
24
|
+
errorData = await response.json();
|
|
25
|
+
errorMessage = errorData.message || errorData.error || '';
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
errorMessage = await response.text();
|
|
29
|
+
}
|
|
30
|
+
if (response.status === 429) {
|
|
31
|
+
throw new Error('Rate limit exceeded. Please wait a few minutes and try again.');
|
|
32
|
+
}
|
|
33
|
+
else if (response.status === 403) {
|
|
34
|
+
throw new Error('Access forbidden. Please check your API credentials.');
|
|
35
|
+
}
|
|
36
|
+
else if (response.status === 404) {
|
|
37
|
+
throw new Error('API endpoint not found. The service might be unavailable.');
|
|
38
|
+
}
|
|
39
|
+
else if (response.status === 500 || response.status === 502 || response.status === 503) {
|
|
40
|
+
throw new Error('Server error during registration. This might be a temporary issue. Please try again in a few moments.');
|
|
41
|
+
}
|
|
42
|
+
else if (response.status === 400) {
|
|
43
|
+
throw new Error(`Bad request: ${errorMessage || 'Invalid registration data'}`);
|
|
44
|
+
}
|
|
45
|
+
throw new Error(`HTTP ${response.status}: ${errorMessage || 'Request failed'}`);
|
|
23
46
|
}
|
|
24
47
|
const responseData = await response.json();
|
|
25
48
|
return {
|
|
@@ -31,7 +54,7 @@ class FetchTransport {
|
|
|
31
54
|
catch (error) {
|
|
32
55
|
clearTimeout(timeoutId);
|
|
33
56
|
if (error.name === 'AbortError') {
|
|
34
|
-
throw new Error('Request timeout');
|
|
57
|
+
throw new Error('Request timeout. The server is taking too long to respond. Please try again.');
|
|
35
58
|
}
|
|
36
59
|
throw error;
|
|
37
60
|
}
|
|
@@ -48,8 +71,31 @@ class FetchTransport {
|
|
|
48
71
|
});
|
|
49
72
|
clearTimeout(timeoutId);
|
|
50
73
|
if (!response.ok) {
|
|
51
|
-
|
|
52
|
-
|
|
74
|
+
let errorMessage = '';
|
|
75
|
+
let errorData = null;
|
|
76
|
+
try {
|
|
77
|
+
errorData = await response.json();
|
|
78
|
+
errorMessage = errorData.message || errorData.error || '';
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
errorMessage = await response.text();
|
|
82
|
+
}
|
|
83
|
+
if (response.status === 429) {
|
|
84
|
+
throw new Error('Rate limit exceeded. Please wait a few minutes and try again.');
|
|
85
|
+
}
|
|
86
|
+
else if (response.status === 403) {
|
|
87
|
+
throw new Error('Access forbidden. Please check your API credentials.');
|
|
88
|
+
}
|
|
89
|
+
else if (response.status === 404) {
|
|
90
|
+
throw new Error('API endpoint not found. The service might be unavailable.');
|
|
91
|
+
}
|
|
92
|
+
else if (response.status === 500 || response.status === 502 || response.status === 503) {
|
|
93
|
+
throw new Error('Server error during registration. This might be a temporary issue. Please try again in a few moments.');
|
|
94
|
+
}
|
|
95
|
+
else if (response.status === 400) {
|
|
96
|
+
throw new Error(`Bad request: ${errorMessage || 'Invalid registration data'}`);
|
|
97
|
+
}
|
|
98
|
+
throw new Error(`HTTP ${response.status}: ${errorMessage || 'Request failed'}`);
|
|
53
99
|
}
|
|
54
100
|
const responseData = await response.json();
|
|
55
101
|
return {
|
|
@@ -61,7 +107,7 @@ class FetchTransport {
|
|
|
61
107
|
catch (error) {
|
|
62
108
|
clearTimeout(timeoutId);
|
|
63
109
|
if (error.name === 'AbortError') {
|
|
64
|
-
throw new Error('Request timeout');
|
|
110
|
+
throw new Error('Request timeout. The server is taking too long to respond. Please try again.');
|
|
65
111
|
}
|
|
66
112
|
throw error;
|
|
67
113
|
}
|
|
@@ -83,12 +129,32 @@ class AxiosTransport {
|
|
|
83
129
|
};
|
|
84
130
|
}
|
|
85
131
|
catch (error) {
|
|
86
|
-
if (error.response
|
|
87
|
-
|
|
132
|
+
if (error.response) {
|
|
133
|
+
const status = error.response.status;
|
|
134
|
+
const errorMessage = error.response.data?.message || error.response.data?.error || '';
|
|
135
|
+
if (status === 429) {
|
|
136
|
+
throw new Error('Rate limit exceeded. Please wait a few minutes and try again.');
|
|
137
|
+
}
|
|
138
|
+
else if (status === 403) {
|
|
139
|
+
throw new Error('Access forbidden. Please check your API credentials.');
|
|
140
|
+
}
|
|
141
|
+
else if (status === 404) {
|
|
142
|
+
throw new Error('API endpoint not found. The service might be unavailable.');
|
|
143
|
+
}
|
|
144
|
+
else if (status === 500 || status === 502 || status === 503) {
|
|
145
|
+
throw new Error('Server error during registration. This might be a temporary issue. Please try again in a few moments.');
|
|
146
|
+
}
|
|
147
|
+
else if (status === 400) {
|
|
148
|
+
throw new Error(`Bad request: ${errorMessage || 'Invalid registration data'}`);
|
|
149
|
+
}
|
|
150
|
+
throw new Error(`HTTP ${status}: ${errorMessage || 'Request failed'}`);
|
|
151
|
+
}
|
|
152
|
+
else if (error.request) {
|
|
153
|
+
throw new Error('No response from server. Please check your internet connection.');
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
throw new Error(error.message || 'Request failed');
|
|
88
157
|
}
|
|
89
|
-
throw new Error(error.response?.data?.message ||
|
|
90
|
-
error.message ||
|
|
91
|
-
'Request failed');
|
|
92
158
|
}
|
|
93
159
|
}
|
|
94
160
|
async get(url, options) {
|
|
@@ -105,9 +171,32 @@ class AxiosTransport {
|
|
|
105
171
|
};
|
|
106
172
|
}
|
|
107
173
|
catch (error) {
|
|
108
|
-
|
|
109
|
-
error.
|
|
110
|
-
|
|
174
|
+
if (error.response) {
|
|
175
|
+
const status = error.response.status;
|
|
176
|
+
const errorMessage = error.response.data?.message || error.response.data?.error || '';
|
|
177
|
+
if (status === 429) {
|
|
178
|
+
throw new Error('Rate limit exceeded. Please wait a few minutes and try again.');
|
|
179
|
+
}
|
|
180
|
+
else if (status === 403) {
|
|
181
|
+
throw new Error('Access forbidden. Please check your API credentials.');
|
|
182
|
+
}
|
|
183
|
+
else if (status === 404) {
|
|
184
|
+
throw new Error('API endpoint not found. The service might be unavailable.');
|
|
185
|
+
}
|
|
186
|
+
else if (status === 500 || status === 502 || status === 503) {
|
|
187
|
+
throw new Error('Server error. This might be a temporary issue. Please try again in a few moments.');
|
|
188
|
+
}
|
|
189
|
+
else if (status === 400) {
|
|
190
|
+
throw new Error(`Bad request: ${errorMessage || 'Invalid request data'}`);
|
|
191
|
+
}
|
|
192
|
+
throw new Error(`HTTP ${status}: ${errorMessage || 'Request failed'}`);
|
|
193
|
+
}
|
|
194
|
+
else if (error.request) {
|
|
195
|
+
throw new Error('No response from server. Please check your internet connection.');
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
throw new Error(error.message || 'Request failed');
|
|
199
|
+
}
|
|
111
200
|
}
|
|
112
201
|
}
|
|
113
202
|
async getAxios() {
|
package/dist/esm/logger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],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;IAErD,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAItC,MAAM,CAAC,SAAS,IAAI,MAAM;IAI1B,MAAM,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,MAAM;IAIpD,MAAM,CAAC,kBAAkB,IAAI,MAAM;IAInC,MAAM,CAAC,KAAK,IAAI,IAAI;CAGrB;AAGD,wBAAgB,SAAS,IAAI,MAAM,CAElC"}
|
package/dist/esm/logger.js
CHANGED
|
@@ -29,22 +29,38 @@ export class ConsoleLogger {
|
|
|
29
29
|
}
|
|
30
30
|
debug(message, ...args) {
|
|
31
31
|
if (this.shouldLog('debug')) {
|
|
32
|
-
console.log(
|
|
32
|
+
console.log(`${this.prefix} [DEBUG]`, message, ...args);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
info(message, ...args) {
|
|
36
36
|
if (this.shouldLog('info')) {
|
|
37
|
-
console.log(
|
|
37
|
+
console.log(`${this.prefix} [INFO]`, message, ...args);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
warn(message, ...args) {
|
|
41
41
|
if (this.shouldLog('warn')) {
|
|
42
|
-
console.warn(
|
|
42
|
+
console.warn(`${this.prefix} [WARN]`, message, ...args);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
error(message, ...args) {
|
|
46
46
|
if (this.shouldLog('error')) {
|
|
47
|
-
|
|
47
|
+
// Enhanced error logging
|
|
48
|
+
if (args.length > 0 && args[0] instanceof Error) {
|
|
49
|
+
const error = args[0];
|
|
50
|
+
console.error(`${this.prefix} [ERROR]`, message);
|
|
51
|
+
console.error(`${this.prefix} [ERROR] Message:`, error.message);
|
|
52
|
+
// Show stack trace in debug mode
|
|
53
|
+
if (this.level === 'debug' && error.stack) {
|
|
54
|
+
console.error(`${this.prefix} [ERROR] Stack:`, error.stack);
|
|
55
|
+
}
|
|
56
|
+
// Log additional args if any
|
|
57
|
+
if (args.length > 1) {
|
|
58
|
+
console.error(`${this.prefix} [ERROR] Additional info:`, ...args.slice(1));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
console.error(`${this.prefix} [ERROR]`, message, ...args);
|
|
63
|
+
}
|
|
48
64
|
}
|
|
49
65
|
}
|
|
50
66
|
}
|
package/dist/esm/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH;;GAEG;AACH,MAAM,OAAO,YAAY;IACvB,KAAK,KAAU,CAAC;IAChB,IAAI,KAAU,CAAC;IACf,IAAI,KAAU,CAAC;IACf,KAAK,KAAU,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,OAAO,aAAa;IACJ;IAA4B;IAAhD,YAAoB,SAAS,SAAS,EAAU,QAAkB,MAAM;QAApD,WAAM,GAAN,MAAM,CAAY;QAAU,UAAK,GAAL,KAAK,CAAmB;IAAG,CAAC;IAEpE,SAAS,CAAC,KAAe;QAC/B,MAAM,MAAM,GAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QACxE,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC3C,OAAO,YAAY,IAAI,YAAY,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,GAAG,IAAW;QACnC,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5B,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH;;GAEG;AACH,MAAM,OAAO,YAAY;IACvB,KAAK,KAAU,CAAC;IAChB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IAED,MAAM,CAAC,SAAS;QACd,OAAO,aAAa,CAAC,QAAQ,CAAC;IAChC,CAAC;IAED,MAAM,CAAC,mBAAmB,CAAC,KAAgB;QACzC,OAAO,IAAI,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CAAC,kBAAkB;QACvB,OAAO,IAAI,YAAY,EAAE,CAAC;IAC5B,CAAC;IAED,MAAM,CAAC,KAAK;QACV,aAAa,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;IAC9C,CAAC;;AAGH,8BAA8B;AAC9B,MAAM,UAAU,SAAS;IACvB,OAAO,aAAa,CAAC,SAAS,EAAE,CAAC;AACnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowthat.d.ts","sourceRoot":"","sources":["../../../src/registry/knowthat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,EAEf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,SAAS,EAAoB,MAAM,cAAc,CAAC;AAE3D,qBAAa,gBAAiB,YAAW,eAAe;IACtD,IAAI,SAAc;IAClB,IAAI,EAAE,SAAS,GAAG,WAAW,CAAa;IAC1C,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAY;gBAEjB,QAAQ,SAAwB,EAAE,SAAS,CAAC,EAAE,SAAS;IAKnE;;OAEG;IACG,OAAO,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"knowthat.d.ts","sourceRoot":"","sources":["../../../src/registry/knowthat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,EAEf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,SAAS,EAAoB,MAAM,cAAc,CAAC;AAE3D,qBAAa,gBAAiB,YAAW,eAAe;IACtD,IAAI,SAAc;IAClB,IAAI,EAAE,SAAS,GAAG,WAAW,CAAa;IAC1C,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAY;gBAEjB,QAAQ,SAAwB,EAAE,SAAS,CAAC,EAAE,SAAS;IAKnE;;OAEG;IACG,OAAO,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IA2CxE;;OAEG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAc3C;;OAEG;IACG,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAwBrD;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAKzB"}
|
|
@@ -46,12 +46,7 @@ export class KnowThatRegistry {
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
catch (error) {
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
success: false,
|
|
52
|
-
error: 'Rate limit exceeded. Please try again later.'
|
|
53
|
-
};
|
|
54
|
-
}
|
|
49
|
+
// The transport layer now provides clearer error messages
|
|
55
50
|
return {
|
|
56
51
|
success: false,
|
|
57
52
|
error: error.message || 'Failed to register with KnowThat.ai'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowthat.js","sourceRoot":"","sources":["../../../src/registry/knowthat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAa,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE3D,MAAM,OAAO,gBAAgB;IAC3B,IAAI,GAAG,UAAU,CAAC;IAClB,IAAI,GAA4B,SAAS,CAAC;IAClC,QAAQ,CAAS;IACjB,SAAS,CAAY;IAE7B,YAAY,QAAQ,GAAG,qBAAqB,EAAE,SAAqB;QACjE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,SAAS,GA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CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACjC,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,GAAG;IACxC,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;IACjG,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;CACtF;AAED;;GAEG;AACH,qBAAa,cAAe,YAAW,SAAS;IACxC,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAA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AO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;YA4C5E,QAAQ;CAgBvB;AAED;;GAEG;AACH,qBAAa,eAAe;IAC1B,MAAM,CAAC,aAAa,IAAI,OAAO;IAU/B,MAAM,CAAC,aAAa,IAAI,OAAO;IAQ/B,MAAM,CAAC,QAAQ,IAAI,OAAO;IAQ1B,MAAM,CAAC,QAAQ,IAAI,OAAO;IAI1B,MAAM,CAAC,QAAQ,IAAI,OAAO;CAO3B;AAED;;GAEG;AACH,qBAAa,gBAAgB;IAC3B,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;QACtB,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;KACxC,GAAG,SAAS;CA+Cd"}
|
package/dist/esm/transport.js
CHANGED
|
@@ -22,8 +22,35 @@ export class FetchTransport {
|
|
|
22
22
|
});
|
|
23
23
|
clearTimeout(timeoutId);
|
|
24
24
|
if (!response.ok) {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
let errorMessage = '';
|
|
26
|
+
let errorData = null;
|
|
27
|
+
try {
|
|
28
|
+
// Try to parse JSON error response
|
|
29
|
+
errorData = await response.json();
|
|
30
|
+
errorMessage = errorData.message || errorData.error || '';
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
// Fallback to text if not JSON
|
|
34
|
+
errorMessage = await response.text();
|
|
35
|
+
}
|
|
36
|
+
// Handle specific error cases
|
|
37
|
+
if (response.status === 429) {
|
|
38
|
+
throw new Error('Rate limit exceeded. Please wait a few minutes and try again.');
|
|
39
|
+
}
|
|
40
|
+
else if (response.status === 403) {
|
|
41
|
+
throw new Error('Access forbidden. Please check your API credentials.');
|
|
42
|
+
}
|
|
43
|
+
else if (response.status === 404) {
|
|
44
|
+
throw new Error('API endpoint not found. The service might be unavailable.');
|
|
45
|
+
}
|
|
46
|
+
else if (response.status === 500 || response.status === 502 || response.status === 503) {
|
|
47
|
+
throw new Error('Server error during registration. This might be a temporary issue. Please try again in a few moments.');
|
|
48
|
+
}
|
|
49
|
+
else if (response.status === 400) {
|
|
50
|
+
throw new Error(`Bad request: ${errorMessage || 'Invalid registration data'}`);
|
|
51
|
+
}
|
|
52
|
+
// Generic error with status code
|
|
53
|
+
throw new Error(`HTTP ${response.status}: ${errorMessage || 'Request failed'}`);
|
|
27
54
|
}
|
|
28
55
|
const responseData = await response.json();
|
|
29
56
|
return {
|
|
@@ -35,7 +62,7 @@ export class FetchTransport {
|
|
|
35
62
|
catch (error) {
|
|
36
63
|
clearTimeout(timeoutId);
|
|
37
64
|
if (error.name === 'AbortError') {
|
|
38
|
-
throw new Error('Request timeout');
|
|
65
|
+
throw new Error('Request timeout. The server is taking too long to respond. Please try again.');
|
|
39
66
|
}
|
|
40
67
|
throw error;
|
|
41
68
|
}
|
|
@@ -52,8 +79,35 @@ export class FetchTransport {
|
|
|
52
79
|
});
|
|
53
80
|
clearTimeout(timeoutId);
|
|
54
81
|
if (!response.ok) {
|
|
55
|
-
|
|
56
|
-
|
|
82
|
+
let errorMessage = '';
|
|
83
|
+
let errorData = null;
|
|
84
|
+
try {
|
|
85
|
+
// Try to parse JSON error response
|
|
86
|
+
errorData = await response.json();
|
|
87
|
+
errorMessage = errorData.message || errorData.error || '';
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
// Fallback to text if not JSON
|
|
91
|
+
errorMessage = await response.text();
|
|
92
|
+
}
|
|
93
|
+
// Handle specific error cases
|
|
94
|
+
if (response.status === 429) {
|
|
95
|
+
throw new Error('Rate limit exceeded. Please wait a few minutes and try again.');
|
|
96
|
+
}
|
|
97
|
+
else if (response.status === 403) {
|
|
98
|
+
throw new Error('Access forbidden. Please check your API credentials.');
|
|
99
|
+
}
|
|
100
|
+
else if (response.status === 404) {
|
|
101
|
+
throw new Error('API endpoint not found. The service might be unavailable.');
|
|
102
|
+
}
|
|
103
|
+
else if (response.status === 500 || response.status === 502 || response.status === 503) {
|
|
104
|
+
throw new Error('Server error during registration. This might be a temporary issue. Please try again in a few moments.');
|
|
105
|
+
}
|
|
106
|
+
else if (response.status === 400) {
|
|
107
|
+
throw new Error(`Bad request: ${errorMessage || 'Invalid registration data'}`);
|
|
108
|
+
}
|
|
109
|
+
// Generic error with status code
|
|
110
|
+
throw new Error(`HTTP ${response.status}: ${errorMessage || 'Request failed'}`);
|
|
57
111
|
}
|
|
58
112
|
const responseData = await response.json();
|
|
59
113
|
return {
|
|
@@ -65,7 +119,7 @@ export class FetchTransport {
|
|
|
65
119
|
catch (error) {
|
|
66
120
|
clearTimeout(timeoutId);
|
|
67
121
|
if (error.name === 'AbortError') {
|
|
68
|
-
throw new Error('Request timeout');
|
|
122
|
+
throw new Error('Request timeout. The server is taking too long to respond. Please try again.');
|
|
69
123
|
}
|
|
70
124
|
throw error;
|
|
71
125
|
}
|
|
@@ -90,12 +144,36 @@ export class AxiosTransport {
|
|
|
90
144
|
};
|
|
91
145
|
}
|
|
92
146
|
catch (error) {
|
|
93
|
-
|
|
94
|
-
|
|
147
|
+
// Handle specific Axios error cases
|
|
148
|
+
if (error.response) {
|
|
149
|
+
const status = error.response.status;
|
|
150
|
+
const errorMessage = error.response.data?.message || error.response.data?.error || '';
|
|
151
|
+
if (status === 429) {
|
|
152
|
+
throw new Error('Rate limit exceeded. Please wait a few minutes and try again.');
|
|
153
|
+
}
|
|
154
|
+
else if (status === 403) {
|
|
155
|
+
throw new Error('Access forbidden. Please check your API credentials.');
|
|
156
|
+
}
|
|
157
|
+
else if (status === 404) {
|
|
158
|
+
throw new Error('API endpoint not found. The service might be unavailable.');
|
|
159
|
+
}
|
|
160
|
+
else if (status === 500 || status === 502 || status === 503) {
|
|
161
|
+
throw new Error('Server error during registration. This might be a temporary issue. Please try again in a few moments.');
|
|
162
|
+
}
|
|
163
|
+
else if (status === 400) {
|
|
164
|
+
throw new Error(`Bad request: ${errorMessage || 'Invalid registration data'}`);
|
|
165
|
+
}
|
|
166
|
+
// Generic error with status code
|
|
167
|
+
throw new Error(`HTTP ${status}: ${errorMessage || 'Request failed'}`);
|
|
168
|
+
}
|
|
169
|
+
else if (error.request) {
|
|
170
|
+
// Request was made but no response received
|
|
171
|
+
throw new Error('No response from server. Please check your internet connection.');
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
// Something else happened
|
|
175
|
+
throw new Error(error.message || 'Request failed');
|
|
95
176
|
}
|
|
96
|
-
throw new Error(error.response?.data?.message ||
|
|
97
|
-
error.message ||
|
|
98
|
-
'Request failed');
|
|
99
177
|
}
|
|
100
178
|
}
|
|
101
179
|
async get(url, options) {
|
|
@@ -112,9 +190,36 @@ export class AxiosTransport {
|
|
|
112
190
|
};
|
|
113
191
|
}
|
|
114
192
|
catch (error) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
193
|
+
// Handle specific Axios error cases
|
|
194
|
+
if (error.response) {
|
|
195
|
+
const status = error.response.status;
|
|
196
|
+
const errorMessage = error.response.data?.message || error.response.data?.error || '';
|
|
197
|
+
if (status === 429) {
|
|
198
|
+
throw new Error('Rate limit exceeded. Please wait a few minutes and try again.');
|
|
199
|
+
}
|
|
200
|
+
else if (status === 403) {
|
|
201
|
+
throw new Error('Access forbidden. Please check your API credentials.');
|
|
202
|
+
}
|
|
203
|
+
else if (status === 404) {
|
|
204
|
+
throw new Error('API endpoint not found. The service might be unavailable.');
|
|
205
|
+
}
|
|
206
|
+
else if (status === 500 || status === 502 || status === 503) {
|
|
207
|
+
throw new Error('Server error. This might be a temporary issue. Please try again in a few moments.');
|
|
208
|
+
}
|
|
209
|
+
else if (status === 400) {
|
|
210
|
+
throw new Error(`Bad request: ${errorMessage || 'Invalid request data'}`);
|
|
211
|
+
}
|
|
212
|
+
// Generic error with status code
|
|
213
|
+
throw new Error(`HTTP ${status}: ${errorMessage || 'Request failed'}`);
|
|
214
|
+
}
|
|
215
|
+
else if (error.request) {
|
|
216
|
+
// Request was made but no response received
|
|
217
|
+
throw new Error('No response from server. Please check your internet connection.');
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
// Something else happened
|
|
221
|
+
throw new Error(error.message || 'Request failed');
|
|
222
|
+
}
|
|
118
223
|
}
|
|
119
224
|
}
|
|
120
225
|
async getAxios() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkBH;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,KAAK,CAAC,IAAI,CAAU,GAAW,EAAE,IAAS,EAAE,OAA0B;QACpE,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACzC,MAAM,OAAO,GAAG,OAAO,EAAE,OAAO,IAAI,KAAK,CAAC;QAE1C,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QAEhE,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;gBAChC,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,GAAG,OAAO,EAAE,OAAO;iBACpB;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;gBAC1B,MAAM,EAAE,UAAU,CAAC,MAAM;aAC1B,CAAC,CAAC;YAEH,YAAY,CAAC,SAAS,CAAC,CAAC;YAExB,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkBH;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,KAAK,CAAC,IAAI,CAAU,GAAW,EAAE,IAAS,EAAE,OAA0B;QACpE,MAAM,UAAU,GAA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AC/B,IAAI,aAAa,KAAK,MAAM,EAAE,CAAC;YAC7B,iCAAiC;YACjC,IAAI,eAAe,CAAC,aAAa,EAAE,IAAI,eAAe,CAAC,QAAQ,EAAE,EAAE,CAAC;gBAClE,OAAO,IAAI,cAAc,EAAE,CAAC;YAC9B,CAAC;YAED,iDAAiD;YACjD,IAAI,eAAe,CAAC,QAAQ,EAAE,IAAI,eAAe,CAAC,QAAQ,EAAE,EAAE,CAAC;gBAC7D,OAAO,IAAI,cAAc,EAAE,CAAC;YAC9B,CAAC;YAED,gEAAgE;YAChE,IAAI,eAAe,CAAC,QAAQ,EAAE,IAAI,eAAe,CAAC,QAAQ,EAAE,EAAE,CAAC;gBAC7D,OAAO,IAAI,cAAc,EAAE,CAAC;YAC9B,CAAC;YAED,+BAA+B;YAC/B,IAAI,eAAe,CAAC,aAAa,EAAE,EAAE,CAAC;gBACpC,OAAO,IAAI,cAAc,EAAE,CAAC;YAC9B,CAAC;YAED,iCAAiC;YACjC,IAAI,eAAe,CAAC,QAAQ,EAAE,EAAE,CAAC;gBAC/B,OAAO,IAAI,cAAc,EAAE,CAAC;YAC9B,CAAC;YAED,qBAAqB;YACrB,OAAO,IAAI,cAAc,EAAE,CAAC;QAC9B,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,2BAA2B,aAAa,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kya-os/mcp-i",
|
|
3
|
-
"version": "0.1.0-alpha.3.
|
|
3
|
+
"version": "0.1.0-alpha.3.2",
|
|
4
4
|
"description": "COMING SOON:Production-ready MCP Identity with automatic registration, key rotation, and optimized performance",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|