@redocly/framework 1.0.0-next.3 → 1.0.0-next.4

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.
Files changed (176) hide show
  1. package/dist/bundler/build/output-metadata.js +1 -1
  2. package/dist/bundler/build/run.js +1 -1
  3. package/dist/bundler/build/vite-config.js +2 -2
  4. package/dist/bundler/dev/materialization-sweeper.js +1 -1
  5. package/dist/bundler/dev/routes/dev-problems-route.js +1 -1
  6. package/dist/bundler/dev/routes/source-sync-route.js +1 -1
  7. package/dist/bundler/dev/run.js +1 -1
  8. package/dist/bundler/dev/runtime-app.js +1 -1
  9. package/dist/bundler/dev/vite-chunk-url.js +1 -1
  10. package/dist/bundler/user-markdoc-schema.js +1 -1
  11. package/dist/bundler/vite-config.base.js +3 -3
  12. package/dist/cli/commands/build.js +1 -1
  13. package/dist/cli/commands/dev.js +1 -1
  14. package/dist/cli/commands/ingest.js +1 -1
  15. package/dist/cli/commands/translate.js +2 -2
  16. package/dist/cli/dev-console/index.js +1 -1
  17. package/dist/cli/log-output/index.js +1 -1
  18. package/dist/cli/validate-react-pages.js +1 -1
  19. package/dist/client/RuntimeLink.js +1 -1
  20. package/dist/client/ai-search/use-ai-search.js +1 -1
  21. package/dist/client/analytics-page-view.js +1 -1
  22. package/dist/client/app.js +3 -3
  23. package/dist/client/client-entry.js +1 -1
  24. package/dist/client/contexts.js +1 -1
  25. package/dist/client/dev-problems/ProblemsBar.js +1 -1
  26. package/dist/client/feedback.js +1 -1
  27. package/dist/client/l10n/use-l10n-config.js +1 -1
  28. package/dist/client/products.js +1 -1
  29. package/dist/client/review/ReviewBar.js +50 -50
  30. package/dist/client/review/use-review.js +1 -1
  31. package/dist/client/sidebar/SidebarDataProvider.js +1 -1
  32. package/dist/client/sidebar/drilldown.js +1 -1
  33. package/dist/client/ssr.js +1 -1
  34. package/dist/client/telemetry/config.js +1 -1
  35. package/dist/client/use-entity-revisions.js +1 -1
  36. package/dist/client/use-page-versions.js +1 -1
  37. package/dist/client/use-search.js +1 -1
  38. package/dist/client/webmcp/tools/shared.js +1 -1
  39. package/dist/client/webmcp/tools/site-tools.js +1 -1
  40. package/dist/client/webmcp/use-webmcp-tools.js +1 -1
  41. package/dist/content-layer/config.js +1 -1
  42. package/dist/content-layer/database/invalidation.js +26 -26
  43. package/dist/content-layer/ingest/finalize-phase.js +1 -1
  44. package/dist/content-layer/ingest/normalize-artifacts.js +1 -1
  45. package/dist/content-layer/ingest/run.js +1 -1
  46. package/dist/content-layer/ingest/search-sync.js +1 -1
  47. package/dist/content-layer/ingest/sync.js +1 -1
  48. package/dist/content-layer/link-checker/load-view.js +1 -1
  49. package/dist/content-layer/link-checker/validate.js +1 -1
  50. package/dist/content-layer/loaders/context.js +1 -1
  51. package/dist/content-layer/markdown/client/markdown-text.js +1 -1
  52. package/dist/content-layer/markdown/constants/builtin-tags.js +1 -1
  53. package/dist/content-layer/markdown/constants/markdown-text-tag-set.js +1 -1
  54. package/dist/content-layer/markdown/constants/tag-sets.js +1 -1
  55. package/dist/content-layer/markdown/nodes/heading.js +1 -1
  56. package/dist/content-layer/markdown/resolve/markdoc-resolvers/json-schema.js +1 -1
  57. package/dist/content-layer/markdown/resolve/markdoc-resolvers/operation-samples.js +1 -1
  58. package/dist/content-layer/markdown/resolve/markdoc.js +1 -1
  59. package/dist/content-layer/markdown/resolve/references.js +1 -1
  60. package/dist/content-layer/markdown/search/to-markdown.js +1 -1
  61. package/dist/content-layer/markdown/search/to-sections.js +1 -1
  62. package/dist/content-layer/markdown/server/render.js +1 -1
  63. package/dist/content-layer/markdown/tags/variant.js +1 -1
  64. package/dist/content-layer/markdown/utils/parse-cache.js +1 -1
  65. package/dist/content-layer/plugins/index.js +1 -1
  66. package/dist/content-layer/plugins/internal/api-docs/client/rebase-item-links.js +1 -1
  67. package/dist/content-layer/plugins/internal/api-docs/client/template.js +2 -2
  68. package/dist/content-layer/plugins/internal/api-docs/index.js +1 -1
  69. package/dist/content-layer/plugins/internal/api-docs/server/markdown-docs.js +13 -13
  70. package/dist/content-layer/plugins/internal/api-docs/server/options.js +1 -1
  71. package/dist/content-layer/plugins/internal/app-data/banner.js +1 -1
  72. package/dist/content-layer/plugins/internal/app-data/index.js +1 -1
  73. package/dist/content-layer/plugins/internal/catalog-classic/client/use-catalog-classic.js +1 -1
  74. package/dist/content-layer/plugins/internal/catalog-classic/index.js +1 -1
  75. package/dist/content-layer/plugins/internal/index.js +1 -1
  76. package/dist/content-layer/plugins/internal/markdoc/client/template.js +1 -1
  77. package/dist/content-layer/plugins/internal/markdoc/index.js +1 -1
  78. package/dist/content-layer/plugins/internal/mcp/constants.d.ts +0 -6
  79. package/dist/content-layer/plugins/internal/mcp/constants.js +1 -1
  80. package/dist/content-layer/plugins/internal/mcp/content-tools.js +1 -1
  81. package/dist/content-layer/plugins/internal/mcp/ignored-routes.js +1 -1
  82. package/dist/content-layer/plugins/internal/mcp/server/audit.js +1 -1
  83. package/dist/content-layer/plugins/internal/mcp/server/codemode/capabilities.js +3 -3
  84. package/dist/content-layer/plugins/internal/mcp/server/codemode/constants.js +1 -1
  85. package/dist/content-layer/plugins/internal/mcp/server/codemode/discover.js +1 -1
  86. package/dist/content-layer/plugins/internal/mcp/server/codemode/execute-schema.js +1 -1
  87. package/dist/content-layer/plugins/internal/mcp/server/codemode/index.js +1 -1
  88. package/dist/content-layer/plugins/internal/mcp/server/codemode/prompts.js +8 -8
  89. package/dist/content-layer/plugins/internal/mcp/server/codemode/sandbox.js +1 -1
  90. package/dist/content-layer/plugins/internal/mcp/server/codemode/tool-list.js +1 -1
  91. package/dist/content-layer/plugins/internal/mcp/server/gateway/api-call-operations.js +1 -1
  92. package/dist/content-layer/plugins/internal/mcp/server/gateway/credentials-page/site-branding.js +1 -1
  93. package/dist/content-layer/plugins/internal/mcp/server/gateway/credentials.js +1 -1
  94. package/dist/content-layer/plugins/internal/mcp/server/gateway/elicitation.js +6 -5
  95. package/dist/content-layer/plugins/internal/mcp/server/gateway/fetch/allowed-hosts.js +1 -1
  96. package/dist/content-layer/plugins/internal/mcp/server/gateway/fetch/fetch-bridge.js +1 -1
  97. package/dist/content-layer/plugins/internal/mcp/server/gateway/fetch/fetch-errors.js +1 -1
  98. package/dist/content-layer/plugins/internal/mcp/server/gateway/fetch/ssrf-guard.js +1 -1
  99. package/dist/content-layer/plugins/internal/mcp/server/gateway/index.js +3 -3
  100. package/dist/content-layer/plugins/internal/mcp/server/gateway/subject.js +1 -1
  101. package/dist/content-layer/plugins/internal/mcp/server/gateway/tools.js +4 -4
  102. package/dist/content-layer/plugins/internal/mcp/server/gateway/upstream-auth-scheme.js +2 -2
  103. package/dist/content-layer/plugins/internal/mcp/server/mcp-server.js +1 -1
  104. package/dist/content-layer/plugins/internal/mcp/server/mcp-telemetry.js +1 -1
  105. package/dist/content-layer/plugins/internal/mcp/server/oauth/authorize.js +1 -1
  106. package/dist/content-layer/plugins/internal/mcp/server/server-info.js +1 -1
  107. package/dist/content-layer/plugins/internal/mcp/server/tools/graphql-document.js +1 -1
  108. package/dist/content-layer/plugins/internal/mcp/server/tools/graphql.js +1 -1
  109. package/dist/content-layer/plugins/internal/mcp/server/tools/openapi-catalog.js +1 -1
  110. package/dist/content-layer/plugins/internal/mcp/server/tools/openapi-document.js +1 -1
  111. package/dist/content-layer/plugins/internal/mcp/server/tools/openapi.js +1 -1
  112. package/dist/content-layer/plugins/internal/mcp/server/tools/pages-navigation.js +1 -1
  113. package/dist/content-layer/plugins/internal/mcp/server/tools/pages.js +3 -3
  114. package/dist/content-layer/plugins/internal/mcp/server/tools/search.js +1 -1
  115. package/dist/content-layer/plugins/internal/mcp/server/tools/submit-feedback.js +1 -1
  116. package/dist/content-layer/plugins/internal/mcp/server/tools/whoami.js +1 -1
  117. package/dist/content-layer/plugins/internal/mock/server/handler.js +1 -1
  118. package/dist/content-layer/plugins/internal/scorecard-classic/index.js +1 -1
  119. package/dist/content-layer/plugins/internal/sidebar/bundle.js +1 -1
  120. package/dist/content-layer/plugins/internal/sidebar/index.js +2 -2
  121. package/dist/content-layer/plugins/internal/skills/index.js +1 -1
  122. package/dist/content-layer/plugins/project/load.js +2 -2
  123. package/dist/content-layer/plugins/utils/link-access.js +1 -1
  124. package/dist/content-layer/plugins/utils/route-index.js +1 -1
  125. package/dist/content-layer/versions/redirect.js +1 -1
  126. package/dist/content-layer/versions/resolve.js +1 -1
  127. package/dist/server/__tests__/rbac-fixture.js +1 -1
  128. package/dist/server/app.js +3 -3
  129. package/dist/server/ask-ai/route.js +1 -1
  130. package/dist/server/auth/middleware.js +1 -1
  131. package/dist/server/auth/request.js +1 -1
  132. package/dist/server/auth/routes.js +1 -1
  133. package/dist/server/constants/system-routes.js +1 -1
  134. package/dist/server/content.js +13 -13
  135. package/dist/server/cors-proxy/handler.js +1 -1
  136. package/dist/server/feedback/route.js +1 -1
  137. package/dist/server/lambda-entry.js +1 -1
  138. package/dist/server/llms-txt.js +1 -1
  139. package/dist/server/manifest-assets.js +4 -4
  140. package/dist/server/node-entry.js +1 -1
  141. package/dist/server/plugin-context.js +1 -1
  142. package/dist/server/public-url.js +1 -0
  143. package/dist/server/rbac/l10n-rules.js +1 -1
  144. package/dist/server/rbac/team-templates.js +1 -1
  145. package/dist/server/search/cache.js +1 -0
  146. package/dist/server/search/route.js +1 -1
  147. package/dist/server/seo-tags.js +2 -2
  148. package/dist/server/static-files/serve.js +1 -1
  149. package/dist/shared/constants/l10n/langs/ar.js +1 -1
  150. package/dist/shared/constants/l10n/langs/de.js +1 -1
  151. package/dist/shared/constants/l10n/langs/en.js +1 -1
  152. package/dist/shared/constants/l10n/langs/es.js +1 -1
  153. package/dist/shared/constants/l10n/langs/fr.js +1 -1
  154. package/dist/shared/constants/l10n/langs/hi.js +1 -1
  155. package/dist/shared/constants/l10n/langs/it.js +1 -1
  156. package/dist/shared/constants/l10n/langs/ja.js +1 -1
  157. package/dist/shared/constants/l10n/langs/ko.js +1 -1
  158. package/dist/shared/constants/l10n/langs/pl.js +1 -1
  159. package/dist/shared/constants/l10n/langs/pt-br.js +1 -1
  160. package/dist/shared/constants/l10n/langs/pt.js +1 -1
  161. package/dist/shared/constants/l10n/langs/ru.js +1 -1
  162. package/dist/shared/constants/l10n/langs/uk.js +1 -1
  163. package/dist/shared/constants/l10n/langs/zh.js +1 -1
  164. package/dist/shared/utils/routes/file-path-to-route-slug.js +1 -1
  165. package/dist/shared/utils/routes/markdown-copy-url.js +1 -0
  166. package/package.json +6 -4
  167. package/dist/content-layer/plugins/internal/mcp/server/codemode/execution-budget.js +0 -1
  168. package/dist/content-layer/plugins/internal/mcp/server/codemode/read-result.js +0 -1
  169. package/dist/content-layer/plugins/internal/mcp/server/codemode/return-last-expression.js +0 -6
  170. package/dist/content-layer/plugins/internal/mcp/server/codemode/returns-from-top-level.js +0 -1
  171. package/dist/content-layer/plugins/internal/mcp/server/codemode/tool-declarations.js +0 -4
  172. package/dist/content-layer/plugins/internal/mcp/server/codemode/unknown-tool-hint.js +0 -3
  173. package/dist/content-layer/plugins/internal/mcp/server/tools/graphql-constants.js +0 -1
  174. package/dist/content-layer/plugins/internal/mcp/server/tools/pages-constants.js +0 -1
  175. package/dist/content-layer/plugins/internal/mcp/server/tools/schemas.js +0 -1
  176. package/dist/shared/utils/routes/markdown-path.js +0 -1
@@ -0,0 +1 @@
1
+ import{withPathPrefix as e}from"../../path-prefix.js";import{getMarkdownCopyPath as t}from"@redocly/theme/core/utils";function n(n){return e(t(n))}export{n as markdownCopyUrl};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/framework",
3
- "version": "1.0.0-next.3",
3
+ "version": "1.0.0-next.4",
4
4
  "description": "A modern hybrid CMS and API documentation platform",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {
@@ -27,14 +27,15 @@
27
27
  "@hono/node-server": "^2.0.5",
28
28
  "@jitl/quickjs-singlefile-mjs-release-sync": "0.32.0",
29
29
  "@modelcontextprotocol/server": "2.3.1",
30
- "@redocly/api-docs": "0.6.0-next.2",
31
- "@redocly/config": "0.72.1",
30
+ "@redocly/api-docs": "0.6.0-next.3",
31
+ "@redocly/config": "0.73.0",
32
32
  "@redocly/markdoc": "0.7.0-beta.2",
33
+ "@redocly/mcp": "0.1.0",
33
34
  "@redocly/mock-server": "0.15.0-next.0",
34
35
  "@redocly/openapi-core": "2.75.0",
35
36
  "@redocly/realm-asyncapi-sdk": "0.17.0",
36
37
  "@redocly/realm-db-client": "0.2.0",
37
- "@redocly/theme": "0.73.0-next.0",
38
+ "@redocly/theme": "0.73.0-next.1",
38
39
  "@tanstack/highlight": "0.0.10",
39
40
  "@vitejs/plugin-react": "6.2.1",
40
41
  "chokidar": "npm:@redocly/chokidar@3.6.0",
@@ -117,6 +118,7 @@
117
118
  "projects": [
118
119
  "@redocly/preview-engine-protocol",
119
120
  "@redocly/realm-db-client",
121
+ "@redocly/mcp",
120
122
  "@redocly/config",
121
123
  "@redocly/theme",
122
124
  "@redocly/replay",
@@ -1 +0,0 @@
1
- function e(e,t,n){let r=Math.max(0,n-Date.now()),i=`Execution timed out after ${t}ms. Do less processing in the script, or ask the functions for less data.`,a=`Exceeded the maximum lifetime of ${r}ms. Make fewer function calls in one script, or ask for less data.`,o=Date.now()+t,s=t,c,l=()=>{},u=new Promise((e,t)=>{l=e=>{c=e,t(Error(e))}}),d,f=()=>{clearTimeout(d),d=setTimeout(()=>l(i),t)};e.runtime.setInterruptHandler(()=>{let e=Date.now();return e>o?c=i:e>n&&(c=a),c!==void 0}),f();let p=setTimeout(()=>l(a),r),m=0;return{hostCall:t=>{s=o-Date.now(),m++,clearTimeout(d);let n=()=>{e.alive&&(o=Date.now()+s,--m===0&&f())},r=t();return r.then(n,n),r},aborted:u,expiredMessage:()=>c,dispose(){clearTimeout(d),clearTimeout(p)}}}export{e as createExecutionBudget};
@@ -1 +0,0 @@
1
- import{SANDBOX_FAILURE as e}from"./constants.js";function t(t,a,o){try{let s=t.callFunction(a,t.undefined,o);return s.error?i(s.error.consume(e=>r(t,e))):s.value.consume(r=>{if(t.typeof(r)!==`string`)return i(n(t,o));let a=t.getProp(r,`length`).consume(e=>t.getNumber(e));return a>1048576?{error:`Result is too large (${a} bytes); return less data`,failure:e.OutputTooLarge}:{result:JSON.parse(t.getString(r))}})}finally{o.dispose()}}function n(e,t){let n=e.typeof(t);return n===`function`||n===`symbol`?`the value is a ${n}`:`the value has no JSON form`}function r(e,t){let n=e.typeof(t);if(n===`string`)return e.getString(t);if(n===`object`&&!e.eq(t,e.null)){let n=e.getProp(t,`message`).consume(t=>e.typeof(t)===`string`?e.getString(t):void 0);if(n!==void 0)return n}return`${n===`object`?`an`:`a`} ${n} was thrown`}function i(t){return t.includes(`out of memory`)?{error:`Result is too large to serialize; return less data`,failure:e.OutputTooLarge}:{error:`The result could not be converted to JSON (${t}); return plain data instead`,failure:e.RuntimeError}}export{t as readResult};
@@ -1,6 +0,0 @@
1
- const e=(async()=>{}).constructor,t=/^(?:[)\]}]|(?:async\s+)?(?:function|class|const|let|var|if|for|while|do|switch|try|return|throw)\b)/,n=`return (`;function r(e){let r=e.length;for(;r>0&&` \r
2
- ;`.includes(e[r-1]);)r--;let i=e.slice(0,r);for(let e of a(i)){let r=i.slice(e);if(t.test(r.slice(o(r))))continue;let a=`${i.slice(0,e)}${n}${r}\n)`;if(s(`${n}${r}\n)`)&&s(a))return{code:a,returnAt:e}}return{code:e}}function i({code:e,returnAt:t},n){if(t===void 0)return n;let r=e.slice(0,t).split(`
3
- `),i=r.length,a=(r.at(-1)??``).length+1;return n.line!==i||n.column<a?n:{line:i,column:Math.max(a,n.column-8)}}function a(e){let t=[0];for(let n=e.length-1;n>=0&&t.length<=50;n--)(e[n]===`
4
- `||e[n]===`;`)&&t.push(n+1);return t.sort((e,t)=>e-t)}function o(e){let t=0;for(;;){for(;t<e.length&&` \r
5
- `.includes(e[t]);)t++;if(e.startsWith(`//`,t)){let n=e.indexOf(`
6
- `,t);t=n===-1?e.length:n}else if(e.startsWith(`/*`,t)){let n=e.indexOf(`*/`,t+2);t=n===-1?e.length:n+2}else return t}}function s(t){try{return new e(t),!0}catch{return!1}}export{i as authoredPosition,r as returnLastExpression};
@@ -1 +0,0 @@
1
- function e(e,t){let n=e.evalCode(t,`returns-from-top-level.js`,{type:`module`,compileOnly:!0});return n.error?n.error.consume(t=>e.dump(t))?.message===`return not in a function`:(n.value.dispose(),!1)}export{e as returnsFromTopLevel};
@@ -1,4 +0,0 @@
1
- const e=/^[A-Za-z_$][\w$]*$/;function t(t){let n=t.split(/[^A-Za-z0-9]+/).filter(Boolean).map((e,t)=>t===0?e:e[0].toUpperCase()+e.slice(1)).join(``);return e.test(n)?n:`_${n}`}function n(e,n){return n===`code`?t(e):e}function r(e){return["```ts",`declare const site: {`,e.map(e=>{let n=e.schema,r=e.outputSchema?a(e.outputSchema):`unknown`,o=n.required?.length?`input`:`input?`;return` /** ${i(e.description)} */\n ${t(e.name)}(${o}: ${a(n,` `)}): Promise<${r}>;`}).join(`
2
- `),`};`,"```"].join(`
3
- `)}function i(e){return(e??``).replace(/\*\//g,`*\\/`)}function a(e,t=``){if(!e||typeof e!=`object`)return`unknown`;let n=typeof e.codemodeType==`string`?[e.codemodeType]:Array.isArray(e.enum)&&e.enum.length>0?e.enum.map(s):[o(e,t)];return e.nullable&&n.push(`null`),[...new Set(n)].join(` | `)}function o(e,t){switch(e.type){case`string`:return`string`;case`number`:case`integer`:return`number`;case`boolean`:return`boolean`;case`array`:return`Array<${a(e.items,t)}>`;case`object`:return c(e,t);default:return`unknown`}}function s(e){return typeof e==`string`?`'${e.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`)}'`:String(e)}function c(t,n){let r=t.properties??{},o=Object.keys(r),s=t.additionalProperties,c=s?s===!0?`unknown`:a(s,n):void 0;if(o.length===0)return s===!1?`{}`:`Record<string, ${c??`unknown`}>`;let l=new Set(t.required??[]),u=o.map(t=>{let i=r[t],o=l.has(t)?``:`?`,s=e.test(t)?t:JSON.stringify(t);return{doc:i.description,field:`${s}${o}: ${a(i,n+` `)}`}});if(c&&u.push({field:`[key: string]: ${c}`}),!u.some(({doc:e})=>e))return`{ ${u.map(({field:e})=>e).join(`; `)} }`;let d=n+` `;return`{\n${u.map(({doc:e,field:t})=>`${e?`${d}/** ${i(e)} */\n`:``}${d}${t};`).join(`
4
- `)}\n${n}}`}export{r as buildToolTypeDeclarations,t as sanitizeToolName,n as toolNameForMode};
@@ -1,3 +0,0 @@
1
- import{SANDBOX_FAILURE as e}from"./constants.js";import{PLAIN_JAVASCRIPT_RULE as t}from"./prompts.js";const n=/^(?:not a function|cannot read property '.*' of (?:undefined|null)|value is not iterable|cannot convert to object)$/,r=/(?:^|[^\w$.])(?:site|tools)(?:\s*(?:\?\.|\.)\s*([A-Za-z_$][\w$]*)|(?:\s*\?\.)?\s*\[\s*(['"])([^'"]*)\2\s*\])(?:\s*\?\.)?\s*$/;function i(e,t,n,r,i){let l=n&&c(e,n),u=l!==void 0&&t===`not a function`?s(e.slice(0,l),r):void 0;if(u!==void 0)return{message:`Unknown function "site.${u}". Available functions: ${r.join(`, `)}`,unknownTool:u};let d=l===void 0?void 0:n,f=a(t,i);return f===void 0?{message:d?`${t} (line ${d.line})`:t}:{message:`${t}${d?` (line ${d.line}, column ${d.column}: \`${o(e,d)}\`)`:``}. ${f}`}}function a(r,i){if(i===e.SyntaxError)return t;if(i===e.RuntimeError&&n.test(r))return`Check the result shape with discover, for example listApis returns { items }.`}function o(e,{line:t,column:n}){let r=e.split(`
2
- `)[t-1]??``,i=Math.max(0,Math.min(n-1-60,r.length-120)),a=i+120,o=r.slice(i,a).trim();return`${i>0?`…`:``}${o}${a<r.length?`…`:``}`}function s(e,t){let n=r.exec(e),i=n?.[1]??n?.[3];return i!==void 0&&!t.includes(i)?i:void 0}function c(e,{line:t,column:n}){let r=e.split(`
3
- `);if(t>r.length)return;let i=r.slice(0,t-1).reduce((e,t)=>e+t.length+1,0)+n-1;return i<=e.length?i:void 0}export{i as describeGuestError};
@@ -1 +0,0 @@
1
- const e=[`queries`,`mutations`,`subscriptions`,`objects`,`interfaces`,`unions`,`enums`,`inputs`,`scalars`,`directives`],t=[`members`,`fields`],n=[`objects`,`interfaces`,`inputs`];export{n as FIELD_SCOPE_KINDS,t as GRAPHQL_LIST_SCOPES,e as GRAPHQL_TYPE_KINDS};
@@ -1 +0,0 @@
1
- const e=200,t=1e3,n=20,r=100;export{n as DEFAULT_GREP_MATCHES,e as DEFAULT_PAGE_LINES,r as MAX_GREP_MATCHES,t as MAX_PAGE_LINES};
@@ -1 +0,0 @@
1
- import{SUBMIT_FEEDBACK_TOOL_NAME as e}from"../../constants.js";import{toolNameForMode as t}from"../codemode/tool-declarations.js";import{GRAPHQL_LIST_SCOPES as n,GRAPHQL_TYPE_KINDS as r}from"./graphql-constants.js";import{OPERATION_METHODS as i}from"./openapi-document.js";import{MAX_PAGE_LINES as a}from"./pages-constants.js";const o={type:`string`,nullable:!0},s={limit:{type:`number`},total:{type:`number`},page:{type:`number`},totalPages:{type:`number`}},c={codemodeType:`OpenApiServer[]`},l={codemodeType:`OpenApiSecurityRequirement[]`},u={codemodeType:`Record<string, OpenApiSecurityScheme>`},d={codemodeType:`OpenApiDocument`},f={codemodeType:`OpenApiOperation & { path: string; method: string }`},p={codemodeType:`OpenApiComponents`,description:"Components the endpoint references. A `$ref` in `endpoint` resolves against the root of the result."},m={filePath:{type:`string`,description:`API definition file path`},otherMatches:{type:`array`,description:"Other API definitions the lookup also matched. Present only when several matched; pass `filePath` to pick another one",items:{type:`object`,required:[`filePath`],properties:{version:{type:`string`},filePath:{type:`string`}}}}},h="When several definitions match the name, the highest version or the shortest file path is used and the rest are listed in `otherMatches`; tell the user which version or file the answer is based on.",g={readOnlyHint:!0,destructiveHint:!1,openWorldHint:!1};function _(e,t){let n={query:{type:`string`,description:`What to find, as a few words or a short question.`,minLength:1}};return e.length>0&&(n.product={type:`string`,description:`Optional product name to filter search results by specific product.`,enum:[...e,null],nullable:!0}),t.length>0&&(n.locale={type:`string`,description:`Optional locale code to filter search results by documentation language (e.g. 'en', 'ja'). Use the locale matching the language of the user's request. Defaults to the site's default locale.`,enum:[...t,null],nullable:!0}),{name:`search`,title:`Search documentation`,description:`Search the documentation. Returns Markdown text: one section per matching page, with its title and URL as a link.`,summary:`Search the documentation.`,schema:{type:`object`,required:[`query`],additionalProperties:!1,properties:n},annotations:g,outputSchema:{type:`string`}}}const v=_([],[]),y={name:`whoami`,title:`Who am I`,description:`Get information about the currently authenticated user`,summary:`Get the signed-in user.`,schema:{type:`object`,required:[],additionalProperties:!1,properties:{}},annotations:g,outputSchema:{type:`object`,required:[`authenticated`],properties:{authenticated:{type:`boolean`},email:{type:`string`},name:{type:`string`},subject:{type:`string`},clientId:{type:`string`},scope:{type:`string`},issuedAt:{type:`string`},expiresAt:{type:`string`}}}},b={name:e,title:`Submit feedback`,description:`Report a documentation page that is wrong or incomplete. Use it when the user reports a problem with a page on this site, or agrees to report a problem that you found. Do not use it for product bugs or support questions.`,schema:{type:`object`,required:[`path`,`summary`],additionalProperties:!1,properties:{path:{type:`string`,description:`Path or URL of the documentation page the feedback is about (e.g. /guides/auth)`,minLength:1,maxLength:1e3},summary:{type:`string`,description:`One sentence that names what is wrong with the page`,minLength:1,maxLength:500},details:{type:`string`,description:`Expected versus actual behavior, missing steps, or the snippet that failed`,maxLength:4e3,nullable:!0},targetFeature:{type:`string`,description:`The API or feature the page documents`,maxLength:500,nullable:!0}}},annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0},outputSchema:{type:`object`,required:[`status`,`page`,`message`],properties:{status:{type:`string`},page:{type:`string`},message:{type:`string`}}}},x={type:`object`,additionalProperties:!1,required:[],properties:{filter:{type:`string`,description:`Matches part of an API name, or of a description when no name matches`,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}}};function S(e){return{type:`string`,description:`API definition file path, as returned by \`${t(`list-apis`,e)}\``,nullable:!0}}function C(e){return{type:`object`,required:[],additionalProperties:!1,properties:{name:{type:`string`,description:"API name, or a unique part of it. Required when the project documents more than one API, unless `filePath` is given.",minLength:1,nullable:!0},version:{type:`string`,description:`API version. When omitted and several versions exist, the highest one is used`,nullable:!0},filePath:S(e)}}}function w(e){let{name:t,version:n,filePath:r}=C(e).properties;return{type:`object`,required:[`path`,`method`],additionalProperties:!1,properties:{name:t,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:[...i.map(e=>e.toUpperCase()),...i],minLength:1},version:n,filePath:r}}}function T(e){let t={name:{type:`string`},description:{type:`string`},version:{type:`string`},servers:c,filePath:{type:`string`,description:`API definition file path`},ambiguousTitle:{type:`boolean`,description:"true = another API shares this title; a lookup picks the highest version, or the shortest file path at the same version, and lists the rest in `otherMatches`. Pass `filePath` to pick another one"}};return e&&(t.callable={type:`boolean`,description:"true = the documented hosts of this API are reachable via `fetch`; false = documentation only"}),{name:`list-apis`,title:`List APIs`,description:`Lists the APIs documented on this site`,summary:`List the available APIs.`,schema:x,annotations:g,outputSchema:{type:`object`,required:[`items`,`limit`,`total`,`page`,`totalPages`],properties:{items:{type:`array`,items:{type:`object`,required:[`name`,`description`,`version`,`servers`,`filePath`],properties:t}},...s}}}}const E=T(!1),D=T(!0);function O(e){return{name:`get-endpoints`,title:`Get endpoints`,description:`Get all endpoints for a specific API. ${h}`,summary:`Get all endpoints for an API.`,schema:C(e),annotations:g,outputSchema:{type:`object`,required:[`api`,`version`,`filePath`,`servers`,`endpoints`],properties:{api:{type:`string`},version:{type:`string`},...m,servers:c,endpoints:{type:`array`,items:{type:`object`,required:[`path`,`method`],properties:{path:{type:`string`},method:{type:`string`},summary:o,description:o,security:l}}}}}}}const k=O(`tools`);function A(e){return{name:`get-endpoint-info`,title:`Get endpoint info`,description:`Get comprehensive information about specific endpoint including parameters, security, and examples. A \`$ref\` in \`endpoint\` points into the \`components\` key at the root of the result: read \`#/components/<section>/<name>\` there. ${h}`,summary:`Get the details of an endpoint.`,schema:w(e),annotations:g,outputSchema:{type:`object`,required:[`api`,`version`,`filePath`,`servers`,`endpoint`,`globalSecurity`,`securitySchemes`],properties:{api:{type:`string`},version:{type:`string`},...m,servers:c,endpoint:f,globalSecurity:l,securitySchemes:u,components:p}}}}const j=A(`tools`);function M(e){return{name:`get-security-schemes`,title:`Get security schemes`,description:`Get the security schemes for a specific API. ${h}`,summary:`Get the security schemes for an API.`,schema:C(e),annotations:g,outputSchema:{type:`object`,required:[`api`,`version`,`filePath`,`securitySchemes`,`security`],properties:{api:{type:`string`},version:{type:`string`},...m,securitySchemes:u,security:l}}}}const N=M(`tools`);function P(e){return{name:`get-full-api-description`,title:`Get full API description`,description:`Get the complete OpenAPI description. ${h}`,summary:`Get the complete OpenAPI description.`,schema:C(e),annotations:g,outputSchema:{type:`object`,required:[`api`,`version`,`filePath`,`definition`],properties:{api:{type:`string`},version:{type:`string`},...m,definition:d}}}}const F=P(`tools`),I={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}}},L={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. With scope "fields", restricts to the fields of that parent category ("objects", "interfaces", or "inputs" only).`,enum:[...r,null],nullable:!0},scope:{type:`string`,description:'Optional: what each list item is. "members" (default) lists top-level types and operations. "fields" flattens every field of every object/interface/input type into "ParentType.fieldName" entries with their descriptions — combine with `filter` to search nested fields anywhere in the schema.',enum:[...n,null],nullable:!0},filter:{type:`string`,description:`Optional: only members whose name or description contains this substring, case-insensitive (e.g. "custom tags")`,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 — 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}}},R={type:`object`,required:[`name`],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,nullable:!0},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}}},z={type:`object`,required:[`name`],additionalProperties:!1,properties:{name:{type:`string`,description:`GraphQL schema name`,minLength:1}}},B={name:`list-graphql-apis`,title:`List GraphQL APIs`,description:`Lists available GraphQL schemas with their context and purpose`,summary:`List the available GraphQL schemas.`,schema:I,annotations:g,outputSchema:{type:`object`,required:[`items`,`limit`,`total`,`page`,`totalPages`],properties:{items:{type:`array`,items:{type:`object`,required:[`name`],properties:{name:{type:`string`},description:o}}},...s}}},V={name:`get-graphql-type-list`,title:`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, …) and carries a one-line description; operations also include their return type and argument signature — use it to decide which members to fetch in detail. Narrow the result with `kind` (one category), `filter` (case-insensitive substring of the member name or description, e.g. "book"), or `referencesType` (only members that use a given type, directly or transitively) to explore a domain cheaply instead of pulling the full schema. To search nested fields — not just type names — set scope "fields": it flattens every field of every object/interface/input type into "ParentType.fieldName" entries with their descriptions, so `filter` finds things like an input field whose docstring mentions your keyword.',summary:`List the operations and types in a GraphQL schema.`,schema:L,annotations:g,outputSchema:{type:`object`,required:[`name`,`items`,`limit`,`total`,`page`,`totalPages`],properties:{name:{type:`string`},items:{type:`array`,items:{type:`object`,required:[`kind`,`name`],properties:{kind:{type:`string`,enum:[...r]},name:{type:`string`},description:o,type:{type:`string`},args:{type:`string`},directives:{type:`string`}}}},...s}}};function H(e){return{name:`get-graphql-type`,title:`Get GraphQL type`,description:`Get the SDL for a single GraphQL type, operation (query/mutation/subscription field), or directive. Without includeReferencedTypes, the SDL is followed by a one-level manifest of every directly referenced type's field names (e.g. "input ActionOperationInput { addTags, removeTags }"), so you can see what nested types contain before fetching them. Set includeReferencedTypes to instead pull in the full SDL of every type it references transitively — the whole structural subgraph in one call, ideal for complete exploration of an entity (e.g. Book and all the types it touches). That traversal only follows what the target depends on; to go the other direction and find the members that use a type, call ${t(`get-graphql-type-list`,e)} with \`referencesType\`.`,summary:`Get the SDL of one GraphQL type or operation.`,schema:R,annotations:g,outputSchema:{type:`string`}}}const U=H(`tools`);function W(e){return{name:`get-graphql-schema`,title:`Get GraphQL schema`,description:`Get the complete GraphQL schema as SDL — the whole type graph in one call. Returns everything, so it can be very large and token-expensive for big schemas; prefer ${t(`get-graphql-type-list`,e)} (filter/paginate) plus targeted ${t(`get-graphql-type`,e)} calls, and reach for this only for small schemas or when you truly need the full SDL.`,summary:`Get the complete GraphQL schema.`,schema:z,annotations:g,outputSchema:{type:`string`}}}const G=W(`tools`);function K(e){return`Section id from ${t(`list-pages`,e)} (for example "products/ledger > Integration"), a section title, or a section URL`}function q(e){return{type:`object`,required:[`type`,`title`],properties:{type:{type:`string`,enum:[`page`,`section`]},id:{type:`string`,description:`Section id to pass to ${t(`list-pages`,e)} or ${t(`grep-pages`,e)}`},title:{type:`string`},url:{type:`string`},pageCount:{type:`number`,description:`Pages inside the section`}}}}function J(e){let t=q(e);return{name:`list-pages`,title:`List pages`,description:`Lists the docs navigation, one level per call`,summary:`List the docs navigation, one level per call.`,schema:{type:`object`,additionalProperties:!1,required:[],properties:{section:{type:`string`,nullable:!0,description:`${K(e)}. Omit it to list the top level`}}},annotations:g,outputSchema:{type:`object`,properties:{sections:{type:`array`,description:`Top level, when no section is given`,items:{type:`object`,required:[`id`,`title`,`items`],properties:{id:{type:`string`},title:{type:`string`},items:{type:`array`,items:t}}}},section:{type:`object`,properties:{id:{type:`string`},title:{type:`string`}}},items:{type:`array`,items:t}}}}}const Y=J(`tools`),X={name:`get-page`,title:`Get page`,description:`Reads a docs page as Markdown, in line windows`,summary:`Read a docs page as Markdown, in line windows.`,schema:{type:`object`,additionalProperties:!1,required:[`url`],properties:{url:{type:`string`,minLength:1,description:`Page URL or path, for example "/guides/auth"`},startLine:{type:`integer`,nullable:!0,minimum:1,description:`First line to return (default 1)`},lines:{type:`integer`,nullable:!0,minimum:1,maximum:a,description:`Number of lines to return (default 200)`}}},annotations:g,outputSchema:{type:`object`,required:[`url`,`title`,`totalLines`,`startLine`,`endLine`,`outline`,`content`],properties:{url:{type:`string`},title:{type:`string`},totalLines:{type:`number`},startLine:{type:`number`},endLine:{type:`number`},nextStartLine:{type:`number`,description:`Pass as startLine to read on; absent at the end`},outline:{type:`array`,description:`Headings (levels 1-3) with their line numbers`,items:{type:`object`,required:[`line`,`level`,`heading`],properties:{line:{type:`number`},level:{type:`number`},heading:{type:`string`}}}},content:{type:`string`}}}};function Z(e){return{name:`grep-pages`,title:`Grep pages`,description:`Finds the docs lines that contain a text`,summary:`Find the docs lines that contain a text.`,schema:{type:`object`,additionalProperties:!1,required:[`query`],properties:{query:{type:`string`,minLength:1,description:`Text to find, case-insensitive. Not a regular expression`},section:{type:`string`,nullable:!0,description:`${K(e)}. Omit it to search every page`},maxMatches:{type:`integer`,nullable:!0,minimum:1,maximum:100,description:`Maximum matching lines to return (default 20)`}}},annotations:g,outputSchema:{type:`object`,required:[`matches`,`searchedPages`,`truncated`],properties:{matches:{type:`array`,items:{type:`object`,required:[`url`,`title`,`line`,`text`],properties:{url:{type:`string`},title:{type:`string`},line:{type:`number`},text:{type:`string`}}}},searchedPages:{type:`number`,description:`Pages searched: every page you can read, or every page in the section`},truncated:{type:`boolean`,description:`true = more matches exist; narrow the query or the section`},note:{type:`string`,description:`Present when nothing matches: the docs you can read do not contain the text`}}}}}const Q=Z(`tools`);export{k as GET_ENDPOINTS_SCHEMA,j as GET_ENDPOINT_INFO_SCHEMA,F as GET_FULL_API_DESCRIPTION_SCHEMA,G as GET_GRAPHQL_SCHEMA_SCHEMA,V as GET_GRAPHQL_TYPE_LIST_SCHEMA,U as GET_GRAPHQL_TYPE_SCHEMA,X as GET_PAGE_SCHEMA,N as GET_SECURITY_SCHEMES_SCHEMA,Q as GREP_PAGES_SCHEMA,D as LIST_APIS_CALLABLE_SCHEMA,E as LIST_APIS_SCHEMA,B as LIST_GRAPHQL_APIS_SCHEMA,Y as LIST_PAGES_SCHEMA,g as READ_ONLY_ANNOTATIONS,v as SEARCH_SCHEMA,b as SUBMIT_FEEDBACK_SCHEMA,y as WHOAMI_SCHEMA,A as getEndpointInfoToolSchema,O as getEndpointsToolSchema,P as getFullApiDescriptionToolSchema,W as getGraphqlSchemaToolSchema,H as getGraphqlTypeToolSchema,M as getSecuritySchemesToolSchema,Z as grepPagesToolSchema,J as listPagesToolSchema,_ as searchSchema};
@@ -1 +0,0 @@
1
- import{withPathPrefix as e}from"../../path-prefix.js";function t(t){return e(t===`/`?`/index.html.md`:`${t}.md`)}export{t as markdownPathForSlug};