@payloadcms/plugin-mcp 4.0.0-internal.011fd46 → 4.0.0-internal.0b9bec1
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/LICENSE.md +1 -1
- package/bin.js +7 -0
- package/dist/defaultAccess.d.ts +3 -0
- package/dist/defaultAccess.d.ts.map +1 -0
- package/dist/defaultAccess.js +3 -0
- package/dist/defaultAccess.js.map +1 -0
- package/dist/defineTool.d.ts +8 -8
- package/dist/defineTool.d.ts.map +1 -1
- package/dist/endpoint/access.d.ts +12 -5
- package/dist/endpoint/access.d.ts.map +1 -1
- package/dist/endpoint/access.js +74 -103
- package/dist/endpoint/access.js.map +1 -1
- package/dist/endpoint/index.d.ts +1 -1
- package/dist/endpoint/index.d.ts.map +1 -1
- package/dist/endpoint/index.js +68 -17
- package/dist/endpoint/index.js.map +1 -1
- package/dist/exports/client.d.ts +1 -4
- package/dist/exports/client.d.ts.map +1 -1
- package/dist/exports/client.js +1 -4
- package/dist/exports/client.js.map +1 -1
- package/dist/exports/internal.d.ts +2 -0
- package/dist/exports/internal.d.ts.map +1 -0
- package/dist/exports/internal.js +3 -0
- package/dist/exports/internal.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -56
- package/dist/index.js.map +1 -1
- package/dist/mcp/buildMcpServer.d.ts +4 -4
- package/dist/mcp/buildMcpServer.d.ts.map +1 -1
- package/dist/mcp/buildMcpServer.js +32 -10
- package/dist/mcp/buildMcpServer.js.map +1 -1
- package/dist/mcp/builtin/collections/countTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/countTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/countTool.js +68 -0
- package/dist/mcp/builtin/collections/countTool.js.map +1 -0
- package/dist/mcp/builtin/collections/countVersionsTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/countVersionsTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/countVersionsTool.js +64 -0
- package/dist/mcp/builtin/collections/countVersionsTool.js.map +1 -0
- package/dist/mcp/builtin/collections/createTool.d.ts +1 -1
- package/dist/mcp/builtin/collections/createTool.d.ts.map +1 -1
- package/dist/mcp/builtin/collections/createTool.js +93 -40
- package/dist/mcp/builtin/collections/createTool.js.map +1 -1
- package/dist/mcp/builtin/collections/deleteTool.d.ts.map +1 -1
- package/dist/mcp/builtin/collections/deleteTool.js +3 -2
- package/dist/mcp/builtin/collections/deleteTool.js.map +1 -1
- package/dist/mcp/builtin/collections/duplicateTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/duplicateTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/duplicateTool.js +96 -0
- package/dist/mcp/builtin/collections/duplicateTool.js.map +1 -0
- package/dist/mcp/builtin/collections/fileInput.d.ts +28 -0
- package/dist/mcp/builtin/collections/fileInput.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/fileInput.js +124 -0
- package/dist/mcp/builtin/collections/fileInput.js.map +1 -0
- package/dist/mcp/builtin/collections/fileInput.spec.js +86 -0
- package/dist/mcp/builtin/collections/fileInput.spec.js.map +1 -0
- package/dist/mcp/builtin/collections/findDistinctTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/findDistinctTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/findDistinctTool.js +92 -0
- package/dist/mcp/builtin/collections/findDistinctTool.js.map +1 -0
- package/dist/mcp/builtin/collections/findTool.d.ts.map +1 -1
- package/dist/mcp/builtin/collections/findTool.js +5 -4
- package/dist/mcp/builtin/collections/findTool.js.map +1 -1
- package/dist/mcp/builtin/collections/findVersionByIDTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/findVersionByIDTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/findVersionByIDTool.js +83 -0
- package/dist/mcp/builtin/collections/findVersionByIDTool.js.map +1 -0
- package/dist/mcp/builtin/collections/findVersionsTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/findVersionsTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/findVersionsTool.js +98 -0
- package/dist/mcp/builtin/collections/findVersionsTool.js.map +1 -0
- package/dist/mcp/builtin/collections/formatCollectionError.d.ts +1 -1
- package/dist/mcp/builtin/collections/formatCollectionError.d.ts.map +1 -1
- package/dist/mcp/builtin/collections/formatCollectionError.js.map +1 -1
- package/dist/mcp/builtin/collections/getCollectionSchemaTool.d.ts.map +1 -1
- package/dist/mcp/builtin/collections/getCollectionSchemaTool.js +49 -4
- package/dist/mcp/builtin/collections/getCollectionSchemaTool.js.map +1 -1
- package/dist/mcp/builtin/collections/restoreVersionTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/restoreVersionTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/restoreVersionTool.js +81 -0
- package/dist/mcp/builtin/collections/restoreVersionTool.js.map +1 -0
- package/dist/mcp/builtin/collections/updateTool.d.ts.map +1 -1
- package/dist/mcp/builtin/collections/updateTool.js +26 -12
- package/dist/mcp/builtin/collections/updateTool.js.map +1 -1
- package/dist/mcp/builtin/collections/uploadInstructionsTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/uploadInstructionsTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/uploadInstructionsTool.js +55 -0
- package/dist/mcp/builtin/collections/uploadInstructionsTool.js.map +1 -0
- package/dist/mcp/builtin/getConfigInfoTool.d.ts.map +1 -1
- package/dist/mcp/builtin/getConfigInfoTool.js +20 -8
- package/dist/mcp/builtin/getConfigInfoTool.js.map +1 -1
- package/dist/mcp/builtin/globals/countVersionsTool.d.ts +2 -0
- package/dist/mcp/builtin/globals/countVersionsTool.d.ts.map +1 -0
- package/dist/mcp/builtin/globals/countVersionsTool.js +64 -0
- package/dist/mcp/builtin/globals/countVersionsTool.js.map +1 -0
- package/dist/mcp/builtin/globals/findTool.d.ts.map +1 -1
- package/dist/mcp/builtin/globals/findTool.js +4 -2
- package/dist/mcp/builtin/globals/findTool.js.map +1 -1
- package/dist/mcp/builtin/globals/findVersionByIDTool.d.ts +2 -0
- package/dist/mcp/builtin/globals/findVersionByIDTool.d.ts.map +1 -0
- package/dist/mcp/builtin/globals/findVersionByIDTool.js +79 -0
- package/dist/mcp/builtin/globals/findVersionByIDTool.js.map +1 -0
- package/dist/mcp/builtin/globals/findVersionsTool.d.ts +2 -0
- package/dist/mcp/builtin/globals/findVersionsTool.d.ts.map +1 -0
- package/dist/mcp/builtin/globals/findVersionsTool.js +94 -0
- package/dist/mcp/builtin/globals/findVersionsTool.js.map +1 -0
- package/dist/mcp/builtin/globals/getGlobalSchemaTool.d.ts.map +1 -1
- package/dist/mcp/builtin/globals/getGlobalSchemaTool.js +25 -2
- package/dist/mcp/builtin/globals/getGlobalSchemaTool.js.map +1 -1
- package/dist/mcp/builtin/globals/restoreVersionTool.d.ts +2 -0
- package/dist/mcp/builtin/globals/restoreVersionTool.d.ts.map +1 -0
- package/dist/mcp/builtin/globals/restoreVersionTool.js +77 -0
- package/dist/mcp/builtin/globals/restoreVersionTool.js.map +1 -0
- package/dist/mcp/builtin/globals/updateTool.d.ts.map +1 -1
- package/dist/mcp/builtin/globals/updateTool.js +4 -2
- package/dist/mcp/builtin/globals/updateTool.js.map +1 -1
- package/dist/mcp/builtin/validateEntityData.d.ts.map +1 -1
- package/dist/mcp/builtin/validateEntityData.js +1 -1
- package/dist/mcp/builtin/validateEntityData.js.map +1 -1
- package/dist/mcp/builtinTools.d.ts +73 -2
- package/dist/mcp/builtinTools.d.ts.map +1 -1
- package/dist/mcp/builtinTools.js +73 -3
- package/dist/mcp/builtinTools.js.map +1 -1
- package/dist/mcp/sanitizeMCPConfig.d.ts +0 -1
- package/dist/mcp/sanitizeMCPConfig.d.ts.map +1 -1
- package/dist/mcp/sanitizeMCPConfig.js +48 -17
- package/dist/mcp/sanitizeMCPConfig.js.map +1 -1
- package/dist/stdio.d.ts +3 -3
- package/dist/stdio.d.ts.map +1 -1
- package/dist/stdio.js +84 -46
- package/dist/stdio.js.map +1 -1
- package/dist/types.d.ts +93 -87
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -4
- package/dist/types.js.map +1 -1
- package/dist/utils/camelCase.d.ts.map +1 -1
- package/dist/utils/getPluginConfig.d.ts +1 -1
- package/dist/utils/getPluginConfig.js +1 -1
- package/dist/utils/getPluginConfig.js.map +1 -1
- package/dist/utils/resolveProjectRoot.d.ts.map +1 -1
- package/dist/utils/schemaConversion/filterFieldsByAccess.d.ts +28 -0
- package/dist/utils/schemaConversion/filterFieldsByAccess.d.ts.map +1 -0
- package/dist/utils/schemaConversion/filterFieldsByAccess.js +71 -0
- package/dist/utils/schemaConversion/filterFieldsByAccess.js.map +1 -0
- package/dist/utils/schemaConversion/getEntityInputSchema.d.ts +5 -3
- package/dist/utils/schemaConversion/getEntityInputSchema.d.ts.map +1 -1
- package/dist/utils/schemaConversion/getEntityInputSchema.js +44 -12
- package/dist/utils/schemaConversion/getEntityInputSchema.js.map +1 -1
- package/dist/utils/schemaConversion/sanitizeEntitySchema.d.ts +5 -10
- package/dist/utils/schemaConversion/sanitizeEntitySchema.d.ts.map +1 -1
- package/dist/utils/schemaConversion/sanitizeEntitySchema.js +15 -95
- package/dist/utils/schemaConversion/sanitizeEntitySchema.js.map +1 -1
- package/dist/utils/schemaConversion/sanitizeEntitySchema.spec.js +15 -40
- package/dist/utils/schemaConversion/sanitizeEntitySchema.spec.js.map +1 -1
- package/dist/utils/toStandardSchema.d.ts.map +1 -1
- package/package.json +11 -17
- package/src/defaultAccess.ts +3 -0
- package/src/endpoint/access.ts +80 -112
- package/src/endpoint/index.ts +58 -16
- package/src/exports/client.ts +2 -4
- package/src/exports/internal.ts +1 -0
- package/src/index.ts +5 -62
- package/src/mcp/buildMcpServer.ts +46 -21
- package/src/mcp/builtin/collections/countTool.ts +73 -0
- package/src/mcp/builtin/collections/countVersionsTool.ts +69 -0
- package/src/mcp/builtin/collections/createTool.ts +93 -34
- package/src/mcp/builtin/collections/deleteTool.ts +4 -2
- package/src/mcp/builtin/collections/duplicateTool.ts +134 -0
- package/src/mcp/builtin/collections/fileInput.spec.ts +93 -0
- package/src/mcp/builtin/collections/fileInput.ts +164 -0
- package/src/mcp/builtin/collections/findDistinctTool.ts +119 -0
- package/src/mcp/builtin/collections/findTool.ts +6 -4
- package/src/mcp/builtin/collections/findVersionByIDTool.ts +109 -0
- package/src/mcp/builtin/collections/findVersionsTool.ts +154 -0
- package/src/mcp/builtin/collections/formatCollectionError.ts +1 -1
- package/src/mcp/builtin/collections/getCollectionSchemaTool.ts +48 -3
- package/src/mcp/builtin/collections/restoreVersionTool.ts +107 -0
- package/src/mcp/builtin/collections/updateTool.ts +29 -10
- package/src/mcp/builtin/collections/uploadInstructionsTool.ts +64 -0
- package/src/mcp/builtin/getConfigInfoTool.ts +20 -4
- package/src/mcp/builtin/globals/countVersionsTool.ts +68 -0
- package/src/mcp/builtin/globals/findTool.ts +5 -2
- package/src/mcp/builtin/globals/findVersionByIDTool.ts +103 -0
- package/src/mcp/builtin/globals/findVersionsTool.ts +147 -0
- package/src/mcp/builtin/globals/getGlobalSchemaTool.ts +30 -2
- package/src/mcp/builtin/globals/restoreVersionTool.ts +99 -0
- package/src/mcp/builtin/globals/updateTool.ts +5 -2
- package/src/mcp/builtin/validateEntityData.ts +1 -1
- package/src/mcp/builtinTools.ts +72 -6
- package/src/mcp/sanitizeMCPConfig.ts +36 -19
- package/src/stdio.ts +79 -46
- package/src/types.ts +101 -91
- package/src/utils/getPluginConfig.ts +1 -1
- package/src/utils/schemaConversion/filterFieldsByAccess.ts +123 -0
- package/src/utils/schemaConversion/getEntityInputSchema.ts +45 -27
- package/src/utils/schemaConversion/sanitizeEntitySchema.spec.ts +12 -19
- package/src/utils/schemaConversion/sanitizeEntitySchema.ts +17 -114
- package/dist/collection/getAccessField.d.ts +0 -12
- package/dist/collection/getAccessField.d.ts.map +0 -1
- package/dist/collection/getAccessField.js +0 -72
- package/dist/collection/getAccessField.js.map +0 -1
- package/dist/collection/index.d.ts +0 -6
- package/dist/collection/index.d.ts.map +0 -1
- package/dist/collection/index.js +0 -105
- package/dist/collection/index.js.map +0 -1
- package/dist/components/APIKeyField/index.client.d.ts +0 -9
- package/dist/components/APIKeyField/index.client.d.ts.map +0 -1
- package/dist/components/APIKeyField/index.client.js +0 -85
- package/dist/components/APIKeyField/index.client.js.map +0 -1
- package/dist/components/APIKeyField/index.css +0 -105
- package/dist/components/APIKeysEmptyState/index.client.d.ts +0 -4
- package/dist/components/APIKeysEmptyState/index.client.d.ts.map +0 -1
- package/dist/components/APIKeysEmptyState/index.client.js +0 -21
- package/dist/components/APIKeysEmptyState/index.client.js.map +0 -1
- package/dist/components/AccessField/index.client.d.ts +0 -10
- package/dist/components/AccessField/index.client.d.ts.map +0 -1
- package/dist/components/AccessField/index.client.js +0 -247
- package/dist/components/AccessField/index.client.js.map +0 -1
- package/dist/components/AccessField/index.css +0 -99
- package/dist/components/SettingsMenu/index.client.d.ts +0 -8
- package/dist/components/SettingsMenu/index.client.d.ts.map +0 -1
- package/dist/components/SettingsMenu/index.client.js +0 -24
- package/dist/components/SettingsMenu/index.client.js.map +0 -1
- package/dist/translations/index.d.ts +0 -11
- package/dist/translations/index.d.ts.map +0 -1
- package/dist/translations/index.js +0 -92
- package/dist/translations/index.js.map +0 -1
- package/dist/translations/languages/ar.d.ts +0 -31
- package/dist/translations/languages/ar.d.ts.map +0 -1
- package/dist/translations/languages/ar.js +0 -34
- package/dist/translations/languages/ar.js.map +0 -1
- package/dist/translations/languages/az.d.ts +0 -31
- package/dist/translations/languages/az.d.ts.map +0 -1
- package/dist/translations/languages/az.js +0 -34
- package/dist/translations/languages/az.js.map +0 -1
- package/dist/translations/languages/bg.d.ts +0 -31
- package/dist/translations/languages/bg.d.ts.map +0 -1
- package/dist/translations/languages/bg.js +0 -34
- package/dist/translations/languages/bg.js.map +0 -1
- package/dist/translations/languages/bnBd.d.ts +0 -31
- package/dist/translations/languages/bnBd.d.ts.map +0 -1
- package/dist/translations/languages/bnBd.js +0 -34
- package/dist/translations/languages/bnBd.js.map +0 -1
- package/dist/translations/languages/bnIn.d.ts +0 -31
- package/dist/translations/languages/bnIn.d.ts.map +0 -1
- package/dist/translations/languages/bnIn.js +0 -34
- package/dist/translations/languages/bnIn.js.map +0 -1
- package/dist/translations/languages/ca.d.ts +0 -31
- package/dist/translations/languages/ca.d.ts.map +0 -1
- package/dist/translations/languages/ca.js +0 -34
- package/dist/translations/languages/ca.js.map +0 -1
- package/dist/translations/languages/cs.d.ts +0 -31
- package/dist/translations/languages/cs.d.ts.map +0 -1
- package/dist/translations/languages/cs.js +0 -34
- package/dist/translations/languages/cs.js.map +0 -1
- package/dist/translations/languages/da.d.ts +0 -31
- package/dist/translations/languages/da.d.ts.map +0 -1
- package/dist/translations/languages/da.js +0 -34
- package/dist/translations/languages/da.js.map +0 -1
- package/dist/translations/languages/de.d.ts +0 -31
- package/dist/translations/languages/de.d.ts.map +0 -1
- package/dist/translations/languages/de.js +0 -34
- package/dist/translations/languages/de.js.map +0 -1
- package/dist/translations/languages/en.d.ts +0 -31
- package/dist/translations/languages/en.d.ts.map +0 -1
- package/dist/translations/languages/en.js +0 -34
- package/dist/translations/languages/en.js.map +0 -1
- package/dist/translations/languages/es.d.ts +0 -31
- package/dist/translations/languages/es.d.ts.map +0 -1
- package/dist/translations/languages/es.js +0 -34
- package/dist/translations/languages/es.js.map +0 -1
- package/dist/translations/languages/et.d.ts +0 -31
- package/dist/translations/languages/et.d.ts.map +0 -1
- package/dist/translations/languages/et.js +0 -34
- package/dist/translations/languages/et.js.map +0 -1
- package/dist/translations/languages/fa.d.ts +0 -31
- package/dist/translations/languages/fa.d.ts.map +0 -1
- package/dist/translations/languages/fa.js +0 -34
- package/dist/translations/languages/fa.js.map +0 -1
- package/dist/translations/languages/fr.d.ts +0 -31
- package/dist/translations/languages/fr.d.ts.map +0 -1
- package/dist/translations/languages/fr.js +0 -34
- package/dist/translations/languages/fr.js.map +0 -1
- package/dist/translations/languages/he.d.ts +0 -31
- package/dist/translations/languages/he.d.ts.map +0 -1
- package/dist/translations/languages/he.js +0 -34
- package/dist/translations/languages/he.js.map +0 -1
- package/dist/translations/languages/hr.d.ts +0 -31
- package/dist/translations/languages/hr.d.ts.map +0 -1
- package/dist/translations/languages/hr.js +0 -34
- package/dist/translations/languages/hr.js.map +0 -1
- package/dist/translations/languages/hu.d.ts +0 -31
- package/dist/translations/languages/hu.d.ts.map +0 -1
- package/dist/translations/languages/hu.js +0 -34
- package/dist/translations/languages/hu.js.map +0 -1
- package/dist/translations/languages/hy.d.ts +0 -31
- package/dist/translations/languages/hy.d.ts.map +0 -1
- package/dist/translations/languages/hy.js +0 -34
- package/dist/translations/languages/hy.js.map +0 -1
- package/dist/translations/languages/id.d.ts +0 -31
- package/dist/translations/languages/id.d.ts.map +0 -1
- package/dist/translations/languages/id.js +0 -34
- package/dist/translations/languages/id.js.map +0 -1
- package/dist/translations/languages/is.d.ts +0 -31
- package/dist/translations/languages/is.d.ts.map +0 -1
- package/dist/translations/languages/is.js +0 -34
- package/dist/translations/languages/is.js.map +0 -1
- package/dist/translations/languages/it.d.ts +0 -31
- package/dist/translations/languages/it.d.ts.map +0 -1
- package/dist/translations/languages/it.js +0 -34
- package/dist/translations/languages/it.js.map +0 -1
- package/dist/translations/languages/ja.d.ts +0 -31
- package/dist/translations/languages/ja.d.ts.map +0 -1
- package/dist/translations/languages/ja.js +0 -34
- package/dist/translations/languages/ja.js.map +0 -1
- package/dist/translations/languages/ko.d.ts +0 -31
- package/dist/translations/languages/ko.d.ts.map +0 -1
- package/dist/translations/languages/ko.js +0 -34
- package/dist/translations/languages/ko.js.map +0 -1
- package/dist/translations/languages/lt.d.ts +0 -31
- package/dist/translations/languages/lt.d.ts.map +0 -1
- package/dist/translations/languages/lt.js +0 -34
- package/dist/translations/languages/lt.js.map +0 -1
- package/dist/translations/languages/lv.d.ts +0 -31
- package/dist/translations/languages/lv.d.ts.map +0 -1
- package/dist/translations/languages/lv.js +0 -34
- package/dist/translations/languages/lv.js.map +0 -1
- package/dist/translations/languages/my.d.ts +0 -31
- package/dist/translations/languages/my.d.ts.map +0 -1
- package/dist/translations/languages/my.js +0 -34
- package/dist/translations/languages/my.js.map +0 -1
- package/dist/translations/languages/nb.d.ts +0 -31
- package/dist/translations/languages/nb.d.ts.map +0 -1
- package/dist/translations/languages/nb.js +0 -34
- package/dist/translations/languages/nb.js.map +0 -1
- package/dist/translations/languages/nl.d.ts +0 -31
- package/dist/translations/languages/nl.d.ts.map +0 -1
- package/dist/translations/languages/nl.js +0 -34
- package/dist/translations/languages/nl.js.map +0 -1
- package/dist/translations/languages/pl.d.ts +0 -31
- package/dist/translations/languages/pl.d.ts.map +0 -1
- package/dist/translations/languages/pl.js +0 -34
- package/dist/translations/languages/pl.js.map +0 -1
- package/dist/translations/languages/pt.d.ts +0 -31
- package/dist/translations/languages/pt.d.ts.map +0 -1
- package/dist/translations/languages/pt.js +0 -34
- package/dist/translations/languages/pt.js.map +0 -1
- package/dist/translations/languages/ro.d.ts +0 -31
- package/dist/translations/languages/ro.d.ts.map +0 -1
- package/dist/translations/languages/ro.js +0 -34
- package/dist/translations/languages/ro.js.map +0 -1
- package/dist/translations/languages/rs.d.ts +0 -31
- package/dist/translations/languages/rs.d.ts.map +0 -1
- package/dist/translations/languages/rs.js +0 -34
- package/dist/translations/languages/rs.js.map +0 -1
- package/dist/translations/languages/rsLatin.d.ts +0 -31
- package/dist/translations/languages/rsLatin.d.ts.map +0 -1
- package/dist/translations/languages/rsLatin.js +0 -34
- package/dist/translations/languages/rsLatin.js.map +0 -1
- package/dist/translations/languages/ru.d.ts +0 -31
- package/dist/translations/languages/ru.d.ts.map +0 -1
- package/dist/translations/languages/ru.js +0 -34
- package/dist/translations/languages/ru.js.map +0 -1
- package/dist/translations/languages/sk.d.ts +0 -31
- package/dist/translations/languages/sk.d.ts.map +0 -1
- package/dist/translations/languages/sk.js +0 -34
- package/dist/translations/languages/sk.js.map +0 -1
- package/dist/translations/languages/sl.d.ts +0 -31
- package/dist/translations/languages/sl.d.ts.map +0 -1
- package/dist/translations/languages/sl.js +0 -34
- package/dist/translations/languages/sl.js.map +0 -1
- package/dist/translations/languages/sv.d.ts +0 -31
- package/dist/translations/languages/sv.d.ts.map +0 -1
- package/dist/translations/languages/sv.js +0 -34
- package/dist/translations/languages/sv.js.map +0 -1
- package/dist/translations/languages/ta.d.ts +0 -31
- package/dist/translations/languages/ta.d.ts.map +0 -1
- package/dist/translations/languages/ta.js +0 -34
- package/dist/translations/languages/ta.js.map +0 -1
- package/dist/translations/languages/th.d.ts +0 -31
- package/dist/translations/languages/th.d.ts.map +0 -1
- package/dist/translations/languages/th.js +0 -34
- package/dist/translations/languages/th.js.map +0 -1
- package/dist/translations/languages/tr.d.ts +0 -31
- package/dist/translations/languages/tr.d.ts.map +0 -1
- package/dist/translations/languages/tr.js +0 -34
- package/dist/translations/languages/tr.js.map +0 -1
- package/dist/translations/languages/uk.d.ts +0 -31
- package/dist/translations/languages/uk.d.ts.map +0 -1
- package/dist/translations/languages/uk.js +0 -34
- package/dist/translations/languages/uk.js.map +0 -1
- package/dist/translations/languages/vi.d.ts +0 -31
- package/dist/translations/languages/vi.d.ts.map +0 -1
- package/dist/translations/languages/vi.js +0 -34
- package/dist/translations/languages/vi.js.map +0 -1
- package/dist/translations/languages/zh.d.ts +0 -31
- package/dist/translations/languages/zh.d.ts.map +0 -1
- package/dist/translations/languages/zh.js +0 -34
- package/dist/translations/languages/zh.js.map +0 -1
- package/dist/translations/languages/zhTw.d.ts +0 -31
- package/dist/translations/languages/zhTw.d.ts.map +0 -1
- package/dist/translations/languages/zhTw.js +0 -34
- package/dist/translations/languages/zhTw.js.map +0 -1
- package/dist/translations/types.d.ts +0 -32
- package/dist/translations/types.d.ts.map +0 -1
- package/dist/translations/types.js +0 -3
- package/dist/translations/types.js.map +0 -1
- package/dist/utils/localAPIDefaults.d.ts +0 -20
- package/dist/utils/localAPIDefaults.d.ts.map +0 -1
- package/dist/utils/localAPIDefaults.js +0 -19
- package/dist/utils/localAPIDefaults.js.map +0 -1
- package/dist/utils/schemaConversion/removeVirtualFieldsFromSchema.d.ts +0 -7
- package/dist/utils/schemaConversion/removeVirtualFieldsFromSchema.d.ts.map +0 -1
- package/dist/utils/schemaConversion/removeVirtualFieldsFromSchema.js +0 -20
- package/dist/utils/schemaConversion/removeVirtualFieldsFromSchema.js.map +0 -1
- package/src/collection/getAccessField.ts +0 -84
- package/src/collection/index.ts +0 -105
- package/src/components/APIKeyField/index.client.tsx +0 -68
- package/src/components/APIKeyField/index.css +0 -105
- package/src/components/APIKeysEmptyState/index.client.tsx +0 -33
- package/src/components/AccessField/index.client.tsx +0 -296
- package/src/components/AccessField/index.css +0 -99
- package/src/components/SettingsMenu/index.client.tsx +0 -30
- package/src/translations/index.ts +0 -105
- package/src/translations/languages/ar.ts +0 -38
- package/src/translations/languages/az.ts +0 -38
- package/src/translations/languages/bg.ts +0 -39
- package/src/translations/languages/bnBd.ts +0 -39
- package/src/translations/languages/bnIn.ts +0 -39
- package/src/translations/languages/ca.ts +0 -39
- package/src/translations/languages/cs.ts +0 -39
- package/src/translations/languages/da.ts +0 -38
- package/src/translations/languages/de.ts +0 -39
- package/src/translations/languages/en.ts +0 -39
- package/src/translations/languages/es.ts +0 -39
- package/src/translations/languages/et.ts +0 -38
- package/src/translations/languages/fa.ts +0 -39
- package/src/translations/languages/fr.ts +0 -39
- package/src/translations/languages/he.ts +0 -37
- package/src/translations/languages/hr.ts +0 -39
- package/src/translations/languages/hu.ts +0 -39
- package/src/translations/languages/hy.ts +0 -39
- package/src/translations/languages/id.ts +0 -39
- package/src/translations/languages/is.ts +0 -39
- package/src/translations/languages/it.ts +0 -39
- package/src/translations/languages/ja.ts +0 -39
- package/src/translations/languages/ko.ts +0 -39
- package/src/translations/languages/lt.ts +0 -39
- package/src/translations/languages/lv.ts +0 -38
- package/src/translations/languages/my.ts +0 -39
- package/src/translations/languages/nb.ts +0 -39
- package/src/translations/languages/nl.ts +0 -39
- package/src/translations/languages/pl.ts +0 -38
- package/src/translations/languages/pt.ts +0 -39
- package/src/translations/languages/ro.ts +0 -39
- package/src/translations/languages/rs.ts +0 -38
- package/src/translations/languages/rsLatin.ts +0 -38
- package/src/translations/languages/ru.ts +0 -39
- package/src/translations/languages/sk.ts +0 -39
- package/src/translations/languages/sl.ts +0 -38
- package/src/translations/languages/sv.ts +0 -39
- package/src/translations/languages/ta.ts +0 -39
- package/src/translations/languages/th.ts +0 -38
- package/src/translations/languages/tr.ts +0 -38
- package/src/translations/languages/uk.ts +0 -39
- package/src/translations/languages/vi.ts +0 -39
- package/src/translations/languages/zh.ts +0 -36
- package/src/translations/languages/zhTw.ts +0 -36
- package/src/translations/types.ts +0 -34
- package/src/utils/localAPIDefaults.ts +0 -22
- package/src/utils/schemaConversion/removeVirtualFieldsFromSchema.ts +0 -27
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { PluginLanguage } from '../types.js';
|
|
2
|
-
export declare const zhTranslations: {
|
|
3
|
-
'plugin-mcp': {
|
|
4
|
-
apiKeyDescription: string;
|
|
5
|
-
apiKeys: string;
|
|
6
|
-
authentication: string;
|
|
7
|
-
description: string;
|
|
8
|
-
descriptionDescription: string;
|
|
9
|
-
dismiss: string;
|
|
10
|
-
keepKeyPrivate: string;
|
|
11
|
-
keyPrivateDescription: string;
|
|
12
|
-
lastUsed: string;
|
|
13
|
-
manageAPIKeys: string;
|
|
14
|
-
mcp: string;
|
|
15
|
-
noAPIKeys: string;
|
|
16
|
-
operations: string;
|
|
17
|
-
overrideAccess: string;
|
|
18
|
-
overrideAccessDescription: string;
|
|
19
|
-
permissions: string;
|
|
20
|
-
permissionsDescription: string;
|
|
21
|
-
prompts: string;
|
|
22
|
-
resources: string;
|
|
23
|
-
server: string;
|
|
24
|
-
title: string;
|
|
25
|
-
titleDescription: string;
|
|
26
|
-
tools: string;
|
|
27
|
-
userDescription: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export declare const zh: PluginLanguage;
|
|
31
|
-
//# sourceMappingURL=zh.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../src/translations/languages/zh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B1B,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,cAGhB,CAAA"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export const zhTranslations = {
|
|
2
|
-
'plugin-mcp': {
|
|
3
|
-
apiKeyDescription: 'API 密钥控制 MCP 客户端可以访问哪些集合、资源、工具和提示词。',
|
|
4
|
-
apiKeys: 'API 密钥',
|
|
5
|
-
authentication: '身份验证',
|
|
6
|
-
description: '描述',
|
|
7
|
-
descriptionDescription: '描述 API 密钥的用途。',
|
|
8
|
-
dismiss: '关闭',
|
|
9
|
-
keepKeyPrivate: '请妥善保管你的密钥。',
|
|
10
|
-
keyPrivateDescription: '此密钥会让 MCP 访问你的内容。不要与他人共享!',
|
|
11
|
-
lastUsed: '上次使用',
|
|
12
|
-
manageAPIKeys: '管理 API 密钥',
|
|
13
|
-
mcp: 'MCP',
|
|
14
|
-
noAPIKeys: '没有 API 密钥',
|
|
15
|
-
operations: '操作',
|
|
16
|
-
overrideAccess: '覆盖访问控制',
|
|
17
|
-
overrideAccessDescription: '启用后,此密钥执行的每个操作都会绕过 Payload 访问控制。除非有明确原因,否则请保持关闭。',
|
|
18
|
-
permissions: '权限',
|
|
19
|
-
permissionsDescription: '允许 MCP 客户端访问以下集合、工具、资源和提示词。',
|
|
20
|
-
prompts: '提示词',
|
|
21
|
-
resources: '资源',
|
|
22
|
-
server: '服务器',
|
|
23
|
-
title: '标题',
|
|
24
|
-
titleDescription: 'API 密钥的易识别名称。',
|
|
25
|
-
tools: '工具',
|
|
26
|
-
userDescription: 'MCP 将代表其操作的用户。'
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
export const zh = {
|
|
30
|
-
dateFNSKey: 'zh-CN',
|
|
31
|
-
translations: zhTranslations
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
//# sourceMappingURL=zh.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/translations/languages/zh.ts"],"sourcesContent":["import type { PluginLanguage } from '../types.js'\n\nexport const zhTranslations = {\n 'plugin-mcp': {\n apiKeyDescription: 'API 密钥控制 MCP 客户端可以访问哪些集合、资源、工具和提示词。',\n apiKeys: 'API 密钥',\n authentication: '身份验证',\n description: '描述',\n descriptionDescription: '描述 API 密钥的用途。',\n dismiss: '关闭',\n keepKeyPrivate: '请妥善保管你的密钥。',\n keyPrivateDescription: '此密钥会让 MCP 访问你的内容。不要与他人共享!',\n lastUsed: '上次使用',\n manageAPIKeys: '管理 API 密钥',\n mcp: 'MCP',\n noAPIKeys: '没有 API 密钥',\n operations: '操作',\n overrideAccess: '覆盖访问控制',\n overrideAccessDescription:\n '启用后,此密钥执行的每个操作都会绕过 Payload 访问控制。除非有明确原因,否则请保持关闭。',\n permissions: '权限',\n permissionsDescription: '允许 MCP 客户端访问以下集合、工具、资源和提示词。',\n prompts: '提示词',\n resources: '资源',\n server: '服务器',\n title: '标题',\n titleDescription: 'API 密钥的易识别名称。',\n tools: '工具',\n userDescription: 'MCP 将代表其操作的用户。',\n },\n}\n\nexport const zh: PluginLanguage = {\n dateFNSKey: 'zh-CN',\n translations: zhTranslations,\n}\n"],"names":["zhTranslations","apiKeyDescription","apiKeys","authentication","description","descriptionDescription","dismiss","keepKeyPrivate","keyPrivateDescription","lastUsed","manageAPIKeys","mcp","noAPIKeys","operations","overrideAccess","overrideAccessDescription","permissions","permissionsDescription","prompts","resources","server","title","titleDescription","tools","userDescription","zh","dateFNSKey","translations"],"mappings":"AAEA,OAAO,MAAMA,iBAAiB;IAC5B,cAAc;QACZC,mBAAmB;QACnBC,SAAS;QACTC,gBAAgB;QAChBC,aAAa;QACbC,wBAAwB;QACxBC,SAAS;QACTC,gBAAgB;QAChBC,uBAAuB;QACvBC,UAAU;QACVC,eAAe;QACfC,KAAK;QACLC,WAAW;QACXC,YAAY;QACZC,gBAAgB;QAChBC,2BACE;QACFC,aAAa;QACbC,wBAAwB;QACxBC,SAAS;QACTC,WAAW;QACXC,QAAQ;QACRC,OAAO;QACPC,kBAAkB;QAClBC,OAAO;QACPC,iBAAiB;IACnB;AACF,EAAC;AAED,OAAO,MAAMC,KAAqB;IAChCC,YAAY;IACZC,cAAc3B;AAChB,EAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { PluginLanguage } from '../types.js';
|
|
2
|
-
export declare const zhTwTranslations: {
|
|
3
|
-
'plugin-mcp': {
|
|
4
|
-
apiKeyDescription: string;
|
|
5
|
-
apiKeys: string;
|
|
6
|
-
authentication: string;
|
|
7
|
-
description: string;
|
|
8
|
-
descriptionDescription: string;
|
|
9
|
-
dismiss: string;
|
|
10
|
-
keepKeyPrivate: string;
|
|
11
|
-
keyPrivateDescription: string;
|
|
12
|
-
lastUsed: string;
|
|
13
|
-
manageAPIKeys: string;
|
|
14
|
-
mcp: string;
|
|
15
|
-
noAPIKeys: string;
|
|
16
|
-
operations: string;
|
|
17
|
-
overrideAccess: string;
|
|
18
|
-
overrideAccessDescription: string;
|
|
19
|
-
permissions: string;
|
|
20
|
-
permissionsDescription: string;
|
|
21
|
-
prompts: string;
|
|
22
|
-
resources: string;
|
|
23
|
-
server: string;
|
|
24
|
-
title: string;
|
|
25
|
-
titleDescription: string;
|
|
26
|
-
tools: string;
|
|
27
|
-
userDescription: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export declare const zhTw: PluginLanguage;
|
|
31
|
-
//# sourceMappingURL=zhTw.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zhTw.d.ts","sourceRoot":"","sources":["../../../src/translations/languages/zhTw.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B5B,CAAA;AAED,eAAO,MAAM,IAAI,EAAE,cAGlB,CAAA"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export const zhTwTranslations = {
|
|
2
|
-
'plugin-mcp': {
|
|
3
|
-
apiKeyDescription: 'API 金鑰控制 MCP 用戶端可以存取哪些集合、資源、工具和提示詞。',
|
|
4
|
-
apiKeys: 'API 金鑰',
|
|
5
|
-
authentication: '驗證',
|
|
6
|
-
description: '描述',
|
|
7
|
-
descriptionDescription: '描述 API 金鑰的用途。',
|
|
8
|
-
dismiss: '關閉',
|
|
9
|
-
keepKeyPrivate: '請妥善保管你的金鑰。',
|
|
10
|
-
keyPrivateDescription: '此金鑰會讓 MCP 存取你的內容。不要與他人分享!',
|
|
11
|
-
lastUsed: '上次使用',
|
|
12
|
-
manageAPIKeys: '管理 API 金鑰',
|
|
13
|
-
mcp: 'MCP',
|
|
14
|
-
noAPIKeys: '沒有 API 金鑰',
|
|
15
|
-
operations: '操作',
|
|
16
|
-
overrideAccess: '覆寫存取控制',
|
|
17
|
-
overrideAccessDescription: '啟用後,此金鑰執行的每個操作都會略過 Payload 存取控制。除非有明確原因,否則請保持關閉。',
|
|
18
|
-
permissions: '權限',
|
|
19
|
-
permissionsDescription: '允許 MCP 用戶端存取以下集合、工具、資源和提示詞。',
|
|
20
|
-
prompts: '提示詞',
|
|
21
|
-
resources: '資源',
|
|
22
|
-
server: '伺服器',
|
|
23
|
-
title: '標題',
|
|
24
|
-
titleDescription: 'API 金鑰的易識別名稱。',
|
|
25
|
-
tools: '工具',
|
|
26
|
-
userDescription: 'MCP 將代表其操作的使用者。'
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
export const zhTw = {
|
|
30
|
-
dateFNSKey: 'zh-TW',
|
|
31
|
-
translations: zhTwTranslations
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
//# sourceMappingURL=zhTw.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/translations/languages/zhTw.ts"],"sourcesContent":["import type { PluginLanguage } from '../types.js'\n\nexport const zhTwTranslations = {\n 'plugin-mcp': {\n apiKeyDescription: 'API 金鑰控制 MCP 用戶端可以存取哪些集合、資源、工具和提示詞。',\n apiKeys: 'API 金鑰',\n authentication: '驗證',\n description: '描述',\n descriptionDescription: '描述 API 金鑰的用途。',\n dismiss: '關閉',\n keepKeyPrivate: '請妥善保管你的金鑰。',\n keyPrivateDescription: '此金鑰會讓 MCP 存取你的內容。不要與他人分享!',\n lastUsed: '上次使用',\n manageAPIKeys: '管理 API 金鑰',\n mcp: 'MCP',\n noAPIKeys: '沒有 API 金鑰',\n operations: '操作',\n overrideAccess: '覆寫存取控制',\n overrideAccessDescription:\n '啟用後,此金鑰執行的每個操作都會略過 Payload 存取控制。除非有明確原因,否則請保持關閉。',\n permissions: '權限',\n permissionsDescription: '允許 MCP 用戶端存取以下集合、工具、資源和提示詞。',\n prompts: '提示詞',\n resources: '資源',\n server: '伺服器',\n title: '標題',\n titleDescription: 'API 金鑰的易識別名稱。',\n tools: '工具',\n userDescription: 'MCP 將代表其操作的使用者。',\n },\n}\n\nexport const zhTw: PluginLanguage = {\n dateFNSKey: 'zh-TW',\n translations: zhTwTranslations,\n}\n"],"names":["zhTwTranslations","apiKeyDescription","apiKeys","authentication","description","descriptionDescription","dismiss","keepKeyPrivate","keyPrivateDescription","lastUsed","manageAPIKeys","mcp","noAPIKeys","operations","overrideAccess","overrideAccessDescription","permissions","permissionsDescription","prompts","resources","server","title","titleDescription","tools","userDescription","zhTw","dateFNSKey","translations"],"mappings":"AAEA,OAAO,MAAMA,mBAAmB;IAC9B,cAAc;QACZC,mBAAmB;QACnBC,SAAS;QACTC,gBAAgB;QAChBC,aAAa;QACbC,wBAAwB;QACxBC,SAAS;QACTC,gBAAgB;QAChBC,uBAAuB;QACvBC,UAAU;QACVC,eAAe;QACfC,KAAK;QACLC,WAAW;QACXC,YAAY;QACZC,gBAAgB;QAChBC,2BACE;QACFC,aAAa;QACbC,wBAAwB;QACxBC,SAAS;QACTC,WAAW;QACXC,QAAQ;QACRC,OAAO;QACPC,kBAAkB;QAClBC,OAAO;QACPC,iBAAiB;IACnB;AACF,EAAC;AAED,OAAO,MAAMC,OAAuB;IAClCC,YAAY;IACZC,cAAc3B;AAChB,EAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Language } from '@payloadcms/translations';
|
|
2
|
-
import type { enTranslations } from './languages/en.js';
|
|
3
|
-
export type PluginLanguage = Language<{
|
|
4
|
-
'plugin-mcp': {
|
|
5
|
-
apiKeyDescription: string;
|
|
6
|
-
apiKeys: string;
|
|
7
|
-
authentication: string;
|
|
8
|
-
description: string;
|
|
9
|
-
descriptionDescription: string;
|
|
10
|
-
dismiss: string;
|
|
11
|
-
keepKeyPrivate: string;
|
|
12
|
-
keyPrivateDescription: string;
|
|
13
|
-
lastUsed: string;
|
|
14
|
-
manageAPIKeys: string;
|
|
15
|
-
mcp: string;
|
|
16
|
-
noAPIKeys: string;
|
|
17
|
-
operations: string;
|
|
18
|
-
overrideAccess: string;
|
|
19
|
-
overrideAccessDescription: string;
|
|
20
|
-
permissions: string;
|
|
21
|
-
permissionsDescription: string;
|
|
22
|
-
prompts: string;
|
|
23
|
-
resources: string;
|
|
24
|
-
server: string;
|
|
25
|
-
title: string;
|
|
26
|
-
titleDescription: string;
|
|
27
|
-
tools: string;
|
|
28
|
-
userDescription: string;
|
|
29
|
-
};
|
|
30
|
-
}>;
|
|
31
|
-
export type PluginDefaultTranslationsObject = typeof enTranslations;
|
|
32
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/translations/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,YAAY,EAAE;QACZ,iBAAiB,EAAE,MAAM,CAAA;QACzB,OAAO,EAAE,MAAM,CAAA;QACf,cAAc,EAAE,MAAM,CAAA;QACtB,WAAW,EAAE,MAAM,CAAA;QACnB,sBAAsB,EAAE,MAAM,CAAA;QAC9B,OAAO,EAAE,MAAM,CAAA;QACf,cAAc,EAAE,MAAM,CAAA;QACtB,qBAAqB,EAAE,MAAM,CAAA;QAC7B,QAAQ,EAAE,MAAM,CAAA;QAChB,aAAa,EAAE,MAAM,CAAA;QACrB,GAAG,EAAE,MAAM,CAAA;QACX,SAAS,EAAE,MAAM,CAAA;QACjB,UAAU,EAAE,MAAM,CAAA;QAClB,cAAc,EAAE,MAAM,CAAA;QACtB,yBAAyB,EAAE,MAAM,CAAA;QACjC,WAAW,EAAE,MAAM,CAAA;QACnB,sBAAsB,EAAE,MAAM,CAAA;QAC9B,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;QACjB,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,MAAM,CAAA;QACb,gBAAgB,EAAE,MAAM,CAAA;QACxB,KAAK,EAAE,MAAM,CAAA;QACb,eAAe,EAAE,MAAM,CAAA;KACxB,CAAA;CACF,CAAC,CAAA;AAEF,MAAM,MAAM,+BAA+B,GAAG,OAAO,cAAc,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/translations/types.ts"],"sourcesContent":["import type { Language } from '@payloadcms/translations'\n\nimport type { enTranslations } from './languages/en.js'\n\nexport type PluginLanguage = Language<{\n 'plugin-mcp': {\n apiKeyDescription: string\n apiKeys: string\n authentication: string\n description: string\n descriptionDescription: string\n dismiss: string\n keepKeyPrivate: string\n keyPrivateDescription: string\n lastUsed: string\n manageAPIKeys: string\n mcp: string\n noAPIKeys: string\n operations: string\n overrideAccess: string\n overrideAccessDescription: string\n permissions: string\n permissionsDescription: string\n prompts: string\n resources: string\n server: string\n title: string\n titleDescription: string\n tools: string\n userDescription: string\n }\n}>\n\nexport type PluginDefaultTranslationsObject = typeof enTranslations\n"],"names":[],"mappings":"AAiCA,WAAmE"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { AuthorizedMCP } from '../types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Returns the `user` and `overrideAccess` arguments every Payload local API call
|
|
4
|
-
* should receive when initiated from an MCP request. Spread the result into the
|
|
5
|
-
* call's arg object so the two pieces of caller state can't drift apart.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```ts
|
|
9
|
-
* await req.payload.create({
|
|
10
|
-
* collection: 'posts',
|
|
11
|
-
* data,
|
|
12
|
-
* ...localAPIDefaults(authorizedMCP),
|
|
13
|
-
* })
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
export declare const localAPIDefaults: (authorizedMCP: AuthorizedMCP) => {
|
|
17
|
-
overrideAccess: boolean;
|
|
18
|
-
user: AuthorizedMCP["user"];
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=localAPIDefaults.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"localAPIDefaults.d.ts","sourceRoot":"","sources":["../../src/utils/localAPIDefaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,GAC3B,eAAe,aAAa,KAC3B;IAAE,cAAc,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CAGvD,CAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the `user` and `overrideAccess` arguments every Payload local API call
|
|
3
|
-
* should receive when initiated from an MCP request. Spread the result into the
|
|
4
|
-
* call's arg object so the two pieces of caller state can't drift apart.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```ts
|
|
8
|
-
* await req.payload.create({
|
|
9
|
-
* collection: 'posts',
|
|
10
|
-
* data,
|
|
11
|
-
* ...localAPIDefaults(authorizedMCP),
|
|
12
|
-
* })
|
|
13
|
-
* ```
|
|
14
|
-
*/ export const localAPIDefaults = (authorizedMCP)=>({
|
|
15
|
-
overrideAccess: authorizedMCP.overrideAccess,
|
|
16
|
-
user: authorizedMCP.user
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=localAPIDefaults.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/localAPIDefaults.ts"],"sourcesContent":["import type { AuthorizedMCP } from '../types.js'\n\n/**\n * Returns the `user` and `overrideAccess` arguments every Payload local API call\n * should receive when initiated from an MCP request. Spread the result into the\n * call's arg object so the two pieces of caller state can't drift apart.\n *\n * @example\n * ```ts\n * await req.payload.create({\n * collection: 'posts',\n * data,\n * ...localAPIDefaults(authorizedMCP),\n * })\n * ```\n */\nexport const localAPIDefaults = (\n authorizedMCP: AuthorizedMCP,\n): { overrideAccess: boolean; user: AuthorizedMCP['user'] } => ({\n overrideAccess: authorizedMCP.overrideAccess,\n user: authorizedMCP.user,\n})\n"],"names":["localAPIDefaults","authorizedMCP","overrideAccess","user"],"mappings":"AAEA;;;;;;;;;;;;;CAaC,GACD,OAAO,MAAMA,mBAAmB,CAC9BC,gBAC8D,CAAA;QAC9DC,gBAAgBD,cAAcC,cAAc;QAC5CC,MAAMF,cAAcE,IAAI;IAC1B,CAAA,EAAE"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { JsonSchemaType } from '../../types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Removes virtual fields from a JSON Schema by name so they don't appear
|
|
4
|
-
* in the generated MCP tool input schema.
|
|
5
|
-
*/
|
|
6
|
-
export declare function removeVirtualFieldsFromSchema(schema: JsonSchemaType, virtualFieldNames: string[]): JsonSchemaType;
|
|
7
|
-
//# sourceMappingURL=removeVirtualFieldsFromSchema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"removeVirtualFieldsFromSchema.d.ts","sourceRoot":"","sources":["../../../src/utils/schemaConversion/removeVirtualFieldsFromSchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEpD;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,cAAc,EACtB,iBAAiB,EAAE,MAAM,EAAE,GAC1B,cAAc,CAiBhB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Removes virtual fields from a JSON Schema by name so they don't appear
|
|
3
|
-
* in the generated MCP tool input schema.
|
|
4
|
-
*/ export function removeVirtualFieldsFromSchema(schema, virtualFieldNames) {
|
|
5
|
-
if (virtualFieldNames.length === 0) {
|
|
6
|
-
return schema;
|
|
7
|
-
}
|
|
8
|
-
for (const name of virtualFieldNames){
|
|
9
|
-
delete schema?.properties?.[name];
|
|
10
|
-
}
|
|
11
|
-
if (Array.isArray(schema.required)) {
|
|
12
|
-
schema.required = schema.required.filter((field)=>!virtualFieldNames.includes(field));
|
|
13
|
-
if (schema.required.length === 0) {
|
|
14
|
-
delete schema.required;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return schema;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=removeVirtualFieldsFromSchema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/schemaConversion/removeVirtualFieldsFromSchema.ts"],"sourcesContent":["import type { JsonSchemaType } from '../../types.js'\n\n/**\n * Removes virtual fields from a JSON Schema by name so they don't appear\n * in the generated MCP tool input schema.\n */\nexport function removeVirtualFieldsFromSchema(\n schema: JsonSchemaType,\n virtualFieldNames: string[],\n): JsonSchemaType {\n if (virtualFieldNames.length === 0) {\n return schema\n }\n\n for (const name of virtualFieldNames) {\n delete schema?.properties?.[name]\n }\n\n if (Array.isArray(schema.required)) {\n schema.required = schema.required.filter((field) => !virtualFieldNames.includes(field))\n if (schema.required.length === 0) {\n delete schema.required\n }\n }\n\n return schema\n}\n"],"names":["removeVirtualFieldsFromSchema","schema","virtualFieldNames","length","name","properties","Array","isArray","required","filter","field","includes"],"mappings":"AAEA;;;CAGC,GACD,OAAO,SAASA,8BACdC,MAAsB,EACtBC,iBAA2B;IAE3B,IAAIA,kBAAkBC,MAAM,KAAK,GAAG;QAClC,OAAOF;IACT;IAEA,KAAK,MAAMG,QAAQF,kBAAmB;QACpC,OAAOD,QAAQI,YAAY,CAACD,KAAK;IACnC;IAEA,IAAIE,MAAMC,OAAO,CAACN,OAAOO,QAAQ,GAAG;QAClCP,OAAOO,QAAQ,GAAGP,OAAOO,QAAQ,CAACC,MAAM,CAAC,CAACC,QAAU,CAACR,kBAAkBS,QAAQ,CAACD;QAChF,IAAIT,OAAOO,QAAQ,CAACL,MAAM,KAAK,GAAG;YAChC,OAAOF,OAAOO,QAAQ;QACxB;IACF;IAEA,OAAOP;AACT"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import type { JSONField } from 'payload'
|
|
2
|
-
|
|
3
|
-
import type { ClientMCPPluginConfig, MCPItem, SanitizedMCPPluginConfig } from '../types.js'
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
COLLECTION_AUTH_BUILTINS,
|
|
7
|
-
COLLECTION_BUILTINS,
|
|
8
|
-
GLOBAL_BUILTINS,
|
|
9
|
-
} from '../mcp/builtinTools.js'
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Returns the API key collection's `access` field — a JSON field whose value
|
|
13
|
-
* is the `MCPAPIKeysDocAccessTree` the endpoint consults. The actual UI is
|
|
14
|
-
* a custom client component (`AccessField`) which renders a permissions
|
|
15
|
-
* matrix; the field's stored shape is just the runtime access tree.
|
|
16
|
-
*/
|
|
17
|
-
export const getAccessField = ({
|
|
18
|
-
pluginConfig,
|
|
19
|
-
}: {
|
|
20
|
-
pluginConfig: SanitizedMCPPluginConfig
|
|
21
|
-
}): JSONField => {
|
|
22
|
-
const clientPluginConfig = sanitizeClientPluginConfig(pluginConfig)
|
|
23
|
-
|
|
24
|
-
return {
|
|
25
|
-
name: 'access',
|
|
26
|
-
type: 'json',
|
|
27
|
-
admin: {
|
|
28
|
-
components: {
|
|
29
|
-
Field: {
|
|
30
|
-
clientProps: { pluginConfig: clientPluginConfig },
|
|
31
|
-
path: '@payloadcms/plugin-mcp/client#AccessField',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
defaultValue: {},
|
|
36
|
-
label: false,
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Strips the non-serializable parts of `SanitizedMCPPluginConfig` (handlers,
|
|
42
|
-
* input/argsSchema functions, etc.) so the result is safe to thread to a
|
|
43
|
-
* client component via `clientProps`.
|
|
44
|
-
*/
|
|
45
|
-
const sanitizeClientPluginConfig = (
|
|
46
|
-
pluginConfig: SanitizedMCPPluginConfig,
|
|
47
|
-
): ClientMCPPluginConfig => ({
|
|
48
|
-
items: pluginConfig.items.map((item) => {
|
|
49
|
-
const group = itemGroup(item)
|
|
50
|
-
|
|
51
|
-
return {
|
|
52
|
-
...(item.type === 'collectionTool' ? { collectionSlug: item.collectionSlug } : {}),
|
|
53
|
-
...(item.type === 'globalTool' ? { globalSlug: item.globalSlug } : {}),
|
|
54
|
-
type: item.type,
|
|
55
|
-
configKey: item.configKey,
|
|
56
|
-
...(group === 'operations' ? {} : { description: itemDescription(item) }),
|
|
57
|
-
group,
|
|
58
|
-
label: item.label,
|
|
59
|
-
}
|
|
60
|
-
}),
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
const itemDescription = (item: MCPItem): string => {
|
|
64
|
-
if (item.type === 'prompt') {
|
|
65
|
-
return item.prompt.description
|
|
66
|
-
}
|
|
67
|
-
if (item.type === 'resource') {
|
|
68
|
-
return item.resource.description
|
|
69
|
-
}
|
|
70
|
-
return item.tool.description
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const itemGroup = (item: MCPItem): 'auth' | 'custom' | 'operations' | undefined => {
|
|
74
|
-
if (item.type === 'collectionTool') {
|
|
75
|
-
if (item.configKey in COLLECTION_BUILTINS) {
|
|
76
|
-
return 'operations'
|
|
77
|
-
}
|
|
78
|
-
return item.configKey in COLLECTION_AUTH_BUILTINS ? 'auth' : 'custom'
|
|
79
|
-
}
|
|
80
|
-
if (item.type === 'globalTool') {
|
|
81
|
-
return item.configKey in GLOBAL_BUILTINS ? 'operations' : 'custom'
|
|
82
|
-
}
|
|
83
|
-
return undefined
|
|
84
|
-
}
|
package/src/collection/index.ts
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import type { CollectionConfig } from 'payload'
|
|
2
|
-
|
|
3
|
-
import { createAPIKeyFields } from 'payload'
|
|
4
|
-
|
|
5
|
-
import type { SanitizedMCPPluginConfig } from '../types.js'
|
|
6
|
-
|
|
7
|
-
import { getAccessField } from './getAccessField.js'
|
|
8
|
-
|
|
9
|
-
const apiKeyStorageFields = createAPIKeyFields({
|
|
10
|
-
apiKeyField: {
|
|
11
|
-
admin: {
|
|
12
|
-
components: { Field: '@payloadcms/plugin-mcp/client#APIKeyField' },
|
|
13
|
-
},
|
|
14
|
-
required: true,
|
|
15
|
-
},
|
|
16
|
-
apiKeyIndexField: {
|
|
17
|
-
index: true,
|
|
18
|
-
required: true,
|
|
19
|
-
},
|
|
20
|
-
includeEnableAPIKey: false,
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
export const getAPIKeysCollection = ({
|
|
24
|
-
pluginConfig,
|
|
25
|
-
}: {
|
|
26
|
-
pluginConfig: SanitizedMCPPluginConfig
|
|
27
|
-
}): CollectionConfig => {
|
|
28
|
-
const collection: CollectionConfig = {
|
|
29
|
-
slug: 'payload-mcp-api-keys',
|
|
30
|
-
admin: {
|
|
31
|
-
components: {
|
|
32
|
-
views: {
|
|
33
|
-
list: {
|
|
34
|
-
NoResults: '@payloadcms/plugin-mcp/client#APIKeysEmptyState',
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
defaultColumns: ['label', 'lastUsed', 'user'],
|
|
39
|
-
// Kept out of the main nav — reachable through the user menu's settings instead.
|
|
40
|
-
group: false,
|
|
41
|
-
useAsTitle: 'label',
|
|
42
|
-
},
|
|
43
|
-
fields: [
|
|
44
|
-
...apiKeyStorageFields,
|
|
45
|
-
getAccessField({ pluginConfig }),
|
|
46
|
-
{
|
|
47
|
-
name: 'label',
|
|
48
|
-
type: 'text',
|
|
49
|
-
admin: {
|
|
50
|
-
description: ({ t }) => t('plugin-mcp:titleDescription'),
|
|
51
|
-
position: 'sidebar',
|
|
52
|
-
},
|
|
53
|
-
label: ({ t }) => t('plugin-mcp:title'),
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
name: 'description',
|
|
57
|
-
type: 'text',
|
|
58
|
-
admin: {
|
|
59
|
-
description: ({ t }) => t('plugin-mcp:descriptionDescription'),
|
|
60
|
-
position: 'sidebar',
|
|
61
|
-
},
|
|
62
|
-
label: ({ t }) => t('plugin-mcp:description'),
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: 'lastUsed',
|
|
66
|
-
type: 'date',
|
|
67
|
-
admin: {
|
|
68
|
-
date: { pickerAppearance: 'dayAndTime' },
|
|
69
|
-
disabled: { field: true },
|
|
70
|
-
},
|
|
71
|
-
label: ({ t }) => t('plugin-mcp:lastUsed'),
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
name: 'user',
|
|
75
|
-
type: 'relationship',
|
|
76
|
-
admin: {
|
|
77
|
-
description: ({ t }) => t('plugin-mcp:userDescription'),
|
|
78
|
-
position: 'sidebar',
|
|
79
|
-
},
|
|
80
|
-
label: ({ t }) => t('general:user'),
|
|
81
|
-
relationTo: pluginConfig.userCollection,
|
|
82
|
-
required: true,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
name: 'overrideAccess',
|
|
86
|
-
type: 'checkbox',
|
|
87
|
-
admin: {
|
|
88
|
-
description: ({ t }) => t('plugin-mcp:overrideAccessDescription'),
|
|
89
|
-
position: 'sidebar',
|
|
90
|
-
},
|
|
91
|
-
defaultValue: false,
|
|
92
|
-
label: ({ t }) => t('plugin-mcp:overrideAccess'),
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
labels: {
|
|
96
|
-
plural: ({ t }) => `${t('plugin-mcp:mcp')} ${t('plugin-mcp:apiKeys')}`,
|
|
97
|
-
singular: ({ t }) => `${t('plugin-mcp:mcp')} ${t('authentication:apiKey')}`,
|
|
98
|
-
},
|
|
99
|
-
versions: false,
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return pluginConfig.overrideApiKeyCollection
|
|
103
|
-
? pluginConfig.overrideApiKeyCollection(collection)
|
|
104
|
-
: collection
|
|
105
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { APIKeyInput, Button, useField, useTranslation, WarningTriangleIcon } from '@payloadcms/ui'
|
|
4
|
-
import React, { useState } from 'react'
|
|
5
|
-
|
|
6
|
-
import type { PluginMCPTranslationKeys, PluginMCPTranslations } from '../../translations/index.js'
|
|
7
|
-
|
|
8
|
-
import './index.css'
|
|
9
|
-
|
|
10
|
-
const baseClass = 'mcp-api-key-field'
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Custom component for the MCP API-keys collection's `apiKey` field:
|
|
14
|
-
* - no key yet: a "Generate new key" button
|
|
15
|
-
* - key set: a dismissible privacy warning + the shared masked-key input
|
|
16
|
-
*/
|
|
17
|
-
export const APIKeyField: React.FC = () => {
|
|
18
|
-
const { setValue: setApiKey, value: apiKey } = useField<string>({ path: 'apiKey' })
|
|
19
|
-
const { t } = useTranslation<PluginMCPTranslations, PluginMCPTranslationKeys>()
|
|
20
|
-
const [isWarningDismissed, setIsWarningDismissed] = useState(false)
|
|
21
|
-
|
|
22
|
-
const generateKey = () => {
|
|
23
|
-
setApiKey(crypto.randomUUID())
|
|
24
|
-
setIsWarningDismissed(false)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<div className={baseClass}>
|
|
29
|
-
<p className={`${baseClass}__description`}>{t('plugin-mcp:apiKeyDescription')}</p>
|
|
30
|
-
<div className={`${baseClass}__panel`}>
|
|
31
|
-
<div className={`${baseClass}__header`}>
|
|
32
|
-
<span className={`${baseClass}__title`}>{t('authentication:apiKey')}</span>
|
|
33
|
-
{!apiKey && (
|
|
34
|
-
<Button
|
|
35
|
-
buttonStyle="primary"
|
|
36
|
-
className={`${baseClass}__generate`}
|
|
37
|
-
onClick={generateKey}
|
|
38
|
-
>
|
|
39
|
-
{t('authentication:generateNewAPIKey')}
|
|
40
|
-
</Button>
|
|
41
|
-
)}
|
|
42
|
-
</div>
|
|
43
|
-
{Boolean(apiKey) && (
|
|
44
|
-
<div className={`${baseClass}__body`}>
|
|
45
|
-
{!isWarningDismissed && (
|
|
46
|
-
<div className={`${baseClass}__warning`}>
|
|
47
|
-
<WarningTriangleIcon className={`${baseClass}__warning-icon`} />
|
|
48
|
-
<p className={`${baseClass}__warning-text`}>
|
|
49
|
-
<strong>{t('plugin-mcp:keepKeyPrivate')}</strong>
|
|
50
|
-
{` ${t('plugin-mcp:keyPrivateDescription')}`}
|
|
51
|
-
</p>
|
|
52
|
-
<button
|
|
53
|
-
aria-label={t('plugin-mcp:dismiss')}
|
|
54
|
-
className={`${baseClass}__warning-dismiss`}
|
|
55
|
-
onClick={() => setIsWarningDismissed(true)}
|
|
56
|
-
type="button"
|
|
57
|
-
>
|
|
58
|
-
×
|
|
59
|
-
</button>
|
|
60
|
-
</div>
|
|
61
|
-
)}
|
|
62
|
-
<APIKeyInput aria-label={t('authentication:apiKey')} value={apiKey} />
|
|
63
|
-
</div>
|
|
64
|
-
)}
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
)
|
|
68
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
@layer payload-default {
|
|
2
|
-
/* Section wrapper: description + panel, closed off by a full-bleed divider
|
|
3
|
-
that spans the fields column past its horizontal gutter. */
|
|
4
|
-
.mcp-api-key-field {
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
gap: var(--base);
|
|
8
|
-
margin-inline: calc(-1 * var(--gutter-h));
|
|
9
|
-
padding-inline: var(--gutter-h);
|
|
10
|
-
padding-block-end: var(--spacer-4);
|
|
11
|
-
border-block-end: var(--stroke-width-small) solid var(--color-border);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.mcp-api-key-field__description {
|
|
15
|
-
margin: 0;
|
|
16
|
-
color: var(--color-text);
|
|
17
|
-
font-family: var(--text-body-medium-font-family);
|
|
18
|
-
font-size: var(--text-body-medium-font-size);
|
|
19
|
-
font-weight: var(--text-body-medium-font-weight);
|
|
20
|
-
line-height: var(--text-body-medium-line-height);
|
|
21
|
-
letter-spacing: var(--text-body-medium-letter-spacing);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.mcp-api-key-field__panel {
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
background: var(--color-bg);
|
|
27
|
-
border: var(--stroke-width-small) solid var(--color-border);
|
|
28
|
-
border-radius: var(--button-radius);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.mcp-api-key-field__header {
|
|
32
|
-
display: flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
justify-content: space-between;
|
|
35
|
-
gap: var(--spacer-2);
|
|
36
|
-
min-height: var(--spacer-5);
|
|
37
|
-
padding: var(--spacer-2) var(--spacer-3);
|
|
38
|
-
background: var(--color-bg-secondary);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* Holds the warning + key row; its top border is the full-width divider
|
|
42
|
-
under the header. Only rendered once a key exists. */
|
|
43
|
-
.mcp-api-key-field__body {
|
|
44
|
-
display: flex;
|
|
45
|
-
flex-direction: column;
|
|
46
|
-
gap: var(--spacer-2);
|
|
47
|
-
padding: var(--spacer-3);
|
|
48
|
-
border-block-start: var(--stroke-width-small) solid var(--color-border);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.mcp-api-key-field__title {
|
|
52
|
-
color: var(--color-text);
|
|
53
|
-
font-family: var(--text-body-medium-strong-font-family);
|
|
54
|
-
font-size: var(--text-body-medium-strong-font-size);
|
|
55
|
-
font-weight: var(--text-body-medium-strong-font-weight);
|
|
56
|
-
line-height: var(--text-body-medium-strong-line-height);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.mcp-api-key-field__generate {
|
|
60
|
-
margin: 0;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* Matches the core Banner's warning treatment: theme-adaptive warning-tertiary
|
|
64
|
-
bg with regular --color-text (NOT --color-text-onwarning, which is only
|
|
65
|
-
defined for light mode and reads as muddy dark-on-dark in dark mode). */
|
|
66
|
-
.mcp-api-key-field__warning {
|
|
67
|
-
display: flex;
|
|
68
|
-
align-items: center;
|
|
69
|
-
gap: calc(var(--base) / 2);
|
|
70
|
-
padding: calc(var(--spacer-2) + (var(--spacer-1) / 2)) calc(var(--base) / 2);
|
|
71
|
-
background: var(--color-bg-warning-tertiary);
|
|
72
|
-
border: none;
|
|
73
|
-
border-radius: var(--radius-medium);
|
|
74
|
-
color: var(--color-text);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.mcp-api-key-field__warning-icon {
|
|
78
|
-
flex-shrink: 0;
|
|
79
|
-
width: 15px;
|
|
80
|
-
height: 13px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.mcp-api-key-field__warning-text {
|
|
84
|
-
flex-grow: 1;
|
|
85
|
-
margin: 0;
|
|
86
|
-
font-family: var(--text-body-medium-font-family);
|
|
87
|
-
font-size: var(--text-body-medium-font-size);
|
|
88
|
-
line-height: var(--text-body-medium-line-height);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.mcp-api-key-field__warning-text strong {
|
|
92
|
-
font-weight: var(--text-body-medium-strong-font-weight);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.mcp-api-key-field__warning-dismiss {
|
|
96
|
-
appearance: none;
|
|
97
|
-
background: none;
|
|
98
|
-
border: none;
|
|
99
|
-
cursor: pointer;
|
|
100
|
-
color: inherit;
|
|
101
|
-
font-size: 1rem;
|
|
102
|
-
line-height: 1;
|
|
103
|
-
padding: 0;
|
|
104
|
-
}
|
|
105
|
-
}
|