@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,75 +0,0 @@
|
|
|
1
|
-
//#region src/modules/mcp/resources/glossary/resource.ts
|
|
2
|
-
var resourceResource = {
|
|
3
|
-
uri: "plitzi://docs/resource",
|
|
4
|
-
name: "Plitzi Docs: Resource",
|
|
5
|
-
description: "A CDN-stored file in a Plitzi space — images, videos, documents, plugins, and templates uploaded to cloud storage.",
|
|
6
|
-
mimeType: "text/markdown",
|
|
7
|
-
content: `# Resource
|
|
8
|
-
|
|
9
|
-
A **Resource** is a file stored on a CDN (AWS S3 or Cloudflare R2) and associated with a Plitzi space. Resources include images, videos, documents, application files, plugin bundles, and page templates.
|
|
10
|
-
|
|
11
|
-
## TypeScript Shape
|
|
12
|
-
|
|
13
|
-
\`\`\`typescript
|
|
14
|
-
type ResourceType = 'image' | 'video' | 'document' | 'application' | 'plugin' | 'template';
|
|
15
|
-
|
|
16
|
-
type Resource = {
|
|
17
|
-
id: string; // Storage key (S3/R2 object path)
|
|
18
|
-
cdnIdentifier: string; // Which CDN configuration to use
|
|
19
|
-
name: string; // Display filename
|
|
20
|
-
path: string; // Full public CDN URL
|
|
21
|
-
type: ResourceType;
|
|
22
|
-
size: number; // File size in bytes
|
|
23
|
-
metadata?: PluginManifest; // Present when type === 'plugin' or 'template'
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
type Cdn = {
|
|
27
|
-
identifier: string;
|
|
28
|
-
name: string;
|
|
29
|
-
domain: string;
|
|
30
|
-
provider: 's3' | 'r2';
|
|
31
|
-
region: string;
|
|
32
|
-
endpoint?: string; // Custom endpoint for R2 / S3-compatible storage
|
|
33
|
-
bucketName: string;
|
|
34
|
-
prefix: string;
|
|
35
|
-
credential?: SpaceCredential;
|
|
36
|
-
createdAt: number;
|
|
37
|
-
updatedAt: number;
|
|
38
|
-
};
|
|
39
|
-
\`\`\`
|
|
40
|
-
|
|
41
|
-
## Resource Types
|
|
42
|
-
|
|
43
|
-
| Type | Description |
|
|
44
|
-
|---|---|
|
|
45
|
-
| \`image\` | PNG, JPEG, GIF, WebP, SVG |
|
|
46
|
-
| \`video\` | MP4, WebM, OGG |
|
|
47
|
-
| \`document\` | PDF, Word, Excel, etc. |
|
|
48
|
-
| \`application\` | Generic binary files |
|
|
49
|
-
| \`plugin\` | Plugin JS bundles — \`metadata\` contains \`PluginManifest\` |
|
|
50
|
-
| \`template\` | Page template presets — \`metadata\` contains \`PluginManifest\` |
|
|
51
|
-
|
|
52
|
-
## Key Properties
|
|
53
|
-
|
|
54
|
-
- **\`id\`** — the storage object path (e.g. \`images/hero.jpg\`). Used together with \`cdnIdentifier\` to address the file.
|
|
55
|
-
- **\`cdnIdentifier\`** — references a configured CDN (the space can have multiple CDNs).
|
|
56
|
-
- **\`path\`** — the full public URL to use in \`<img src>\`, CSS \`url()\`, etc.
|
|
57
|
-
- **\`metadata\`** — only present for \`plugin\` and \`template\` types; contains the \`PluginManifest\`.
|
|
58
|
-
|
|
59
|
-
## Relationships
|
|
60
|
-
|
|
61
|
-
- Resources are managed at the **Space** level and shared across all environments.
|
|
62
|
-
- **Plugin** resources (type \`plugin\`) power the component library.
|
|
63
|
-
- Elements reference image/video resources via \`attributes\` (e.g. \`element.attributes.src\`).
|
|
64
|
-
|
|
65
|
-
## Common Operations
|
|
66
|
-
|
|
67
|
-
- \`get_resources\` — list all resources, optionally filtered by type or CDN.
|
|
68
|
-
- \`get_resource\` — fetch a single resource by \`id\` and \`cdnIdentifier\`.
|
|
69
|
-
- \`add_resource\` — upload a file from a URL to the CDN.
|
|
70
|
-
- \`move_resource\` — relocate a resource to a different CDN prefix/folder.
|
|
71
|
-
- \`remove_resource\` — delete a resource from the CDN.
|
|
72
|
-
`
|
|
73
|
-
};
|
|
74
|
-
//#endregion
|
|
75
|
-
export { resourceResource };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
//#region src/modules/mcp/resources/glossary/schema.ts
|
|
2
|
-
var schemaResource = {
|
|
3
|
-
uri: "plitzi://docs/schema",
|
|
4
|
-
name: "Plitzi Docs: Schema",
|
|
5
|
-
description: "Core data structure of a Plitzi space — holds all pages, elements, variables, and settings.",
|
|
6
|
-
mimeType: "text/markdown",
|
|
7
|
-
content: `# Schema
|
|
8
|
-
|
|
9
|
-
The \`Schema\` is the primary data structure of a Plitzi space. It is a serializable, flat representation of the entire page tree plus global configuration.
|
|
10
|
-
|
|
11
|
-
## TypeScript Shape
|
|
12
|
-
|
|
13
|
-
\`\`\`typescript
|
|
14
|
-
type Schema = {
|
|
15
|
-
flat: Record<string, Element>; // All elements keyed by their ID
|
|
16
|
-
definition: {
|
|
17
|
-
name: string; // Human-readable space name
|
|
18
|
-
permanentUrl: string; // URL slug (e.g. "my-app")
|
|
19
|
-
};
|
|
20
|
-
variables: SchemaVariable[]; // Space-level dynamic variables
|
|
21
|
-
settings: {
|
|
22
|
-
keepState?: boolean;
|
|
23
|
-
stateStorage?: 'localStorage' | 'sessionStorage';
|
|
24
|
-
customCss: string;
|
|
25
|
-
userProvider?: 'auth0' | 'basic' | 'custom' | '';
|
|
26
|
-
auth0Domain?: string;
|
|
27
|
-
auth0ClientId?: string;
|
|
28
|
-
tokenStorage?: 'localStorage' | 'sessionStorage' | '';
|
|
29
|
-
loginUrl?: string;
|
|
30
|
-
userUrl?: string;
|
|
31
|
-
refreshUrl?: string;
|
|
32
|
-
logoutUrl?: string;
|
|
33
|
-
detailsPath?: string;
|
|
34
|
-
tokenPath?: string;
|
|
35
|
-
expirationTimePath?: string;
|
|
36
|
-
};
|
|
37
|
-
rsc?: {
|
|
38
|
-
enabled?: boolean;
|
|
39
|
-
transport?: 'json' | 'stream';
|
|
40
|
-
path?: string; // Defaults to '/_rsc'
|
|
41
|
-
};
|
|
42
|
-
pages: string[]; // Ordered list of root page element IDs
|
|
43
|
-
pageFolders: PageFolder[]; // Hierarchical page organization
|
|
44
|
-
};
|
|
45
|
-
\`\`\`
|
|
46
|
-
|
|
47
|
-
## Key Properties
|
|
48
|
-
|
|
49
|
-
- **\`flat\`** — the entire element tree as a dictionary. Every element (page, container, component) lives here. Children are referenced by IDs stored in \`definition.items\`.
|
|
50
|
-
- **\`pages\`** — ordered list of element IDs for the top-level pages. The elements themselves are in \`flat\`.
|
|
51
|
-
- **\`pageFolders\`** — hierarchical folder structure for organizing pages in the builder sidebar.
|
|
52
|
-
- **\`variables\`** — schema-level variables that can be injected into elements via bindings.
|
|
53
|
-
- **\`settings\`** — authentication provider configuration (Auth0, basic, custom token), state persistence, and custom global CSS.
|
|
54
|
-
- **\`rsc\`** — optional React Server Components configuration.
|
|
55
|
-
|
|
56
|
-
## Relationships
|
|
57
|
-
|
|
58
|
-
- Contains **Element** objects in \`flat\`.
|
|
59
|
-
- Contains **SchemaVariable** entries in \`variables\`.
|
|
60
|
-
- Paired with a **Style** object that holds all CSS for the same space/environment.
|
|
61
|
-
- Each **Segment** also has its own \`schema\` with the same structure but scoped to the segment.
|
|
62
|
-
|
|
63
|
-
## Environments
|
|
64
|
-
|
|
65
|
-
Each environment (\`main\`, \`development\`, \`staging\`, \`production\`) can have an independent schema snapshot. The \`main\` environment is the live working copy.
|
|
66
|
-
`
|
|
67
|
-
};
|
|
68
|
-
//#endregion
|
|
69
|
-
export { schemaResource };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
//#region src/modules/mcp/resources/glossary/schemaVariable.ts
|
|
2
|
-
var schemaVariableResource = {
|
|
3
|
-
uri: "plitzi://docs/schema-variable",
|
|
4
|
-
name: "Plitzi Docs: Schema Variable",
|
|
5
|
-
description: "A space-level dynamic variable in Plitzi — typed values that can be injected into elements via bindings.",
|
|
6
|
-
mimeType: "text/markdown",
|
|
7
|
-
content: `# Schema Variable
|
|
8
|
-
|
|
9
|
-
A **Schema Variable** is a space-level dynamic variable defined in \`schema.variables\`. Variables can be injected into element \`attributes\` or \`style\` via bindings, making them a lightweight way to parameterize behavior and appearance without hardcoding values.
|
|
10
|
-
|
|
11
|
-
## TypeScript Shape
|
|
12
|
-
|
|
13
|
-
\`\`\`typescript
|
|
14
|
-
type SchemaVariable = {
|
|
15
|
-
name: string; // Unique identifier used in bindings (e.g. 'primaryColor')
|
|
16
|
-
category: string; // Grouping label shown in the builder UI
|
|
17
|
-
type:
|
|
18
|
-
| 'text'
|
|
19
|
-
| 'number'
|
|
20
|
-
| 'email'
|
|
21
|
-
| 'password'
|
|
22
|
-
| 'select'
|
|
23
|
-
| 'select2'
|
|
24
|
-
| 'checkbox'
|
|
25
|
-
| 'textarea'
|
|
26
|
-
| 'color'
|
|
27
|
-
| 'switch';
|
|
28
|
-
value: string; // Default/current value
|
|
29
|
-
subValues: { when: RuleGroup; value: string }[]; // Conditional overrides
|
|
30
|
-
};
|
|
31
|
-
\`\`\`
|
|
32
|
-
|
|
33
|
-
## Key Properties
|
|
34
|
-
|
|
35
|
-
- **\`name\`** — the variable identifier used when binding to elements. Must be unique within the schema.
|
|
36
|
-
- **\`category\`** — organizes variables into logical groups in the builder panel (e.g. \`'Colors'\`, \`'Typography'\`).
|
|
37
|
-
- **\`type\`** — determines the editor widget and value format. \`color\` stores a hex/rgba string; \`switch\` stores \`'true'\`/\`'false'\`.
|
|
38
|
-
- **\`value\`** — the base value. All values are stored as strings regardless of type.
|
|
39
|
-
- **\`subValues\`** — conditional overrides: when a \`RuleGroup\` condition is met, the variable uses that value instead of the default. Enables rule-based theming and personalization.
|
|
40
|
-
|
|
41
|
-
## Difference from Style Variables
|
|
42
|
-
|
|
43
|
-
| | Schema Variable | Style Variable |
|
|
44
|
-
|---|---|---|
|
|
45
|
-
| Stored in | \`schema.variables\` | \`style.variables\` |
|
|
46
|
-
| Used for | Element attributes, logic | CSS design tokens |
|
|
47
|
-
| Types | text, color, switch, etc. | string, number, theme-aware |
|
|
48
|
-
| Scope | Element bindings | CSS properties |
|
|
49
|
-
|
|
50
|
-
## Common Operations
|
|
51
|
-
|
|
52
|
-
- \`create_schema_variable\` — define a new variable.
|
|
53
|
-
- \`update_schema_variable\` — change the value, category, or conditional rules.
|
|
54
|
-
- \`delete_schema_variable\` — remove a variable (breaks any bindings referencing it).
|
|
55
|
-
|
|
56
|
-
Segment variables use: \`create_segment_variable\`, \`update_segment_variable\`, \`delete_segment_variable\`.
|
|
57
|
-
`
|
|
58
|
-
};
|
|
59
|
-
//#endregion
|
|
60
|
-
export { schemaVariableResource };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
//#region src/modules/mcp/resources/glossary/segment.ts
|
|
2
|
-
var segmentResource = {
|
|
3
|
-
uri: "plitzi://docs/segment",
|
|
4
|
-
name: "Plitzi Docs: Segment",
|
|
5
|
-
description: "A reusable UI template in Plitzi — a named, versioned component group with its own schema and style.",
|
|
6
|
-
mimeType: "text/markdown",
|
|
7
|
-
content: `# Segment
|
|
8
|
-
|
|
9
|
-
A **Segment** is a reusable UI template. It encapsulates a sub-tree of elements with its own isolated schema and style. Segments can be embedded inside pages and reused across the space. Think of them as design-system components built visually.
|
|
10
|
-
|
|
11
|
-
## TypeScript Shape
|
|
12
|
-
|
|
13
|
-
\`\`\`typescript
|
|
14
|
-
type Segment = {
|
|
15
|
-
id: string;
|
|
16
|
-
identifier: string; // Unique string key (e.g. 'hero-banner')
|
|
17
|
-
definition: {
|
|
18
|
-
name: string; // Human-readable display name
|
|
19
|
-
description: string;
|
|
20
|
-
baseElementId: string; // Root element ID within segment.schema.flat
|
|
21
|
-
};
|
|
22
|
-
environment: Environment; // 'main' | 'development' | 'staging' | 'production'
|
|
23
|
-
schema: Schema; // The segment's own element tree
|
|
24
|
-
style: Style; // The segment's own CSS definitions
|
|
25
|
-
};
|
|
26
|
-
\`\`\`
|
|
27
|
-
|
|
28
|
-
## Key Properties
|
|
29
|
-
|
|
30
|
-
- **\`identifier\`** — the stable string ID used to reference this segment when embedding it in pages.
|
|
31
|
-
- **\`definition.baseElementId\`** — the ID of the root element inside \`segment.schema.flat\`. This is the entry point when the segment is rendered.
|
|
32
|
-
- **\`schema\`** — a full \`Schema\` object scoped to the segment. Contains the element sub-tree in \`flat\`.
|
|
33
|
-
- **\`style\`** — a full \`Style\` object scoped to the segment. CSS is isolated from the space style.
|
|
34
|
-
- **\`environment\`** — each environment has an independent version of the segment.
|
|
35
|
-
|
|
36
|
-
## Isolation
|
|
37
|
-
|
|
38
|
-
Segment schema and style are completely isolated from the space schema/style. This means:
|
|
39
|
-
- Style selectors in a segment do not conflict with space-level selectors.
|
|
40
|
-
- Variables inside a segment are scoped to the segment.
|
|
41
|
-
- When a segment is updated and published, all pages using it pick up the new version.
|
|
42
|
-
|
|
43
|
-
## Relationships
|
|
44
|
-
|
|
45
|
-
- A **Segment** contains a **Schema** and a **Style** just like a space.
|
|
46
|
-
- Elements inside the segment follow the same **Element** structure.
|
|
47
|
-
- Segments reference **Environment** for versioning.
|
|
48
|
-
|
|
49
|
-
## Common Operations
|
|
50
|
-
|
|
51
|
-
- \`create_segment\` — create a new segment definition.
|
|
52
|
-
- \`update_segment\` — rename or update description.
|
|
53
|
-
- \`delete_segment\` — remove a segment.
|
|
54
|
-
- \`create_segment_element\` / \`update_segment_element\` / \`delete_segment_element\` — manage elements inside.
|
|
55
|
-
- \`create_segment_variable\` / \`update_segment_variable\` / \`delete_segment_variable\` — manage schema variables inside.
|
|
56
|
-
`
|
|
57
|
-
};
|
|
58
|
-
//#endregion
|
|
59
|
-
export { segmentResource };
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
//#region src/modules/mcp/resources/glossary/space.ts
|
|
2
|
-
var spaceResource = {
|
|
3
|
-
uri: "plitzi://docs/space",
|
|
4
|
-
name: "Plitzi Docs: Space",
|
|
5
|
-
description: "A Plitzi project workspace — the top-level container for schema, style, plugins, segments, collections, and deployments.",
|
|
6
|
-
mimeType: "text/markdown",
|
|
7
|
-
content: `# Space
|
|
8
|
-
|
|
9
|
-
A **Space** is the top-level container of a Plitzi project. It holds everything: the page structure (schema), styling (style), plugins, segments, collections, CDN resources, and deployment configurations.
|
|
10
|
-
|
|
11
|
-
## TypeScript Shape (partial)
|
|
12
|
-
|
|
13
|
-
\`\`\`typescript
|
|
14
|
-
type Space = {
|
|
15
|
-
id: number;
|
|
16
|
-
name: string;
|
|
17
|
-
permanentUrl: string; // URL slug identifying the space
|
|
18
|
-
verified: boolean; // Whether the custom domain is verified
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
type SpaceDeployment = {
|
|
22
|
-
id: number;
|
|
23
|
-
environment: Environment; // 'production' | 'staging' | 'development' | 'main'
|
|
24
|
-
revision: number | null;
|
|
25
|
-
domain: string;
|
|
26
|
-
isVerified: boolean;
|
|
27
|
-
default: boolean;
|
|
28
|
-
credential: SpaceCredential | null; // Cloud storage credential for deployment
|
|
29
|
-
createdAt: number;
|
|
30
|
-
updatedAt: number;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
type SpaceCredential = {
|
|
34
|
-
identifier: string;
|
|
35
|
-
name: string;
|
|
36
|
-
provider: 's3' | 'r2' | 'ssr';
|
|
37
|
-
inUse: boolean;
|
|
38
|
-
usedIn: { usedFrom: string; name: string }[];
|
|
39
|
-
createdAt: number;
|
|
40
|
-
updatedAt: number;
|
|
41
|
-
};
|
|
42
|
-
\`\`\`
|
|
43
|
-
|
|
44
|
-
## Key Concepts
|
|
45
|
-
|
|
46
|
-
- **\`permanentUrl\`** — a stable URL slug (e.g. \`my-app\`) that identifies the space. Also stored in \`schema.definition.permanentUrl\`.
|
|
47
|
-
- **Environments** — each space has up to 4 environments: \`main\` (working copy), \`development\`, \`staging\`, \`production\`. Each has its own schema, style, and deployment.
|
|
48
|
-
- **\`SpaceDeployment\`** — maps an environment to a public domain and cloud storage credential for publishing.
|
|
49
|
-
- **\`SpaceCredential\`** — AWS S3 or Cloudflare R2 credentials used to store published assets.
|
|
50
|
-
|
|
51
|
-
## Relationships
|
|
52
|
-
|
|
53
|
-
- A space has one **Schema** and one **Style** per environment.
|
|
54
|
-
- A space owns all **Segments**, **Collections**, and **Resources** (CDN files).
|
|
55
|
-
- A space has installed **Plugins**.
|
|
56
|
-
- The \`main\` environment is always the live editing copy; publishing copies it to \`production\` (or another target environment).
|
|
57
|
-
|
|
58
|
-
## Settings
|
|
59
|
-
|
|
60
|
-
Space-level settings live in \`schema.settings\` and control:
|
|
61
|
-
- Authentication provider (Auth0, basic JWT, custom token endpoint)
|
|
62
|
-
- State persistence (localStorage vs. sessionStorage)
|
|
63
|
-
- Custom global CSS
|
|
64
|
-
|
|
65
|
-
## Common Operations
|
|
66
|
-
|
|
67
|
-
- \`list_spaces\` — list all accessible spaces.
|
|
68
|
-
- \`publish_space\` — publish \`main\` environment to a target environment.
|
|
69
|
-
- \`update_space_settings\` — modify \`schema.settings\` fields.
|
|
70
|
-
`
|
|
71
|
-
};
|
|
72
|
-
//#endregion
|
|
73
|
-
export { spaceResource };
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
//#region src/modules/mcp/resources/glossary/style.ts
|
|
2
|
-
var styleResource = {
|
|
3
|
-
uri: "plitzi://docs/style",
|
|
4
|
-
name: "Plitzi Docs: Style",
|
|
5
|
-
description: "The styling system of a Plitzi space — CSS definitions organized by display mode, selector, and theme.",
|
|
6
|
-
mimeType: "text/markdown",
|
|
7
|
-
content: `# Style
|
|
8
|
-
|
|
9
|
-
The \`Style\` object holds all CSS definitions for a Plitzi space. It is paired one-to-one with a \`Schema\` per environment. Styles are organized by display mode (responsive breakpoints), CSS selector, and optionally by theme (light/dark).
|
|
10
|
-
|
|
11
|
-
## TypeScript Shape
|
|
12
|
-
|
|
13
|
-
\`\`\`typescript
|
|
14
|
-
type Style = {
|
|
15
|
-
platform: Record<DisplayMode, Record<string, StyleItem>>;
|
|
16
|
-
mode?: 'mobile-first' | 'desktop-first';
|
|
17
|
-
theme: {
|
|
18
|
-
default: StyleThemeMode; // 'system' | 'light' | 'dark'
|
|
19
|
-
schemes: StyleThemeMode[]; // Enabled theme schemes
|
|
20
|
-
};
|
|
21
|
-
variables: Partial<StyleVariables>;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
type DisplayMode = 'desktop' | 'tablet' | 'mobile';
|
|
25
|
-
type StyleThemeMode = 'system' | 'light' | 'dark';
|
|
26
|
-
|
|
27
|
-
type StyleItem = {
|
|
28
|
-
name: string; // The CSS selector string
|
|
29
|
-
type: 'class' | 'element' | 'id';
|
|
30
|
-
variables?: Partial<StyleVariables>;
|
|
31
|
-
attributes: StyleAttributes; // CSS properties per sub-selector
|
|
32
|
-
cache: string; // Pre-compiled CSS string (read-only)
|
|
33
|
-
componentType?: string; // Plugin type that owns this selector
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
type StyleAttributes = Record<string, StyleBlock>; // key = sub-selector name (e.g. 'base', 'header')
|
|
37
|
-
|
|
38
|
-
type StyleBlock = {
|
|
39
|
-
default?: StyleObject; // Base CSS properties
|
|
40
|
-
states?: Partial<Record<StyleState, StyleObject>>; // Pseudo-classes
|
|
41
|
-
variants?: Record<string, Omit<StyleBlock, 'variants'>>; // Custom variants
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
type StyleState = 'hover' | 'active' | 'focus' | 'disabled' | 'checked' | 'visited';
|
|
45
|
-
type StyleObject = Partial<Record<StyleCategory, StyleValue>>;
|
|
46
|
-
type StyleValue = number | string;
|
|
47
|
-
|
|
48
|
-
// StyleVariableValue can be theme-aware
|
|
49
|
-
type StyleVariableValue = string | number | {
|
|
50
|
-
light?: string;
|
|
51
|
-
dark?: string;
|
|
52
|
-
default?: string;
|
|
53
|
-
};
|
|
54
|
-
\`\`\`
|
|
55
|
-
|
|
56
|
-
## Key Properties
|
|
57
|
-
|
|
58
|
-
- **\`platform\`** — top-level split by \`DisplayMode\`. Each mode holds a dictionary of selector → \`StyleItem\`. Desktop is the base; tablet and mobile override via breakpoints.
|
|
59
|
-
- **\`StyleItem.name\`** — the raw CSS selector (e.g. \`.btn-primary\`, \`#hero\`, \`button\`).
|
|
60
|
-
- **\`StyleItem.type\`** — whether the selector is a class, element tag, or ID.
|
|
61
|
-
- **\`StyleItem.attributes\`** — the CSS data, keyed by sub-selector slot names. The \`base\` slot always corresponds to the element itself. Other slots (e.g. \`header\`, \`icon\`) target internal parts of a component.
|
|
62
|
-
- **\`StyleBlock.default\`** — normal-state CSS properties.
|
|
63
|
-
- **\`StyleBlock.states\`** — CSS overrides for pseudo-classes (hover, focus, disabled, etc.).
|
|
64
|
-
- **\`StyleBlock.variants\`** — named visual variants applied via \`element.definition.initialState.styleVariant\`.
|
|
65
|
-
- **\`StyleItem.cache\`** — compiled CSS string. Recomputed automatically; do not modify directly.
|
|
66
|
-
- **\`variables\`** — design tokens (colors, spacing, shadows, custom) at the style or item level.
|
|
67
|
-
|
|
68
|
-
## Relationships
|
|
69
|
-
|
|
70
|
-
- Each \`Element\` references its style entries via \`definition.styleSelectors\`, mapping slot names to selector strings in \`style.platform[mode]\`.
|
|
71
|
-
- **Style variables** (\`StyleVariable\`) are design tokens shared across the style system.
|
|
72
|
-
- A **Segment** has its own isolated \`Style\` object, separate from the space style.
|
|
73
|
-
|
|
74
|
-
## Display Mode Behavior
|
|
75
|
-
|
|
76
|
-
- Styles are applied from most-specific breakpoint down to \`desktop\`.
|
|
77
|
-
- In \`mobile-first\` mode, \`desktop\` styles are the widest override; in \`desktop-first\` (default), \`mobile\` overrides narrow screens.
|
|
78
|
-
`
|
|
79
|
-
};
|
|
80
|
-
//#endregion
|
|
81
|
-
export { styleResource };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
//#region src/modules/mcp/resources/glossary/styleSelector.ts
|
|
2
|
-
var styleSelectorResource = {
|
|
3
|
-
uri: "plitzi://docs/style-selector",
|
|
4
|
-
name: "Plitzi Docs: Style Selector",
|
|
5
|
-
description: "A CSS selector entry in the Plitzi style system — holds all visual rules for one selector across states and variants.",
|
|
6
|
-
mimeType: "text/markdown",
|
|
7
|
-
content: `# Style Selector (StyleItem)
|
|
8
|
-
|
|
9
|
-
A **style selector** is a single entry in \`style.platform[displayMode]\`. It represents one CSS selector (class, element, or ID) and stores all its CSS rules organized by sub-selector, state, and variant.
|
|
10
|
-
|
|
11
|
-
## TypeScript Shape
|
|
12
|
-
|
|
13
|
-
\`\`\`typescript
|
|
14
|
-
type StyleItem = {
|
|
15
|
-
name: string; // The CSS selector (e.g. '.hero-section')
|
|
16
|
-
type: 'class' | 'element' | 'id';
|
|
17
|
-
variables?: Partial<StyleVariables>; // Design tokens scoped to this selector
|
|
18
|
-
attributes: Record<string, StyleBlock>; // CSS per sub-selector slot
|
|
19
|
-
cache: string; // Pre-compiled CSS (auto-managed)
|
|
20
|
-
componentType?: string; // Plugin type that created this selector
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
type StyleBlock = {
|
|
24
|
-
default?: StyleObject; // Normal state CSS
|
|
25
|
-
states?: Partial<Record<StyleState, StyleObject>>;// Pseudo-class overrides
|
|
26
|
-
variants?: Record<string, Omit<StyleBlock, 'variants'>>; // Named variants
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
type StyleState = 'hover' | 'active' | 'focus' | 'disabled' | 'checked' | 'visited';
|
|
30
|
-
type StyleObject = Partial<Record<StyleCategory, string | number>>;
|
|
31
|
-
\`\`\`
|
|
32
|
-
|
|
33
|
-
## Sub-selector Slots
|
|
34
|
-
|
|
35
|
-
The \`attributes\` object is keyed by **slot names**, not raw CSS selectors. Each slot maps to a structural part of the component:
|
|
36
|
-
|
|
37
|
-
- \`base\` — always present; targets the root DOM element of the component.
|
|
38
|
-
- Other slots (e.g. \`header\`, \`body\`, \`icon\`, \`label\`) target internal parts defined by the plugin.
|
|
39
|
-
|
|
40
|
-
The mapping from slot name → CSS selector is managed by the plugin renderer.
|
|
41
|
-
|
|
42
|
-
## Variants
|
|
43
|
-
|
|
44
|
-
Variants allow a single selector to have multiple named visual appearances (e.g. \`primary\`, \`danger\`, \`sm\`, \`lg\`). An element activates a variant through \`definition.initialState.styleVariant\`:
|
|
45
|
-
|
|
46
|
-
\`\`\`typescript
|
|
47
|
-
// element.definition.initialState.styleVariant
|
|
48
|
-
{
|
|
49
|
-
base: { base: 'primary' } // Apply 'primary' variant on the 'base' slot
|
|
50
|
-
}
|
|
51
|
-
\`\`\`
|
|
52
|
-
|
|
53
|
-
## Relationship to Elements
|
|
54
|
-
|
|
55
|
-
Elements reference style selectors via \`definition.styleSelectors\`:
|
|
56
|
-
|
|
57
|
-
\`\`\`typescript
|
|
58
|
-
// element.definition.styleSelectors
|
|
59
|
-
{
|
|
60
|
-
base: '.hero-section', // Points to style.platform.desktop['.hero-section']
|
|
61
|
-
title: '.hero-title' // Points to style.platform.desktop['.hero-title']
|
|
62
|
-
}
|
|
63
|
-
\`\`\`
|
|
64
|
-
|
|
65
|
-
## Display Modes
|
|
66
|
-
|
|
67
|
-
A style selector can exist in multiple display modes (\`desktop\`, \`tablet\`, \`mobile\`). Rules in \`tablet\` and \`mobile\` override the desktop base at their respective breakpoints.
|
|
68
|
-
|
|
69
|
-
## Common Operations
|
|
70
|
-
|
|
71
|
-
- \`create_style_selector\` — add a new StyleItem to a display mode.
|
|
72
|
-
- \`update_style_selector\` — modify \`attributes\` for an existing selector.
|
|
73
|
-
- \`delete_style_selector\` — remove a selector from a display mode.
|
|
74
|
-
`
|
|
75
|
-
};
|
|
76
|
-
//#endregion
|
|
77
|
-
export { styleSelectorResource };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
//#region src/modules/mcp/resources/glossary/styleVariable.ts
|
|
2
|
-
var styleVariableResource = {
|
|
3
|
-
uri: "plitzi://docs/style-variable",
|
|
4
|
-
name: "Plitzi Docs: Style Variable",
|
|
5
|
-
description: "Design tokens in the Plitzi style system — reusable values for colors, spacing, shadows, and custom properties.",
|
|
6
|
-
mimeType: "text/markdown",
|
|
7
|
-
content: `# Style Variable
|
|
8
|
-
|
|
9
|
-
**Style variables** are design tokens stored in the \`Style\` object. They define reusable values (colors, spacing units, shadows, custom properties) that can be referenced across all CSS rules in the space.
|
|
10
|
-
|
|
11
|
-
## TypeScript Shape
|
|
12
|
-
|
|
13
|
-
\`\`\`typescript
|
|
14
|
-
enum StyleVariableCategory {
|
|
15
|
-
COLOR = 'color',
|
|
16
|
-
SPACING = 'spacing',
|
|
17
|
-
SHADOW = 'shadow',
|
|
18
|
-
CUSTOM = 'custom'
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
type StyleVariables = Record<StyleVariableCategory, StyleVariableGroup>;
|
|
22
|
-
type StyleVariableGroup = Record<string, StyleVariableValue>;
|
|
23
|
-
|
|
24
|
-
// Value can be a plain string/number or theme-aware (different per light/dark)
|
|
25
|
-
type StyleVariableValue =
|
|
26
|
-
| string
|
|
27
|
-
| number
|
|
28
|
-
| {
|
|
29
|
-
light?: string;
|
|
30
|
-
dark?: string;
|
|
31
|
-
default?: string;
|
|
32
|
-
};
|
|
33
|
-
\`\`\`
|
|
34
|
-
|
|
35
|
-
## Categories
|
|
36
|
-
|
|
37
|
-
- **\`color\`** — color tokens (e.g. \`primary\`, \`background\`, \`text-muted\`). Values can be theme-aware (different for light vs. dark).
|
|
38
|
-
- **\`spacing\`** — spacing units (e.g. \`sm\`, \`md\`, \`lg\`). Plain numbers or CSS values.
|
|
39
|
-
- **\`shadow\`** — box-shadow definitions (e.g. \`card\`, \`modal\`).
|
|
40
|
-
- **\`custom\`** — any other token (border radius, font size, z-index, etc.).
|
|
41
|
-
|
|
42
|
-
## Theme-Aware Values
|
|
43
|
-
|
|
44
|
-
When a design system supports multiple themes, a variable value can vary:
|
|
45
|
-
|
|
46
|
-
\`\`\`typescript
|
|
47
|
-
{ light: '#ffffff', dark: '#1a1a1a', default: '#ffffff' }
|
|
48
|
-
\`\`\`
|
|
49
|
-
|
|
50
|
-
The \`default\` key is used when no theme preference is detected.
|
|
51
|
-
|
|
52
|
-
## Scope
|
|
53
|
-
|
|
54
|
-
Variables can be scoped at two levels:
|
|
55
|
-
|
|
56
|
-
1. **Style-level** (\`style.variables\`) — global tokens available everywhere in the space.
|
|
57
|
-
2. **Selector-level** (\`styleItem.variables\`) — tokens scoped to one CSS selector (override global for that component).
|
|
58
|
-
|
|
59
|
-
## Common Operations
|
|
60
|
-
|
|
61
|
-
- \`create_style_variable\` — add a new token with a category and name.
|
|
62
|
-
- \`update_style_variable\` — change a token's value.
|
|
63
|
-
- \`delete_style_variable\` — remove a token.
|
|
64
|
-
|
|
65
|
-
## Relationships
|
|
66
|
-
|
|
67
|
-
- Referenced by **Style Selectors** via CSS variable syntax or direct value interpolation.
|
|
68
|
-
- **Schema Variables** are different — they are schema-level data variables, not CSS design tokens.
|
|
69
|
-
`
|
|
70
|
-
};
|
|
71
|
-
//#endregion
|
|
72
|
-
export { styleVariableResource };
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { bindingResource } from "./glossary/binding.js";
|
|
2
|
-
import { collectionResource } from "./glossary/collection.js";
|
|
3
|
-
import { displayModeResource } from "./glossary/displayMode.js";
|
|
4
|
-
import { elementResource } from "./glossary/element.js";
|
|
5
|
-
import { environmentResource } from "./glossary/environment.js";
|
|
6
|
-
import { interactionResource } from "./glossary/interaction.js";
|
|
7
|
-
import { pageResource } from "./glossary/page.js";
|
|
8
|
-
import { pluginResource } from "./glossary/plugin.js";
|
|
9
|
-
import { resourceResource } from "./glossary/resource.js";
|
|
10
|
-
import { schemaResource } from "./glossary/schema.js";
|
|
11
|
-
import { schemaVariableResource } from "./glossary/schemaVariable.js";
|
|
12
|
-
import { segmentResource } from "./glossary/segment.js";
|
|
13
|
-
import { spaceResource } from "./glossary/space.js";
|
|
14
|
-
import { styleResource } from "./glossary/style.js";
|
|
15
|
-
import { styleSelectorResource } from "./glossary/styleSelector.js";
|
|
16
|
-
import { styleVariableResource } from "./glossary/styleVariable.js";
|
|
17
|
-
import { workflowDataResource } from "./workflows/data.js";
|
|
18
|
-
import { workflowElementsResource } from "./workflows/elements.js";
|
|
19
|
-
import { workflowSegmentsResource } from "./workflows/segments.js";
|
|
20
|
-
import { workflowStylesResource } from "./workflows/styles.js";
|
|
21
|
-
//#region src/modules/mcp/resources/index.ts
|
|
22
|
-
var glossaryResources = [
|
|
23
|
-
schemaResource,
|
|
24
|
-
elementResource,
|
|
25
|
-
pageResource,
|
|
26
|
-
styleResource,
|
|
27
|
-
styleSelectorResource,
|
|
28
|
-
styleVariableResource,
|
|
29
|
-
segmentResource,
|
|
30
|
-
pluginResource,
|
|
31
|
-
collectionResource,
|
|
32
|
-
spaceResource,
|
|
33
|
-
environmentResource,
|
|
34
|
-
schemaVariableResource,
|
|
35
|
-
resourceResource,
|
|
36
|
-
bindingResource,
|
|
37
|
-
interactionResource,
|
|
38
|
-
displayModeResource
|
|
39
|
-
];
|
|
40
|
-
var workflowResources = [
|
|
41
|
-
workflowElementsResource,
|
|
42
|
-
workflowStylesResource,
|
|
43
|
-
workflowSegmentsResource,
|
|
44
|
-
workflowDataResource
|
|
45
|
-
];
|
|
46
|
-
var registerResources = (server, custom = [], onRead) => {
|
|
47
|
-
for (const r of [
|
|
48
|
-
...glossaryResources,
|
|
49
|
-
...workflowResources,
|
|
50
|
-
...custom
|
|
51
|
-
]) server.registerResource(r.name, r.uri, {
|
|
52
|
-
description: r.description,
|
|
53
|
-
mimeType: r.mimeType
|
|
54
|
-
}, () => {
|
|
55
|
-
onRead?.(r.name, r.uri);
|
|
56
|
-
return { contents: [{
|
|
57
|
-
uri: r.uri,
|
|
58
|
-
mimeType: r.mimeType,
|
|
59
|
-
text: r.content
|
|
60
|
-
}] };
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
var allResources = [...glossaryResources, ...workflowResources];
|
|
64
|
-
var getResourceList = () => allResources.map(({ uri, name, description }) => ({
|
|
65
|
-
uri,
|
|
66
|
-
name,
|
|
67
|
-
description
|
|
68
|
-
}));
|
|
69
|
-
var getResourceByUri = (uri) => allResources.find((r) => r.uri === uri);
|
|
70
|
-
//#endregion
|
|
71
|
-
export { allResources, getResourceByUri, getResourceList, registerResources };
|