@kya-os/mcp-i-core 1.4.15 → 1.4.17
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.
|
@@ -21,6 +21,11 @@ export interface OAuthRequiredErrorOptions {
|
|
|
21
21
|
userDid?: string;
|
|
22
22
|
/** Optional session ID */
|
|
23
23
|
sessionId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Auth type from tool protection config (e.g., "password", "oauth")
|
|
26
|
+
* Used to determine correct consent flow when catching the error
|
|
27
|
+
*/
|
|
28
|
+
authType?: string;
|
|
24
29
|
}
|
|
25
30
|
/**
|
|
26
31
|
* Error thrown when a tool requires OAuth but IDP token is not available
|
|
@@ -35,6 +40,7 @@ export declare class OAuthRequiredError extends Error {
|
|
|
35
40
|
readonly resumeToken?: string;
|
|
36
41
|
readonly userDid?: string;
|
|
37
42
|
readonly sessionId?: string;
|
|
43
|
+
readonly authType?: string;
|
|
38
44
|
constructor(options: OAuthRequiredErrorOptions);
|
|
39
45
|
}
|
|
40
46
|
//# sourceMappingURL=oauth-required-error.d.ts.map
|
|
@@ -22,6 +22,7 @@ class OAuthRequiredError extends Error {
|
|
|
22
22
|
resumeToken;
|
|
23
23
|
userDid;
|
|
24
24
|
sessionId;
|
|
25
|
+
authType;
|
|
25
26
|
constructor(options) {
|
|
26
27
|
const { toolName, requiredScopes, provider, oauthUrl } = options;
|
|
27
28
|
super(`OAuth required for tool "${toolName}" with provider "${provider}". ` +
|
|
@@ -34,6 +35,7 @@ class OAuthRequiredError extends Error {
|
|
|
34
35
|
this.resumeToken = options.resumeToken;
|
|
35
36
|
this.userDid = options.userDid;
|
|
36
37
|
this.sessionId = options.sessionId;
|
|
38
|
+
this.authType = options.authType;
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
exports.OAuthRequiredError = OAuthRequiredError;
|