@redocly/realm 0.135.0-next.3 → 0.135.0-next.5
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/CHANGELOG.md +45 -0
- package/dist/api-schemas/search-facets.d.ts +41 -0
- package/dist/api-schemas/search-facets.js +1 -0
- package/dist/api-schemas/search.d.ts +66 -0
- package/dist/api-schemas/search.js +1 -0
- package/dist/client/app/Feedback/useSubmitFeedback.js +1 -1
- package/dist/client/app/Sidebar/helpers/filter-out-versioned-items.d.ts +5 -2
- package/dist/client/app/Sidebar/helpers/filter-out-versioned-items.js +1 -1
- package/dist/client/app/UserMenu/useUserMenu.js +1 -1
- package/dist/client/app/pages/DevLogin/DevLogin.js +1 -1
- package/dist/client/app/pages/Invite/Invite.js +1 -1
- package/dist/client/app/search/useAiSearch.js +1 -1
- package/dist/client/app/search/useFacets.js +1 -1
- package/dist/client/app/search/useSearch.js +1 -1
- package/dist/client/app/utils/resolveRouteBySlug.js +1 -1
- package/dist/client/browser-entry.js +2 -2
- package/dist/client/providers/post-message/PostMessageProvider.js +1 -1
- package/dist/client/providers/theme/ThemeDataProvider.js +1 -1
- package/dist/client/templates/asyncapi-docs/template.js +1 -1
- package/dist/client/templates/openapi-docs/helpers.js +2 -2
- package/dist/client/templates/openapi-docs/template.js +1 -1
- package/dist/client/types/post-message.d.ts +4 -0
- package/dist/constants/api.d.ts +49 -0
- package/dist/constants/api.js +1 -0
- package/dist/constants/common.d.ts +0 -48
- package/dist/constants/common.js +1 -1
- package/dist/server/config/env-config.d.ts +2 -2
- package/dist/server/config/env-schema.d.ts +5 -5
- package/dist/server/config/env-schemas/feature-flags.d.ts +4 -0
- package/dist/server/config/env-schemas/feature-flags.js +1 -1
- package/dist/server/config/env-schemas/server-config.d.ts +0 -3
- package/dist/server/config/env-schemas/server-config.js +1 -1
- package/dist/server/constants/common.d.ts +0 -1
- package/dist/server/constants/common.js +1 -1
- package/dist/server/constants/plugins/search.js +1 -1
- package/dist/server/plugins/graphql-docs/template/GraphQLDocs.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/index.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-image-gallery.d.ts +4 -0
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-image-gallery.js +1 -0
- package/dist/server/plugins/markdown/extract-frontmatter.d.ts +6 -0
- package/dist/server/plugins/markdown/extract-frontmatter.js +1 -0
- package/dist/server/plugins/markdown/markdown-frontmatter-loader.js +1 -1
- package/dist/server/plugins/mcp/auth/auth-handlers.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/codemode/build-execute-tool-description.d.ts +4 -0
- package/dist/server/plugins/mcp/docs-mcp/codemode/build-execute-tool-description.js +4 -0
- package/dist/server/plugins/mcp/docs-mcp/codemode/sandbox.d.ts +3 -0
- package/dist/server/plugins/mcp/docs-mcp/codemode/sandbox.js +7 -0
- package/dist/server/plugins/mcp/docs-mcp/codemode/types.d.ts +9 -0
- package/dist/server/plugins/mcp/docs-mcp/tool-schemas.d.ts +2 -0
- package/dist/server/plugins/mcp/docs-mcp/tool-schemas.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/core/search.d.ts +2 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/core/search.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/core/types.d.ts +6 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/core/types.js +0 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/core/whoami.d.ts +2 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/execute.d.ts +9 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/execute.js +1 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/graphql/get-graphql-schema.d.ts +2 -3
- package/dist/server/plugins/mcp/docs-mcp/tools/graphql/get-graphql-type-list.d.ts +2 -9
- package/dist/server/plugins/mcp/docs-mcp/tools/graphql/get-graphql-type.d.ts +2 -5
- package/dist/server/plugins/mcp/docs-mcp/tools/graphql/list-graphql-apis.d.ts +2 -5
- package/dist/server/plugins/mcp/docs-mcp/tools/graphql/types.d.ts +21 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/index.d.ts +11 -46
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/get-endpoint-info.d.ts +2 -6
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/get-endpoints.d.ts +2 -4
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/get-full-api-description.d.ts +2 -4
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/get-security-schemes.d.ts +2 -4
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/list-apis.d.ts +2 -5
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/types.d.ts +16 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/types.js +0 -0
- package/dist/server/plugins/mcp/handlers/errors.js +1 -1
- package/dist/server/plugins/mcp/index.js +1 -1
- package/dist/server/plugins/mcp/mode.d.ts +9 -0
- package/dist/server/plugins/mcp/mode.js +1 -0
- package/dist/server/plugins/mcp/servers/docs-server.js +1 -1
- package/dist/server/plugins/mcp/types.d.ts +1 -0
- package/dist/server/plugins/mcp/workers/execute-mcp-tool.js +1 -1
- package/dist/server/plugins/mcp/workers/mcp-tool-telemetry.d.ts +4 -0
- package/dist/server/plugins/mcp/workers/mcp-tool-telemetry.js +1 -0
- package/dist/server/plugins/search/engines/flexsearch/index.d.ts +3 -3
- package/dist/server/plugins/search/engines/flexsearch/index.js +1 -1
- package/dist/server/plugins/search/engines/search-engine.d.ts +3 -3
- package/dist/server/plugins/search/engines/search-engine.js +1 -1
- package/dist/server/plugins/search/engines/typesense/index.d.ts +3 -3
- package/dist/server/plugins/search/engines/typesense/index.js +1 -1
- package/dist/server/plugins/sitemap/index.js +1 -1
- package/dist/server/types/plugins/common.d.ts +3 -0
- package/dist/server/types/plugins/search.d.ts +2 -2
- package/dist/server/types/web-server.d.ts +8 -0
- package/dist/server/utils/rbac.js +1 -1
- package/dist/server/web-server/auth.js +3 -3
- package/dist/server/web-server/dev-server.js +1 -1
- package/dist/server/web-server/middleware/jsonValidatorMiddleware.d.ts +336 -0
- package/dist/server/web-server/middleware/jsonValidatorMiddleware.js +1 -0
- package/dist/server/web-server/routes/auth.d.ts +1 -1
- package/dist/server/web-server/routes/auth.js +1 -1
- package/dist/server/web-server/routes/catalog/bff-catalog-related-entities.js +1 -1
- package/dist/server/web-server/routes/catalog/bff-catalog.js +1 -1
- package/dist/server/web-server/routes/catalog/catalog-relations.js +1 -1
- package/dist/server/web-server/routes/catalog/catalog.js +1 -1
- package/dist/server/web-server/routes/cors-proxy.js +1 -1
- package/dist/server/web-server/routes/index.js +1 -1
- package/dist/server/web-server/routes/mcp-routes/mcp-oauth.js +1 -1
- package/dist/server/web-server/routes/mcp-routes/mcp-routes.js +1 -1
- package/dist/server/web-server/routes/page-data.js +1 -1
- package/dist/server/web-server/routes/search.d.ts +5 -3
- package/dist/server/web-server/routes/search.js +1 -1
- package/dist/types/api.d.ts +15 -0
- package/dist/types/api.js +0 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/auth/build-login-url.js +1 -1
- package/dist/utils/auth/is-auth-route-path.js +1 -1
- package/package.json +14 -12
- package/dist/types/search.d.ts +0 -29
- /package/dist/{types/search.js → server/plugins/mcp/docs-mcp/codemode/types.js} +0 -0
|
@@ -15,7 +15,6 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
15
15
|
REDOCLY_CONTENT_DIR: z.ZodOptional<z.ZodString>;
|
|
16
16
|
REDOCLY_PORTAL_VERSION: z.ZodOptional<z.ZodString>;
|
|
17
17
|
REDOCLY_TELEMETRY: z.ZodOptional<z.ZodString>;
|
|
18
|
-
REDOCLY_TELEMETRY_ENDPOINT: z.ZodOptional<z.ZodString>;
|
|
19
18
|
TELEMETRY_DEV_DEBUG: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
20
19
|
WEB_SERVER_IDLE_TIMEOUT: z.ZodOptional<z.ZodString>;
|
|
21
20
|
REDOCLY_PROBLEMS_OUTPUT_FILE: z.ZodOptional<z.ZodString>;
|
|
@@ -57,6 +56,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
57
56
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
58
57
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL: z.ZodOptional<z.ZodString>;
|
|
59
58
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT: z.ZodOptional<z.ZodString>;
|
|
59
|
+
REDOCLY_EXP_MCP_CODE_MODE_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
60
60
|
} & {
|
|
61
61
|
SEARCH_DEV_REINIT: z.ZodOptional<z.ZodString>;
|
|
62
62
|
SEARCH_DEV_DEBUG: z.ZodEffects<z.ZodDefault<z.ZodEnum<["true", "false"]>>, boolean, "false" | "true" | undefined>;
|
|
@@ -95,7 +95,6 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
95
95
|
REDOCLY_CONTENT_DIR?: string | undefined;
|
|
96
96
|
REDOCLY_PORTAL_VERSION?: string | undefined;
|
|
97
97
|
REDOCLY_TELEMETRY?: string | undefined;
|
|
98
|
-
REDOCLY_TELEMETRY_ENDPOINT?: string | undefined;
|
|
99
98
|
TELEMETRY_DEV_DEBUG?: boolean | undefined;
|
|
100
99
|
WEB_SERVER_IDLE_TIMEOUT?: string | undefined;
|
|
101
100
|
REDOCLY_PROBLEMS_OUTPUT_FILE?: string | undefined;
|
|
@@ -133,6 +132,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
133
132
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: boolean | undefined;
|
|
134
133
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
135
134
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
135
|
+
REDOCLY_EXP_MCP_CODE_MODE_ENABLED?: boolean | undefined;
|
|
136
136
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
137
137
|
SEARCH_DEV_DEBUG: boolean;
|
|
138
138
|
TYPESENSE_API_URL?: string | undefined;
|
|
@@ -164,7 +164,6 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
164
164
|
REDOCLY_CONTENT_DIR?: string | undefined;
|
|
165
165
|
REDOCLY_PORTAL_VERSION?: string | undefined;
|
|
166
166
|
REDOCLY_TELEMETRY?: string | undefined;
|
|
167
|
-
REDOCLY_TELEMETRY_ENDPOINT?: string | undefined;
|
|
168
167
|
TELEMETRY_DEV_DEBUG?: "false" | "true" | undefined;
|
|
169
168
|
WEB_SERVER_IDLE_TIMEOUT?: string | undefined;
|
|
170
169
|
REDOCLY_PROBLEMS_OUTPUT_FILE?: string | undefined;
|
|
@@ -202,6 +201,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
202
201
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: "false" | "true" | undefined;
|
|
203
202
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
204
203
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
204
|
+
REDOCLY_EXP_MCP_CODE_MODE_ENABLED?: "false" | "true" | undefined;
|
|
205
205
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
206
206
|
SEARCH_DEV_DEBUG?: "false" | "true" | undefined;
|
|
207
207
|
TYPESENSE_API_URL?: string | undefined;
|
|
@@ -233,7 +233,6 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
233
233
|
REDOCLY_CONTENT_DIR?: string | undefined;
|
|
234
234
|
REDOCLY_PORTAL_VERSION?: string | undefined;
|
|
235
235
|
REDOCLY_TELEMETRY?: string | undefined;
|
|
236
|
-
REDOCLY_TELEMETRY_ENDPOINT?: string | undefined;
|
|
237
236
|
TELEMETRY_DEV_DEBUG?: boolean | undefined;
|
|
238
237
|
WEB_SERVER_IDLE_TIMEOUT?: string | undefined;
|
|
239
238
|
REDOCLY_PROBLEMS_OUTPUT_FILE?: string | undefined;
|
|
@@ -271,6 +270,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
271
270
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: boolean | undefined;
|
|
272
271
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
273
272
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
273
|
+
REDOCLY_EXP_MCP_CODE_MODE_ENABLED?: boolean | undefined;
|
|
274
274
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
275
275
|
SEARCH_DEV_DEBUG: boolean;
|
|
276
276
|
TYPESENSE_API_URL?: string | undefined;
|
|
@@ -302,7 +302,6 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
302
302
|
REDOCLY_CONTENT_DIR?: string | undefined;
|
|
303
303
|
REDOCLY_PORTAL_VERSION?: string | undefined;
|
|
304
304
|
REDOCLY_TELEMETRY?: string | undefined;
|
|
305
|
-
REDOCLY_TELEMETRY_ENDPOINT?: string | undefined;
|
|
306
305
|
TELEMETRY_DEV_DEBUG?: "false" | "true" | undefined;
|
|
307
306
|
WEB_SERVER_IDLE_TIMEOUT?: string | undefined;
|
|
308
307
|
REDOCLY_PROBLEMS_OUTPUT_FILE?: string | undefined;
|
|
@@ -340,6 +339,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
340
339
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: "false" | "true" | undefined;
|
|
341
340
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
342
341
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
342
|
+
REDOCLY_EXP_MCP_CODE_MODE_ENABLED?: "false" | "true" | undefined;
|
|
343
343
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
344
344
|
SEARCH_DEV_DEBUG?: "false" | "true" | undefined;
|
|
345
345
|
TYPESENSE_API_URL?: string | undefined;
|
|
@@ -15,6 +15,8 @@ export declare const featureFlagsSchema: z.ZodObject<{
|
|
|
15
15
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL: z.ZodOptional<z.ZodString>;
|
|
16
16
|
/** (Optional) API endpoint for the agent feedback endpoint;**/
|
|
17
17
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT: z.ZodOptional<z.ZodString>;
|
|
18
|
+
/** Experimental: serve the Docs MCP server in codemode (a single `execute` tool). */
|
|
19
|
+
REDOCLY_EXP_MCP_CODE_MODE_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
18
20
|
}, "strip", z.ZodTypeAny, {
|
|
19
21
|
NEW_CATALOG_ENABLED?: boolean | undefined;
|
|
20
22
|
NEW_SCORECARDS_ENABLED?: boolean | undefined;
|
|
@@ -25,6 +27,7 @@ export declare const featureFlagsSchema: z.ZodObject<{
|
|
|
25
27
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: boolean | undefined;
|
|
26
28
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
27
29
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
30
|
+
REDOCLY_EXP_MCP_CODE_MODE_ENABLED?: boolean | undefined;
|
|
28
31
|
}, {
|
|
29
32
|
NEW_CATALOG_ENABLED?: "false" | "true" | undefined;
|
|
30
33
|
NEW_SCORECARDS_ENABLED?: "false" | "true" | undefined;
|
|
@@ -35,5 +38,6 @@ export declare const featureFlagsSchema: z.ZodObject<{
|
|
|
35
38
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: "false" | "true" | undefined;
|
|
36
39
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
37
40
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
41
|
+
REDOCLY_EXP_MCP_CODE_MODE_ENABLED?: "false" | "true" | undefined;
|
|
38
42
|
}>;
|
|
39
43
|
//# sourceMappingURL=feature-flags.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as
|
|
1
|
+
import{z as _}from"zod";import{envBooleanStringOptional as E}from"../../utils/envs/env-boolean-string.js";const o=_.object({NEW_CATALOG_ENABLED:E(),NEW_SCORECARDS_ENABLED:E(),ENABLE_COMMENTS:_.string().optional(),REDOCLY_EXP_DISABLE_MD_VALIDATION:E(),ENABLE_SOURCE_MAPS:E(),PLAN_GATES:_.string().optional(),REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED:E(),REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL:_.string().optional(),REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT:_.string().optional(),REDOCLY_EXP_MCP_CODE_MODE_ENABLED:E()});export{o as featureFlagsSchema};
|
|
@@ -12,7 +12,6 @@ export declare const serverConfigSchema: z.ZodObject<{
|
|
|
12
12
|
REDOCLY_CONTENT_DIR: z.ZodOptional<z.ZodString>;
|
|
13
13
|
REDOCLY_PORTAL_VERSION: z.ZodOptional<z.ZodString>;
|
|
14
14
|
REDOCLY_TELEMETRY: z.ZodOptional<z.ZodString>;
|
|
15
|
-
REDOCLY_TELEMETRY_ENDPOINT: z.ZodOptional<z.ZodString>;
|
|
16
15
|
TELEMETRY_DEV_DEBUG: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
17
16
|
WEB_SERVER_IDLE_TIMEOUT: z.ZodOptional<z.ZodString>;
|
|
18
17
|
REDOCLY_PROBLEMS_OUTPUT_FILE: z.ZodOptional<z.ZodString>;
|
|
@@ -27,7 +26,6 @@ export declare const serverConfigSchema: z.ZodObject<{
|
|
|
27
26
|
REDOCLY_CONTENT_DIR?: string | undefined;
|
|
28
27
|
REDOCLY_PORTAL_VERSION?: string | undefined;
|
|
29
28
|
REDOCLY_TELEMETRY?: string | undefined;
|
|
30
|
-
REDOCLY_TELEMETRY_ENDPOINT?: string | undefined;
|
|
31
29
|
TELEMETRY_DEV_DEBUG?: boolean | undefined;
|
|
32
30
|
WEB_SERVER_IDLE_TIMEOUT?: string | undefined;
|
|
33
31
|
REDOCLY_PROBLEMS_OUTPUT_FILE?: string | undefined;
|
|
@@ -42,7 +40,6 @@ export declare const serverConfigSchema: z.ZodObject<{
|
|
|
42
40
|
REDOCLY_CONTENT_DIR?: string | undefined;
|
|
43
41
|
REDOCLY_PORTAL_VERSION?: string | undefined;
|
|
44
42
|
REDOCLY_TELEMETRY?: string | undefined;
|
|
45
|
-
REDOCLY_TELEMETRY_ENDPOINT?: string | undefined;
|
|
46
43
|
TELEMETRY_DEV_DEBUG?: "false" | "true" | undefined;
|
|
47
44
|
WEB_SERVER_IDLE_TIMEOUT?: string | undefined;
|
|
48
45
|
REDOCLY_PROBLEMS_OUTPUT_FILE?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as o}from"zod";import{envBooleanStringOptional as E}from"../../utils/envs/env-boolean-string.js";const i=o.object({PORT:o.coerce.number().optional(),REDOCLY_LOG_FORMAT:o.string().optional(),REDOCLY_LOG_LEVEL:o.string().optional(),TERM:o.string().optional(),INSPECT_MODE:o.string().optional(),REDOCLY_PREFIX_PATHS:o.string().optional(),REDOCLY_CONTENT_DIR:o.string().optional(),REDOCLY_PORTAL_VERSION:o.string().optional(),REDOCLY_TELEMETRY:o.string().optional(),
|
|
1
|
+
import{z as o}from"zod";import{envBooleanStringOptional as E}from"../../utils/envs/env-boolean-string.js";const i=o.object({PORT:o.coerce.number().optional(),REDOCLY_LOG_FORMAT:o.string().optional(),REDOCLY_LOG_LEVEL:o.string().optional(),TERM:o.string().optional(),INSPECT_MODE:o.string().optional(),REDOCLY_PREFIX_PATHS:o.string().optional(),REDOCLY_CONTENT_DIR:o.string().optional(),REDOCLY_PORTAL_VERSION:o.string().optional(),REDOCLY_TELEMETRY:o.string().optional(),TELEMETRY_DEV_DEBUG:E(),WEB_SERVER_IDLE_TIMEOUT:o.string().optional(),REDOCLY_PROBLEMS_OUTPUT_FILE:o.string().optional(),REDOCLY_METADATA_OUTPUT_FOLDER:o.string().optional()});export{i as serverConfigSchema};
|
|
@@ -44,7 +44,6 @@ export declare const SSR_WORKERS_MIN: number;
|
|
|
44
44
|
export declare const SSR_WORKERS_MAX: number;
|
|
45
45
|
export declare const BEGIN_CERTIFICATE_DELIMITER = "-----BEGIN CERTIFICATE-----";
|
|
46
46
|
export declare const END_CERTIFICATE_DELIMITER = "-----END CERTIFICATE-----";
|
|
47
|
-
export declare const TELEMETRY_ENDPOINT: string;
|
|
48
47
|
export declare const TELEMETRY_ENABLED: boolean;
|
|
49
48
|
export declare const OTEL_TRACES_DEV_URL = "http://localhost:4318/v1/traces";
|
|
50
49
|
export declare const OTEL_EXCLUDED_ROUTES: "/_health"[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ServerRoutes as L
|
|
1
|
+
import{ServerRoutes as L}from"../../constants/api.js";import{USER_THEME_ALIAS as c}from"../../constants/common.js";import{envConfig as _}from"../config/env-config.js";const N="runtime",x="/assets",U="/_spec",P="/_bundle",l="static",M="redocly:::linkOriginal",a="@",i="default",m=new RegExp("((?!@i18n\\/|@l10n\\/)\\/?@.*?(?=\\/))","g"),H="@redocly/theme/plugin.js",F="styles.css",G=["@theme/plugin.js","@theme/plugin.cjs","@theme/plugin.mjs"],u=_.JWT_SECRET_KEY||"test_secret_key",A="@i18n",p="@l10n",Y=[c,A,p],d="https://redocly.com/auth/aud",g="catalog.json",B="scorecard.json",h="page-count.json",K="sitemap.xml",J="llms.txt",R=_.PROJECT_ID,e=_.PROJECT_SLUG,n=_.ORGANIZATION_ID,s=_.ORG_SLUG,E=_.BH_API_URL,t=E&&s&&e?`${E}/orgs/${s}/projects/${e}`:void 0,o=E&&n&&R?`${E}/orgs/${n}/projects/${R}`:void 0,S=E?`${E}/entitlements/.well-known/jwks`:"https://app.cloud.redocly.com/api/entitlements/.well-known/jwks",W=_.ENTITLEMENTS_JWKS_CDN_URL||S,$=t?`${t}/feedback`:"",f=o?`${o}/ai-agentic-conversations`:"",j=o?`${o}/semantic-search`:"",V=t&&`${t}/registry/apis`,X=t&&`${t}/registry/paths`,k="no-store",w=365*24*60*60,y="X-Redocly-Cache-Control",v="no-cache",b="public, s-maxage=86400, max-age=10, must-revalidate",Z=_.AUTH_URL,q="Developer Documentation",T=_.REDOCLY_SSR_RENDER_MODE==="worker"?"worker":"main",z=T==="main"?0:_.REDOCLY_SSR_WORKERS_MIN!=null?Number(_.REDOCLY_SSR_WORKERS_MIN):2,Q=T==="main"?1:_.REDOCLY_SSR_WORKERS_MAX!=null?Number(_.REDOCLY_SSR_WORKERS_MAX):5,__="-----BEGIN CERTIFICATE-----",E_="-----END CERTIFICATE-----",t_=!_.isDevelopMode&&_.REDOCLY_TELEMETRY!=="off"||_.REDOCLY_TELEMETRY==="on",o_="http://localhost:4318/v1/traces",R_=[L.HEALTH],r=_.SERVER_EDITOR_APP_URL||"http://127.0.0.1:3000",e_=_.REDOCLY_CORS_ORIGINS?_.REDOCLY_CORS_ORIGINS.split(",").map(I=>I.trim()).filter(Boolean).concat(r):[r];export{e_ as ALLOWED_CORS_ORIGINS,d as ALTERNATIVE_AUD_CLAIM_NAME,f as ASK_AI_API_URL,Z as AUTH_URL,__ as BEGIN_CERTIFICATE_DELIMITER,t as BH_API_PROJECTS_URL,o as BH_API_PROJECTS_URL_V2,k as CACHE_CONTROL_NO_STORE_HEADER_VALUE,v as CACHE_CONTROL_PUBLIC_HTML,g as CATALOG_OUTPUT_FILE_NAME,w as DEFAULT_IMMUTABLE_CACHE_MAX_AGE,G as DEFAULT_PROJECT_PLUGIN_PATHS,H as DEFAULT_THEME_PLUGIN_PATH,q as DEFAULT_TITLE,i as DEFAULT_VERSION_NAME,U as DEPRECATED_PUBLIC_API_DEFINITIONS_FOLDER,E_ as END_CERTIFICATE_DELIMITER,W as ENTITLEMENTS_JWKS_URL,$ as FEEDBACK_API_URL,A as I18N_DIR_NAME,u as JWT_SECRET_KEY,p as L10N_DIR_NAME,M as LINK_ORIGINAL_ATTR_NAME,J as LLMS_TXT_FILE_NAME,n as ORG_ID,s as ORG_SLUG,R_ as OTEL_EXCLUDED_ROUTES,o_ as OTEL_TRACES_DEV_URL,h as PAGE_COUNT_OUTPUT_FILE_NAME,R as PROJECT_ID,e as PROJECT_SLUG,P as PUBLIC_API_DEFINITIONS_FOLDER,x as PUBLIC_ASSETS_FOLDER,l as PUBLIC_STATIC_FOLDER,V as REGISTRY_APIS_API_URL,X as REGISTRY_APIS_PATHS_API_URL,Y as RESERVED_DIR_NAMES,N as RUNTIME_RESOURCES_DIR,B as SCORECARD_OUTPUT_FILE_NAME,j as SEMANTIC_SEARCH_API_URL,r as SERVER_EDITOR_APP_URL,K as SITEMAP_FILE_NAME,T as SSR_RENDER_MODE,Q as SSR_WORKERS_MAX,z as SSR_WORKERS_MIN,F as STYLES_FILE,t_ as TELEMETRY_ENABLED,m as VERSIONED_FOLDER_REGEXP_MATCH,a as VERSION_SEPARATOR,y as X_REDOCLY_CACHE_CONTROL_HEADER,b as X_REDOCLY_CACHE_CONTROL_PUBLIC_HTML};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_ANONYMOUS_VISITOR_TEAM as e,DEFAULT_AUTHENTICATED_TEAM as t}from"../../../constants/common.js";const _="flexsearch",A=["
|
|
1
|
+
import{DEFAULT_ANONYMOUS_VISITOR_TEAM as e,DEFAULT_AUTHENTICATED_TEAM as t}from"../../../constants/common.js";const _="flexsearch",A=["title","text","path","httpPath","parameters[]:name","parameters[]:description","parameters[]:place","parameters[]:path"],o="Documentation",r="API Reference",p="search",T=100,a=10,n=20,s=100,c=150,I="ai-search",S=50,C=250,R=Symbol("metadata"),D={id:"",url:"",title:"",text:"",security:[],parameters:[{place:"",mediaType:void 0,name:"",description:"",path:[],type:"object",required:!1,example:void 0,enum:void 0}],rbacTeams:[e,t]},N=!0,x=["title"];export{I as AI_INDEX_EXPORT_FOLDER,S as AI_SEARCH_CHUNK_SIZE,C as AI_SEARCH_DOCUMENT_CHUNK_SIZE,D as BASE_SEARCH_DOCUMENT,N as DEFAULT_AI_SEARCH_ENABLED,_ as DEFAULT_SEARCH_ENGINE,x as DISABLE_DEEP_LINK_IF_FIELDS_EXIST,c as HIGHLIGHTED_TEXT_MAX_LENGTH,p as SEARCH_DATA_EXPORT_FOLDER,R as SEARCH_DOCUMENT_METADATA_KEY,a as SEARCH_GROUP_LIMIT,r as SEARCH_GROUP_NAME_API,o as SEARCH_GROUP_NAME_DOCUMENTATION,A as SEARCH_INDEX_FIELDS,T as SEARCH_LIMIT,n as SEARCH_MAX_FACET_VALUES,s as SEARCH_MAX_INMEMORY_DOCUMENTS_COUNT};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import t from"react";import c from"styled-components";import{RedoclyGraphQLDocs as h}from"@redocly/graphql-docs";import{buildSchema as l}from"graphql";import{LayoutVariant as f}from"@redocly/theme/components/SidebarActions/SidebarActions";import{useThemeConfig as p}from"@redocly/theme/core/hooks";import{withPathPrefix as g}from"@redocly/theme/core/utils";import{ServerRoutes as E}from"../../../../constants/
|
|
1
|
+
import t from"react";import c from"styled-components";import{RedoclyGraphQLDocs as h}from"@redocly/graphql-docs";import{buildSchema as l}from"graphql";import{LayoutVariant as f}from"@redocly/theme/components/SidebarActions/SidebarActions";import{useThemeConfig as p}from"@redocly/theme/core/hooks";import{withPathPrefix as g}from"@redocly/theme/core/utils";import{ServerRoutes as E}from"../../../../constants/api.js";import{CLIENT_TELEMETRY_ENABLED as u}from"../../../../client/constants/common.js";import{PACKAGE_NAME as d}from"../../../../config/product-gates.js";import{envConfig as S}from"../../../config/env-config.js";import{usePageSharedData as L}from"../../../../client/providers/page-data/hooks.js";import{useCodeHighlight as R}from"../../../../client/app/hooks/codeHighlight/useCodeHighlight.js";function v({pageProps:o}){const e=L("graphQlSettings"),{settings:r}=o,{graphql:i}=p(),{highlight:n}=R(),m=t.useMemo(()=>({graphql:l(e)}),[e]),s=t.useMemo(()=>{const a={...i,...r};return{layout:o.apiOptions?.layout??f.THREE_PANEL,...a,markdown:{...a.markdown,highlight:n},navigation:{contentPrefix:""}}},[i,r,n,o.apiOptions?.layout]);return t.createElement(C,null,t.createElement(h,{schema:m,settings:s,telemetryConfig:{collectorUrl:new URL(g(E.OTEL_TRACES),location.origin).toString(),disabled:!u,serviceVersion:`${d}@${S.REDOCLY_PORTAL_VERSION}`}}))}const C=c.div`
|
|
2
2
|
--navigation-anchor-offset: var(--navbar-height);
|
|
3
3
|
--sidebar-width: 0px;
|
|
4
4
|
`;export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveOpenApiRef as e}from"./resolve-open-api-ref.js";import{resolveJsonSchemaRef as
|
|
1
|
+
import{resolveOpenApiRef as e}from"./resolve-open-api-ref.js";import{resolveJsonSchemaRef as r}from"./resolve-json-schema-ref.js";import{resolveParsedYaml as o}from"./resolve-parsed-yaml.js";import{resolveRawContent as m}from"./resolve-raw-content.js";import{resolveSvgContent as t}from"./resolve-svg-content.js";import{resolveRelativePath as i}from"./resolve-relative-path.js";import{resolveLink as l}from"./resolve-link.js";import{resolveNativeMdLink as a}from"./resolve-native-md-link.js";import{resolveCodeSnippetFromFile as s}from"./resolve-code-snippet-from-file.js";import{resolveDiagramFromFile as p}from"./resolve-diagram-from-file.js";import{resolveHtmlSourceAttribute as n}from"./resolve-html-source-attribute.js";import{resolveHtmlHref as v}from"./resolve-html-href.js";import{resolveImageSrc as f}from"./resolve-image-src.js";import{resolveImageSrcSet as S}from"./resolve-image-src-set.js";import{resolveImageGallery as c}from"./resolve-image-gallery.js";import{resolveNavLinks as g}from"./resolve-nav-links.js";import{resolveRelativeOrCdnIcon as h}from"./resolve-relative-or-cdn-icon.js";import{resolveCodeWalkthroughFilesets as d}from"./code-walkthrough/filesets-resolver.js";import{resolveJsonExampleRef as F}from"./resolve-json-example-ref.js";import{resolveSampleFromJsonSchema as R}from"./resolve-sample-from-json-schema.js";const Y={openapiRef:e,jsonSchemaRef:r,parsedYaml:o,rawContent:m,svgContent:t,relativePath:i,link:l,nativeMdLink:a,codeSnippetFile:s,diagramFile:p,htmlSourceAttribute:n,htmlHref:v,imageSrc:f,imageSrcSet:S,imageGallery:c,navLinks:g,relativeOrCdnIcon:h,codeWalkthroughFilesets:d,jsonExampleRef:F,sampleFromJsonSchema:R};export{Y as attributeResolvers};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Node } from '@markdoc/markdoc';
|
|
2
|
+
import type { MarkdocResolveContext, WithOriginalAttr } from '../../../types';
|
|
3
|
+
export declare function resolveImageGallery(node: WithOriginalAttr<Node>, attributeName: string, pageRelativePath: string, { actions: { contentDir, outdir }, context }: MarkdocResolveContext): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=resolve-image-gallery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getNodeAttribute as p}from"../../../../markdoc/helpers/get-node-attribute.js";import{setNodeAttributeValue as u}from"../../../../markdoc/helpers/set-node-attribute-value.js";import{FileNotFoundError as y,resolveAssetPath as A}from"../../../utils/index.js";import{MdResolveError as d}from"./md-resolve-error.js";import{getLinkOriginalAttrName as v}from"./utils.js";async function P(e,i,f,{actions:{contentDir:c,outdir:m},context:g}){const l=e,h=p(e,i),a=v(i),s=l[a]??h;if(!Array.isArray(s))return;l[a]=s;const r=[],o=[];for(const t of s){if(typeof t!="string"){r.push(t);continue}try{r.push(await A(t,g.fs,{fromFileRelativePath:f,contentDir:c,outdir:m}))}catch(n){if(n instanceof y)r.push(t),o.push(n.filePath);else throw n}}if(u(e,i,r),o.length>0){const[t]=o;throw new d(o.length===1?`File ${t} does not exist`:`Files do not exist: ${o.join(", ")}`,{rawLink:t,link:t})}}export{P as resolveImageGallery};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import a from"js-yaml";const c=/^---\r?\n(?:([\s\S]*?)\r?\n)?---\r?\n?/;function m(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function f(t){const n=t.match(c);if(!n)return{frontmatter:{}};const o=n[1]??"";try{const r=a.load(o);return{frontmatter:m(r)?r:{}}}catch(r){const e=r instanceof Error?r.message:String(r);return{frontmatter:{},frontmatterError:e}}}export{f as extractFrontmatter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{extractFrontmatter as m}from"./extract-frontmatter.js";import{ensureFrontmatterThemeCompatibility as f}from"../ensure-frontmatter-theme-compatibility.js";const w=async(r,t,a)=>{const n=await t.fs.read(r),{frontmatter:e,frontmatterError:o}=m(n);return o&&a(new Error(o)),{frontmatter:await f(e,r,t.fs)}};export{w as markdownFrontmatterLoader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{extractTokenFromAuthHeader as u}from"../../../plugins/mcp/utils/jwt.js";import{getUserParamsFromCookies as d}from"../../../web-server/auth.js";import{DEFAULT_ANONYMOUS_VISITOR_TEAM as i,RBAC_ALL_OTHER_TEAMS as a
|
|
1
|
+
import{extractTokenFromAuthHeader as u}from"../../../plugins/mcp/utils/jwt.js";import{getUserParamsFromCookies as d}from"../../../web-server/auth.js";import{ServerRoutes as l}from"../../../../constants/api.js";import{DEFAULT_ANONYMOUS_VISITOR_TEAM as i,RBAC_ALL_OTHER_TEAMS as a}from"../../../../constants/common.js";import{withPathPrefix as h}from"@redocly/theme/core/utils";function c(e){return!e||typeof e!="object"||Object.keys(e).length===0?!1:!(e[i]&&e[i]!=="none"||e[a]&&e[a]!=="none")}function R(e,t){if(!t||Object.keys(t).length===0)return e;const r=t.content;if(r&&Object.keys(r).length>0&&Object.values(r).some(c))return!0;const o=t.teamFoldersBaseRoles;return c(o)?!0:e}async function O(e,t){const r=e.headers.get("Authorization");if(!r)return{isAuthenticated:!1};const o=u(r),s=t?.config?.ssoDirect||{},n=o?await d(s,{authorization:o}):{};return o&&n&&n.isAuthenticated?{isAuthenticated:!0,isTokenValid:!0,currentUser:{teams:n.teams||[],email:n.email||"",claims:n,isAuthenticated:!0,idpAccessToken:n.idpAccessToken||void 0,idpId:n.idpId||void 0},accessToken:o}:{isAuthenticated:!1,isTokenValid:!1}}function _(e){return e=e.replace(/^http:\/\//,"https://"),new Response(JSON.stringify({error:"unauthorized",message:"Authentication required"}),{status:401,headers:{"Content-Type":"application/json","WWW-Authenticate":`Bearer resource_metadata="${e}${l.MCP_OAUTH_PROTECTED_RESOURCE}${h("/mcp")}"`,"Access-Control-Allow-Origin":"*"}})}function g(){return new Response(JSON.stringify({error:"invalid_token",message:"Invalid or expired token"}),{status:401,headers:{"Content-Type":"application/json","WWW-Authenticate":'Bearer error="invalid_token", error_description="Invalid or expired token"',"Access-Control-Allow-Origin":"*"}})}export{g as constructInvalidTokenResponse,_ as constructUnauthorizedResponse,O as handleMcpAuth,R as shouldHandleMcpAuth};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const c=/^[A-Za-z_$][\w$]*$/;function p(e){const n=e.split(/[^A-Za-z0-9]+/).filter(Boolean).map((o,r)=>r===0?o:o[0].toUpperCase()+o.slice(1)).join("");return c.test(n)?n:`_${n}`}function y(e){return["Execute JavaScript in a sandbox to call the documentation tools below.","","Each tool is an async function on the global `tools` object.","","Do everything one request needs in a SINGLE execution: call as many tools as you need,","pass one call's output into the next, and branch or loop on intermediate results, then","`return` the final value. Each `execute` call is a full round-trip, so one script that","gathers everything is far cheaper and faster than several sequential calls. Only make","another `execute` call when you must react to something you genuinely could not","anticipate, and never repeat discovery you have already done.","","Example \u2014 one call that lists APIs, then drills into an endpoint:","","```ts","const { items } = await tools.listApis({ filter: 'billing' });","const { endpoints } = await tools.getEndpoints({ name: items[0].name });","return tools.getEndpointInfo({"," name: items[0].name,"," path: endpoints[0].path,"," method: endpoints[0].method,","});","```","","Available tools:","","Types named `OpenApi\u2026` are the standard OpenAPI Specification objects.","","```ts","declare const tools: {",e.map(n=>{const o=n.schema,r=s(o),u=n.outputSchema?s(n.outputSchema):"unknown",a=o.required?.length?"input":"input?";return` /** ${n.description} */
|
|
2
|
+
${p(n.name)}(${a}: ${r}): Promise<${u}>;`}).join(`
|
|
3
|
+
`),"};","```"].join(`
|
|
4
|
+
`)}function s(e){if(!e||typeof e!="object")return"unknown";const t=e.nullable?" | null":"";if(typeof e.codemodeType=="string")return e.codemodeType+t;if(Array.isArray(e.enum))return e.enum.map(d).join(" | ")+t;switch(e.type){case"string":return"string"+t;case"number":case"integer":return"number"+t;case"boolean":return"boolean"+t;case"array":return`Array<${s(e.items)}>`+t;case"object":return f(e)+t;default:return"unknown"}}function d(e){return typeof e=="string"?`'${e}'`:String(e)}function f(e){const t=e.properties??{},n=Object.keys(t),o=e.additionalProperties,r=o?o===!0?"unknown":s(o):void 0;if(n.length===0)return o===!1?"{}":`Record<string, ${r??"unknown"}>`;const u=new Set(e.required??[]),a=n.map(i=>{const l=u.has(i)?"":"?";return`${c.test(i)?i:JSON.stringify(i)}${l}: ${s(t[i])}`});return r&&a.push(`[key: string]: ${r}`),`{ ${a.join("; ")} }`}export{y as buildExecuteToolDescription,p as sanitizeToolName};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import J from"@jitl/quickjs-singlefile-mjs-release-sync";import{newQuickJSWASMModuleFromVariant as A,shouldInterruptAfterDeadline as I}from"quickjs-emscripten-core";const $=1e4,C=64*1024*1024,L=256*1024,w=100,N=1024*1024,R=1024*1024;let O;function x(){return O??=A(J)}function Y(t){return`(() => {
|
|
2
|
+
const invoke = globalThis.__invoke;
|
|
3
|
+
delete globalThis.__invoke;
|
|
4
|
+
globalThis.tools = Object.freeze({ ${t.map(r=>`${JSON.stringify(r)}: (input) => invoke(${JSON.stringify(r)}, JSON.stringify(input ?? {})).then(JSON.parse)`).join(", ")} });
|
|
5
|
+
})();`}async function F(t,n,r={}){const{timeoutMs:s=$}=r,m=new Set;let M=0,f=0;const e=(await x()).newContext();let l,g=()=>{};const y=new Promise((o,c)=>{g=()=>c(new Error(`Execution timed out after ${s}ms`))}),S=()=>e.runtime.setInterruptHandler(I(Date.now()+s)),p=()=>{clearTimeout(l),l=setTimeout(g,s)};let u;try{e.runtime.setMemoryLimit(C),e.runtime.setMaxStackSize(L),S(),p(),B(e,"__invoke",(E,b)=>{const P=e.getString(E),j=JSON.parse(e.getString(b)),i=e.newPromise();return m.add(i),f++,clearTimeout(l),(++M>w?Promise.reject(new Error(`Exceeded the limit of ${w} tool calls`)):Promise.resolve().then(()=>n[P](j))).then(a=>{if(!e.alive)return;const d=JSON.stringify(a??null);if(d.length>N){const k=`Tool output is too large (${d.length} bytes); request narrower data instead`;e.newError(k).consume(i.reject)}else e.newString(d).consume(i.resolve)},a=>{e.alive&&e.newError(h(a)).consume(i.reject)}),i.settled.then(()=>{e.alive&&(S(),--f===0&&p(),e.runtime.executePendingJobs())}),i.handle}),U(e,Y(Object.keys(n))),u=e.unwrapResult(e.evalCode(`(async () => {
|
|
6
|
+
${t}
|
|
7
|
+
})()`));const o=e.resolvePromise(u);e.runtime.executePendingJobs();const c=await Promise.race([o,y]),T=e.unwrapResult(c),_=e.dump(T);T.dispose();const v=JSON.stringify(_??null).length;return v>R?{error:`Result is too large (${v} bytes); return less data`}:{result:_}}catch(o){return{error:h(o)}}finally{clearTimeout(l),u?.dispose();for(const o of m)o.alive&&o.dispose();try{e.dispose()}catch{O=void 0}}}function B(t,n,r){t.newFunction(n,r).consume(s=>t.setProp(t.global,n,s))}function U(t,n){t.unwrapResult(t.evalCode(n)).dispose()}function h(t){return t instanceof Error?t.message:String(t)}export{F as runInSandbox};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { McpToolSchema } from '../../../types';
|
|
2
|
+
export declare const EXECUTE_TOOL_NAME = "execute";
|
|
3
|
+
export declare const EXECUTE_TOOL_SCHEMA: McpToolSchema;
|
|
2
4
|
export declare function getDefaultToolSchemas(config: {
|
|
3
5
|
products?: string[];
|
|
4
6
|
requiresLogin: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{shouldHandleMcpAuth as
|
|
1
|
+
import{shouldHandleMcpAuth as p}from"../auth/auth-handlers.js";import{GRAPHQL_TYPE_KINDS as l}from"./tools/graphql/types.js";const s=["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE"],t={type:"string",nullable:!0},n={codemodeType:"OpenApiServer[]"},r={codemodeType:"OpenApiSecurityRequirement[]"},o={codemodeType:"Record<string, OpenApiSecurityScheme>"},c={codemodeType:"OpenApiDocument"},u={codemodeType:"OpenApiOperation & { path: string; method: string }"},m="execute",P={name:m,description:"Run JavaScript in a sandbox to orchestrate multiple documentation tools in one call.",schema:{type:"object",required:["code","description"],additionalProperties:!1,properties:{code:{type:"string",description:"JavaScript to run in the sandbox. Return a value to receive it as the result.",minLength:1},description:{type:"string",description:"A short, human-readable summary of what this code does (shown to users in place of the raw call).",minLength:1}}}},d={type:"object",additionalProperties:!1,required:[],properties:{filter:{type:"string",description:"API name (or part of it)",minLength:1,nullable:!0},page:{type:"number",description:"Page number",minimum:1,default:1,nullable:!0},limit:{type:"number",description:"Number of APIs per page. Default is 300",minimum:1,default:300,nullable:!0}}},a={type:"object",required:["name"],additionalProperties:!1,properties:{name:{type:"string",description:"API name",minLength:1},version:{type:"string",description:"API version (required when multiple APIs share the same name but differ by version)",nullable:!0}}},h={type:"object",required:["name","path","method"],additionalProperties:!1,properties:{name:{type:"string",description:"API name",minLength:1},path:{type:"string",description:"Endpoint path (e.g. /api/v1/users)",minLength:1},method:{type:"string",description:"HTTP method (GET, POST, PUT, DELETE, etc.)",enum:[...s,...s.map(e=>e.toLowerCase())],minLength:1},version:{type:"string",description:"API version (required when multiple APIs share the same name but differ by version)",nullable:!0}}},y={type:"object",required:[],additionalProperties:!1,properties:{}};function q(e){const i=[{name:"list-apis",description:"Lists available APIs with their context and purpose",schema:d,annotations:{title:"List APIs",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},outputSchema:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:t,version:t,servers:n}}},limit:{type:"number"},total:{type:"number"},page:{type:"number"},totalPages:{type:"number"}}}},{name:"get-endpoints",description:"Get all endpoints for a specific API",schema:a,annotations:{title:"Get Endpoints",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},outputSchema:{type:"object",properties:{api:{type:"string"},version:{type:"string"},servers:n,endpoints:{type:"array",items:{type:"object",properties:{path:{type:"string"},method:{type:"string"},summary:t,description:t,security:r}}}}}},{name:"get-endpoint-info",description:"Get comprehensive information about specific endpoint including parameters, security, and examples",schema:h,annotations:{title:"Get Endpoint Info",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},outputSchema:{type:"object",properties:{api:{type:"string"},version:{type:"string"},servers:n,endpoint:u,globalSecurity:r,securitySchemes:o}}},{name:"get-security-schemes",description:"Get the security schemes for a specific API",schema:a,annotations:{title:"Get Security Schemes",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},outputSchema:{type:"object",properties:{name:t,version:t,securitySchemes:o,security:r}}},{name:"get-full-api-description",description:"Get the complete OpenAPI description",schema:a,annotations:{title:"Get Full API Description",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},outputSchema:{type:"object",properties:{api:{type:"string"},version:{type:"string"},definition:c}}},v(e.products)];return p(e.requiresLogin,e.rbac)&&i.push({name:"whoami",description:"Get information about the currently authenticated user",schema:y,annotations:{title:"Who Am I",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},outputSchema:{type:"object",properties:{email:{type:"string"},name:{type:"string"},subject:{type:"string"},clientId:{type:"string"},scope:{type:"string"},issuedAt:{type:"string"},expiresAt:{type:"string"}}}}),e.hasGraphqlApis&&i.push(...H()),i}const g={type:"object",required:[],additionalProperties:!1,properties:{filter:{type:"string",description:"GraphQL schema name (or part of it)",minLength:1,nullable:!0},page:{type:"number",description:"Page number",minimum:1,default:1,nullable:!0},limit:{type:"number",description:"Number of results per page. Default is 300",minimum:1,default:300,nullable:!0}}},f={type:"object",required:["name"],additionalProperties:!1,properties:{name:{type:"string",description:"GraphQL schema name",minLength:1},kind:{type:"string",description:"Optional: return only a single category of schema members",enum:[...l],nullable:!0},filter:{type:"string",description:'Optional: only members whose name contains this substring (e.g. "book")',minLength:1,nullable:!0},referencesType:{type:"string",description:'Optional: only members that reference this type directly or transitively (via return, field, argument, union-member or input-field types). Finds cross-cutting members that never name it \u2014 e.g. referencesType "Book" surfaces a search query returning a union that includes Book.',minLength:1,nullable:!0},page:{type:"number",description:"Page number",minimum:1,default:1,nullable:!0},limit:{type:"number",description:"Number of results per page. Default is 300",minimum:1,default:300,nullable:!0}}},b={type:"object",required:["name","type"],additionalProperties:!1,properties:{name:{type:"string",description:"GraphQL schema name",minLength:1},type:{type:"string",description:"Name of the type, operation, or directive",minLength:1},includeReferencedTypes:{type:"boolean",description:"Also include the SDL of every type referenced transitively. Gives the whole subgraph at once, but can be large for highly-connected types.",default:!1,nullable:!0}}},S={type:"object",required:["name"],additionalProperties:!1,properties:{name:{type:"string",description:"GraphQL schema name",minLength:1}}};function H(){return[{name:"list-graphql-apis",description:"Lists available GraphQL schemas with their context and purpose",schema:g,annotations:{title:"List GraphQL APIs",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},{name:"get-graphql-type-list",description:'List all operations and types in a GraphQL schema as a flat, paginated list. Each item is tagged with its kind (query, object, enum, \u2026) and carries a one-line description; operations also include their return type and argument signature \u2014 use it to decide which members to fetch in detail. Narrow the result with `kind` (one category) and/or `filter` (member-name substring, e.g. "book") to explore a domain cheaply instead of pulling the full schema.',schema:f,annotations:{title:"Get GraphQL Type List",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},{name:"get-graphql-type",description:"Get the SDL for a single GraphQL type, operation (query/mutation/subscription field), or directive. Set includeReferencedTypes to also pull in every type it references transitively \u2014 the full structural subgraph in one call, ideal for complete exploration of an entity (e.g. Book and all the types it touches).",schema:b,annotations:{title:"Get GraphQL Type",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},{name:"get-graphql-schema",description:"Get the complete GraphQL schema as SDL \u2014 the whole type graph in one call. Returns everything, so it can be very large and token-expensive for big schemas; prefer get-graphql-type-list (filter/paginate) plus targeted get-graphql-type calls, and reach for this only for small schemas or when you truly need the full SDL.",schema:S,annotations:{title:"Get GraphQL Schema",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}}]}function v(e){return{name:"search",description:"Search across the documentation to fetch relevant content for a given query",schema:e&&e.length>0?{type:"object",required:["query"],additionalProperties:!1,properties:{query:{type:"string",description:"Search query. Should be a single word or that phrase that is presented in a documentation.",minLength:1},product:{type:"string",description:"Optional product name to filter search results by specific product.",enum:e,nullable:!0}}}:{type:"object",required:["query"],additionalProperties:!1,properties:{query:{type:"string",description:"Search query. Should be a single word or that phrase that is presented in a documentation.",minLength:1}}},annotations:{title:"Search Documentation",readOnlyHint:!0,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},outputSchema:{type:"string"}}}export{m as EXECUTE_TOOL_NAME,P as EXECUTE_TOOL_SCHEMA,q as getDefaultToolSchemas};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { McpToolHandler } from '../../../types.js';
|
|
2
|
+
import type { SearchArgs } from './types.js';
|
|
2
3
|
declare const _default: {
|
|
3
|
-
search: McpToolHandler
|
|
4
|
+
search: McpToolHandler<SearchArgs>;
|
|
4
5
|
};
|
|
5
6
|
export default _default;
|
|
6
7
|
//# sourceMappingURL=search.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{withPathPrefix as p}from"@redocly/theme/core/utils";import{ServerRoutes as h}from"../../../../../../constants/
|
|
1
|
+
import{withPathPrefix as p}from"@redocly/theme/core/utils";import{ServerRoutes as h}from"../../../../../../constants/api.js";const f=async(a,t)=>{const{query:c,product:u}=a,l=JSON.stringify({query:c,product:u});let e=`${t.baseUrl}${p(h.SEMANTIC_SEARCH)}`;e.startsWith("http://")&&(e=e.replace(/^http:\/\//,"https://"));const o=t.accessToken?`authorization=${String(t.accessToken).replace(/^Bearer /,"")}`:"";try{const s=await fetch(e,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...o?{Cookie:o}:{}},body:l});if(!s.ok)return{content:[{type:"text",text:"Error retrieving search results."}],isError:!0};const r=await s.json();if(!r||r.length===0)return{content:[{type:"text",text:"No results found."}]};const i=r.map(n=>`### [${n.title}](${new URL(n.url,t.baseUrl).toString()})
|
|
2
2
|
|
|
3
3
|
${n.content}
|
|
4
4
|
`).join(`
|
|
File without changes
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { McpToolHandler } from '../../../types.js';
|
|
2
|
+
import type { WhoamiArgs } from './types.js';
|
|
2
3
|
declare const _default: {
|
|
3
|
-
whoami: McpToolHandler
|
|
4
|
+
whoami: McpToolHandler<WhoamiArgs>;
|
|
4
5
|
};
|
|
5
6
|
export default _default;
|
|
6
7
|
//# sourceMappingURL=whoami.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mcpToolHandlers as s}from"../../../../../client/mcp-tool-handlers-entry.js";import{EXECUTE_TOOL_NAME as c}from"../tool-schemas.js";import{sanitizeToolName as u}from"../codemode/build-execute-tool-description.js";import{runInSandbox as f}from"../codemode/sandbox.js";import{executeMcpTool as l,isMcpToolAvailable as m}from"../../workers/execute-mcp-tool.js";const p=async(t,r,n)=>{const o=await y(r,n),{result:i,error:e}=await f(t.code,o);return{content:[{type:"text",text:JSON.stringify({result:i,error:e})}],isError:e!==void 0}};async function y(t,r){const n={};for(const o of Object.keys(s))o!==c&&await d(o,t)&&(n[u(o)]=async i=>{const e=await l({toolName:o,args:i,context:t,extra:r}),a=x(e);if(e.isError)throw new Error(a);return T(a)});return n}async function d(t,r){try{return await m({toolName:t,context:r})}catch{return!1}}function x(t){return t.content.filter(r=>r.type==="text").map(r=>r.text).join("")}function T(t){try{return JSON.parse(t)}catch{return t}}var g={[c]:p};export{g as default};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { McpToolHandler } from '../../../types.js';
|
|
2
|
+
import type { GetGraphqlSchemaArgs } from './types.js';
|
|
2
3
|
declare const _default: {
|
|
3
|
-
'get-graphql-schema': McpToolHandler<
|
|
4
|
-
name: string;
|
|
5
|
-
}>;
|
|
4
|
+
'get-graphql-schema': McpToolHandler<GetGraphqlSchemaArgs>;
|
|
6
5
|
};
|
|
7
6
|
export default _default;
|
|
8
7
|
//# sourceMappingURL=get-graphql-schema.d.ts.map
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import type { McpToolHandler } from '../../../types.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { GetGraphqlTypeListArgs } from './types.js';
|
|
3
3
|
declare const _default: {
|
|
4
|
-
'get-graphql-type-list': McpToolHandler<
|
|
5
|
-
name: string;
|
|
6
|
-
kind?: GraphqlTypeKind;
|
|
7
|
-
filter?: string;
|
|
8
|
-
referencesType?: string;
|
|
9
|
-
page?: number;
|
|
10
|
-
limit?: number;
|
|
11
|
-
}>;
|
|
4
|
+
'get-graphql-type-list': McpToolHandler<GetGraphqlTypeListArgs>;
|
|
12
5
|
};
|
|
13
6
|
export default _default;
|
|
14
7
|
//# sourceMappingURL=get-graphql-type-list.d.ts.map
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { McpToolHandler } from '../../../types.js';
|
|
2
|
+
import type { GetGraphqlTypeArgs } from './types.js';
|
|
2
3
|
declare const _default: {
|
|
3
|
-
'get-graphql-type': McpToolHandler<
|
|
4
|
-
name: string;
|
|
5
|
-
type: string;
|
|
6
|
-
includeReferencedTypes?: boolean;
|
|
7
|
-
}>;
|
|
4
|
+
'get-graphql-type': McpToolHandler<GetGraphqlTypeArgs>;
|
|
8
5
|
};
|
|
9
6
|
export default _default;
|
|
10
7
|
//# sourceMappingURL=get-graphql-type.d.ts.map
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { McpToolHandler } from '../../../types.js';
|
|
2
|
+
import type { ListGraphqlApisArgs } from './types.js';
|
|
2
3
|
declare const _default: {
|
|
3
|
-
'list-graphql-apis': McpToolHandler<
|
|
4
|
-
filter?: string;
|
|
5
|
-
page?: number;
|
|
6
|
-
limit?: number;
|
|
7
|
-
}>;
|
|
4
|
+
'list-graphql-apis': McpToolHandler<ListGraphqlApisArgs>;
|
|
8
5
|
};
|
|
9
6
|
export default _default;
|
|
10
7
|
//# sourceMappingURL=list-graphql-apis.d.ts.map
|
|
@@ -7,4 +7,25 @@ export type SchemaMember = {
|
|
|
7
7
|
args?: string;
|
|
8
8
|
};
|
|
9
9
|
export type GroupedSchemaTypes = Record<GraphqlTypeKind, SchemaMember[]>;
|
|
10
|
+
export type ListGraphqlApisArgs = {
|
|
11
|
+
filter?: string;
|
|
12
|
+
page?: number;
|
|
13
|
+
limit?: number;
|
|
14
|
+
};
|
|
15
|
+
export type GetGraphqlTypeListArgs = {
|
|
16
|
+
name: string;
|
|
17
|
+
kind?: GraphqlTypeKind;
|
|
18
|
+
filter?: string;
|
|
19
|
+
referencesType?: string;
|
|
20
|
+
page?: number;
|
|
21
|
+
limit?: number;
|
|
22
|
+
};
|
|
23
|
+
export type GetGraphqlTypeArgs = {
|
|
24
|
+
name: string;
|
|
25
|
+
type: string;
|
|
26
|
+
includeReferencedTypes?: boolean;
|
|
27
|
+
};
|
|
28
|
+
export type GetGraphqlSchemaArgs = {
|
|
29
|
+
name: string;
|
|
30
|
+
};
|
|
10
31
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,50 +1,15 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
'list-apis': import("../../types.js").McpToolHandler<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
'get-
|
|
12
|
-
|
|
13
|
-
path: string;
|
|
14
|
-
method: string;
|
|
15
|
-
version?: string;
|
|
16
|
-
}>;
|
|
17
|
-
'get-security-schemes': import("../../types.js").McpToolHandler<{
|
|
18
|
-
name: string;
|
|
19
|
-
version?: string;
|
|
20
|
-
}>;
|
|
21
|
-
'get-full-api-description': import("../../types.js").McpToolHandler<{
|
|
22
|
-
name: string;
|
|
23
|
-
version?: string;
|
|
24
|
-
}>;
|
|
25
|
-
search: import("../../types.js").McpToolHandler;
|
|
26
|
-
whoami: import("../../types.js").McpToolHandler;
|
|
27
|
-
'list-graphql-apis': import("../../types.js").McpToolHandler<{
|
|
28
|
-
filter?: string;
|
|
29
|
-
page?: number;
|
|
30
|
-
limit?: number;
|
|
31
|
-
}>;
|
|
32
|
-
'get-graphql-type-list': import("../../types.js").McpToolHandler<{
|
|
33
|
-
name: string;
|
|
34
|
-
kind?: import("./graphql/types.js").GraphqlTypeKind;
|
|
35
|
-
filter?: string;
|
|
36
|
-
referencesType?: string;
|
|
37
|
-
page?: number;
|
|
38
|
-
limit?: number;
|
|
39
|
-
}>;
|
|
40
|
-
'get-graphql-type': import("../../types.js").McpToolHandler<{
|
|
41
|
-
name: string;
|
|
42
|
-
type: string;
|
|
43
|
-
includeReferencedTypes?: boolean;
|
|
44
|
-
}>;
|
|
45
|
-
'get-graphql-schema': import("../../types.js").McpToolHandler<{
|
|
46
|
-
name: string;
|
|
47
|
-
}>;
|
|
2
|
+
'list-apis': import("../../types.js").McpToolHandler<import("./openapi/types.js").ListApisArgs>;
|
|
3
|
+
'get-endpoints': import("../../types.js").McpToolHandler<import("./openapi/types.js").ApiNameVersionArgs>;
|
|
4
|
+
'get-endpoint-info': import("../../types.js").McpToolHandler<import("./openapi/types.js").GetEndpointInfoArgs>;
|
|
5
|
+
'get-security-schemes': import("../../types.js").McpToolHandler<import("./openapi/types.js").ApiNameVersionArgs>;
|
|
6
|
+
'get-full-api-description': import("../../types.js").McpToolHandler<import("./openapi/types.js").ApiNameVersionArgs>;
|
|
7
|
+
search: import("../../types.js").McpToolHandler<import("./core/types.js").SearchArgs>;
|
|
8
|
+
whoami: import("../../types.js").McpToolHandler<import("./core/types.js").WhoamiArgs>;
|
|
9
|
+
'list-graphql-apis': import("../../types.js").McpToolHandler<import("./graphql/types.js").ListGraphqlApisArgs>;
|
|
10
|
+
'get-graphql-type-list': import("../../types.js").McpToolHandler<import("./graphql/types.js").GetGraphqlTypeListArgs>;
|
|
11
|
+
'get-graphql-type': import("../../types.js").McpToolHandler<import("./graphql/types.js").GetGraphqlTypeArgs>;
|
|
12
|
+
'get-graphql-schema': import("../../types.js").McpToolHandler<import("./graphql/types.js").GetGraphqlSchemaArgs>;
|
|
48
13
|
};
|
|
49
14
|
export default _default;
|
|
50
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import type { McpToolHandler } from '../../../types.js';
|
|
2
|
+
import type { GetEndpointInfoArgs } from './types.js';
|
|
2
3
|
declare const _default: {
|
|
3
|
-
'get-endpoint-info': McpToolHandler<
|
|
4
|
-
name: string;
|
|
5
|
-
path: string;
|
|
6
|
-
method: string;
|
|
7
|
-
version?: string;
|
|
8
|
-
}>;
|
|
4
|
+
'get-endpoint-info': McpToolHandler<GetEndpointInfoArgs>;
|
|
9
5
|
};
|
|
10
6
|
export default _default;
|
|
11
7
|
//# sourceMappingURL=get-endpoint-info.d.ts.map
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { McpToolHandler } from '../../../types.js';
|
|
2
|
+
import type { ApiNameVersionArgs } from './types.js';
|
|
2
3
|
declare const _default: {
|
|
3
|
-
'get-endpoints': McpToolHandler<
|
|
4
|
-
name: string;
|
|
5
|
-
version?: string;
|
|
6
|
-
}>;
|
|
4
|
+
'get-endpoints': McpToolHandler<ApiNameVersionArgs>;
|
|
7
5
|
};
|
|
8
6
|
export default _default;
|
|
9
7
|
//# sourceMappingURL=get-endpoints.d.ts.map
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { McpToolHandler } from '../../../types.js';
|
|
2
|
+
import type { ApiNameVersionArgs } from './types.js';
|
|
2
3
|
declare const _default: {
|
|
3
|
-
'get-full-api-description': McpToolHandler<
|
|
4
|
-
name: string;
|
|
5
|
-
version?: string;
|
|
6
|
-
}>;
|
|
4
|
+
'get-full-api-description': McpToolHandler<ApiNameVersionArgs>;
|
|
7
5
|
};
|
|
8
6
|
export default _default;
|
|
9
7
|
//# sourceMappingURL=get-full-api-description.d.ts.map
|