@plitzi/sdk-server 0.32.4 → 0.32.6
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 +19 -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 +3 -9
- package/dist/index.js +20 -6
- package/dist/modules/ai/AIEngine.js +4 -4
- package/dist/modules/ai/toolkit.js +58 -0
- package/dist/modules/mcp/catalogs/builtinCallbacks.js +204 -0
- package/dist/modules/mcp/catalogs/builtinComponents.js +170 -0
- package/dist/modules/mcp/catalogs/builtinElementCallbacks.js +50 -0
- package/dist/modules/mcp/catalogs/builtinTransformers.js +148 -0
- package/dist/modules/mcp/catalogs/builtinUtilities.js +90 -0
- package/dist/modules/mcp/catalogs/cssCatalog.js +205 -0
- package/dist/modules/mcp/catalogs/observed.js +90 -0
- package/dist/modules/mcp/catalogs/paramSpec.js +69 -0
- package/dist/modules/mcp/catalogs/registry.js +89 -0
- package/dist/modules/mcp/constants.js +4 -0
- package/dist/modules/mcp/handler.js +24 -20
- package/dist/modules/mcp/helpers/agentPrompt.js +104 -0
- package/dist/modules/mcp/helpers/computeVersion.js +16 -0
- package/dist/modules/mcp/helpers/guide.js +449 -0
- package/dist/modules/mcp/helpers/interactions.js +123 -0
- package/dist/modules/mcp/helpers/log.js +54 -0
- package/dist/modules/mcp/helpers/opResult.js +18 -0
- package/dist/modules/mcp/helpers/space.js +262 -0
- package/dist/modules/mcp/helpers/uris.js +44 -0
- package/dist/modules/mcp/previewClient.js +31 -0
- package/dist/modules/mcp/resources/canonical.js +30 -0
- package/dist/modules/mcp/resources/core.js +15 -0
- package/dist/modules/mcp/resources/envelope.js +14 -0
- package/dist/modules/mcp/resources/primer.js +30 -0
- package/dist/modules/mcp/resources/register.js +174 -0
- package/dist/modules/mcp/resources/router.js +25 -0
- package/dist/modules/mcp/resources/schema.js +43 -0
- package/dist/modules/mcp/resources/style.js +34 -0
- package/dist/modules/mcp/screenshotClient.js +47 -0
- package/dist/modules/mcp/server.js +66 -20
- package/dist/modules/mcp/tools/apply/dispatch.js +103 -0
- package/dist/modules/mcp/tools/apply/index.js +136 -0
- package/dist/modules/mcp/tools/apply/writeResult.js +37 -0
- package/dist/modules/mcp/tools/index.js +20 -148
- package/dist/modules/mcp/tools/operations/index.js +41 -0
- package/dist/modules/mcp/tools/operations/schema/bindings/deleteBinding.js +32 -0
- package/dist/modules/mcp/tools/operations/schema/bindings/patchBinding.js +36 -0
- package/dist/modules/mcp/tools/operations/schema/bindings/upsertBinding.js +47 -0
- package/dist/modules/mcp/tools/operations/schema/elements/deleteElement.js +29 -0
- package/dist/modules/mcp/tools/operations/schema/elements/moveElement.js +41 -0
- package/dist/modules/mcp/tools/operations/schema/elements/patchElement.js +58 -0
- package/dist/modules/mcp/tools/operations/schema/elements/upsertElement.js +65 -0
- package/dist/modules/mcp/tools/operations/schema/folders/deleteFolder.js +30 -0
- package/dist/modules/mcp/tools/operations/schema/folders/upsertFolder.js +49 -0
- package/dist/modules/mcp/tools/operations/schema/interactions/deleteInteraction.js +52 -0
- package/dist/modules/mcp/tools/operations/schema/interactions/patchInteractionNode.js +47 -0
- package/dist/modules/mcp/tools/operations/schema/interactions/upsertInteractionFlow.js +43 -0
- package/dist/modules/mcp/tools/operations/schema/operations.js +39 -0
- package/dist/modules/mcp/tools/operations/schema/pages/deletePage.js +25 -0
- package/dist/modules/mcp/tools/operations/schema/pages/upsertPage.js +75 -0
- package/dist/modules/mcp/tools/operations/schema/settings/patchSettings.js +45 -0
- package/dist/modules/mcp/tools/operations/schema/shared.js +119 -0
- package/dist/modules/mcp/tools/operations/schema/translator.js +215 -0
- package/dist/modules/mcp/tools/operations/schema/variables/deleteVariable.js +18 -0
- package/dist/modules/mcp/tools/operations/schema/variables/upsertVariable.js +42 -0
- package/dist/modules/mcp/tools/operations/schema/write.js +109 -0
- package/dist/modules/mcp/tools/operations/style/definitions/deleteDefinition.js +21 -0
- package/dist/modules/mcp/tools/operations/style/definitions/patchDefinition.js +28 -0
- package/dist/modules/mcp/tools/operations/style/definitions/upsertDefinition.js +24 -0
- package/dist/modules/mcp/tools/operations/style/globalStyles/deleteGlobalStyle.js +21 -0
- package/dist/modules/mcp/tools/operations/style/globalStyles/patchGlobalStyle.js +28 -0
- package/dist/modules/mcp/tools/operations/style/globalStyles/upsertGlobalStyle.js +24 -0
- package/dist/modules/mcp/tools/operations/style/idStyles/deleteIdStyle.js +21 -0
- package/dist/modules/mcp/tools/operations/style/idStyles/patchIdStyle.js +28 -0
- package/dist/modules/mcp/tools/operations/style/idStyles/upsertIdStyle.js +24 -0
- package/dist/modules/mcp/tools/operations/style/operations.js +27 -0
- package/dist/modules/mcp/tools/operations/style/shared.js +59 -0
- package/dist/modules/mcp/tools/operations/style/translator.js +101 -0
- package/dist/modules/mcp/tools/operations/style/variables/deleteStyleVariable.js +21 -0
- package/dist/modules/mcp/tools/operations/style/variables/upsertStyleVariable.js +22 -0
- package/dist/modules/mcp/tools/operations/style/write.js +108 -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 +115 -0
- package/dist/modules/mcp/tools/shared/tool.js +26 -0
- package/dist/modules/mcp/tools/shared/validator/audit.js +124 -0
- package/dist/modules/mcp/tools/shared/validator/batch.js +30 -0
- package/dist/modules/mcp/tools/shared/validator/bindings.js +70 -0
- package/dist/modules/mcp/tools/shared/validator/context.js +35 -0
- package/dist/modules/mcp/tools/shared/validator/css.js +47 -0
- package/dist/modules/mcp/tools/shared/validator/elements.js +55 -0
- package/dist/modules/mcp/tools/shared/validator/index.js +226 -0
- package/dist/modules/mcp/tools/shared/validator/interactions.js +106 -0
- package/dist/modules/mcp/tools/shared/validator/refs.js +28 -0
- package/dist/modules/mcp/tools/validate.js +39 -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/modules/ssr/views/template.ejs +2 -0
- 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/catalogs/builtinCallbacks.d.ts +23 -0
- package/dist/src/modules/mcp/catalogs/builtinComponents.d.ts +4 -0
- package/dist/src/modules/mcp/catalogs/builtinElementCallbacks.d.ts +20 -0
- package/dist/src/modules/mcp/catalogs/builtinTransformers.d.ts +28 -0
- package/dist/src/modules/mcp/catalogs/builtinUtilities.d.ts +18 -0
- package/dist/src/modules/mcp/catalogs/cssCatalog.d.ts +14 -0
- package/dist/src/modules/mcp/catalogs/index.d.ts +9 -0
- package/dist/src/modules/mcp/catalogs/observed.d.ts +48 -0
- package/dist/src/modules/mcp/catalogs/paramSpec.d.ts +42 -0
- package/dist/src/modules/mcp/catalogs/registry.d.ts +35 -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/agentPrompt.d.ts +4 -0
- package/dist/src/modules/mcp/helpers/computeVersion.d.ts +1 -0
- package/dist/src/modules/mcp/helpers/guide.d.ts +3 -0
- package/dist/src/modules/mcp/helpers/index.d.ts +8 -0
- package/dist/src/modules/mcp/helpers/interactions.d.ts +30 -0
- package/dist/src/modules/mcp/helpers/log.d.ts +8 -0
- package/dist/src/modules/mcp/helpers/opResult.d.ts +13 -0
- package/dist/src/modules/mcp/helpers/space.d.ts +105 -0
- package/dist/src/modules/mcp/helpers/uris.d.ts +28 -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 +6 -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 +7 -10
- package/dist/src/modules/mcp/resources/primer.d.ts +7 -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 +21 -3
- package/dist/src/modules/mcp/tools/apply/dispatch.d.ts +6 -0
- package/dist/src/modules/mcp/tools/apply/index.d.ts +420 -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 +828 -0
- package/dist/src/modules/mcp/tools/operations/schema/bindings/deleteBinding.d.ts +17 -0
- package/dist/src/modules/mcp/tools/operations/schema/bindings/patchBinding.d.ts +25 -0
- package/dist/src/modules/mcp/tools/operations/schema/bindings/upsertBinding.d.ts +27 -0
- package/dist/src/modules/mcp/tools/operations/schema/elements/deleteElement.d.ts +10 -0
- package/dist/src/modules/mcp/tools/operations/schema/elements/moveElement.d.ts +16 -0
- package/dist/src/modules/mcp/tools/operations/schema/elements/patchElement.d.ts +22 -0
- package/dist/src/modules/mcp/tools/operations/schema/elements/upsertElement.d.ts +16 -0
- package/dist/src/modules/mcp/tools/operations/schema/folders/deleteFolder.d.ts +9 -0
- package/dist/src/modules/mcp/tools/operations/schema/folders/upsertFolder.d.ts +12 -0
- package/dist/src/modules/mcp/tools/operations/schema/index.d.ts +20 -0
- package/dist/src/modules/mcp/tools/operations/schema/interactions/deleteInteraction.d.ts +12 -0
- package/dist/src/modules/mcp/tools/operations/schema/interactions/patchInteractionNode.d.ts +18 -0
- package/dist/src/modules/mcp/tools/operations/schema/interactions/upsertInteractionFlow.d.ts +27 -0
- package/dist/src/modules/mcp/tools/operations/schema/operations.d.ts +210 -0
- package/dist/src/modules/mcp/tools/operations/schema/pages/deletePage.d.ts +9 -0
- package/dist/src/modules/mcp/tools/operations/schema/pages/upsertPage.d.ts +14 -0
- package/dist/src/modules/mcp/tools/operations/schema/settings/patchSettings.d.ts +34 -0
- package/dist/src/modules/mcp/tools/operations/schema/shared.d.ts +77 -0
- package/dist/src/modules/mcp/tools/operations/schema/translator.d.ts +12 -0
- package/dist/src/modules/mcp/tools/operations/schema/variables/deleteVariable.d.ts +9 -0
- package/dist/src/modules/mcp/tools/operations/schema/variables/upsertVariable.d.ts +16 -0
- package/dist/src/modules/mcp/tools/operations/schema/write.d.ts +42 -0
- package/dist/src/modules/mcp/tools/operations/style/definitions/deleteDefinition.d.ts +9 -0
- package/dist/src/modules/mcp/tools/operations/style/definitions/patchDefinition.d.ts +37 -0
- package/dist/src/modules/mcp/tools/operations/style/definitions/upsertDefinition.d.ts +37 -0
- package/dist/src/modules/mcp/tools/operations/style/globalStyles/deleteGlobalStyle.d.ts +9 -0
- package/dist/src/modules/mcp/tools/operations/style/globalStyles/patchGlobalStyle.d.ts +37 -0
- package/dist/src/modules/mcp/tools/operations/style/globalStyles/upsertGlobalStyle.d.ts +37 -0
- package/dist/src/modules/mcp/tools/operations/style/idStyles/deleteIdStyle.d.ts +9 -0
- package/dist/src/modules/mcp/tools/operations/style/idStyles/patchIdStyle.d.ts +37 -0
- package/dist/src/modules/mcp/tools/operations/style/idStyles/upsertIdStyle.d.ts +37 -0
- package/dist/src/modules/mcp/tools/operations/style/index.d.ts +14 -0
- package/dist/src/modules/mcp/tools/operations/style/operations.d.ts +231 -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 +12 -0
- package/dist/src/modules/mcp/tools/operations/style/variables/deleteStyleVariable.d.ts +15 -0
- package/dist/src/modules/mcp/tools/operations/style/variables/upsertStyleVariable.d.ts +20 -0
- package/dist/src/modules/mcp/tools/operations/style/write.d.ts +12 -0
- package/dist/src/modules/mcp/tools/preview.d.ts +415 -0
- package/dist/src/modules/mcp/tools/read.d.ts +8 -0
- package/dist/src/modules/mcp/tools/screenshot.d.ts +420 -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/audit.d.ts +4 -0
- package/dist/src/modules/mcp/tools/shared/validator/batch.d.ts +5 -0
- package/dist/src/modules/mcp/tools/shared/validator/bindings.d.ts +6 -0
- package/dist/src/modules/mcp/tools/shared/validator/context.d.ts +34 -0
- package/dist/src/modules/mcp/tools/shared/validator/css.d.ts +4 -0
- package/dist/src/modules/mcp/tools/shared/validator/elements.d.ts +6 -0
- package/dist/src/modules/mcp/tools/shared/validator/index.d.ts +8 -0
- package/dist/src/modules/mcp/tools/shared/validator/interactions.d.ts +3 -0
- package/dist/src/modules/mcp/tools/shared/validator/refs.d.ts +4 -0
- package/dist/src/modules/mcp/tools/validate.d.ts +417 -0
- package/dist/src/modules/mcp/types/aiSchema.d.ts +218 -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 +16 -14
- 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/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/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/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 → catalogs/builtinTransformers.test.d.ts} +0 -0
- /package/dist/src/modules/mcp/{tools/resources/resources.test.d.ts → helpers/log.test.d.ts} +0 -0
- /package/dist/src/modules/mcp/{tools/segment/schema/elements/segmentElements.test.d.ts → mcp.bench.d.ts} +0 -0
- /package/dist/src/modules/mcp/{tools/segment/schema/variables/segmentVariables.test.d.ts → mcp.test.d.ts} +0 -0
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
//#region src/modules/mcp/resources/workflows/data.ts
|
|
2
|
-
var workflowDataResource = {
|
|
3
|
-
uri: "plitzi://workflows/data",
|
|
4
|
-
name: "Plitzi Workflow: Data",
|
|
5
|
-
description: "Step-by-step guide for schema variables, collection records, and data bindings.",
|
|
6
|
-
mimeType: "text/markdown",
|
|
7
|
-
content: `# Workflow: Data — Variables, Collections, Bindings
|
|
8
|
-
|
|
9
|
-
## Schema variables (space-level named values)
|
|
10
|
-
|
|
11
|
-
Variables are typed, named values that elements can bind to.
|
|
12
|
-
|
|
13
|
-
1. Create a variable with \`create_variable\`:
|
|
14
|
-
\`\`\`json
|
|
15
|
-
{ "variable": { "name": "heroTitle", "type": "text", "value": "Welcome", "category": "Content" } }
|
|
16
|
-
\`\`\`
|
|
17
|
-
2. Update it with \`update_variable\` (identified by name).
|
|
18
|
-
3. Delete with \`delete_variable\` — any element bindings referencing it will break.
|
|
19
|
-
|
|
20
|
-
## Collection records (CMS data)
|
|
21
|
-
|
|
22
|
-
1. List collections: \`get_collections\` → pick the target \`id\`.
|
|
23
|
-
2. Inspect the collection's field definitions: \`get_collection\` → \`fields\`.
|
|
24
|
-
3. Create a record with \`create_collection_record\`:
|
|
25
|
-
\`\`\`json
|
|
26
|
-
{ "collectionId": "<id>", "values": { "title": "My Product", "price": 99 }, "status": "published" }
|
|
27
|
-
\`\`\`
|
|
28
|
-
4. Update a record with \`update_collection_record\` (by \`recordId\`).
|
|
29
|
-
5. List records with \`get_collection_records\` — supports optional \`filter\` and \`limit\`.
|
|
30
|
-
|
|
31
|
-
## Bindings (connecting data to elements)
|
|
32
|
-
|
|
33
|
-
A binding maps a data source (variable or collection field) to an element's attribute or style at runtime.
|
|
34
|
-
Read \`plitzi://docs/binding\` for the full binding structure before working with bindings.
|
|
35
|
-
|
|
36
|
-
General flow:
|
|
37
|
-
1. Ensure the variable or collection exists.
|
|
38
|
-
2. Get the target element via \`get_element\` to inspect its current \`definition.bindings\`.
|
|
39
|
-
3. Use \`update_element\` with the updated \`props\` that include the binding reference.
|
|
40
|
-
|
|
41
|
-
## Reading the current state
|
|
42
|
-
|
|
43
|
-
- \`get_schema\` → \`variables\` — all space-level variables with types and values.
|
|
44
|
-
- \`get_collections\` — all collections in the space.
|
|
45
|
-
- \`get_collection_records\` — records from a specific collection.
|
|
46
|
-
`
|
|
47
|
-
};
|
|
48
|
-
//#endregion
|
|
49
|
-
export { workflowDataResource };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
//#region src/modules/mcp/resources/workflows/elements.ts
|
|
2
|
-
var workflowElementsResource = {
|
|
3
|
-
uri: "plitzi://workflows/elements",
|
|
4
|
-
name: "Plitzi Workflow: Elements",
|
|
5
|
-
description: "Step-by-step guide for adding, nesting, moving, and removing elements on a page.",
|
|
6
|
-
mimeType: "text/markdown",
|
|
7
|
-
content: `# Workflow: Working with Elements
|
|
8
|
-
|
|
9
|
-
## Add an element to a page
|
|
10
|
-
|
|
11
|
-
1. Get the target page ID:
|
|
12
|
-
- \`get_builder_context\` → \`currentPageId\` (active page in the builder), OR
|
|
13
|
-
- \`get_schema\` → \`pages[]\` (all page IDs)
|
|
14
|
-
2. Get valid element types: \`get_builder_context\` → \`elementDefaults\` keys.
|
|
15
|
-
3. Call \`create_element\`:
|
|
16
|
-
\`\`\`json
|
|
17
|
-
{ "element": { "type": "container", "label": "Hero" }, "parentId": "<pageId>" }
|
|
18
|
-
\`\`\`
|
|
19
|
-
4. The response contains the created element with \`definition.styleSelectors\` (e.g. \`{ "base": ".el-abc123" }\`).
|
|
20
|
-
5. Use those selectors to style the element → see **plitzi://workflows/styles**.
|
|
21
|
-
|
|
22
|
-
## Nest elements (container → children)
|
|
23
|
-
|
|
24
|
-
Repeat \`create_element\` using the container's \`id\` as \`parentId\`:
|
|
25
|
-
\`\`\`json
|
|
26
|
-
{ "element": { "type": "text", "label": "Heading" }, "parentId": "<containerId>" }
|
|
27
|
-
\`\`\`
|
|
28
|
-
|
|
29
|
-
## Read the current element tree
|
|
30
|
-
|
|
31
|
-
- \`get_schema\` → \`flat\` — full map of all elements keyed by ID, with \`definition.parentId\` and \`definition.items\`.
|
|
32
|
-
- \`list_elements\` — lighter; returns id, label, type, parentId for every element.
|
|
33
|
-
- \`get_element\` — full detail for a single element (attributes, bindings, interactions).
|
|
34
|
-
|
|
35
|
-
## Move an element
|
|
36
|
-
|
|
37
|
-
\`move_element\` with \`elementId\`, \`toParentId\`, and \`dropPosition\`:
|
|
38
|
-
- \`"inside"\` — appends as last child of the target (default).
|
|
39
|
-
- \`"top"\` / \`"bottom"\` — inserts before/after the target's siblings.
|
|
40
|
-
|
|
41
|
-
## Update an element
|
|
42
|
-
|
|
43
|
-
\`update_element\` — change \`label\`, \`props\` (component attributes), or \`runtime\`.
|
|
44
|
-
For style changes use \`update_style_selector\`, not \`props\`.
|
|
45
|
-
|
|
46
|
-
## Delete an element
|
|
47
|
-
|
|
48
|
-
\`delete_element\` removes the element and all its descendants. This cannot be undone.
|
|
49
|
-
Always confirm with the user before calling this.
|
|
50
|
-
`
|
|
51
|
-
};
|
|
52
|
-
//#endregion
|
|
53
|
-
export { workflowElementsResource };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
//#region src/modules/mcp/resources/workflows/segments.ts
|
|
2
|
-
var workflowSegmentsResource = {
|
|
3
|
-
uri: "plitzi://workflows/segments",
|
|
4
|
-
name: "Plitzi Workflow: Segments",
|
|
5
|
-
description: "Step-by-step guide for creating and populating reusable segment templates.",
|
|
6
|
-
mimeType: "text/markdown",
|
|
7
|
-
content: `# Workflow: Working with Segments
|
|
8
|
-
|
|
9
|
-
A segment is a reusable UI template with its own isolated schema and style.
|
|
10
|
-
It is NOT placed on a page directly — it is defined once and referenced by elements across the space.
|
|
11
|
-
|
|
12
|
-
## Create a segment and populate it
|
|
13
|
-
|
|
14
|
-
1. Call \`create_segment\`:
|
|
15
|
-
\`\`\`json
|
|
16
|
-
{ "name": "Product Card", "description": "Reusable card for product listings" }
|
|
17
|
-
\`\`\`
|
|
18
|
-
The response contains:
|
|
19
|
-
- \`id\` — segment ID (used by all subsequent segment calls)
|
|
20
|
-
- \`definition.baseElementId\` — the root element ID inside the segment
|
|
21
|
-
|
|
22
|
-
2. Add elements to the segment root using \`create_segment_element\`:
|
|
23
|
-
\`\`\`json
|
|
24
|
-
{ "segmentId": "<id>", "element": { "type": "container", "label": "Card" }, "parentId": "<baseElementId>" }
|
|
25
|
-
\`\`\`
|
|
26
|
-
|
|
27
|
-
3. Nest elements inside by using the returned element \`id\` as the next \`parentId\`:
|
|
28
|
-
\`\`\`json
|
|
29
|
-
{ "segmentId": "<id>", "element": { "type": "text", "label": "Title" }, "parentId": "<cardId>" }
|
|
30
|
-
\`\`\`
|
|
31
|
-
|
|
32
|
-
4. Style segment elements the same way as page elements:
|
|
33
|
-
- Get the element's \`definition.styleSelectors\` from the \`create_segment_element\` response.
|
|
34
|
-
- Call \`update_style_selector\` with the selector and CSS rules.
|
|
35
|
-
|
|
36
|
-
5. For segment-scoped design tokens (not shared with the space), use \`create_segment_style_variable\`.
|
|
37
|
-
|
|
38
|
-
## Update segment metadata
|
|
39
|
-
|
|
40
|
-
\`update_segment\` — rename the segment or update its description.
|
|
41
|
-
|
|
42
|
-
## Delete a segment
|
|
43
|
-
|
|
44
|
-
\`delete_segment\` removes the segment, its entire schema, and its style. Cannot be undone.
|
|
45
|
-
Always confirm with the user before calling this.
|
|
46
|
-
|
|
47
|
-
## Segment variables
|
|
48
|
-
|
|
49
|
-
Segments can have their own typed variables (scoped to the segment):
|
|
50
|
-
- \`create_segment_variable\` — add a variable to the segment.
|
|
51
|
-
- \`update_segment_variable\` / \`delete_segment_variable\` — manage existing ones.
|
|
52
|
-
`
|
|
53
|
-
};
|
|
54
|
-
//#endregion
|
|
55
|
-
export { workflowSegmentsResource };
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
//#region src/modules/mcp/resources/workflows/styles.ts
|
|
2
|
-
var workflowStylesResource = {
|
|
3
|
-
uri: "plitzi://workflows/styles",
|
|
4
|
-
name: "Plitzi Workflow: Styles",
|
|
5
|
-
description: "Step-by-step guide for styling elements, using design tokens, and working across breakpoints.",
|
|
6
|
-
mimeType: "text/markdown",
|
|
7
|
-
content: `# Workflow: Styling Elements
|
|
8
|
-
|
|
9
|
-
## Style an element after creating it
|
|
10
|
-
|
|
11
|
-
Every element has a \`definition.styleSelectors\` map (e.g. \`{ "base": ".el-abc123", "icon": ".el-abc123-icon" }\`).
|
|
12
|
-
These are the CSS class strings registered in the space style system.
|
|
13
|
-
|
|
14
|
-
1. Get the element's \`styleSelectors\` — from the \`create_element\` / \`get_element\` response.
|
|
15
|
-
2. Call \`update_style_selector\`:
|
|
16
|
-
\`\`\`json
|
|
17
|
-
{
|
|
18
|
-
"displayMode": "desktop",
|
|
19
|
-
"selector": ".el-abc123",
|
|
20
|
-
"type": "class",
|
|
21
|
-
"style": { "base": { "backgroundColor": "#3b82f6", "padding": "16px" } }
|
|
22
|
-
}
|
|
23
|
-
\`\`\`
|
|
24
|
-
3. To style other breakpoints, repeat with \`"displayMode": "tablet"\` or \`"mobile"\`.
|
|
25
|
-
4. To style sub-slots (e.g. icon, header, body): use the corresponding selector from \`styleSelectors\` and the slot name as the style key.
|
|
26
|
-
|
|
27
|
-
## Update a specific CSS property (path parameter)
|
|
28
|
-
|
|
29
|
-
The \`path\` parameter in \`update_style_selector\` controls the scope of the update:
|
|
30
|
-
|
|
31
|
-
| path | style value | result |
|
|
32
|
-
|------|------------|--------|
|
|
33
|
-
| omitted | \`{ base: { color: "#fff" } }\` | Replaces **all** attributes of the selector |
|
|
34
|
-
| \`"base.color"\` | \`"#fff"\` | Updates only \`color\` inside the \`base\` slot |
|
|
35
|
-
| \`"base.color"\` | \`undefined\` / omitted | **Deletes** the \`color\` property from \`base\` |
|
|
36
|
-
| omitted | \`undefined\` / omitted | **Clears** all attributes from the selector |
|
|
37
|
-
|
|
38
|
-
Example — update only the background color without touching other properties:
|
|
39
|
-
\`\`\`json
|
|
40
|
-
{
|
|
41
|
-
"displayMode": "desktop",
|
|
42
|
-
"selector": ".el-abc123",
|
|
43
|
-
"type": "class",
|
|
44
|
-
"path": "base.backgroundColor",
|
|
45
|
-
"style": { "base": { "backgroundColor": "#ef4444" } }
|
|
46
|
-
}
|
|
47
|
-
\`\`\`
|
|
48
|
-
|
|
49
|
-
## Create a new selector from scratch
|
|
50
|
-
|
|
51
|
-
Use \`create_style_selector\` when you need a CSS class that isn't tied to a specific element (shared utility class):
|
|
52
|
-
\`\`\`json
|
|
53
|
-
{
|
|
54
|
-
"displayMode": "desktop",
|
|
55
|
-
"selector": ".hero-banner",
|
|
56
|
-
"type": "class",
|
|
57
|
-
"style": { "base": { "minHeight": "400px" } }
|
|
58
|
-
}
|
|
59
|
-
\`\`\`
|
|
60
|
-
|
|
61
|
-
## Use design tokens (CSS variables)
|
|
62
|
-
|
|
63
|
-
Tokens let you reuse values across many selectors.
|
|
64
|
-
|
|
65
|
-
1. Create a token with \`create_style_variable\`:
|
|
66
|
-
\`\`\`json
|
|
67
|
-
{ "category": "color", "name": "brand", "value": { "light": "#3b82f6", "dark": "#60a5fa", "default": "#3b82f6" } }
|
|
68
|
-
\`\`\`
|
|
69
|
-
2. Reference the token by name in any style rule:
|
|
70
|
-
\`\`\`json
|
|
71
|
-
{ "base": { "color": "var(--plitzi-brand)" } }
|
|
72
|
-
\`\`\`
|
|
73
|
-
|
|
74
|
-
## Responsive styles
|
|
75
|
-
|
|
76
|
-
Apply the same selector at different display modes to override values:
|
|
77
|
-
1. Desktop (default): \`update_style_selector\` with \`"displayMode": "desktop"\`.
|
|
78
|
-
2. Tablet overrides: \`update_style_selector\` with \`"displayMode": "tablet"\`.
|
|
79
|
-
3. Mobile overrides: \`update_style_selector\` with \`"displayMode": "mobile"\`.
|
|
80
|
-
|
|
81
|
-
Only the overriding properties need to be included in each breakpoint call.
|
|
82
|
-
|
|
83
|
-
## Preview and inspect current styles
|
|
84
|
-
|
|
85
|
-
- To see how a saved element currently looks: use \`preview_element\` — it returns its schema+style for display.
|
|
86
|
-
- The \`style.platform\` in the response is keyed by displayMode, then by selector, and shows the actual CSS rules applied.
|
|
87
|
-
- \`get_schema\` does not include style data — use \`preview_element\` to read an element's live styles.
|
|
88
|
-
`
|
|
89
|
-
};
|
|
90
|
-
//#endregion
|
|
91
|
-
export { workflowStylesResource };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/collections/createCollection.ts
|
|
4
|
-
var createCollectionTool = {
|
|
5
|
-
name: "create_collection",
|
|
6
|
-
adapterName: "createCollection",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Create Collection",
|
|
9
|
-
description: "Create a new collection — a structured data store for the space.\n\nProvide field definitions in fields as a map of field name to field config. Records can be created afterwards via create_collection_record.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
name: z.string().describe("Singular collection name (e.g. \"Product\")"),
|
|
12
|
-
namePlural: z.string().describe("Plural collection name (e.g. \"Products\")"),
|
|
13
|
-
description: z.string().optional().describe("Short description of what this collection stores"),
|
|
14
|
-
privacy: z.enum(["public", "private"]).optional().describe("\"public\" allows unauthenticated reads; \"private\" requires auth"),
|
|
15
|
-
fields: z.record(z.string(), z.unknown()).describe("Field definitions keyed by field name — each value is a field config object")
|
|
16
|
-
}),
|
|
17
|
-
outputSchema: z.object({
|
|
18
|
-
id: z.string().describe("Collection ID"),
|
|
19
|
-
name: z.string().describe("Collection name")
|
|
20
|
-
}).catchall(z.unknown()).describe("The created collection")
|
|
21
|
-
},
|
|
22
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
23
|
-
};
|
|
24
|
-
//#endregion
|
|
25
|
-
export { createCollectionTool as default };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/collections/createCollectionRecord.ts
|
|
4
|
-
var createCollectionRecordTool = {
|
|
5
|
-
name: "create_collection_record",
|
|
6
|
-
adapterName: "createCollectionRecord",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Create Collection Record",
|
|
9
|
-
description: "Create a new record in a collection. Pass field values matching the collection's field definitions.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
collectionId: z.string().describe("Collection ID"),
|
|
12
|
-
values: z.record(z.string(), z.union([
|
|
13
|
-
z.string(),
|
|
14
|
-
z.number(),
|
|
15
|
-
z.boolean()
|
|
16
|
-
])).describe("Field values keyed by field name — keys must match the collection field definitions (see get_collection)"),
|
|
17
|
-
status: z.enum(["draft", "published"]).optional().describe("Publication status; defaults to \"draft\"")
|
|
18
|
-
}),
|
|
19
|
-
outputSchema: z.object({
|
|
20
|
-
id: z.string().describe("Record ID"),
|
|
21
|
-
collectionId: z.string().describe("Collection ID")
|
|
22
|
-
}).catchall(z.unknown()).describe("The created record")
|
|
23
|
-
},
|
|
24
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
25
|
-
};
|
|
26
|
-
//#endregion
|
|
27
|
-
export { createCollectionRecordTool as default };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/collections/deleteCollection.ts
|
|
4
|
-
var deleteCollectionTool = {
|
|
5
|
-
name: "delete_collection",
|
|
6
|
-
adapterName: "deleteCollection",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Delete Collection",
|
|
9
|
-
description: "Delete a collection and all its records permanently. This action cannot be undone.",
|
|
10
|
-
inputSchema: z.object({ collectionId: z.string().describe("Collection ID") }),
|
|
11
|
-
outputSchema: z.literal(true).describe("Always true on successful deletion")
|
|
12
|
-
},
|
|
13
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
14
|
-
};
|
|
15
|
-
//#endregion
|
|
16
|
-
export { deleteCollectionTool as default };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/collections/deleteCollectionRecord.ts
|
|
4
|
-
var deleteCollectionRecordTool = {
|
|
5
|
-
name: "delete_collection_record",
|
|
6
|
-
adapterName: "deleteCollectionRecord",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Delete Collection Record",
|
|
9
|
-
description: "Delete a record from a collection.",
|
|
10
|
-
inputSchema: z.object({ recordId: z.string().describe("Record ID") }),
|
|
11
|
-
outputSchema: z.literal(true).describe("Always true on successful deletion")
|
|
12
|
-
},
|
|
13
|
-
definition: { allowedModes: getAllowedModes("write") }
|
|
14
|
-
};
|
|
15
|
-
//#endregion
|
|
16
|
-
export { deleteCollectionRecordTool as default };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/collections/getCollection.ts
|
|
4
|
-
var getCollectionTool = {
|
|
5
|
-
name: "get_collection",
|
|
6
|
-
adapterName: "getCollection",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Get Collection",
|
|
9
|
-
description: "Get a specific collection by ID.",
|
|
10
|
-
inputSchema: z.object({ collectionId: z.string().describe("Collection ID") }),
|
|
11
|
-
outputSchema: z.object({
|
|
12
|
-
id: z.string().describe("Collection ID"),
|
|
13
|
-
name: z.string().describe("Collection name"),
|
|
14
|
-
namePlural: z.string().describe("Plural collection name"),
|
|
15
|
-
fields: z.record(z.string(), z.unknown()).describe("Field definitions keyed by field name")
|
|
16
|
-
}).catchall(z.unknown()).nullable().describe("The collection object, or null if not found")
|
|
17
|
-
},
|
|
18
|
-
definition: { allowedModes: getAllowedModes("read") }
|
|
19
|
-
};
|
|
20
|
-
//#endregion
|
|
21
|
-
export { getCollectionTool as default };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/collections/getCollectionRecord.ts
|
|
4
|
-
var getCollectionRecordTool = {
|
|
5
|
-
name: "get_collection_record",
|
|
6
|
-
adapterName: "getCollectionRecord",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Get Collection Record",
|
|
9
|
-
description: "Get a specific record from a collection.",
|
|
10
|
-
inputSchema: z.object({ recordId: z.string().describe("Record ID") }),
|
|
11
|
-
outputSchema: z.object({
|
|
12
|
-
id: z.string().describe("Record ID"),
|
|
13
|
-
collectionId: z.string().describe("Collection ID"),
|
|
14
|
-
values: z.record(z.string(), z.unknown()).describe("Field values keyed by field name"),
|
|
15
|
-
status: z.enum([
|
|
16
|
-
"draft",
|
|
17
|
-
"published",
|
|
18
|
-
"archived"
|
|
19
|
-
]).describe("Publication status")
|
|
20
|
-
}).catchall(z.unknown()).nullable().describe("The record, or null if not found")
|
|
21
|
-
},
|
|
22
|
-
definition: { allowedModes: getAllowedModes("read") }
|
|
23
|
-
};
|
|
24
|
-
//#endregion
|
|
25
|
-
export { getCollectionRecordTool as default };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/collections/getCollectionRecords.ts
|
|
4
|
-
var getCollectionRecordsTool = {
|
|
5
|
-
name: "get_collection_records",
|
|
6
|
-
adapterName: "getCollectionRecords",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Get Collection Records",
|
|
9
|
-
description: "List records from a collection, with optional filtering and result cap.",
|
|
10
|
-
inputSchema: z.object({
|
|
11
|
-
collectionId: z.string().describe("Collection ID"),
|
|
12
|
-
filter: z.record(z.string(), z.unknown()).optional().describe("Key-value filter map — each key is a field name and value is the value to match"),
|
|
13
|
-
limit: z.number().optional().describe("Maximum number of records to return")
|
|
14
|
-
}),
|
|
15
|
-
outputSchema: z.array(z.object({
|
|
16
|
-
id: z.string().describe("Record ID"),
|
|
17
|
-
collectionId: z.string().describe("Collection ID"),
|
|
18
|
-
values: z.record(z.string(), z.unknown()).describe("Field values keyed by field name"),
|
|
19
|
-
status: z.enum([
|
|
20
|
-
"draft",
|
|
21
|
-
"published",
|
|
22
|
-
"archived"
|
|
23
|
-
]).describe("Publication status")
|
|
24
|
-
}).catchall(z.unknown())).describe("Array of records in the collection")
|
|
25
|
-
},
|
|
26
|
-
definition: { allowedModes: getAllowedModes("read") }
|
|
27
|
-
};
|
|
28
|
-
//#endregion
|
|
29
|
-
export { getCollectionRecordsTool as default };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/modules/mcp/tools/collections/getCollections.ts
|
|
4
|
-
var getCollectionsTool = {
|
|
5
|
-
name: "get_collections",
|
|
6
|
-
adapterName: "getCollections",
|
|
7
|
-
mcpDefinition: {
|
|
8
|
-
title: "Get Collections",
|
|
9
|
-
description: "Get all collections for the current space.",
|
|
10
|
-
inputSchema: z.object({}),
|
|
11
|
-
outputSchema: z.array(z.object({
|
|
12
|
-
id: z.string().describe("Collection ID"),
|
|
13
|
-
name: z.string().describe("Collection name")
|
|
14
|
-
}).catchall(z.unknown())).describe("Array of collections in the space")
|
|
15
|
-
},
|
|
16
|
-
definition: { allowedModes: getAllowedModes("read") }
|
|
17
|
-
};
|
|
18
|
-
//#endregion
|
|
19
|
-
export { getCollectionsTool as default };
|
|
@@ -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 };
|