authhero 9.12.0 → 9.13.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/dist/assets/u/widget/authhero-widget.esm.js +1 -1
- package/dist/assets/u/widget/p-1471c0f2.entry.js +1 -0
- package/dist/authhero.cjs +217 -152
- package/dist/authhero.d.ts +350 -102
- package/dist/authhero.mjs +14470 -13888
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/common.d.ts +1 -0
- package/dist/types/authentication-flows/passwordless.d.ts +4 -4
- package/dist/types/helpers/reserved-claims.d.ts +2 -2
- package/dist/types/index.d.ts +278 -101
- package/dist/types/routes/auth-api/authorize.d.ts +5 -0
- package/dist/types/routes/auth-api/index.d.ts +35 -30
- package/dist/types/routes/auth-api/passwordless.d.ts +12 -12
- package/dist/types/routes/auth-api/register/index.d.ts +2 -2
- package/dist/types/routes/auth-api/revoke.d.ts +6 -6
- package/dist/types/routes/auth-api/token.d.ts +10 -10
- package/dist/types/routes/management-api/action-executions.d.ts +1 -1
- package/dist/types/routes/management-api/actions.d.ts +1 -1
- package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
- package/dist/types/routes/management-api/branding.d.ts +1 -1
- package/dist/types/routes/management-api/clients.d.ts +8 -8
- package/dist/types/routes/management-api/connections.d.ts +137 -0
- package/dist/types/routes/management-api/email-templates.d.ts +18 -18
- package/dist/types/routes/management-api/guardian.d.ts +5 -5
- package/dist/types/routes/management-api/index.d.ts +236 -64
- package/dist/types/routes/management-api/keys.d.ts +8 -8
- package/dist/types/routes/management-api/logs.d.ts +4 -4
- package/dist/types/routes/management-api/organizations.d.ts +4 -4
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/resource-servers.d.ts +35 -0
- package/dist/types/routes/management-api/roles.d.ts +1 -1
- package/dist/types/routes/management-api/tenant-operations.d.ts +1 -1
- package/dist/types/routes/management-api/tenants.d.ts +5 -5
- package/dist/types/routes/management-api/users.d.ts +8 -8
- package/dist/types/routes/mcp/dispatch.d.ts +60 -0
- package/dist/types/routes/mcp/index.d.ts +21 -0
- package/dist/types/routes/mcp/protocol.d.ts +35 -0
- package/dist/types/routes/mcp/resource.d.ts +14 -0
- package/dist/types/routes/mcp/tools.d.ts +21 -0
- package/dist/types/routes/universal-login/common.d.ts +6 -6
- package/dist/types/routes/universal-login/embed.d.ts +102 -0
- package/dist/types/routes/universal-login/error-page.d.ts +8 -1
- package/dist/types/routes/universal-login/identifier.d.ts +2 -2
- package/dist/types/routes/universal-login/index.d.ts +2 -2
- package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
- package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
- package/dist/types/routes/universal-login/u2-widget-page.d.ts +9 -1
- package/dist/types/types/AuthHeroConfig.d.ts +35 -0
- package/dist/types/types/Bindings.d.ts +2 -1
- package/dist/types/types/Variables.d.ts +2 -0
- package/dist/types/utils/jwt.d.ts +8 -0
- package/package.json +6 -6
- package/dist/assets/u/widget/p-74f95441.entry.js +0 -1
|
@@ -16,13 +16,13 @@ export declare const keyRoutes: OpenAPIHono<{
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
output: {
|
|
19
|
-
type: "jwt_signing" | "saml_encryption";
|
|
20
19
|
kid: string;
|
|
21
20
|
cert: string;
|
|
22
21
|
fingerprint: string;
|
|
23
22
|
thumbprint: string;
|
|
24
|
-
|
|
23
|
+
type: "jwt_signing" | "saml_encryption";
|
|
25
24
|
tenant_id?: string | undefined;
|
|
25
|
+
connection?: string | undefined;
|
|
26
26
|
current?: boolean | undefined;
|
|
27
27
|
next?: boolean | undefined;
|
|
28
28
|
previous?: boolean | undefined;
|
|
@@ -55,13 +55,13 @@ export declare const keyRoutes: OpenAPIHono<{
|
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
57
|
output: {
|
|
58
|
-
type: "jwt_signing" | "saml_encryption";
|
|
59
58
|
kid: string;
|
|
60
59
|
cert: string;
|
|
61
60
|
fingerprint: string;
|
|
62
61
|
thumbprint: string;
|
|
63
|
-
|
|
62
|
+
type: "jwt_signing" | "saml_encryption";
|
|
64
63
|
tenant_id?: string | undefined;
|
|
64
|
+
connection?: string | undefined;
|
|
65
65
|
current?: boolean | undefined;
|
|
66
66
|
next?: boolean | undefined;
|
|
67
67
|
previous?: boolean | undefined;
|
|
@@ -93,13 +93,13 @@ export declare const keyRoutes: OpenAPIHono<{
|
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
95
|
output: {
|
|
96
|
-
type: "jwt_signing" | "saml_encryption";
|
|
97
96
|
kid: string;
|
|
98
97
|
cert: string;
|
|
99
98
|
fingerprint: string;
|
|
100
99
|
thumbprint: string;
|
|
101
|
-
|
|
100
|
+
type: "jwt_signing" | "saml_encryption";
|
|
102
101
|
tenant_id?: string | undefined;
|
|
102
|
+
connection?: string | undefined;
|
|
103
103
|
current?: boolean | undefined;
|
|
104
104
|
next?: boolean | undefined;
|
|
105
105
|
previous?: boolean | undefined;
|
|
@@ -133,13 +133,13 @@ export declare const keyRoutes: OpenAPIHono<{
|
|
|
133
133
|
};
|
|
134
134
|
};
|
|
135
135
|
output: {
|
|
136
|
-
type: "jwt_signing" | "saml_encryption";
|
|
137
136
|
kid: string;
|
|
138
137
|
cert: string;
|
|
139
138
|
fingerprint: string;
|
|
140
139
|
thumbprint: string;
|
|
141
|
-
|
|
140
|
+
type: "jwt_signing" | "saml_encryption";
|
|
142
141
|
tenant_id?: string | undefined;
|
|
142
|
+
connection?: string | undefined;
|
|
143
143
|
current?: boolean | undefined;
|
|
144
144
|
next?: boolean | undefined;
|
|
145
145
|
previous?: boolean | undefined;
|
|
@@ -24,7 +24,7 @@ export declare const logRoutes: OpenAPIHono<{
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
output: {
|
|
27
|
-
type: "
|
|
27
|
+
type: "sapi" | "fn" | "i" | "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "cs" | "depnote" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "festft" | "fh" | "fimp" | "fi" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "sestft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "sv" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
|
|
28
28
|
date: string;
|
|
29
29
|
isMobile: boolean;
|
|
30
30
|
log_id: string;
|
|
@@ -63,7 +63,7 @@ export declare const logRoutes: OpenAPIHono<{
|
|
|
63
63
|
limit: number;
|
|
64
64
|
length: number;
|
|
65
65
|
logs: {
|
|
66
|
-
type: "
|
|
66
|
+
type: "sapi" | "fn" | "i" | "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "cs" | "depnote" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "festft" | "fh" | "fimp" | "fi" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "sestft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "sv" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
|
|
67
67
|
date: string;
|
|
68
68
|
isMobile: boolean;
|
|
69
69
|
log_id: string;
|
|
@@ -102,7 +102,7 @@ export declare const logRoutes: OpenAPIHono<{
|
|
|
102
102
|
next?: string | undefined;
|
|
103
103
|
} | {
|
|
104
104
|
logs: {
|
|
105
|
-
type: "
|
|
105
|
+
type: "sapi" | "fn" | "i" | "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "cs" | "depnote" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "festft" | "fh" | "fimp" | "fi" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "sestft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "sv" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
|
|
106
106
|
date: string;
|
|
107
107
|
isMobile: boolean;
|
|
108
108
|
log_id: string;
|
|
@@ -156,7 +156,7 @@ export declare const logRoutes: OpenAPIHono<{
|
|
|
156
156
|
};
|
|
157
157
|
};
|
|
158
158
|
output: {
|
|
159
|
-
type: "
|
|
159
|
+
type: "sapi" | "fn" | "i" | "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "cs" | "depnote" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "festft" | "fh" | "fimp" | "fi" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "sestft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "sv" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
|
|
160
160
|
date: string;
|
|
161
161
|
isMobile: boolean;
|
|
162
162
|
log_id: string;
|
|
@@ -729,19 +729,19 @@ export declare const organizationRoutes: OpenAPIHono<{
|
|
|
729
729
|
} & {
|
|
730
730
|
json: {
|
|
731
731
|
client_id: string;
|
|
732
|
-
invitee: {
|
|
733
|
-
email?: string | undefined;
|
|
734
|
-
};
|
|
735
732
|
inviter: {
|
|
736
733
|
name?: string | undefined;
|
|
737
734
|
};
|
|
735
|
+
invitee: {
|
|
736
|
+
email?: string | undefined;
|
|
737
|
+
};
|
|
738
738
|
id?: string | undefined;
|
|
739
739
|
app_metadata?: Record<string, any> | undefined;
|
|
740
740
|
user_metadata?: Record<string, any> | undefined;
|
|
741
741
|
connection_id?: string | undefined;
|
|
742
742
|
roles?: string[] | undefined;
|
|
743
|
-
send_invitation_email?: boolean | undefined;
|
|
744
743
|
ttl_sec?: number | undefined;
|
|
744
|
+
send_invitation_email?: boolean | undefined;
|
|
745
745
|
};
|
|
746
746
|
};
|
|
747
747
|
output: {
|
|
@@ -52,7 +52,7 @@ export declare const promptsRoutes: OpenAPIHono<{
|
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
output: {
|
|
55
|
-
prompt: "
|
|
55
|
+
prompt: "mfa" | "organizations" | "signup" | "status" | "common" | "login" | "login-id" | "login-password" | "signup-id" | "signup-password" | "reset-password" | "consent" | "mfa-push" | "mfa-otp" | "mfa-voice" | "mfa-phone" | "mfa-webauthn" | "mfa-email" | "mfa-recovery-code" | "device-flow" | "email-verification" | "email-otp-challenge" | "invitation" | "passkeys" | "captcha" | "custom-form" | "login-passwordless" | "mfa-login-options";
|
|
56
56
|
language: string;
|
|
57
57
|
}[];
|
|
58
58
|
outputFormat: "json";
|
|
@@ -90,7 +90,7 @@ export declare const promptsRoutes: OpenAPIHono<{
|
|
|
90
90
|
$get: {
|
|
91
91
|
input: {
|
|
92
92
|
param: {
|
|
93
|
-
prompt: "
|
|
93
|
+
prompt: "mfa" | "organizations" | "signup" | "status" | "common" | "login" | "login-id" | "login-password" | "signup-id" | "signup-password" | "reset-password" | "consent" | "mfa-push" | "mfa-otp" | "mfa-voice" | "mfa-phone" | "mfa-webauthn" | "mfa-email" | "mfa-recovery-code" | "device-flow" | "email-verification" | "email-otp-challenge" | "invitation" | "passkeys" | "captcha" | "custom-form" | "login-passwordless" | "mfa-login-options";
|
|
94
94
|
language: string;
|
|
95
95
|
};
|
|
96
96
|
} & {
|
|
@@ -112,7 +112,7 @@ export declare const promptsRoutes: OpenAPIHono<{
|
|
|
112
112
|
$put: {
|
|
113
113
|
input: {
|
|
114
114
|
param: {
|
|
115
|
-
prompt: "
|
|
115
|
+
prompt: "mfa" | "organizations" | "signup" | "status" | "common" | "login" | "login-id" | "login-password" | "signup-id" | "signup-password" | "reset-password" | "consent" | "mfa-push" | "mfa-otp" | "mfa-voice" | "mfa-phone" | "mfa-webauthn" | "mfa-email" | "mfa-recovery-code" | "device-flow" | "email-verification" | "email-otp-challenge" | "invitation" | "passkeys" | "captcha" | "custom-form" | "login-passwordless" | "mfa-login-options";
|
|
116
116
|
language: string;
|
|
117
117
|
};
|
|
118
118
|
} & {
|
|
@@ -136,7 +136,7 @@ export declare const promptsRoutes: OpenAPIHono<{
|
|
|
136
136
|
$delete: {
|
|
137
137
|
input: {
|
|
138
138
|
param: {
|
|
139
|
-
prompt: "
|
|
139
|
+
prompt: "mfa" | "organizations" | "signup" | "status" | "common" | "login" | "login-id" | "login-password" | "signup-id" | "signup-password" | "reset-password" | "consent" | "mfa-push" | "mfa-otp" | "mfa-voice" | "mfa-phone" | "mfa-webauthn" | "mfa-email" | "mfa-recovery-code" | "device-flow" | "email-verification" | "email-otp-challenge" | "invitation" | "passkeys" | "captcha" | "custom-form" | "login-passwordless" | "mfa-login-options";
|
|
140
140
|
language: string;
|
|
141
141
|
};
|
|
142
142
|
} & {
|
|
@@ -94,6 +94,41 @@ export declare const resourceServerRoutes: OpenAPIHono<{
|
|
|
94
94
|
}[];
|
|
95
95
|
total?: number | undefined;
|
|
96
96
|
next?: string | undefined;
|
|
97
|
+
} | {
|
|
98
|
+
resource_servers: {
|
|
99
|
+
name: string;
|
|
100
|
+
identifier: string;
|
|
101
|
+
token_lifetime: number;
|
|
102
|
+
token_lifetime_for_web: number;
|
|
103
|
+
id?: string | undefined;
|
|
104
|
+
scopes?: {
|
|
105
|
+
value: string;
|
|
106
|
+
description?: string | undefined;
|
|
107
|
+
}[] | undefined;
|
|
108
|
+
signing_alg?: string | undefined;
|
|
109
|
+
signing_secret?: string | undefined;
|
|
110
|
+
skip_consent_for_verifiable_first_party_clients?: boolean | undefined;
|
|
111
|
+
allow_offline_access?: boolean | undefined;
|
|
112
|
+
verificationKey?: string | undefined;
|
|
113
|
+
options?: {
|
|
114
|
+
token_dialect?: "access_token" | "access_token_authz" | undefined;
|
|
115
|
+
enforce_policies?: boolean | undefined;
|
|
116
|
+
allow_skipping_userinfo?: boolean | undefined;
|
|
117
|
+
skip_userinfo?: boolean | undefined;
|
|
118
|
+
persist_client_authorization?: boolean | undefined;
|
|
119
|
+
enable_introspection_endpoint?: boolean | undefined;
|
|
120
|
+
mtls?: {
|
|
121
|
+
bound_access_tokens?: boolean | undefined;
|
|
122
|
+
} | undefined;
|
|
123
|
+
} | undefined;
|
|
124
|
+
is_system?: boolean | undefined;
|
|
125
|
+
metadata?: {
|
|
126
|
+
[x: string]: any;
|
|
127
|
+
} | undefined;
|
|
128
|
+
created_at?: string | undefined;
|
|
129
|
+
updated_at?: string | undefined;
|
|
130
|
+
}[];
|
|
131
|
+
next?: string | undefined;
|
|
97
132
|
};
|
|
98
133
|
outputFormat: "json";
|
|
99
134
|
status: 200;
|
|
@@ -220,9 +220,9 @@ export declare const roleRoutes: OpenAPIHono<{
|
|
|
220
220
|
};
|
|
221
221
|
} & {
|
|
222
222
|
query: {
|
|
223
|
+
from?: string | undefined;
|
|
223
224
|
page?: string | undefined;
|
|
224
225
|
include_totals?: string | undefined;
|
|
225
|
-
from?: string | undefined;
|
|
226
226
|
per_page?: string | undefined;
|
|
227
227
|
take?: string | undefined;
|
|
228
228
|
};
|
|
@@ -26,7 +26,7 @@ export declare const operationRoutes: OpenAPIHono<{
|
|
|
26
26
|
events: {
|
|
27
27
|
operation_id: string;
|
|
28
28
|
step: string;
|
|
29
|
-
outcome: "failed" | "succeeded" | "
|
|
29
|
+
outcome: "failed" | "succeeded" | "started" | "retried" | "skipped" | "reconciled";
|
|
30
30
|
attempt: number;
|
|
31
31
|
id: string;
|
|
32
32
|
created_at: string;
|
|
@@ -123,7 +123,7 @@ export declare const tenantRoutes: OpenAPIHono<{
|
|
|
123
123
|
pushed_authorization_requests_supported?: boolean | undefined;
|
|
124
124
|
authorization_response_iss_parameter_supported?: boolean | undefined;
|
|
125
125
|
deployment_type?: "shared" | "wfp" | undefined;
|
|
126
|
-
provisioning_state?: "pending" | "
|
|
126
|
+
provisioning_state?: "pending" | "ready" | "failed" | undefined;
|
|
127
127
|
provisioning_error?: string | undefined;
|
|
128
128
|
provisioning_state_changed_at?: string | undefined;
|
|
129
129
|
bundle_configuration?: string | undefined;
|
|
@@ -211,12 +211,12 @@ export declare const tenantRoutes: OpenAPIHono<{
|
|
|
211
211
|
} & {
|
|
212
212
|
json: {
|
|
213
213
|
id?: string | undefined;
|
|
214
|
+
audience?: string | undefined;
|
|
214
215
|
allowed_logout_urls?: string[] | undefined;
|
|
215
216
|
oidc_logout?: {
|
|
216
217
|
rp_logout_end_session_endpoint_discovery?: boolean | undefined;
|
|
217
218
|
} | undefined;
|
|
218
219
|
default_organization?: string | undefined;
|
|
219
|
-
audience?: string | undefined;
|
|
220
220
|
friendly_name?: string | undefined;
|
|
221
221
|
picture_url?: string | undefined;
|
|
222
222
|
support_email?: string | undefined;
|
|
@@ -315,7 +315,7 @@ export declare const tenantRoutes: OpenAPIHono<{
|
|
|
315
315
|
pushed_authorization_requests_supported?: boolean | undefined;
|
|
316
316
|
authorization_response_iss_parameter_supported?: boolean | undefined;
|
|
317
317
|
deployment_type?: "shared" | "wfp" | undefined;
|
|
318
|
-
provisioning_state?: "pending" | "
|
|
318
|
+
provisioning_state?: "pending" | "ready" | "failed" | undefined;
|
|
319
319
|
provisioning_error?: string | undefined;
|
|
320
320
|
provisioning_state_changed_at?: string | undefined;
|
|
321
321
|
bundle_configuration?: string | undefined;
|
|
@@ -500,7 +500,7 @@ export declare const tenantRoutes: OpenAPIHono<{
|
|
|
500
500
|
pushed_authorization_requests_supported?: boolean | undefined;
|
|
501
501
|
authorization_response_iss_parameter_supported?: boolean | undefined;
|
|
502
502
|
deployment_type?: "shared" | "wfp" | undefined;
|
|
503
|
-
provisioning_state?: "pending" | "
|
|
503
|
+
provisioning_state?: "pending" | "ready" | "failed" | undefined;
|
|
504
504
|
provisioning_error?: string | undefined;
|
|
505
505
|
provisioning_state_changed_at?: string | undefined;
|
|
506
506
|
bundle_configuration?: string | undefined;
|
|
@@ -702,7 +702,7 @@ export declare const tenantRoutes: OpenAPIHono<{
|
|
|
702
702
|
pushed_authorization_requests_supported?: boolean | undefined;
|
|
703
703
|
authorization_response_iss_parameter_supported?: boolean | undefined;
|
|
704
704
|
deployment_type?: "shared" | "wfp" | undefined;
|
|
705
|
-
provisioning_state?: "pending" | "
|
|
705
|
+
provisioning_state?: "pending" | "ready" | "failed" | undefined;
|
|
706
706
|
provisioning_error?: string | undefined;
|
|
707
707
|
provisioning_state_changed_at?: string | undefined;
|
|
708
708
|
bundle_configuration?: string | undefined;
|
|
@@ -817,10 +817,10 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
817
817
|
};
|
|
818
818
|
};
|
|
819
819
|
output: {
|
|
820
|
-
|
|
820
|
+
client_id: string;
|
|
821
821
|
user_id: string;
|
|
822
|
+
id: string;
|
|
822
823
|
created_at: string;
|
|
823
|
-
client_id: string;
|
|
824
824
|
rotating: boolean;
|
|
825
825
|
device: {
|
|
826
826
|
initial_user_agent: string;
|
|
@@ -851,10 +851,10 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
851
851
|
limit: number;
|
|
852
852
|
length: number;
|
|
853
853
|
tokens: {
|
|
854
|
-
|
|
854
|
+
client_id: string;
|
|
855
855
|
user_id: string;
|
|
856
|
+
id: string;
|
|
856
857
|
created_at: string;
|
|
857
|
-
client_id: string;
|
|
858
858
|
rotating: boolean;
|
|
859
859
|
device: {
|
|
860
860
|
initial_user_agent: string;
|
|
@@ -885,10 +885,10 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
885
885
|
next?: string | undefined;
|
|
886
886
|
} | {
|
|
887
887
|
tokens: {
|
|
888
|
-
|
|
888
|
+
client_id: string;
|
|
889
889
|
user_id: string;
|
|
890
|
+
id: string;
|
|
890
891
|
created_at: string;
|
|
891
|
-
client_id: string;
|
|
892
892
|
rotating: boolean;
|
|
893
893
|
device: {
|
|
894
894
|
initial_user_agent: string;
|
|
@@ -963,7 +963,7 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
963
963
|
};
|
|
964
964
|
};
|
|
965
965
|
output: {
|
|
966
|
-
type: "
|
|
966
|
+
type: "sapi" | "fn" | "i" | "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "cs" | "depnote" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "festft" | "fh" | "fimp" | "fi" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "sestft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "sv" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
|
|
967
967
|
date: string;
|
|
968
968
|
isMobile: boolean;
|
|
969
969
|
log_id: string;
|
|
@@ -1002,7 +1002,7 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
1002
1002
|
limit: number;
|
|
1003
1003
|
length: number;
|
|
1004
1004
|
logs: {
|
|
1005
|
-
type: "
|
|
1005
|
+
type: "sapi" | "fn" | "i" | "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "cs" | "depnote" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "festft" | "fh" | "fimp" | "fi" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "sestft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "sv" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
|
|
1006
1006
|
date: string;
|
|
1007
1007
|
isMobile: boolean;
|
|
1008
1008
|
log_id: string;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { Context, ExecutionContext } from "hono";
|
|
2
|
+
import type { Bindings, Variables, McpConfig } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* A tool-level error whose message is safe to show to the model as the
|
|
5
|
+
* `isError` text of a tool result.
|
|
6
|
+
*/
|
|
7
|
+
export declare class McpToolError extends Error {
|
|
8
|
+
}
|
|
9
|
+
/** The root app the tools dispatch into (token endpoint + management API). */
|
|
10
|
+
export interface FetchableApp {
|
|
11
|
+
fetch(request: Request, env: Bindings, executionCtx?: ExecutionContext): Response | Promise<Response>;
|
|
12
|
+
}
|
|
13
|
+
/** The authenticated MCP caller, resolved by the bearer middleware. */
|
|
14
|
+
export interface McpCaller {
|
|
15
|
+
/** The caller's raw control-plane access token (the exchange subject). */
|
|
16
|
+
subjectToken: string;
|
|
17
|
+
userId: string;
|
|
18
|
+
controlPlaneTenantId: string;
|
|
19
|
+
controlPlaneIssuer: string;
|
|
20
|
+
/** Set when the endpoint was reached on a tenant's own host. */
|
|
21
|
+
pinnedTenantId?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ManagementRequest {
|
|
24
|
+
/** Path below `/api/v2`, e.g. `/users`. */
|
|
25
|
+
path: string;
|
|
26
|
+
method?: string;
|
|
27
|
+
/** Query params; undefined and empty values are dropped. */
|
|
28
|
+
query?: Record<string, string | undefined>;
|
|
29
|
+
}
|
|
30
|
+
export interface AccessibleTenant {
|
|
31
|
+
tenant_id: string;
|
|
32
|
+
display_name?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ToolApi {
|
|
35
|
+
pinnedTenantId?: string;
|
|
36
|
+
/** Tenants the caller can reach: their control-plane organizations. */
|
|
37
|
+
listTenants(): Promise<AccessibleTenant[]>;
|
|
38
|
+
/** The tenant a call targets: the pinned host tenant, else `tenant_id`. */
|
|
39
|
+
tenantFor(args: Record<string, unknown>): string;
|
|
40
|
+
/** Call the management API for a tenant as the caller. */
|
|
41
|
+
management(tenantId: string, request: ManagementRequest): Promise<unknown>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Build the per-request tool API. Every management call:
|
|
45
|
+
*
|
|
46
|
+
* 1. Looks up the caller's control-plane organization named after the target
|
|
47
|
+
* tenant (organization name == tenant id). No organization, no access.
|
|
48
|
+
* 2. Exchanges the caller's token (RFC 8693) for a management-API token scoped
|
|
49
|
+
* to that organization. The exchange re-checks membership and derives the
|
|
50
|
+
* permissions from the caller's roles in the organization.
|
|
51
|
+
* 3. Dispatches in-process to `/api/v2` with a `tenant-id` header, so the
|
|
52
|
+
* management API's own auth, validation, hooks, logging and tenant
|
|
53
|
+
* dispatch (e.g. WFP forwarding) all apply unchanged.
|
|
54
|
+
*
|
|
55
|
+
* The caller's own token is never forwarded to the management API.
|
|
56
|
+
*/
|
|
57
|
+
export declare function createToolApi(ctx: Context<{
|
|
58
|
+
Bindings: Bindings;
|
|
59
|
+
Variables: Variables;
|
|
60
|
+
}>, app: FetchableApp, caller: McpCaller, config: McpConfig): ToolApi;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Hono } from "hono";
|
|
2
|
+
import type { Bindings, McpConfig, Variables } from "../../types";
|
|
3
|
+
import { type FetchableApp } from "./dispatch";
|
|
4
|
+
type McpEnv = {
|
|
5
|
+
Bindings: Bindings;
|
|
6
|
+
Variables: Variables;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Remote MCP server for the Management API.
|
|
10
|
+
*
|
|
11
|
+
* - `POST /mcp` — JSON-RPC tool endpoint, bearer-protected.
|
|
12
|
+
* - `GET /.well-known/oauth-protected-resource[/mcp]` — RFC 9728 metadata
|
|
13
|
+
* naming the control-plane issuer as the authorization server.
|
|
14
|
+
*
|
|
15
|
+
* Tokens are always issued by the control-plane tenant. On the control-plane
|
|
16
|
+
* host the tools take a `tenant_id`; on a tenant's own host (subdomain or
|
|
17
|
+
* custom domain, or a proxy forwarding one via `x-forwarded-host`) they are
|
|
18
|
+
* pinned to that tenant. Access is enforced per call in `dispatch.ts`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function createMcpApp(config: McpConfig, app: FetchableApp): Hono<McpEnv, import("hono/types").BlankSchema, "/">;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ToolApi } from "./dispatch";
|
|
2
|
+
import type { McpToolDef } from "./tools";
|
|
3
|
+
/**
|
|
4
|
+
* Minimal Model Context Protocol server over Streamable HTTP in stateless JSON
|
|
5
|
+
* mode. Each POST carries one (or, for older clients, a batch of) JSON-RPC
|
|
6
|
+
* message(s); requests are answered and notifications get a 202. A tools-only
|
|
7
|
+
* server needs just `initialize`, `ping`, `tools/list` and `tools/call`, so
|
|
8
|
+
* this is hand-rolled rather than pulling in the MCP SDK.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SUPPORTED_PROTOCOL_VERSIONS: string[];
|
|
11
|
+
type JsonRpcId = string | number;
|
|
12
|
+
type JsonRpcResponse = {
|
|
13
|
+
jsonrpc: "2.0";
|
|
14
|
+
id: JsonRpcId;
|
|
15
|
+
result: unknown;
|
|
16
|
+
} | {
|
|
17
|
+
jsonrpc: "2.0";
|
|
18
|
+
id: JsonRpcId | null;
|
|
19
|
+
error: {
|
|
20
|
+
code: number;
|
|
21
|
+
message: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const rpcError: (id: JsonRpcId | null, code: number, message: string) => JsonRpcResponse;
|
|
25
|
+
export interface McpSession {
|
|
26
|
+
api: ToolApi;
|
|
27
|
+
tools: McpToolDef[];
|
|
28
|
+
instructions: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Handle a parsed POST body. Returns undefined when the body held only
|
|
32
|
+
* notifications (the caller answers 202).
|
|
33
|
+
*/
|
|
34
|
+
export declare function handleMcpBody(session: McpSession, body: unknown): Promise<JsonRpcResponse | JsonRpcResponse[] | undefined>;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Bindings } from "../../types";
|
|
2
|
+
export declare const MCP_PATH = "/mcp";
|
|
3
|
+
/**
|
|
4
|
+
* Whether `value` is the resource URL of this deployment's MCP server on a
|
|
5
|
+
* host it serves: the issuer host, the control-plane issuer host, a
|
|
6
|
+
* `{tenant}.{issuer host}` subdomain of an existing tenant, or a registered
|
|
7
|
+
* custom domain.
|
|
8
|
+
*
|
|
9
|
+
* `/authorize` accepts such a URL as the token audience (RFC 8707 `resource`)
|
|
10
|
+
* without a registered resource server, and the MCP endpoint requires the
|
|
11
|
+
* token's `aud` to be exactly its own resource URL. Tokens are therefore
|
|
12
|
+
* bound to one MCP host and cannot be replayed from other clients or APIs.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isMcpResourceUrl(env: Bindings, value: string): Promise<boolean>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ToolApi } from "./dispatch";
|
|
2
|
+
/**
|
|
3
|
+
* A single MCP tool. `inputSchema` is a JSON Schema advertised verbatim via
|
|
4
|
+
* `tools/list`; `handler` returns JSON-serializable data that the protocol
|
|
5
|
+
* layer wraps as text content.
|
|
6
|
+
*/
|
|
7
|
+
export interface McpToolDef {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
inputSchema: Record<string, unknown>;
|
|
11
|
+
annotations?: Record<string, unknown>;
|
|
12
|
+
handler: (api: ToolApi, args: Record<string, unknown>) => Promise<unknown>;
|
|
13
|
+
}
|
|
14
|
+
export declare function redactSecrets(value: unknown): unknown;
|
|
15
|
+
/**
|
|
16
|
+
* Build the tool list for one mode. On the control-plane host every
|
|
17
|
+
* tenant-scoped tool takes a required `tenant_id`; on a tenant's own host the
|
|
18
|
+
* tenant is implied and `list_tenants` is not offered.
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildTools(pinnedTenantId?: string): McpToolDef[];
|
|
21
|
+
export declare function buildInstructions(pinnedTenantId?: string): string;
|