@plitzi/sdk-server 0.32.3 → 0.32.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/adapters/jsonAdapters.js +6 -1
- package/dist/core/createServer.js +8 -44
- package/dist/core/health.js +15 -0
- package/dist/core/http/dispatcher.js +29 -0
- package/dist/core/http/securityHeaders.js +15 -0
- package/dist/core/http/stages/authRoutes.js +41 -0
- package/dist/core/http/stages/health.js +12 -0
- package/dist/core/http/stages/middlewares.js +16 -0
- package/dist/core/http/stages/pluginAssets.js +20 -0
- package/dist/core/http/stages/static.js +30 -0
- package/dist/core/server/baseServer.js +29 -0
- package/dist/core/server/mcpServer.js +29 -0
- package/dist/core/server/ssrServer.js +54 -0
- package/dist/core/services/mcp.js +22 -0
- package/dist/core/services/preview.js +37 -0
- package/dist/core/services/registry.js +30 -0
- package/dist/core/services/resolve.js +12 -0
- package/dist/core/services/rsc.js +11 -0
- package/dist/core/services/ssr.js +13 -0
- package/dist/core/transports.js +9 -9
- package/dist/helpers/buildServerInfo.js +11 -11
- package/dist/index.js +19 -6
- package/dist/modules/ai/AIEngine.js +4 -4
- package/dist/modules/ai/toolkit.js +58 -0
- package/dist/modules/mcp/constants.js +4 -0
- package/dist/modules/mcp/handler.js +15 -21
- package/dist/modules/mcp/helpers/computeVersion.js +16 -0
- package/dist/modules/mcp/helpers/guide.js +130 -0
- package/dist/modules/mcp/helpers/opResult.js +18 -0
- package/dist/modules/mcp/helpers/space.js +137 -0
- package/dist/modules/mcp/previewClient.js +31 -0
- package/dist/modules/mcp/resources/canonical.js +45 -0
- package/dist/modules/mcp/resources/core.js +14 -0
- package/dist/modules/mcp/resources/envelope.js +14 -0
- package/dist/modules/mcp/resources/primer.js +25 -0
- package/dist/modules/mcp/resources/register.js +142 -0
- package/dist/modules/mcp/resources/router.js +25 -0
- package/dist/modules/mcp/resources/schema.js +33 -0
- package/dist/modules/mcp/resources/style.js +27 -0
- package/dist/modules/mcp/screenshotClient.js +47 -0
- package/dist/modules/mcp/server.js +52 -20
- package/dist/modules/mcp/tools/apply/dispatch.js +83 -0
- package/dist/modules/mcp/tools/apply/index.js +121 -0
- package/dist/modules/mcp/tools/apply/writeResult.js +36 -0
- package/dist/modules/mcp/tools/index.js +20 -148
- package/dist/modules/mcp/tools/operations/index.js +30 -0
- package/dist/modules/mcp/tools/operations/schema/deleteElement.js +25 -0
- package/dist/modules/mcp/tools/operations/schema/deleteFolder.js +30 -0
- package/dist/modules/mcp/tools/operations/schema/deletePage.js +22 -0
- package/dist/modules/mcp/tools/operations/schema/deleteVariable.js +18 -0
- package/dist/modules/mcp/tools/operations/schema/moveElement.js +39 -0
- package/dist/modules/mcp/tools/operations/schema/operations.js +25 -0
- package/dist/modules/mcp/tools/operations/schema/patchElement.js +46 -0
- package/dist/modules/mcp/tools/operations/schema/registry.js +55 -0
- package/dist/modules/mcp/tools/operations/schema/shared.js +27 -0
- package/dist/modules/mcp/tools/operations/schema/translator.js +148 -0
- package/dist/modules/mcp/tools/operations/schema/upsertElement.js +59 -0
- package/dist/modules/mcp/tools/operations/schema/upsertFolder.js +49 -0
- package/dist/modules/mcp/tools/operations/schema/upsertPage.js +64 -0
- package/dist/modules/mcp/tools/operations/schema/upsertVariable.js +42 -0
- package/dist/modules/mcp/tools/operations/schema/write.js +44 -0
- package/dist/modules/mcp/tools/operations/style/cssCatalog.js +132 -0
- package/dist/modules/mcp/tools/operations/style/deleteDefinition.js +20 -0
- package/dist/modules/mcp/tools/operations/style/deleteGlobalStyle.js +20 -0
- package/dist/modules/mcp/tools/operations/style/deleteStyleVariable.js +21 -0
- package/dist/modules/mcp/tools/operations/style/operations.js +21 -0
- package/dist/modules/mcp/tools/operations/style/patchDefinition.js +27 -0
- package/dist/modules/mcp/tools/operations/style/patchGlobalStyle.js +27 -0
- package/dist/modules/mcp/tools/operations/style/shared.js +59 -0
- package/dist/modules/mcp/tools/operations/style/translator.js +77 -0
- package/dist/modules/mcp/tools/operations/style/upsertDefinition.js +23 -0
- package/dist/modules/mcp/tools/operations/style/upsertGlobalStyle.js +23 -0
- package/dist/modules/mcp/tools/operations/style/upsertStyleVariable.js +22 -0
- package/dist/modules/mcp/tools/operations/style/write.js +100 -0
- package/dist/modules/mcp/tools/preview.js +37 -0
- package/dist/modules/mcp/tools/read.js +33 -0
- package/dist/modules/mcp/tools/screenshot.js +83 -0
- package/dist/modules/mcp/tools/search.js +108 -0
- package/dist/modules/mcp/tools/shared/tool.js +26 -0
- package/dist/modules/mcp/tools/shared/validator.js +262 -0
- package/dist/modules/mcp/tools/validate.js +19 -0
- package/dist/modules/ssr/buildBody.js +2 -2
- package/dist/modules/ssr/handler.js +6 -4
- package/dist/modules/ssr/prepareRender.js +5 -5
- package/dist/modules/ssr/preview.js +106 -0
- package/dist/modules/ssr/registerExternalPlugins.js +1 -1
- package/dist/modules/ssr/streamBody.js +3 -3
- package/dist/modules/ssr/template.js +1 -1
- package/dist/plugins/compile.js +1 -1
- package/dist/plugins/copy.js +1 -1
- package/dist/plugins/manager.js +1 -1
- package/dist/server.js +34 -9
- package/dist/src/core/createServer.d.ts +5 -1
- package/dist/src/core/health.d.ts +10 -0
- package/dist/src/core/http/dispatcher.d.ts +7 -0
- package/dist/src/core/http/securityHeaders.d.ts +2 -0
- package/dist/src/core/http/stages/authRoutes.d.ts +4 -0
- package/dist/src/core/http/stages/health.d.ts +2 -0
- package/dist/src/core/http/stages/middlewares.d.ts +2 -0
- package/dist/src/core/http/stages/pluginAssets.d.ts +2 -0
- package/dist/src/core/http/stages/static.d.ts +5 -0
- package/dist/src/core/http/types.d.ts +19 -0
- package/dist/src/core/server/baseServer.d.ts +9 -0
- package/dist/src/core/server/mcpServer.d.ts +2 -0
- package/dist/src/core/server/ssrServer.d.ts +2 -0
- package/dist/src/core/services/mcp.d.ts +3 -0
- package/dist/src/core/services/preview.d.ts +2 -0
- package/dist/src/core/services/registry.d.ts +4 -0
- package/dist/src/core/services/resolve.d.ts +3 -0
- package/dist/src/core/services/rsc.d.ts +2 -0
- package/dist/src/core/services/ssr.d.ts +3 -0
- package/dist/src/core/transports.d.ts +2 -2
- package/dist/src/index.d.ts +12 -3
- package/dist/src/modules/ai/index.d.ts +1 -0
- package/dist/src/modules/ai/toolkit.d.ts +17 -0
- package/dist/src/modules/mcp/constants.d.ts +1 -0
- package/dist/src/modules/mcp/handler.d.ts +6 -3
- package/dist/src/modules/mcp/helpers/computeVersion.d.ts +1 -0
- package/dist/src/modules/mcp/helpers/guide.d.ts +2 -0
- package/dist/src/modules/mcp/helpers/index.d.ts +4 -0
- package/dist/src/modules/mcp/helpers/opResult.d.ts +13 -0
- package/dist/src/modules/mcp/helpers/space.d.ts +49 -0
- package/dist/src/modules/mcp/index.d.ts +12 -5
- package/dist/src/modules/mcp/previewClient.d.ts +13 -0
- package/dist/src/modules/mcp/resources/canonical.d.ts +7 -0
- package/dist/src/modules/mcp/resources/core.d.ts +5 -0
- package/dist/src/modules/mcp/resources/envelope.d.ts +10 -0
- package/dist/src/modules/mcp/resources/index.d.ts +8 -10
- package/dist/src/modules/mcp/resources/primer.d.ts +6 -0
- package/dist/src/modules/mcp/resources/register.d.ts +6 -0
- package/dist/src/modules/mcp/resources/router.d.ts +6 -0
- package/dist/src/modules/mcp/resources/schema.d.ts +5 -0
- package/dist/src/modules/mcp/resources/style.d.ts +5 -0
- package/dist/src/modules/mcp/screenshotClient.d.ts +13 -0
- package/dist/src/modules/mcp/server.d.ts +18 -3
- package/dist/src/modules/mcp/tools/apply/dispatch.d.ts +6 -0
- package/dist/src/modules/mcp/tools/apply/index.d.ts +231 -0
- package/dist/src/modules/mcp/tools/apply/writeResult.d.ts +8 -0
- package/dist/src/modules/mcp/tools/index.d.ts +17 -6
- package/dist/src/modules/mcp/tools/operations/index.d.ts +449 -0
- package/dist/src/modules/mcp/tools/operations/schema/deleteElement.d.ts +10 -0
- package/dist/src/modules/mcp/tools/operations/schema/deleteFolder.d.ts +9 -0
- package/dist/src/modules/mcp/tools/operations/schema/deletePage.d.ts +9 -0
- package/dist/src/modules/mcp/tools/operations/schema/deleteVariable.d.ts +9 -0
- package/dist/src/modules/mcp/tools/operations/schema/index.d.ts +14 -0
- package/dist/src/modules/mcp/tools/operations/schema/moveElement.d.ts +16 -0
- package/dist/src/modules/mcp/tools/operations/schema/operations.d.ts +79 -0
- package/dist/src/modules/mcp/tools/operations/schema/patchElement.d.ts +17 -0
- package/dist/src/modules/mcp/tools/operations/schema/registry.d.ts +22 -0
- package/dist/src/modules/mcp/tools/operations/schema/shared.d.ts +24 -0
- package/dist/src/modules/mcp/tools/operations/schema/translator.d.ts +9 -0
- package/dist/src/modules/mcp/tools/operations/schema/upsertElement.d.ts +16 -0
- package/dist/src/modules/mcp/tools/operations/schema/upsertFolder.d.ts +12 -0
- package/dist/src/modules/mcp/tools/operations/schema/upsertPage.d.ts +13 -0
- package/dist/src/modules/mcp/tools/operations/schema/upsertVariable.d.ts +16 -0
- package/dist/src/modules/mcp/tools/operations/schema/write.d.ts +12 -0
- package/dist/src/modules/mcp/tools/operations/style/cssCatalog.d.ts +10 -0
- package/dist/src/modules/mcp/tools/operations/style/deleteDefinition.d.ts +9 -0
- package/dist/src/modules/mcp/tools/operations/style/deleteGlobalStyle.d.ts +9 -0
- package/dist/src/modules/mcp/tools/operations/style/deleteStyleVariable.d.ts +15 -0
- package/dist/src/modules/mcp/tools/operations/style/index.d.ts +12 -0
- package/dist/src/modules/mcp/tools/operations/style/operations.d.ts +163 -0
- package/dist/src/modules/mcp/tools/operations/style/patchDefinition.d.ts +37 -0
- package/dist/src/modules/mcp/tools/operations/style/patchGlobalStyle.d.ts +37 -0
- package/dist/src/modules/mcp/tools/operations/style/shared.d.ts +115 -0
- package/dist/src/modules/mcp/tools/operations/style/translator.d.ts +9 -0
- package/dist/src/modules/mcp/tools/operations/style/upsertDefinition.d.ts +37 -0
- package/dist/src/modules/mcp/tools/operations/style/upsertGlobalStyle.d.ts +37 -0
- package/dist/src/modules/mcp/tools/operations/style/upsertStyleVariable.d.ts +20 -0
- package/dist/src/modules/mcp/tools/operations/style/write.d.ts +17 -0
- package/dist/src/modules/mcp/tools/preview.d.ts +226 -0
- package/dist/src/modules/mcp/tools/read.d.ts +8 -0
- package/dist/src/modules/mcp/tools/screenshot.d.ts +231 -0
- package/dist/src/modules/mcp/tools/search.d.ts +15 -0
- package/dist/src/modules/mcp/tools/shared/tool.d.ts +50 -0
- package/dist/src/modules/mcp/tools/shared/validator.d.ts +4 -0
- package/dist/src/modules/mcp/tools/validate.d.ts +228 -0
- package/dist/src/modules/mcp/types/aiSchema.d.ts +126 -0
- package/dist/src/modules/mcp/types/index.d.ts +4 -0
- package/dist/src/modules/mcp/types/previewTypes.d.ts +25 -0
- package/dist/src/modules/mcp/types/screenshotTypes.d.ts +29 -0
- package/dist/src/modules/mcp/types/toolTypes.d.ts +138 -0
- package/dist/src/modules/ssr/buildBody.d.ts +2 -2
- package/dist/src/modules/ssr/prepareRender.d.ts +2 -2
- package/dist/src/modules/ssr/preview.d.ts +16 -0
- package/dist/src/modules/ssr/streamBody.d.ts +2 -2
- package/package.json +10 -10
- package/dist/_virtual/_rolldown/runtime.js +0 -13
- package/dist/core/requestHandler.js +0 -126
- package/dist/modules/mcp/helpers.js +0 -75
- package/dist/modules/mcp/resources/glossary/binding.js +0 -73
- package/dist/modules/mcp/resources/glossary/collection.js +0 -76
- package/dist/modules/mcp/resources/glossary/displayMode.js +0 -50
- package/dist/modules/mcp/resources/glossary/element.js +0 -68
- package/dist/modules/mcp/resources/glossary/environment.js +0 -48
- package/dist/modules/mcp/resources/glossary/interaction.js +0 -62
- package/dist/modules/mcp/resources/glossary/page.js +0 -70
- package/dist/modules/mcp/resources/glossary/plugin.js +0 -96
- package/dist/modules/mcp/resources/glossary/resource.js +0 -75
- package/dist/modules/mcp/resources/glossary/schema.js +0 -69
- package/dist/modules/mcp/resources/glossary/schemaVariable.js +0 -60
- package/dist/modules/mcp/resources/glossary/segment.js +0 -59
- package/dist/modules/mcp/resources/glossary/space.js +0 -73
- package/dist/modules/mcp/resources/glossary/style.js +0 -81
- package/dist/modules/mcp/resources/glossary/styleSelector.js +0 -77
- package/dist/modules/mcp/resources/glossary/styleVariable.js +0 -72
- package/dist/modules/mcp/resources/index.js +0 -71
- package/dist/modules/mcp/resources/workflows/data.js +0 -49
- package/dist/modules/mcp/resources/workflows/elements.js +0 -53
- package/dist/modules/mcp/resources/workflows/segments.js +0 -55
- package/dist/modules/mcp/resources/workflows/styles.js +0 -91
- package/dist/modules/mcp/tools/collections/createCollection.js +0 -25
- package/dist/modules/mcp/tools/collections/createCollectionRecord.js +0 -27
- package/dist/modules/mcp/tools/collections/deleteCollection.js +0 -16
- package/dist/modules/mcp/tools/collections/deleteCollectionRecord.js +0 -16
- package/dist/modules/mcp/tools/collections/getCollection.js +0 -21
- package/dist/modules/mcp/tools/collections/getCollectionRecord.js +0 -25
- package/dist/modules/mcp/tools/collections/getCollectionRecords.js +0 -29
- package/dist/modules/mcp/tools/collections/getCollections.js +0 -19
- package/dist/modules/mcp/tools/collections/updateCollection.js +0 -28
- package/dist/modules/mcp/tools/collections/updateCollectionRecord.js +0 -31
- package/dist/modules/mcp/tools/docs/listResources.js +0 -16
- package/dist/modules/mcp/tools/docs/readResource.js +0 -23
- package/dist/modules/mcp/tools/plugins/addPlugin.js +0 -24
- package/dist/modules/mcp/tools/plugins/listPlugins.js +0 -20
- package/dist/modules/mcp/tools/plugins/removePlugin.js +0 -16
- package/dist/modules/mcp/tools/plugins/updatePlugin.js +0 -23
- package/dist/modules/mcp/tools/resources/addResource.js +0 -33
- package/dist/modules/mcp/tools/resources/getResource.js +0 -29
- package/dist/modules/mcp/tools/resources/getResources.js +0 -27
- package/dist/modules/mcp/tools/resources/moveResource.js +0 -30
- package/dist/modules/mcp/tools/resources/removeResource.js +0 -19
- package/dist/modules/mcp/tools/segment/createSegment.js +0 -27
- package/dist/modules/mcp/tools/segment/deleteSegment.js +0 -16
- package/dist/modules/mcp/tools/segment/getSegment.js +0 -19
- package/dist/modules/mcp/tools/segment/getSegments.js +0 -27
- package/dist/modules/mcp/tools/segment/schema/elements/createSegmentElement.js +0 -24
- package/dist/modules/mcp/tools/segment/schema/elements/deleteSegmentElement.js +0 -19
- package/dist/modules/mcp/tools/segment/schema/elements/moveSegmentElement.js +0 -28
- package/dist/modules/mcp/tools/segment/schema/elements/updateSegmentElement.js +0 -23
- package/dist/modules/mcp/tools/segment/schema/variables/createSegmentVariable.js +0 -41
- package/dist/modules/mcp/tools/segment/schema/variables/deleteSegmentVariable.js +0 -19
- package/dist/modules/mcp/tools/segment/schema/variables/updateSegmentVariable.js +0 -41
- package/dist/modules/mcp/tools/segment/style/variables/createSegmentStyleVariable.js +0 -34
- package/dist/modules/mcp/tools/segment/style/variables/deleteSegmentStyleVariable.js +0 -21
- package/dist/modules/mcp/tools/segment/style/variables/updateSegmentStyleVariable.js +0 -34
- package/dist/modules/mcp/tools/segment/updateSegment.js +0 -30
- package/dist/modules/mcp/tools/space/schema/applyPreview.js +0 -33
- package/dist/modules/mcp/tools/space/schema/elements/cloneElement.js +0 -34
- package/dist/modules/mcp/tools/space/schema/elements/createElement.js +0 -50
- package/dist/modules/mcp/tools/space/schema/elements/deleteElement.js +0 -16
- package/dist/modules/mcp/tools/space/schema/elements/getElement.js +0 -17
- package/dist/modules/mcp/tools/space/schema/elements/getElements.js +0 -21
- package/dist/modules/mcp/tools/space/schema/elements/listElements.js +0 -28
- package/dist/modules/mcp/tools/space/schema/elements/moveElement.js +0 -27
- package/dist/modules/mcp/tools/space/schema/elements/updateElement.js +0 -49
- package/dist/modules/mcp/tools/space/schema/getSpaceSettings.js +0 -46
- package/dist/modules/mcp/tools/space/schema/pageFolders/createPageFolder.js +0 -24
- package/dist/modules/mcp/tools/space/schema/pageFolders/deletePageFolder.js +0 -16
- package/dist/modules/mcp/tools/space/schema/pageFolders/getPageFolder.js +0 -17
- package/dist/modules/mcp/tools/space/schema/pageFolders/getPageFolders.js +0 -17
- package/dist/modules/mcp/tools/space/schema/pageFolders/updatePageFolder.js +0 -28
- package/dist/modules/mcp/tools/space/schema/pages/createPage.js +0 -37
- package/dist/modules/mcp/tools/space/schema/pages/deletePage.js +0 -16
- package/dist/modules/mcp/tools/space/schema/pages/getPage.js +0 -28
- package/dist/modules/mcp/tools/space/schema/pages/getPageBySlug.js +0 -17
- package/dist/modules/mcp/tools/space/schema/pages/getPages.js +0 -17
- package/dist/modules/mcp/tools/space/schema/pages/updatePage.js +0 -25
- package/dist/modules/mcp/tools/space/schema/schemas.js +0 -53
- package/dist/modules/mcp/tools/space/schema/updateSpaceSettings.js +0 -23
- package/dist/modules/mcp/tools/space/schema/variables/createVariable.js +0 -38
- package/dist/modules/mcp/tools/space/schema/variables/deleteVariable.js +0 -16
- package/dist/modules/mcp/tools/space/schema/variables/getVariable.js +0 -17
- package/dist/modules/mcp/tools/space/schema/variables/getVariables.js +0 -17
- package/dist/modules/mcp/tools/space/schema/variables/updateVariable.js +0 -38
- package/dist/modules/mcp/tools/space/style/selectors/createStyleSelector.js +0 -37
- package/dist/modules/mcp/tools/space/style/selectors/deleteStyleSelector.js +0 -24
- package/dist/modules/mcp/tools/space/style/selectors/getStyleSelectors.js +0 -20
- package/dist/modules/mcp/tools/space/style/selectors/updateStyleSelector.js +0 -37
- package/dist/modules/mcp/tools/space/style/variables/createStyleVariable.js +0 -33
- package/dist/modules/mcp/tools/space/style/variables/deleteStyleVariable.js +0 -20
- package/dist/modules/mcp/tools/space/style/variables/getStyleVariable.js +0 -19
- package/dist/modules/mcp/tools/space/style/variables/getStyleVariables.js +0 -16
- package/dist/modules/mcp/tools/space/style/variables/updateStyleVariable.js +0 -33
- package/dist/package.js +0 -77
- package/dist/package.json.d.ts +0 -67
- package/dist/src/core/requestHandler.d.ts +0 -5
- package/dist/src/modules/mcp/helpers.d.ts +0 -9
- package/dist/src/modules/mcp/resources/glossary/binding.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/collection.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/displayMode.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/element.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/environment.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/interaction.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/page.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/plugin.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/resource.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/schema.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/schemaVariable.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/segment.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/space.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/style.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/styleSelector.d.ts +0 -7
- package/dist/src/modules/mcp/resources/glossary/styleVariable.d.ts +0 -7
- package/dist/src/modules/mcp/resources/workflows/data.d.ts +0 -7
- package/dist/src/modules/mcp/resources/workflows/elements.d.ts +0 -7
- package/dist/src/modules/mcp/resources/workflows/segments.d.ts +0 -7
- package/dist/src/modules/mcp/resources/workflows/styles.d.ts +0 -7
- package/dist/src/modules/mcp/tools/collections/createCollection.d.ts +0 -3
- package/dist/src/modules/mcp/tools/collections/createCollectionRecord.d.ts +0 -3
- package/dist/src/modules/mcp/tools/collections/deleteCollection.d.ts +0 -3
- package/dist/src/modules/mcp/tools/collections/deleteCollectionRecord.d.ts +0 -3
- package/dist/src/modules/mcp/tools/collections/getCollection.d.ts +0 -3
- package/dist/src/modules/mcp/tools/collections/getCollectionRecord.d.ts +0 -3
- package/dist/src/modules/mcp/tools/collections/getCollectionRecords.d.ts +0 -3
- package/dist/src/modules/mcp/tools/collections/getCollections.d.ts +0 -3
- package/dist/src/modules/mcp/tools/collections/index.d.ts +0 -10
- package/dist/src/modules/mcp/tools/collections/updateCollection.d.ts +0 -3
- package/dist/src/modules/mcp/tools/collections/updateCollectionRecord.d.ts +0 -3
- package/dist/src/modules/mcp/tools/docs/index.d.ts +0 -2
- package/dist/src/modules/mcp/tools/docs/listResources.d.ts +0 -3
- package/dist/src/modules/mcp/tools/docs/readResource.d.ts +0 -3
- package/dist/src/modules/mcp/tools/plugins/addPlugin.d.ts +0 -3
- package/dist/src/modules/mcp/tools/plugins/index.d.ts +0 -5
- package/dist/src/modules/mcp/tools/plugins/listPlugins.d.ts +0 -3
- package/dist/src/modules/mcp/tools/plugins/removePlugin.d.ts +0 -3
- package/dist/src/modules/mcp/tools/plugins/updatePlugin.d.ts +0 -3
- package/dist/src/modules/mcp/tools/resources/addResource.d.ts +0 -3
- package/dist/src/modules/mcp/tools/resources/getResource.d.ts +0 -3
- package/dist/src/modules/mcp/tools/resources/getResources.d.ts +0 -3
- package/dist/src/modules/mcp/tools/resources/index.d.ts +0 -6
- package/dist/src/modules/mcp/tools/resources/moveResource.d.ts +0 -3
- package/dist/src/modules/mcp/tools/resources/removeResource.d.ts +0 -3
- package/dist/src/modules/mcp/tools/resources/resources.test.d.ts +0 -1
- package/dist/src/modules/mcp/tools/segment/createSegment.d.ts +0 -3
- package/dist/src/modules/mcp/tools/segment/deleteSegment.d.ts +0 -3
- package/dist/src/modules/mcp/tools/segment/getSegment.d.ts +0 -3
- package/dist/src/modules/mcp/tools/segment/getSegments.d.ts +0 -3
- package/dist/src/modules/mcp/tools/segment/index.d.ts +0 -8
- package/dist/src/modules/mcp/tools/segment/schema/elements/createSegmentElement.d.ts +0 -3
- package/dist/src/modules/mcp/tools/segment/schema/elements/deleteSegmentElement.d.ts +0 -3
- package/dist/src/modules/mcp/tools/segment/schema/elements/index.d.ts +0 -5
- package/dist/src/modules/mcp/tools/segment/schema/elements/moveSegmentElement.d.ts +0 -3
- package/dist/src/modules/mcp/tools/segment/schema/elements/segmentElements.test.d.ts +0 -1
- package/dist/src/modules/mcp/tools/segment/schema/elements/updateSegmentElement.d.ts +0 -3
- package/dist/src/modules/mcp/tools/segment/schema/index.d.ts +0 -2
- package/dist/src/modules/mcp/tools/segment/schema/variables/createSegmentVariable.d.ts +0 -3
- package/dist/src/modules/mcp/tools/segment/schema/variables/deleteSegmentVariable.d.ts +0 -3
- package/dist/src/modules/mcp/tools/segment/schema/variables/index.d.ts +0 -4
- package/dist/src/modules/mcp/tools/segment/schema/variables/segmentVariables.test.d.ts +0 -1
- package/dist/src/modules/mcp/tools/segment/schema/variables/updateSegmentVariable.d.ts +0 -3
- package/dist/src/modules/mcp/tools/segment/segment.test.d.ts +0 -1
- package/dist/src/modules/mcp/tools/segment/style/index.d.ts +0 -1
- package/dist/src/modules/mcp/tools/segment/style/variables/createSegmentStyleVariable.d.ts +0 -3
- package/dist/src/modules/mcp/tools/segment/style/variables/deleteSegmentStyleVariable.d.ts +0 -3
- package/dist/src/modules/mcp/tools/segment/style/variables/index.d.ts +0 -4
- package/dist/src/modules/mcp/tools/segment/style/variables/segmentStyleVariables.test.d.ts +0 -1
- package/dist/src/modules/mcp/tools/segment/style/variables/updateSegmentStyleVariable.d.ts +0 -3
- package/dist/src/modules/mcp/tools/segment/updateSegment.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/index.d.ts +0 -2
- package/dist/src/modules/mcp/tools/space/schema/applyPreview.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/elements/cloneElement.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/elements/createElement.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/elements/deleteElement.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/elements/elements.test.d.ts +0 -1
- package/dist/src/modules/mcp/tools/space/schema/elements/getElement.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/elements/getElements.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/elements/index.d.ts +0 -9
- package/dist/src/modules/mcp/tools/space/schema/elements/listElements.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/elements/moveElement.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/elements/updateElement.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/getSpaceSettings.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/index.d.ts +0 -8
- package/dist/src/modules/mcp/tools/space/schema/pageFolders/createPageFolder.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/pageFolders/deletePageFolder.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/pageFolders/getPageFolder.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/pageFolders/getPageFolders.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/pageFolders/index.d.ts +0 -6
- package/dist/src/modules/mcp/tools/space/schema/pageFolders/pageFolders.test.d.ts +0 -1
- package/dist/src/modules/mcp/tools/space/schema/pageFolders/updatePageFolder.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/pages/createPage.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/pages/deletePage.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/pages/getPage.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/pages/getPageBySlug.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/pages/getPages.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/pages/index.d.ts +0 -7
- package/dist/src/modules/mcp/tools/space/schema/pages/pages.test.d.ts +0 -1
- package/dist/src/modules/mcp/tools/space/schema/pages/updatePage.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/schemas.d.ts +0 -66
- package/dist/src/modules/mcp/tools/space/schema/updateSpaceSettings.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/variables/createVariable.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/variables/deleteVariable.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/variables/getVariable.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/variables/getVariables.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/variables/index.d.ts +0 -6
- package/dist/src/modules/mcp/tools/space/schema/variables/updateVariable.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/schema/variables/variables.test.d.ts +0 -1
- package/dist/src/modules/mcp/tools/space/space.test.d.ts +0 -1
- package/dist/src/modules/mcp/tools/space/style/index.d.ts +0 -2
- package/dist/src/modules/mcp/tools/space/style/selectors/createStyleSelector.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/style/selectors/deleteStyleSelector.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/style/selectors/getStyleSelectors.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/style/selectors/index.d.ts +0 -5
- package/dist/src/modules/mcp/tools/space/style/selectors/styleSelectors.test.d.ts +0 -1
- package/dist/src/modules/mcp/tools/space/style/selectors/updateStyleSelector.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/style/variables/createStyleVariable.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/style/variables/deleteStyleVariable.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/style/variables/getStyleVariable.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/style/variables/getStyleVariables.d.ts +0 -3
- package/dist/src/modules/mcp/tools/space/style/variables/index.d.ts +0 -6
- package/dist/src/modules/mcp/tools/space/style/variables/styleVariables.test.d.ts +0 -1
- package/dist/src/modules/mcp/tools/space/style/variables/updateStyleVariable.d.ts +0 -3
- /package/dist/src/{modules/mcp/helpers.test.d.ts → core/server/mcpServer.test.d.ts} +0 -0
- /package/dist/src/modules/{mcp/tools/collections/collections.test.d.ts → ai/toolkit.test.d.ts} +0 -0
- /package/dist/src/modules/mcp/{tools/plugins/plugins.test.d.ts → mcp.test.d.ts} +0 -0
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/collections/updateCollection.ts
|
|
4
|
-
var updateCollectionTool = {
|
|
5
|
-
name: "update_collection",
|
|
6
|
-
adapterName: "updateCollection",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Update Collection",
|
|
9
|
-
description: "Update an existing collection — rename, change privacy, or modify field definitions.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
collectionId: z.string().describe("Collection ID"),
|
|
12
|
-
updates: z.object({
|
|
13
|
-
name: z.string().optional().describe("Singular collection name"),
|
|
14
|
-
namePlural: z.string().optional().describe("Plural collection name"),
|
|
15
|
-
description: z.string().optional().describe("Short description of what this collection stores"),
|
|
16
|
-
privacy: z.enum(["public", "private"]).optional().describe("\"public\" allows unauthenticated reads; \"private\" requires auth"),
|
|
17
|
-
fields: z.record(z.string(), z.unknown()).optional().describe("Updated field definitions keyed by field name")
|
|
18
|
-
}).describe("Fields to update — only the provided fields are changed")
|
|
19
|
-
}),
|
|
20
|
-
outputSchema: z.object({
|
|
21
|
-
id: z.string().describe("Collection ID"),
|
|
22
|
-
name: z.string().describe("Collection name")
|
|
23
|
-
}).catchall(z.unknown()).describe("The updated collection")
|
|
24
|
-
},
|
|
25
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
26
|
-
};
|
|
27
|
-
//#endregion
|
|
28
|
-
export { updateCollectionTool as default };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/collections/updateCollectionRecord.ts
|
|
4
|
-
var updateCollectionRecordTool = {
|
|
5
|
-
name: "update_collection_record",
|
|
6
|
-
adapterName: "updateCollectionRecord",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Update Collection Record",
|
|
9
|
-
description: "Update an existing collection record. Only the provided values and status are changed.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
recordId: z.string().describe("Record ID"),
|
|
12
|
-
values: z.record(z.string(), z.union([
|
|
13
|
-
z.string(),
|
|
14
|
-
z.number(),
|
|
15
|
-
z.boolean()
|
|
16
|
-
])).optional().describe("Field values to update, keyed by field name. Only the provided fields are changed."),
|
|
17
|
-
status: z.enum([
|
|
18
|
-
"draft",
|
|
19
|
-
"published",
|
|
20
|
-
"archived"
|
|
21
|
-
]).optional().describe("Publication status: \"draft\", \"published\", or \"archived\"")
|
|
22
|
-
}),
|
|
23
|
-
outputSchema: z.object({
|
|
24
|
-
id: z.string().describe("Record ID"),
|
|
25
|
-
collectionId: z.string().describe("Collection ID")
|
|
26
|
-
}).catchall(z.unknown()).describe("The updated record")
|
|
27
|
-
},
|
|
28
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
29
|
-
};
|
|
30
|
-
//#endregion
|
|
31
|
-
export { updateCollectionRecordTool as default };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes, toolResponseOk } from "../../helpers.js";
|
|
2
|
-
import { getResourceList } from "../../resources/index.js";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
//#region src/modules/mcp/tools/docs/listResources.ts
|
|
5
|
-
var listResourcesTool = {
|
|
6
|
-
name: "list_resources",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "List Resources",
|
|
9
|
-
description: "List every available domain documentation resource (glossary entries and workflows) with its URI and a short description.\n\nUse this to discover which resource to read, then call read_resource with the chosen URI.",
|
|
10
|
-
inputSchema: z.object({})
|
|
11
|
-
},
|
|
12
|
-
definition: { allowedModes: getAllowedModes("read") },
|
|
13
|
-
handler: () => toolResponseOk(getResourceList())
|
|
14
|
-
};
|
|
15
|
-
//#endregion
|
|
16
|
-
export { listResourcesTool as default };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes, toolResponseErr, toolResponseOk } from "../../helpers.js";
|
|
2
|
-
import { getResourceByUri } from "../../resources/index.js";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
//#region src/modules/mcp/tools/docs/readResource.ts
|
|
5
|
-
var readResourceTool = {
|
|
6
|
-
name: "read_resource",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Read Resource",
|
|
9
|
-
description: "Read a domain documentation resource (a glossary entry or a workflow) by its URI.\n\nRead the matching resource before performing the related task. Use list_resources first if unsure of the URI.",
|
|
10
|
-
inputSchema: z.object({ uri: z.string().describe("Resource URI to read, e.g. \"plitzi://docs/element\". Call list_resources to see valid URIs.") })
|
|
11
|
-
},
|
|
12
|
-
definition: { allowedModes: getAllowedModes("read") },
|
|
13
|
-
handler: ({ uri }) => {
|
|
14
|
-
const resource = getResourceByUri(uri);
|
|
15
|
-
if (!resource) return toolResponseErr(`Resource not found: ${uri}. Call list_resources to see available URIs.`);
|
|
16
|
-
return toolResponseOk({
|
|
17
|
-
uri: resource.uri,
|
|
18
|
-
name: resource.name
|
|
19
|
-
}, resource.content);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
//#endregion
|
|
23
|
-
export { readResourceTool as default };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/plugins/addPlugin.ts
|
|
4
|
-
var addPluginTool = {
|
|
5
|
-
name: "add_plugin",
|
|
6
|
-
adapterName: "addPlugin",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Add Plugin",
|
|
9
|
-
description: "Add a plugin to the current space.\n\nUse list_plugins to see available plugin types first. Set override: true to replace an existing plugin of the same type.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
pluginType: z.string().describe("Plugin type identifier"),
|
|
12
|
-
resource: z.string().describe("Plugin resource string"),
|
|
13
|
-
override: z.boolean().optional().describe("Whether to override if the plugin already exists (default: false)")
|
|
14
|
-
}),
|
|
15
|
-
outputSchema: z.object({
|
|
16
|
-
type: z.string().describe("Plugin type"),
|
|
17
|
-
resource: z.string().describe("Plugin resource"),
|
|
18
|
-
settings: z.record(z.string(), z.unknown()).describe("Plugin settings")
|
|
19
|
-
})
|
|
20
|
-
},
|
|
21
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
22
|
-
};
|
|
23
|
-
//#endregion
|
|
24
|
-
export { addPluginTool as default };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/plugins/listPlugins.ts
|
|
4
|
-
var listPluginsTool = {
|
|
5
|
-
name: "list_plugins",
|
|
6
|
-
adapterName: "listPlugins",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "List Plugins",
|
|
9
|
-
description: "List all plugins installed in the space — returns name, version, and description.\n\nPlugins and element types are different concepts: this tool lists plugins (installed packages), not element type identifiers. To get valid type values for create_element, use get_builder_context (elementDefaults keys) or inspect existing elements via get_schema.",
|
|
10
|
-
inputSchema: z.object({}),
|
|
11
|
-
outputSchema: z.array(z.object({
|
|
12
|
-
name: z.string().describe("Plugin name"),
|
|
13
|
-
version: z.string().optional().describe("Plugin version"),
|
|
14
|
-
description: z.string().optional().describe("Plugin description")
|
|
15
|
-
})).describe("Array of available plugins")
|
|
16
|
-
},
|
|
17
|
-
definition: { allowedModes: getAllowedModes("read") }
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
20
|
-
export { listPluginsTool as default };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/plugins/removePlugin.ts
|
|
4
|
-
var removePluginTool = {
|
|
5
|
-
name: "remove_plugin",
|
|
6
|
-
adapterName: "removePlugin",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Remove Plugin",
|
|
9
|
-
description: "Remove a plugin from the current space.\n\nUse list_plugins to see installed plugin types.",
|
|
10
|
-
inputSchema: z.object({ pluginType: z.string().describe("Plugin type identifier to remove") }),
|
|
11
|
-
outputSchema: z.boolean().describe("True if the plugin was removed successfully")
|
|
12
|
-
},
|
|
13
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
14
|
-
};
|
|
15
|
-
//#endregion
|
|
16
|
-
export { removePluginTool as default };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/plugins/updatePlugin.ts
|
|
4
|
-
var updatePluginTool = {
|
|
5
|
-
name: "update_plugin",
|
|
6
|
-
adapterName: "updatePlugin",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Update Plugin",
|
|
9
|
-
description: "Update the resource configuration of an installed plugin.\n\nUse list_plugins to see installed plugin types.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
pluginType: z.string().describe("Plugin type identifier to update"),
|
|
12
|
-
resource: z.string().describe("New resource string for the plugin")
|
|
13
|
-
}),
|
|
14
|
-
outputSchema: z.object({
|
|
15
|
-
type: z.string().describe("Plugin type"),
|
|
16
|
-
resource: z.string().describe("Updated plugin resource"),
|
|
17
|
-
settings: z.record(z.string(), z.unknown()).describe("Plugin settings")
|
|
18
|
-
})
|
|
19
|
-
},
|
|
20
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
21
|
-
};
|
|
22
|
-
//#endregion
|
|
23
|
-
export { updatePluginTool as default };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/resources/addResource.ts
|
|
4
|
-
var resourceSchema = z.object({
|
|
5
|
-
id: z.string().describe("S3 key / resource path"),
|
|
6
|
-
name: z.string().describe("Filename"),
|
|
7
|
-
path: z.string().describe("Full CDN URL"),
|
|
8
|
-
type: z.string().describe("Resource type (image, video, application, plugin, template, unknown)"),
|
|
9
|
-
size: z.number().describe("File size in bytes"),
|
|
10
|
-
cdnIdentifier: z.string().describe("CDN identifier"),
|
|
11
|
-
created_at: z.number().describe("Unix timestamp of creation"),
|
|
12
|
-
updated_at: z.number().describe("Unix timestamp of last update")
|
|
13
|
-
});
|
|
14
|
-
var addResourceTool = {
|
|
15
|
-
name: "add_resource",
|
|
16
|
-
adapterName: "addResource",
|
|
17
|
-
mcpDefinition: {
|
|
18
|
-
title: "Add Resource",
|
|
19
|
-
description: "Upload a resource to the space CDN by fetching from a URL.\n\nThe resource is downloaded from the provided URL, uploaded to the CDN, and the CDN cache is invalidated. Use for images, videos, or other static files.",
|
|
20
|
-
inputSchema: z.object({
|
|
21
|
-
url: z.string().describe("Source URL to fetch and upload as a resource"),
|
|
22
|
-
cdnIdentifier: z.string().describe("CDN identifier to upload to — call get_resources first and use the cdnIdentifier from an existing resource of the same type (images share one CDN, plugins another)"),
|
|
23
|
-
filename: z.string().optional().describe("Override filename (defaults from URL)"),
|
|
24
|
-
type: z.string().optional().describe("Resource type hint: \"plugin\", \"template\", or leave blank for auto-detect"),
|
|
25
|
-
prefix: z.string().optional().describe("Subfolder prefix within the resource folder"),
|
|
26
|
-
compression: z.string().optional().describe("Compression encoding (e.g. \"gzip\", \"br\")")
|
|
27
|
-
}),
|
|
28
|
-
outputSchema: resourceSchema.describe("The uploaded resource metadata")
|
|
29
|
-
},
|
|
30
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
31
|
-
};
|
|
32
|
-
//#endregion
|
|
33
|
-
export { addResourceTool as default };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/resources/getResource.ts
|
|
4
|
-
var resourceSchema = z.object({
|
|
5
|
-
id: z.string().describe("S3 key / resource path"),
|
|
6
|
-
name: z.string().describe("Filename"),
|
|
7
|
-
path: z.string().describe("Full CDN URL"),
|
|
8
|
-
type: z.string().describe("Resource type (image, video, application, plugin, template, unknown)"),
|
|
9
|
-
size: z.number().describe("File size in bytes"),
|
|
10
|
-
cdnIdentifier: z.string().describe("CDN identifier"),
|
|
11
|
-
created_at: z.number().describe("Unix timestamp of creation"),
|
|
12
|
-
updated_at: z.number().describe("Unix timestamp of last update")
|
|
13
|
-
});
|
|
14
|
-
var getResourceTool = {
|
|
15
|
-
name: "get_resource",
|
|
16
|
-
adapterName: "getResource",
|
|
17
|
-
mcpDefinition: {
|
|
18
|
-
title: "Get Resource",
|
|
19
|
-
description: "Get metadata for a single resource by its S3 key.",
|
|
20
|
-
inputSchema: z.object({
|
|
21
|
-
identifier: z.string().describe("S3 key / resource path to look up"),
|
|
22
|
-
cdnIdentifier: z.string().describe("CDN identifier")
|
|
23
|
-
}),
|
|
24
|
-
outputSchema: resourceSchema.nullable().describe("The resource metadata, or null if not found")
|
|
25
|
-
},
|
|
26
|
-
definition: { allowedModes: getAllowedModes("read") }
|
|
27
|
-
};
|
|
28
|
-
//#endregion
|
|
29
|
-
export { getResourceTool as default };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/resources/getResources.ts
|
|
4
|
-
var inputSchema = z.object({});
|
|
5
|
-
var resourceSchema = z.object({
|
|
6
|
-
id: z.string().describe("S3 key / resource path"),
|
|
7
|
-
name: z.string().describe("Filename"),
|
|
8
|
-
path: z.string().describe("Full CDN URL"),
|
|
9
|
-
type: z.string().describe("Resource type (image, video, application, plugin, template, unknown)"),
|
|
10
|
-
size: z.number().describe("File size in bytes"),
|
|
11
|
-
cdnIdentifier: z.string().describe("CDN identifier"),
|
|
12
|
-
created_at: z.number().describe("Unix timestamp of creation"),
|
|
13
|
-
updated_at: z.number().describe("Unix timestamp of last update")
|
|
14
|
-
});
|
|
15
|
-
var getResourcesTool = {
|
|
16
|
-
name: "get_resources",
|
|
17
|
-
adapterName: "getResources",
|
|
18
|
-
mcpDefinition: {
|
|
19
|
-
title: "Get Resources",
|
|
20
|
-
description: "List all CDN resources (images, videos, documents, plugins, templates) for the current space.",
|
|
21
|
-
inputSchema,
|
|
22
|
-
outputSchema: z.object({ resources: z.array(resourceSchema).describe("List of resources for the current space") }).describe("Resources list")
|
|
23
|
-
},
|
|
24
|
-
definition: { allowedModes: getAllowedModes("read") }
|
|
25
|
-
};
|
|
26
|
-
//#endregion
|
|
27
|
-
export { getResourcesTool as default };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/resources/moveResource.ts
|
|
4
|
-
var resourceSchema = z.object({
|
|
5
|
-
id: z.string().describe("S3 key / resource path"),
|
|
6
|
-
name: z.string().describe("Filename"),
|
|
7
|
-
path: z.string().describe("Full CDN URL"),
|
|
8
|
-
type: z.string().describe("Resource type (image, video, application, plugin, template, unknown)"),
|
|
9
|
-
size: z.number().describe("File size in bytes"),
|
|
10
|
-
cdnIdentifier: z.string().describe("CDN identifier"),
|
|
11
|
-
created_at: z.number().describe("Unix timestamp of creation"),
|
|
12
|
-
updated_at: z.number().describe("Unix timestamp of last update")
|
|
13
|
-
});
|
|
14
|
-
var moveResourceTool = {
|
|
15
|
-
name: "move_resource",
|
|
16
|
-
adapterName: "moveResource",
|
|
17
|
-
mcpDefinition: {
|
|
18
|
-
title: "Move Resource",
|
|
19
|
-
description: "Move a resource to a different subfolder within the same CDN.\n\nOnly asset resources can be moved (plugin and template resources are locked). The CDN cache is invalidated after the move.",
|
|
20
|
-
inputSchema: z.object({
|
|
21
|
-
identifier: z.string().describe("Current S3 key / resource path to move"),
|
|
22
|
-
cdnIdentifier: z.string().describe("CDN identifier"),
|
|
23
|
-
prefix: z.string().describe("New subfolder prefix to move the resource into")
|
|
24
|
-
}),
|
|
25
|
-
outputSchema: resourceSchema.describe("The moved resource metadata at its new path")
|
|
26
|
-
},
|
|
27
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
28
|
-
};
|
|
29
|
-
//#endregion
|
|
30
|
-
export { moveResourceTool as default };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/resources/removeResource.ts
|
|
4
|
-
var removeResourceTool = {
|
|
5
|
-
name: "remove_resource",
|
|
6
|
-
adapterName: "removeResource",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Remove Resource",
|
|
9
|
-
description: "Delete a resource from the CDN.\n\nPlugin resources are deleted recursively (entire plugin folder). Asset and template resources are deleted as single files. The CDN cache is invalidated after deletion.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
identifier: z.string().describe("S3 key / resource path to delete"),
|
|
12
|
-
cdnIdentifier: z.string().describe("CDN identifier")
|
|
13
|
-
}),
|
|
14
|
-
outputSchema: z.object({ id: z.string().describe("The deleted resource identifier") }).describe("Deleted resource confirmation")
|
|
15
|
-
},
|
|
16
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
17
|
-
};
|
|
18
|
-
//#endregion
|
|
19
|
-
export { removeResourceTool as default };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/segment/createSegment.ts
|
|
4
|
-
var createSegmentTool = {
|
|
5
|
-
name: "create_segment",
|
|
6
|
-
adapterName: "createSegment",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Create Segment",
|
|
9
|
-
description: "Create a new segment — a reusable UI template with its own isolated schema and style.\n\nAfter creating, use create_segment_element to add elements inside it. The output includes baseElementId — the root element ID for the segment.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
name: z.string().describe("Name of the segment"),
|
|
12
|
-
description: z.string().describe("Description of the segment")
|
|
13
|
-
}),
|
|
14
|
-
outputSchema: z.object({
|
|
15
|
-
identifier: z.string().describe("Segment identifier"),
|
|
16
|
-
definition: z.object({
|
|
17
|
-
name: z.string().describe("Segment name"),
|
|
18
|
-
description: z.string().describe("Segment description"),
|
|
19
|
-
baseElementId: z.string().describe("Root element ID")
|
|
20
|
-
}).describe("Segment definition"),
|
|
21
|
-
id: z.string().optional().describe("Segment ID")
|
|
22
|
-
}).describe("The created segment")
|
|
23
|
-
},
|
|
24
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
25
|
-
};
|
|
26
|
-
//#endregion
|
|
27
|
-
export { createSegmentTool as default };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/segment/deleteSegment.ts
|
|
4
|
-
var deleteSegmentTool = {
|
|
5
|
-
name: "delete_segment",
|
|
6
|
-
adapterName: "deleteSegment",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Delete Segment",
|
|
9
|
-
description: "Delete a segment and its entire isolated schema and style. This action cannot be undone.",
|
|
10
|
-
inputSchema: z.object({ segmentId: z.string().describe("ID of the segment to delete") }),
|
|
11
|
-
outputSchema: z.literal(true).describe("Always true on successful deletion")
|
|
12
|
-
},
|
|
13
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
14
|
-
};
|
|
15
|
-
//#endregion
|
|
16
|
-
export { deleteSegmentTool as default };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/segment/getSegment.ts
|
|
4
|
-
var getSegmentTool = {
|
|
5
|
-
name: "get_segment",
|
|
6
|
-
adapterName: "getSegment",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Get Segment",
|
|
9
|
-
description: "Get the full details of a specific segment by ID or identifier — includes its schema (element tree) and style.\n\nUse get_segments to list available segments first if you do not know the ID or identifier.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
segmentId: z.string().optional().describe("Segment ID (_id). Provide either segmentId or identifier."),
|
|
12
|
-
identifier: z.string().optional().describe("Segment identifier string. Provide either segmentId or identifier.")
|
|
13
|
-
}),
|
|
14
|
-
outputSchema: z.record(z.string(), z.unknown()).nullable().describe("Full segment object including schema and style, or null if not found")
|
|
15
|
-
},
|
|
16
|
-
definition: { allowedModes: getAllowedModes("read") }
|
|
17
|
-
};
|
|
18
|
-
//#endregion
|
|
19
|
-
export { getSegmentTool as default };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/segment/getSegments.ts
|
|
4
|
-
var getSegmentsTool = {
|
|
5
|
-
name: "get_segments",
|
|
6
|
-
adapterName: "getSegments",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Get Segments",
|
|
9
|
-
description: "List all segments in the space — reusable UI templates with their own isolated schema and style.\n\nReturns name, identifier, and base element ID for each segment. Use get_segment with a segmentId to fetch the full schema and style of a specific segment.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
cursor: z.string().optional().describe("Pagination cursor from a previous response"),
|
|
12
|
-
limit: z.number().int().min(1).max(100).optional().default(20).describe("Maximum number of segments to return")
|
|
13
|
-
}),
|
|
14
|
-
outputSchema: z.array(z.object({
|
|
15
|
-
id: z.string().optional().describe("Segment ID"),
|
|
16
|
-
identifier: z.string().describe("Segment identifier"),
|
|
17
|
-
definition: z.object({
|
|
18
|
-
name: z.string().describe("Segment name"),
|
|
19
|
-
description: z.string().optional().describe("Segment description"),
|
|
20
|
-
baseElementId: z.string().optional().describe("Root element ID")
|
|
21
|
-
}).describe("Segment metadata")
|
|
22
|
-
})).describe("List of segments")
|
|
23
|
-
},
|
|
24
|
-
definition: { allowedModes: getAllowedModes("read") }
|
|
25
|
-
};
|
|
26
|
-
//#endregion
|
|
27
|
-
export { getSegmentsTool as default };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/segment/schema/elements/createSegmentElement.ts
|
|
4
|
-
var createSegmentElementTool = {
|
|
5
|
-
name: "create_segment_element",
|
|
6
|
-
adapterName: "createSegmentElement",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Create Segment Element",
|
|
9
|
-
description: "Add an element (component instance) to a segment schema.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
segmentId: z.string().describe("ID of the segment"),
|
|
12
|
-
element: z.object({
|
|
13
|
-
type: z.string().describe("Element type identifier — same values as create_element. Get valid values from get_builder_context (elementDefaults keys)."),
|
|
14
|
-
label: z.string().describe("Human-readable name for the element"),
|
|
15
|
-
props: z.record(z.string(), z.unknown()).optional().describe("Component props")
|
|
16
|
-
}).describe("Element to add"),
|
|
17
|
-
parentId: z.string().describe("Parent element ID — use the segment baseElementId as the root parent, or any existing segment element ID")
|
|
18
|
-
}),
|
|
19
|
-
outputSchema: z.object({ id: z.string().describe("Generated element ID") }).catchall(z.unknown()).describe("The created segment element")
|
|
20
|
-
},
|
|
21
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
22
|
-
};
|
|
23
|
-
//#endregion
|
|
24
|
-
export { createSegmentElementTool as default };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/segment/schema/elements/deleteSegmentElement.ts
|
|
4
|
-
var deleteSegmentElementTool = {
|
|
5
|
-
name: "delete_segment_element",
|
|
6
|
-
adapterName: "deleteSegmentElement",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Delete Segment Element",
|
|
9
|
-
description: "Remove an element from a segment.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
segmentId: z.string().describe("ID of the segment"),
|
|
12
|
-
elementId: z.string().describe("ID of the element to remove")
|
|
13
|
-
}),
|
|
14
|
-
outputSchema: z.literal(true).describe("Always true on successful deletion")
|
|
15
|
-
},
|
|
16
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
17
|
-
};
|
|
18
|
-
//#endregion
|
|
19
|
-
export { deleteSegmentElementTool as default };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/segment/schema/elements/moveSegmentElement.ts
|
|
4
|
-
var moveSegmentElementTool = {
|
|
5
|
-
name: "move_segment_element",
|
|
6
|
-
adapterName: "moveSegmentElement",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Move Segment Element",
|
|
9
|
-
description: "Move an element to a different parent or reorder it within its current parent inside a segment.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
segmentId: z.string().describe("ID of the segment"),
|
|
12
|
-
elementId: z.string().describe("ID of the element to move"),
|
|
13
|
-
toParentId: z.string().describe("ID of the new parent element"),
|
|
14
|
-
dropPosition: z.enum([
|
|
15
|
-
"top",
|
|
16
|
-
"bottom",
|
|
17
|
-
"left",
|
|
18
|
-
"right",
|
|
19
|
-
"inside",
|
|
20
|
-
"custom"
|
|
21
|
-
]).optional().describe("Where to drop relative to the target parent: \"inside\" appends as last child (default), \"top\"/\"bottom\" inserts before/after siblings")
|
|
22
|
-
}),
|
|
23
|
-
outputSchema: z.literal(true).describe("Always true on successful move")
|
|
24
|
-
},
|
|
25
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
26
|
-
};
|
|
27
|
-
//#endregion
|
|
28
|
-
export { moveSegmentElementTool as default };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/segment/schema/elements/updateSegmentElement.ts
|
|
4
|
-
var updateSegmentElementTool = {
|
|
5
|
-
name: "update_segment_element",
|
|
6
|
-
adapterName: "updateSegmentElement",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Update Segment Element",
|
|
9
|
-
description: "Update an element inside a segment.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
segmentId: z.string().describe("ID of the segment"),
|
|
12
|
-
elementId: z.string().describe("ID of the element to update"),
|
|
13
|
-
updates: z.object({
|
|
14
|
-
label: z.string().optional().describe("New label for the element"),
|
|
15
|
-
props: z.record(z.string(), z.unknown()).optional().describe("New props for the element")
|
|
16
|
-
}).describe("Fields to update")
|
|
17
|
-
}),
|
|
18
|
-
outputSchema: z.object({ id: z.string().describe("Element ID") }).catchall(z.unknown()).describe("The updated segment element")
|
|
19
|
-
},
|
|
20
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
21
|
-
};
|
|
22
|
-
//#endregion
|
|
23
|
-
export { updateSegmentElementTool as default };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/segment/schema/variables/createSegmentVariable.ts
|
|
4
|
-
var variableTypesSchema = z.enum([
|
|
5
|
-
"text",
|
|
6
|
-
"number",
|
|
7
|
-
"email",
|
|
8
|
-
"password",
|
|
9
|
-
"select",
|
|
10
|
-
"select2",
|
|
11
|
-
"checkbox",
|
|
12
|
-
"textarea",
|
|
13
|
-
"color",
|
|
14
|
-
"switch"
|
|
15
|
-
]);
|
|
16
|
-
var createSegmentVariableTool = {
|
|
17
|
-
name: "create_segment_variable",
|
|
18
|
-
adapterName: "createSegmentVariable",
|
|
19
|
-
mcpDefinition: {
|
|
20
|
-
title: "Create Segment Variable",
|
|
21
|
-
description: "Create a schema variable inside a segment — a typed, named value that segment elements can reference via data bindings.\n\nAll values are stored as strings regardless of type.",
|
|
22
|
-
inputSchema: z.object({
|
|
23
|
-
segmentId: z.string().describe("ID of the segment"),
|
|
24
|
-
variable: z.object({
|
|
25
|
-
name: z.string().describe("Variable name"),
|
|
26
|
-
type: variableTypesSchema.describe("Variable type"),
|
|
27
|
-
value: z.string().describe("Variable default value"),
|
|
28
|
-
category: z.string().describe("Grouping label shown in the builder UI (e.g. \"Colors\", \"Layout\")")
|
|
29
|
-
}).describe("Variable to create")
|
|
30
|
-
}),
|
|
31
|
-
outputSchema: z.object({
|
|
32
|
-
name: z.string().describe("Variable name"),
|
|
33
|
-
type: z.string().describe("Variable type"),
|
|
34
|
-
value: z.string().describe("Variable value"),
|
|
35
|
-
category: z.string().describe("Grouping label shown in the builder UI (e.g. \"Colors\", \"Layout\")")
|
|
36
|
-
}).describe("The created segment variable")
|
|
37
|
-
},
|
|
38
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
39
|
-
};
|
|
40
|
-
//#endregion
|
|
41
|
-
export { createSegmentVariableTool as default };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/segment/schema/variables/deleteSegmentVariable.ts
|
|
4
|
-
var deleteSegmentVariableTool = {
|
|
5
|
-
name: "delete_segment_variable",
|
|
6
|
-
adapterName: "deleteSegmentVariable",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Delete Segment Variable",
|
|
9
|
-
description: "Delete a schema variable from a segment. Any element bindings referencing this variable will break.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
segmentId: z.string().describe("ID of the segment"),
|
|
12
|
-
name: z.string().describe("Name of the variable to delete")
|
|
13
|
-
}),
|
|
14
|
-
outputSchema: z.literal(true).describe("Always true on successful deletion")
|
|
15
|
-
},
|
|
16
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
17
|
-
};
|
|
18
|
-
//#endregion
|
|
19
|
-
export { deleteSegmentVariableTool as default };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/segment/schema/variables/updateSegmentVariable.ts
|
|
4
|
-
var variableTypesSchema = z.enum([
|
|
5
|
-
"text",
|
|
6
|
-
"number",
|
|
7
|
-
"email",
|
|
8
|
-
"password",
|
|
9
|
-
"select",
|
|
10
|
-
"select2",
|
|
11
|
-
"checkbox",
|
|
12
|
-
"textarea",
|
|
13
|
-
"color",
|
|
14
|
-
"switch"
|
|
15
|
-
]);
|
|
16
|
-
var updateSegmentVariableTool = {
|
|
17
|
-
name: "update_segment_variable",
|
|
18
|
-
adapterName: "updateSegmentVariable",
|
|
19
|
-
mcpDefinition: {
|
|
20
|
-
title: "Update Segment Variable",
|
|
21
|
-
description: "Update an existing schema variable inside a segment. Identified by name; only the provided fields are changed.",
|
|
22
|
-
inputSchema: z.object({
|
|
23
|
-
segmentId: z.string().describe("ID of the segment"),
|
|
24
|
-
variable: z.object({
|
|
25
|
-
name: z.string().describe("Variable name"),
|
|
26
|
-
type: variableTypesSchema.optional().describe("Variable type"),
|
|
27
|
-
value: z.string().optional().describe("Variable value"),
|
|
28
|
-
category: z.string().optional().describe("Grouping label shown in the builder UI")
|
|
29
|
-
}).describe("Variable fields to update")
|
|
30
|
-
}),
|
|
31
|
-
outputSchema: z.object({
|
|
32
|
-
name: z.string().describe("Variable name"),
|
|
33
|
-
type: z.string().describe("Variable type"),
|
|
34
|
-
value: z.string().describe("Variable value"),
|
|
35
|
-
category: z.string().describe("Grouping label shown in the builder UI")
|
|
36
|
-
}).describe("The updated segment variable")
|
|
37
|
-
},
|
|
38
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
39
|
-
};
|
|
40
|
-
//#endregion
|
|
41
|
-
export { updateSegmentVariableTool as default };
|