@plitzi/sdk-mcp 0.33.0
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 +15 -0
- package/README.md +175 -0
- package/dist/createServer.d.ts +11 -0
- package/dist/createServer.js +36 -0
- package/dist/createServer.test.d.ts +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +21 -0
- package/dist/modules/ai/AIEngine.d.ts +20 -0
- package/dist/modules/ai/AIEngine.js +120 -0
- package/dist/modules/ai/index.d.ts +4 -0
- package/dist/modules/ai/toolkit.d.ts +17 -0
- package/dist/modules/ai/toolkit.js +59 -0
- package/dist/modules/ai/toolkit.test.d.ts +1 -0
- package/dist/modules/mcp/apps/apps.test.d.ts +1 -0
- package/dist/modules/mcp/apps/example/index.d.ts +8 -0
- package/dist/modules/mcp/apps/example/view/index.tsx +70 -0
- package/dist/modules/mcp/apps/index.d.ts +11 -0
- package/dist/modules/mcp/apps/index.js +16 -0
- package/dist/modules/mcp/apps/render/index.d.ts +4 -0
- package/dist/modules/mcp/apps/render/index.js +17 -0
- package/dist/modules/mcp/apps/render/styles.d.ts +10 -0
- package/dist/modules/mcp/apps/render/styles.js +54 -0
- package/dist/modules/mcp/apps/render/styles.test.d.ts +1 -0
- package/dist/modules/mcp/apps/render/view/heldBatch.ts +107 -0
- package/dist/modules/mcp/apps/render/view/index.tsx +314 -0
- package/dist/modules/mcp/apps/render/view/streamProgress.ts +137 -0
- package/dist/modules/mcp/apps/shared/assets.d.ts +10 -0
- package/dist/modules/mcp/apps/shared/assets.js +10 -0
- package/dist/modules/mcp/apps/shared/bundle.d.ts +4 -0
- package/dist/modules/mcp/apps/shared/bundle.js +23 -0
- package/dist/modules/mcp/apps/shared/index.d.ts +3 -0
- package/dist/modules/mcp/apps/shared/page.d.ts +2 -0
- package/dist/modules/mcp/apps/shared/page.js +34 -0
- package/dist/modules/mcp/apps/shared/registerApp.d.ts +5 -0
- package/dist/modules/mcp/apps/shared/registerApp.js +43 -0
- package/dist/modules/mcp/apps/shared/resolve.d.ts +1 -0
- package/dist/modules/mcp/apps/shared/resolve.js +5 -0
- package/dist/modules/mcp/apps/shared/shell.ejs +59 -0
- package/dist/modules/mcp/apps/shared/zodEnglishOnly.d.ts +4 -0
- package/dist/modules/mcp/apps/shared/zodEnglishOnly.js +23 -0
- package/dist/modules/mcp/catalogs/builtinCallbacks.d.ts +19 -0
- package/dist/modules/mcp/catalogs/builtinCallbacks.js +139 -0
- package/dist/modules/mcp/catalogs/builtinComponents.d.ts +4 -0
- package/dist/modules/mcp/catalogs/builtinComponents.js +165 -0
- package/dist/modules/mcp/catalogs/builtinElementCallbacks.d.ts +17 -0
- package/dist/modules/mcp/catalogs/builtinElementCallbacks.js +50 -0
- package/dist/modules/mcp/catalogs/builtinTransformers.d.ts +28 -0
- package/dist/modules/mcp/catalogs/builtinTransformers.js +148 -0
- package/dist/modules/mcp/catalogs/builtinTransformers.test.d.ts +1 -0
- package/dist/modules/mcp/catalogs/builtinUtilities.d.ts +15 -0
- package/dist/modules/mcp/catalogs/builtinUtilities.js +90 -0
- package/dist/modules/mcp/catalogs/cssCatalog/border.d.ts +4 -0
- package/dist/modules/mcp/catalogs/cssCatalog/border.js +30 -0
- package/dist/modules/mcp/catalogs/cssCatalog/box.d.ts +4 -0
- package/dist/modules/mcp/catalogs/cssCatalog/box.js +31 -0
- package/dist/modules/mcp/catalogs/cssCatalog/cssCatalog.test.d.ts +1 -0
- package/dist/modules/mcp/catalogs/cssCatalog/helpers.d.ts +34 -0
- package/dist/modules/mcp/catalogs/cssCatalog/helpers.js +185 -0
- package/dist/modules/mcp/catalogs/cssCatalog/index.d.ts +18 -0
- package/dist/modules/mcp/catalogs/cssCatalog/index.js +131 -0
- package/dist/modules/mcp/catalogs/cssCatalog/layout.d.ts +9 -0
- package/dist/modules/mcp/catalogs/cssCatalog/layout.js +99 -0
- package/dist/modules/mcp/catalogs/cssCatalog/visual.d.ts +8 -0
- package/dist/modules/mcp/catalogs/cssCatalog/visual.js +147 -0
- package/dist/modules/mcp/catalogs/index.d.ts +9 -0
- package/dist/modules/mcp/catalogs/observed.d.ts +46 -0
- package/dist/modules/mcp/catalogs/observed.js +90 -0
- package/dist/modules/mcp/catalogs/paramSpec.d.ts +39 -0
- package/dist/modules/mcp/catalogs/paramSpec.js +69 -0
- package/dist/modules/mcp/catalogs/registry.d.ts +35 -0
- package/dist/modules/mcp/catalogs/registry.js +89 -0
- package/dist/modules/mcp/e2e/connector.test.d.ts +1 -0
- package/dist/modules/mcp/e2e/host.test.d.ts +1 -0
- package/dist/modules/mcp/e2e/index.d.ts +6 -0
- package/dist/modules/mcp/e2e/mcpEndpoint.d.ts +27 -0
- package/dist/modules/mcp/e2e/oauthConnector.test.d.ts +1 -0
- package/dist/modules/mcp/e2e/postMessageChannel.d.ts +22 -0
- package/dist/modules/mcp/e2e/renderingHost.d.ts +39 -0
- package/dist/modules/mcp/handler.d.ts +22 -0
- package/dist/modules/mcp/handler.js +83 -0
- package/dist/modules/mcp/helpers/agentPrompt.d.ts +4 -0
- package/dist/modules/mcp/helpers/agentPrompt.js +104 -0
- package/dist/modules/mcp/helpers/computeVersion.d.ts +1 -0
- package/dist/modules/mcp/helpers/computeVersion.js +16 -0
- package/dist/modules/mcp/helpers/guide.d.ts +4 -0
- package/dist/modules/mcp/helpers/guide.js +608 -0
- package/dist/modules/mcp/helpers/index.d.ts +8 -0
- package/dist/modules/mcp/helpers/interactions.d.ts +30 -0
- package/dist/modules/mcp/helpers/interactions.js +123 -0
- package/dist/modules/mcp/helpers/log.d.ts +8 -0
- package/dist/modules/mcp/helpers/log.js +64 -0
- package/dist/modules/mcp/helpers/log.test.d.ts +1 -0
- package/dist/modules/mcp/helpers/opResult.d.ts +13 -0
- package/dist/modules/mcp/helpers/opResult.js +18 -0
- package/dist/modules/mcp/helpers/space.d.ts +126 -0
- package/dist/modules/mcp/helpers/space.js +314 -0
- package/dist/modules/mcp/helpers/uris.d.ts +33 -0
- package/dist/modules/mcp/helpers/uris.js +50 -0
- package/dist/modules/mcp/index.d.ts +13 -0
- package/dist/modules/mcp/mcp.bench.d.ts +1 -0
- package/dist/modules/mcp/previewClient.d.ts +13 -0
- package/dist/modules/mcp/previewClient.js +31 -0
- package/dist/modules/mcp/proxy/config.d.ts +20 -0
- package/dist/modules/mcp/proxy/config.js +62 -0
- package/dist/modules/mcp/proxy/endpoint.test.d.ts +1 -0
- package/dist/modules/mcp/proxy/fetch.d.ts +18 -0
- package/dist/modules/mcp/proxy/fetch.js +91 -0
- package/dist/modules/mcp/proxy/grant.d.ts +25 -0
- package/dist/modules/mcp/proxy/grant.js +67 -0
- package/dist/modules/mcp/proxy/guard.d.ts +6 -0
- package/dist/modules/mcp/proxy/guard.js +38 -0
- package/dist/modules/mcp/proxy/handler.d.ts +8 -0
- package/dist/modules/mcp/proxy/handler.js +99 -0
- package/dist/modules/mcp/proxy/index.d.ts +8 -0
- package/dist/modules/mcp/proxy/payload.d.ts +8 -0
- package/dist/modules/mcp/proxy/payload.js +29 -0
- package/dist/modules/mcp/proxy/proxy.test.d.ts +1 -0
- package/dist/modules/mcp/proxy/rewrite.d.ts +18 -0
- package/dist/modules/mcp/proxy/rewrite.js +138 -0
- package/dist/modules/mcp/proxy/sign.d.ts +6 -0
- package/dist/modules/mcp/proxy/sign.js +15 -0
- package/dist/modules/mcp/proxy/types.d.ts +45 -0
- package/dist/modules/mcp/proxy/types.js +9 -0
- package/dist/modules/mcp/proxy/wiring.test.d.ts +1 -0
- package/dist/modules/mcp/resources/canonical.d.ts +6 -0
- package/dist/modules/mcp/resources/canonical.js +30 -0
- package/dist/modules/mcp/resources/connectors.d.ts +22 -0
- package/dist/modules/mcp/resources/connectors.js +46 -0
- package/dist/modules/mcp/resources/core.d.ts +5 -0
- package/dist/modules/mcp/resources/core.js +18 -0
- package/dist/modules/mcp/resources/envelope.d.ts +10 -0
- package/dist/modules/mcp/resources/envelope.js +14 -0
- package/dist/modules/mcp/resources/index.d.ts +9 -0
- package/dist/modules/mcp/resources/primer.d.ts +7 -0
- package/dist/modules/mcp/resources/primer.js +33 -0
- package/dist/modules/mcp/resources/register.d.ts +10 -0
- package/dist/modules/mcp/resources/register.js +205 -0
- package/dist/modules/mcp/resources/renderGuide.d.ts +10 -0
- package/dist/modules/mcp/resources/renderGuide.js +451 -0
- package/dist/modules/mcp/resources/router.d.ts +10 -0
- package/dist/modules/mcp/resources/router.js +39 -0
- package/dist/modules/mcp/resources/schema.d.ts +5 -0
- package/dist/modules/mcp/resources/schema.js +43 -0
- package/dist/modules/mcp/resources/style.d.ts +5 -0
- package/dist/modules/mcp/resources/style.js +34 -0
- package/dist/modules/mcp/screenshotClient.d.ts +13 -0
- package/dist/modules/mcp/screenshotClient.js +47 -0
- package/dist/modules/mcp/server.d.ts +31 -0
- package/dist/modules/mcp/server.js +127 -0
- package/dist/modules/mcp/tests/apply.test.d.ts +1 -0
- package/dist/modules/mcp/tests/bindings.test.d.ts +1 -0
- package/dist/modules/mcp/tests/connectors.test.d.ts +1 -0
- package/dist/modules/mcp/tests/css.test.d.ts +1 -0
- package/dist/modules/mcp/tests/helpers.d.ts +13 -0
- package/dist/modules/mcp/tests/interactions.test.d.ts +1 -0
- package/dist/modules/mcp/tests/pages.test.d.ts +1 -0
- package/dist/modules/mcp/tests/reads.test.d.ts +1 -0
- package/dist/modules/mcp/tests/schemaIds.test.d.ts +1 -0
- package/dist/modules/mcp/tests/search.test.d.ts +1 -0
- package/dist/modules/mcp/tests/skill.test.d.ts +1 -0
- package/dist/modules/mcp/tests/styles.test.d.ts +1 -0
- package/dist/modules/mcp/tests/tools.test.d.ts +1 -0
- package/dist/modules/mcp/tests/validation.test.d.ts +1 -0
- package/dist/modules/mcp/tools/apply/dispatch.d.ts +6 -0
- package/dist/modules/mcp/tools/apply/dispatch.js +128 -0
- package/dist/modules/mcp/tools/apply/index.d.ts +656 -0
- package/dist/modules/mcp/tools/apply/index.js +161 -0
- package/dist/modules/mcp/tools/apply/writeResult.d.ts +8 -0
- package/dist/modules/mcp/tools/apply/writeResult.js +37 -0
- package/dist/modules/mcp/tools/index.d.ts +18 -0
- package/dist/modules/mcp/tools/index.js +24 -0
- package/dist/modules/mcp/tools/operations/connectors/deleteConnector.d.ts +9 -0
- package/dist/modules/mcp/tools/operations/connectors/deleteConnector.js +20 -0
- package/dist/modules/mcp/tools/operations/connectors/index.d.ts +188 -0
- package/dist/modules/mcp/tools/operations/connectors/index.js +12 -0
- package/dist/modules/mcp/tools/operations/connectors/manifest.d.ts +89 -0
- package/dist/modules/mcp/tools/operations/connectors/manifest.js +70 -0
- package/dist/modules/mcp/tools/operations/connectors/patchConnector.d.ts +94 -0
- package/dist/modules/mcp/tools/operations/connectors/patchConnector.js +58 -0
- package/dist/modules/mcp/tools/operations/connectors/upsertConnector.d.ts +98 -0
- package/dist/modules/mcp/tools/operations/connectors/upsertConnector.js +64 -0
- package/dist/modules/mcp/tools/operations/index.d.ts +2235 -0
- package/dist/modules/mcp/tools/operations/index.js +55 -0
- package/dist/modules/mcp/tools/operations/schema/bindings/deleteBinding.d.ts +17 -0
- package/dist/modules/mcp/tools/operations/schema/bindings/deleteBinding.js +32 -0
- package/dist/modules/mcp/tools/operations/schema/bindings/patchBinding.d.ts +25 -0
- package/dist/modules/mcp/tools/operations/schema/bindings/patchBinding.js +36 -0
- package/dist/modules/mcp/tools/operations/schema/bindings/upsertBinding.d.ts +27 -0
- package/dist/modules/mcp/tools/operations/schema/bindings/upsertBinding.js +47 -0
- package/dist/modules/mcp/tools/operations/schema/elements/deleteElement.d.ts +10 -0
- package/dist/modules/mcp/tools/operations/schema/elements/deleteElement.js +29 -0
- package/dist/modules/mcp/tools/operations/schema/elements/moveElement.d.ts +16 -0
- package/dist/modules/mcp/tools/operations/schema/elements/moveElement.js +41 -0
- package/dist/modules/mcp/tools/operations/schema/elements/patchElement.d.ts +27 -0
- package/dist/modules/mcp/tools/operations/schema/elements/patchElement.js +60 -0
- package/dist/modules/mcp/tools/operations/schema/elements/repeatElement.d.ts +55 -0
- package/dist/modules/mcp/tools/operations/schema/elements/repeatElement.js +148 -0
- package/dist/modules/mcp/tools/operations/schema/elements/upsertElement.d.ts +16 -0
- package/dist/modules/mcp/tools/operations/schema/elements/upsertElement.js +66 -0
- package/dist/modules/mcp/tools/operations/schema/folders/deleteFolder.d.ts +9 -0
- package/dist/modules/mcp/tools/operations/schema/folders/deleteFolder.js +32 -0
- package/dist/modules/mcp/tools/operations/schema/folders/upsertFolder.d.ts +12 -0
- package/dist/modules/mcp/tools/operations/schema/folders/upsertFolder.js +49 -0
- package/dist/modules/mcp/tools/operations/schema/index.d.ts +21 -0
- package/dist/modules/mcp/tools/operations/schema/interactions/deleteInteraction.d.ts +12 -0
- package/dist/modules/mcp/tools/operations/schema/interactions/deleteInteraction.js +52 -0
- package/dist/modules/mcp/tools/operations/schema/interactions/patchInteractionNode.d.ts +18 -0
- package/dist/modules/mcp/tools/operations/schema/interactions/patchInteractionNode.js +47 -0
- package/dist/modules/mcp/tools/operations/schema/interactions/upsertInteractionFlow.d.ts +27 -0
- package/dist/modules/mcp/tools/operations/schema/interactions/upsertInteractionFlow.js +44 -0
- package/dist/modules/mcp/tools/operations/schema/operations.d.ts +236 -0
- package/dist/modules/mcp/tools/operations/schema/operations.js +41 -0
- package/dist/modules/mcp/tools/operations/schema/pages/deletePage.d.ts +9 -0
- package/dist/modules/mcp/tools/operations/schema/pages/deletePage.js +25 -0
- package/dist/modules/mcp/tools/operations/schema/pages/upsertPage.d.ts +14 -0
- package/dist/modules/mcp/tools/operations/schema/pages/upsertPage.js +77 -0
- package/dist/modules/mcp/tools/operations/schema/settings/patchSettings.d.ts +36 -0
- package/dist/modules/mcp/tools/operations/schema/settings/patchSettings.js +44 -0
- package/dist/modules/mcp/tools/operations/schema/shared.d.ts +106 -0
- package/dist/modules/mcp/tools/operations/schema/shared.js +131 -0
- package/dist/modules/mcp/tools/operations/schema/translator.d.ts +12 -0
- package/dist/modules/mcp/tools/operations/schema/translator.js +216 -0
- package/dist/modules/mcp/tools/operations/schema/variables/deleteVariable.d.ts +9 -0
- package/dist/modules/mcp/tools/operations/schema/variables/deleteVariable.js +18 -0
- package/dist/modules/mcp/tools/operations/schema/variables/upsertVariable.d.ts +16 -0
- package/dist/modules/mcp/tools/operations/schema/variables/upsertVariable.js +42 -0
- package/dist/modules/mcp/tools/operations/schema/write.d.ts +42 -0
- package/dist/modules/mcp/tools/operations/schema/write.js +112 -0
- package/dist/modules/mcp/tools/operations/schemaIds.d.ts +6 -0
- package/dist/modules/mcp/tools/operations/schemaIds.js +58 -0
- package/dist/modules/mcp/tools/operations/style/definitions/deleteDefinition.d.ts +9 -0
- package/dist/modules/mcp/tools/operations/style/definitions/deleteDefinition.js +21 -0
- package/dist/modules/mcp/tools/operations/style/definitions/patchDefinition.d.ts +37 -0
- package/dist/modules/mcp/tools/operations/style/definitions/patchDefinition.js +28 -0
- package/dist/modules/mcp/tools/operations/style/definitions/upsertDefinition.d.ts +37 -0
- package/dist/modules/mcp/tools/operations/style/definitions/upsertDefinition.js +24 -0
- package/dist/modules/mcp/tools/operations/style/definitions/upsertDefinitions.d.ts +41 -0
- package/dist/modules/mcp/tools/operations/style/definitions/upsertDefinitions.js +40 -0
- package/dist/modules/mcp/tools/operations/style/globalStyles/deleteGlobalStyle.d.ts +9 -0
- package/dist/modules/mcp/tools/operations/style/globalStyles/deleteGlobalStyle.js +21 -0
- package/dist/modules/mcp/tools/operations/style/globalStyles/patchGlobalStyle.d.ts +37 -0
- package/dist/modules/mcp/tools/operations/style/globalStyles/patchGlobalStyle.js +28 -0
- package/dist/modules/mcp/tools/operations/style/globalStyles/upsertGlobalStyle.d.ts +37 -0
- package/dist/modules/mcp/tools/operations/style/globalStyles/upsertGlobalStyle.js +24 -0
- package/dist/modules/mcp/tools/operations/style/idStyles/deleteIdStyle.d.ts +9 -0
- package/dist/modules/mcp/tools/operations/style/idStyles/deleteIdStyle.js +21 -0
- package/dist/modules/mcp/tools/operations/style/idStyles/patchIdStyle.d.ts +37 -0
- package/dist/modules/mcp/tools/operations/style/idStyles/patchIdStyle.js +28 -0
- package/dist/modules/mcp/tools/operations/style/idStyles/upsertIdStyle.d.ts +37 -0
- package/dist/modules/mcp/tools/operations/style/idStyles/upsertIdStyle.js +24 -0
- package/dist/modules/mcp/tools/operations/style/index.d.ts +15 -0
- package/dist/modules/mcp/tools/operations/style/operations.d.ts +264 -0
- package/dist/modules/mcp/tools/operations/style/operations.js +29 -0
- package/dist/modules/mcp/tools/operations/style/shared.d.ts +116 -0
- package/dist/modules/mcp/tools/operations/style/shared.js +59 -0
- package/dist/modules/mcp/tools/operations/style/translator.d.ts +12 -0
- package/dist/modules/mcp/tools/operations/style/translator.js +101 -0
- package/dist/modules/mcp/tools/operations/style/variables/deleteStyleVariable.d.ts +15 -0
- package/dist/modules/mcp/tools/operations/style/variables/deleteStyleVariable.js +21 -0
- package/dist/modules/mcp/tools/operations/style/variables/upsertStyleVariable.d.ts +20 -0
- package/dist/modules/mcp/tools/operations/style/variables/upsertStyleVariable.js +22 -0
- package/dist/modules/mcp/tools/operations/style/write.d.ts +12 -0
- package/dist/modules/mcp/tools/operations/style/write.js +108 -0
- package/dist/modules/mcp/tools/preview.d.ts +472 -0
- package/dist/modules/mcp/tools/preview.js +37 -0
- package/dist/modules/mcp/tools/read.d.ts +9 -0
- package/dist/modules/mcp/tools/read.js +51 -0
- package/dist/modules/mcp/tools/render.d.ts +506 -0
- package/dist/modules/mcp/tools/render.js +184 -0
- package/dist/modules/mcp/tools/render.test.d.ts +1 -0
- package/dist/modules/mcp/tools/screenshot.d.ts +656 -0
- package/dist/modules/mcp/tools/screenshot.js +83 -0
- package/dist/modules/mcp/tools/search.d.ts +15 -0
- package/dist/modules/mcp/tools/search.js +115 -0
- package/dist/modules/mcp/tools/shared/expandOperations.d.ts +13 -0
- package/dist/modules/mcp/tools/shared/expandOperations.js +44 -0
- package/dist/modules/mcp/tools/shared/tool.d.ts +72 -0
- package/dist/modules/mcp/tools/shared/tool.js +33 -0
- package/dist/modules/mcp/tools/shared/validator/audit.d.ts +4 -0
- package/dist/modules/mcp/tools/shared/validator/audit.js +124 -0
- package/dist/modules/mcp/tools/shared/validator/batch.d.ts +5 -0
- package/dist/modules/mcp/tools/shared/validator/batch.js +39 -0
- package/dist/modules/mcp/tools/shared/validator/bindings.d.ts +6 -0
- package/dist/modules/mcp/tools/shared/validator/bindings.js +70 -0
- package/dist/modules/mcp/tools/shared/validator/connectors.d.ts +19 -0
- package/dist/modules/mcp/tools/shared/validator/connectors.js +76 -0
- package/dist/modules/mcp/tools/shared/validator/context.d.ts +38 -0
- package/dist/modules/mcp/tools/shared/validator/context.js +35 -0
- package/dist/modules/mcp/tools/shared/validator/css.d.ts +4 -0
- package/dist/modules/mcp/tools/shared/validator/css.js +39 -0
- package/dist/modules/mcp/tools/shared/validator/elements.d.ts +7 -0
- package/dist/modules/mcp/tools/shared/validator/elements.js +68 -0
- package/dist/modules/mcp/tools/shared/validator/index.d.ts +8 -0
- package/dist/modules/mcp/tools/shared/validator/index.js +268 -0
- package/dist/modules/mcp/tools/shared/validator/interactions.d.ts +3 -0
- package/dist/modules/mcp/tools/shared/validator/interactions.js +103 -0
- package/dist/modules/mcp/tools/shared/validator/refs.d.ts +4 -0
- package/dist/modules/mcp/tools/shared/validator/refs.js +28 -0
- package/dist/modules/mcp/tools/validate.d.ts +653 -0
- package/dist/modules/mcp/tools/validate.js +47 -0
- package/dist/modules/mcp/types/aiSchema.d.ts +226 -0
- package/dist/modules/mcp/types/appTypes.d.ts +26 -0
- package/dist/modules/mcp/types/index.d.ts +5 -0
- package/dist/modules/mcp/types/previewTypes.d.ts +25 -0
- package/dist/modules/mcp/types/screenshotTypes.d.ts +29 -0
- package/dist/modules/mcp/types/toolTypes.d.ts +145 -0
- package/dist/modules/oauth/authorize.d.ts +7 -0
- package/dist/modules/oauth/authorize.js +177 -0
- package/dist/modules/oauth/challenge.d.ts +11 -0
- package/dist/modules/oauth/challenge.js +33 -0
- package/dist/modules/oauth/consentPage.d.ts +7 -0
- package/dist/modules/oauth/consentPage.js +118 -0
- package/dist/modules/oauth/metadata.d.ts +40 -0
- package/dist/modules/oauth/metadata.js +69 -0
- package/dist/modules/oauth/oauth.test.d.ts +1 -0
- package/dist/modules/oauth/params.d.ts +5 -0
- package/dist/modules/oauth/params.js +5 -0
- package/dist/modules/oauth/pkce.d.ts +6 -0
- package/dist/modules/oauth/pkce.js +15 -0
- package/dist/modules/oauth/records.d.ts +71 -0
- package/dist/modules/oauth/records.js +46 -0
- package/dist/modules/oauth/register.d.ts +5 -0
- package/dist/modules/oauth/register.js +55 -0
- package/dist/modules/oauth/respond.d.ts +13 -0
- package/dist/modules/oauth/respond.js +44 -0
- package/dist/modules/oauth/token.d.ts +5 -0
- package/dist/modules/oauth/token.js +100 -0
- package/dist/options.d.ts +73 -0
- package/dist/packageBoundary.test.d.ts +1 -0
- package/dist/pipeline.d.ts +12 -0
- package/dist/pipeline.js +29 -0
- package/dist/pipeline.test.d.ts +1 -0
- package/dist/preview/createPreview.d.ts +10 -0
- package/dist/preview/createPreview.js +83 -0
- package/dist/server.d.ts +15 -0
- package/dist/server.js +7 -0
- package/dist/stages/mcp.d.ts +4 -0
- package/dist/stages/mcp.js +30 -0
- package/dist/stages/oauth.d.ts +19 -0
- package/dist/stages/oauth.js +114 -0
- package/dist/stages/preview.d.ts +2 -0
- package/dist/stages/preview.js +37 -0
- package/dist/stages/proxy.d.ts +3 -0
- package/dist/stages/proxy.js +14 -0
- package/dist/tests/httpRequest.d.ts +14 -0
- package/package.json +77 -0
- package/skills/plitzi-render/SKILL.md +174 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
//#region src/modules/mcp/tools/operations/style/translator.ts
|
|
2
|
+
var DISPLAY_MODES = [
|
|
3
|
+
"desktop",
|
|
4
|
+
"tablet",
|
|
5
|
+
"mobile"
|
|
6
|
+
];
|
|
7
|
+
var isClassDefinition = (item) => item.type === "class";
|
|
8
|
+
var definitionRefs = (style) => {
|
|
9
|
+
const refs = /* @__PURE__ */ new Set();
|
|
10
|
+
for (const mode of DISPLAY_MODES) for (const [name, item] of Object.entries(style.platform[mode])) if (isClassDefinition(item)) refs.add(name);
|
|
11
|
+
return Array.from(refs).sort();
|
|
12
|
+
};
|
|
13
|
+
var fillSlot = (target, mode, block) => {
|
|
14
|
+
if (block.default && Object.keys(block.default).length > 0) target[mode] = block.default;
|
|
15
|
+
if (block.states) {
|
|
16
|
+
for (const [state, obj] of Object.entries(block.states)) if (Object.keys(obj).length > 0) {
|
|
17
|
+
(target.states ??= {})[state] ??= {};
|
|
18
|
+
target.states[state][mode] = obj;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
if (block.variants) {
|
|
22
|
+
for (const [name, variant] of Object.entries(block.variants)) if (variant.default && Object.keys(variant.default).length > 0) {
|
|
23
|
+
(target.variants ??= {})[name] ??= {};
|
|
24
|
+
target.variants[name][mode] = variant.default;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var projectItem = (style, ref, accept) => {
|
|
29
|
+
const def = { ref };
|
|
30
|
+
let found = false;
|
|
31
|
+
for (const mode of DISPLAY_MODES) {
|
|
32
|
+
const item = style.platform[mode][ref];
|
|
33
|
+
if (!item || !accept(item)) continue;
|
|
34
|
+
found = true;
|
|
35
|
+
for (const [slot, block] of Object.entries(item.attributes)) if (slot === "base") fillSlot(def, mode, block);
|
|
36
|
+
else fillSlot((def.slots ??= {})[slot] ??= {}, mode, block);
|
|
37
|
+
}
|
|
38
|
+
return found ? def : void 0;
|
|
39
|
+
};
|
|
40
|
+
var definitionToAI = (style, ref) => projectItem(style, ref, isClassDefinition);
|
|
41
|
+
var definitionVariantNames = (style, ref) => {
|
|
42
|
+
const def = definitionToAI(style, ref);
|
|
43
|
+
if (!def) return;
|
|
44
|
+
const result = {};
|
|
45
|
+
const baseVariants = Object.keys(def.variants ?? {});
|
|
46
|
+
if (baseVariants.length > 0) result.base = baseVariants.sort();
|
|
47
|
+
for (const [slot, slotDef] of Object.entries(def.slots ?? {})) {
|
|
48
|
+
const variants = Object.keys(slotDef.variants ?? {});
|
|
49
|
+
if (variants.length > 0) result[slot] = variants.sort();
|
|
50
|
+
}
|
|
51
|
+
return Object.keys(result).length > 0 ? result : void 0;
|
|
52
|
+
};
|
|
53
|
+
var globalStylesForType = (style, componentType) => {
|
|
54
|
+
const isGlobal = (item) => item.type === "element" && item.componentType === componentType;
|
|
55
|
+
const refs = /* @__PURE__ */ new Set();
|
|
56
|
+
for (const mode of DISPLAY_MODES) for (const [name, item] of Object.entries(style.platform[mode])) if (isGlobal(item)) refs.add(name);
|
|
57
|
+
const globals = [];
|
|
58
|
+
for (const ref of Array.from(refs).sort()) {
|
|
59
|
+
const def = projectItem(style, ref, isGlobal);
|
|
60
|
+
if (def) globals.push({
|
|
61
|
+
...def,
|
|
62
|
+
appliesToType: componentType
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return globals;
|
|
66
|
+
};
|
|
67
|
+
var globalStyleToAI = (style, componentType) => {
|
|
68
|
+
const def = projectItem(style, componentType, (item) => item.type === "element" && item.componentType === componentType);
|
|
69
|
+
return def ? {
|
|
70
|
+
...def,
|
|
71
|
+
appliesToType: componentType
|
|
72
|
+
} : void 0;
|
|
73
|
+
};
|
|
74
|
+
var globalStyleTypes = (style) => {
|
|
75
|
+
const types = /* @__PURE__ */ new Set();
|
|
76
|
+
for (const mode of DISPLAY_MODES) for (const item of Object.values(style.platform[mode])) if (item.type === "element" && item.componentType) types.add(item.componentType);
|
|
77
|
+
return Array.from(types).sort();
|
|
78
|
+
};
|
|
79
|
+
var idStyleIds = (style) => {
|
|
80
|
+
const ids = /* @__PURE__ */ new Set();
|
|
81
|
+
for (const mode of DISPLAY_MODES) for (const [name, item] of Object.entries(style.platform[mode])) if (item.type === "id") ids.add(name);
|
|
82
|
+
return Array.from(ids).sort();
|
|
83
|
+
};
|
|
84
|
+
var idStyleToAI = (style, targetId) => {
|
|
85
|
+
const def = projectItem(style, targetId, (item) => item.type === "id");
|
|
86
|
+
return def ? {
|
|
87
|
+
...def,
|
|
88
|
+
targetId
|
|
89
|
+
} : void 0;
|
|
90
|
+
};
|
|
91
|
+
var styleVariablesToAI = (style) => {
|
|
92
|
+
const data = {};
|
|
93
|
+
for (const [category, group] of Object.entries(style.variables)) data[category] = Object.entries(group).map(([name, value]) => ({
|
|
94
|
+
name,
|
|
95
|
+
reference: `var(--${name})`,
|
|
96
|
+
value
|
|
97
|
+
}));
|
|
98
|
+
return data;
|
|
99
|
+
};
|
|
100
|
+
//#endregion
|
|
101
|
+
export { definitionRefs, definitionToAI, definitionVariantNames, globalStyleToAI, globalStyleTypes, globalStylesForType, idStyleIds, idStyleToAI, isClassDefinition, styleVariablesToAI };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Space, OpResult } from '../../../../helpers';
|
|
3
|
+
import { Env } from '../../../../types';
|
|
4
|
+
export declare const deleteStyleVariableOp: z.ZodObject<{
|
|
5
|
+
type: z.ZodLiteral<"deleteStyleVariable">;
|
|
6
|
+
category: z.ZodEnum<{
|
|
7
|
+
color: "color";
|
|
8
|
+
spacing: "spacing";
|
|
9
|
+
shadow: "shadow";
|
|
10
|
+
custom: "custom";
|
|
11
|
+
}>;
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type DeleteStyleVariable = z.infer<typeof deleteStyleVariableOp>;
|
|
15
|
+
export declare const deleteStyleVariable: (space: Space, env: Env, op: DeleteStyleVariable) => OpResult;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { styleVarUri, styleVarsUri } from "../../../../helpers/uris.js";
|
|
2
|
+
import { empty } from "../../../../helpers/opResult.js";
|
|
3
|
+
import { styleCategory } from "../shared.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
//#region src/modules/mcp/tools/operations/style/variables/deleteStyleVariable.ts
|
|
6
|
+
var deleteStyleVariableOp = z.object({
|
|
7
|
+
type: z.literal("deleteStyleVariable"),
|
|
8
|
+
category: styleCategory,
|
|
9
|
+
name: z.string().describe("Token name without the -- prefix")
|
|
10
|
+
}).describe("Delete a design token by category + name.");
|
|
11
|
+
var deleteStyleVariable = (space, env, op) => {
|
|
12
|
+
const group = space.style.variables[op.category];
|
|
13
|
+
if (group) Reflect.deleteProperty(group, op.name);
|
|
14
|
+
return {
|
|
15
|
+
...empty(),
|
|
16
|
+
deleted: 1,
|
|
17
|
+
staleResources: [styleVarUri(env, op.category), styleVarsUri(env)]
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { deleteStyleVariable, deleteStyleVariableOp };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Space, OpResult } from '../../../../helpers';
|
|
3
|
+
import { Env } from '../../../../types';
|
|
4
|
+
export declare const upsertStyleVariableOp: z.ZodObject<{
|
|
5
|
+
type: z.ZodLiteral<"upsertStyleVariable">;
|
|
6
|
+
category: z.ZodEnum<{
|
|
7
|
+
color: "color";
|
|
8
|
+
spacing: "spacing";
|
|
9
|
+
shadow: "shadow";
|
|
10
|
+
custom: "custom";
|
|
11
|
+
}>;
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
14
|
+
light: z.ZodOptional<z.ZodString>;
|
|
15
|
+
dark: z.ZodOptional<z.ZodString>;
|
|
16
|
+
default: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, z.core.$strip>]>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type UpsertStyleVariable = z.infer<typeof upsertStyleVariableOp>;
|
|
20
|
+
export declare const upsertStyleVariable: (space: Space, env: Env, op: UpsertStyleVariable) => OpResult;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { styleVarUri, styleVarsUri } from "../../../../helpers/uris.js";
|
|
2
|
+
import { empty } from "../../../../helpers/opResult.js";
|
|
3
|
+
import { styleCategory, themeValue } from "../shared.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
//#region src/modules/mcp/tools/operations/style/variables/upsertStyleVariable.ts
|
|
6
|
+
var upsertStyleVariableOp = z.object({
|
|
7
|
+
type: z.literal("upsertStyleVariable"),
|
|
8
|
+
category: styleCategory,
|
|
9
|
+
name: z.string().describe("Token name without the -- prefix; referenced in CSS as var(--name)"),
|
|
10
|
+
value: themeValue
|
|
11
|
+
}).describe("Create or update a design token (referenced in CSS as var(--name); value may differ per light/dark).");
|
|
12
|
+
var upsertStyleVariable = (space, env, op) => {
|
|
13
|
+
const group = space.style.variables[op.category] ??= {};
|
|
14
|
+
group[op.name] = op.value;
|
|
15
|
+
return {
|
|
16
|
+
...empty(),
|
|
17
|
+
updated: 1,
|
|
18
|
+
staleResources: [styleVarUri(env, op.category), styleVarsUri(env)]
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { upsertStyleVariable, upsertStyleVariableOp };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DefinitionSlotInput, DefinitionSlotPatch } from './shared';
|
|
2
|
+
import { OpResult } from '../../../helpers';
|
|
3
|
+
import { AIDefinition } from '../../../types';
|
|
4
|
+
import { DisplayMode, Style, TagType } from '@plitzi/sdk-shared';
|
|
5
|
+
export declare const MODES: DisplayMode[];
|
|
6
|
+
export { defUri, defsUri, globalUri, globalsUri, idUri, idsUri, styleVarUri, styleVarsUri } from '../../../helpers';
|
|
7
|
+
export declare const guardKind: (style: Style, ref: string, want: TagType) => OpResult | null;
|
|
8
|
+
export declare const writeStyleItem: (style: Style, ref: string, base: DefinitionSlotInput, slots: Record<string, DefinitionSlotInput> | undefined, itemType: TagType, componentType: string | undefined) => void;
|
|
9
|
+
export declare const mergePatch: (existing: AIDefinition, basePatch: DefinitionSlotPatch, slotsPatch: Record<string, DefinitionSlotPatch> | undefined) => {
|
|
10
|
+
base: DefinitionSlotInput;
|
|
11
|
+
slots: Record<string, DefinitionSlotInput> | undefined;
|
|
12
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { expandShorthand, expandShorthandPatch } from "../../../catalogs/cssCatalog/index.js";
|
|
2
|
+
import { defUri, defsUri, globalUri, globalsUri, idUri, idsUri, styleVarUri, styleVarsUri } from "../../../helpers/uris.js";
|
|
3
|
+
import { fail } from "../../../helpers/opResult.js";
|
|
4
|
+
import processSelector from "@plitzi/sdk-style/helpers/processSelector";
|
|
5
|
+
//#region src/modules/mcp/tools/operations/style/write.ts
|
|
6
|
+
var MODES = [
|
|
7
|
+
"desktop",
|
|
8
|
+
"tablet",
|
|
9
|
+
"mobile"
|
|
10
|
+
];
|
|
11
|
+
var KIND_LABEL = {
|
|
12
|
+
class: "a reusable class definition",
|
|
13
|
+
element: "a global style for an element type",
|
|
14
|
+
id: "an id rule targeting a single element"
|
|
15
|
+
};
|
|
16
|
+
var KIND_TOOL = {
|
|
17
|
+
class: "upsertDefinition/patchDefinition",
|
|
18
|
+
element: "upsertGlobalStyle/patchGlobalStyle",
|
|
19
|
+
id: "upsertIdStyle/patchIdStyle"
|
|
20
|
+
};
|
|
21
|
+
var KIND_FIELD = {
|
|
22
|
+
class: "ref",
|
|
23
|
+
element: "componentType",
|
|
24
|
+
id: "targetId"
|
|
25
|
+
};
|
|
26
|
+
var guardKind = (style, ref, want) => {
|
|
27
|
+
const clash = MODES.map((mode) => style.platform[mode][ref]).find((item) => item !== void 0 && item.type !== want);
|
|
28
|
+
if (!clash) return null;
|
|
29
|
+
return fail(KIND_FIELD[want], `"${ref}" is already ${KIND_LABEL[clash.type]}; it cannot be edited as ${KIND_LABEL[want]}`, `Edit it with ${KIND_TOOL[clash.type]}, or choose a different ${KIND_FIELD[want]}.`);
|
|
30
|
+
};
|
|
31
|
+
var slotToBlocks = (slot) => {
|
|
32
|
+
const perMode = {};
|
|
33
|
+
for (const mode of MODES) {
|
|
34
|
+
const block = {};
|
|
35
|
+
const baseCss = slot[mode];
|
|
36
|
+
if (baseCss && Object.keys(baseCss).length > 0) block.default = expandShorthand(baseCss);
|
|
37
|
+
for (const [state, dm] of Object.entries(slot.states ?? {})) if (dm[mode]) (block.states ??= {})[state] = expandShorthand(dm[mode]);
|
|
38
|
+
for (const [name, dm] of Object.entries(slot.variants ?? {})) if (dm[mode]) (block.variants ??= {})[name] = { default: expandShorthand(dm[mode]) };
|
|
39
|
+
if (Object.keys(block).length > 0) perMode[mode] = block;
|
|
40
|
+
}
|
|
41
|
+
return perMode;
|
|
42
|
+
};
|
|
43
|
+
var writeStyleItem = (style, ref, base, slots, itemType, componentType) => {
|
|
44
|
+
for (const mode of MODES) {
|
|
45
|
+
const attributes = {};
|
|
46
|
+
const baseBlocks = slotToBlocks(base);
|
|
47
|
+
if (baseBlocks[mode]) attributes.base = baseBlocks[mode];
|
|
48
|
+
for (const [slotName, slotDef] of Object.entries(slots ?? {})) {
|
|
49
|
+
const blocks = slotToBlocks(slotDef);
|
|
50
|
+
if (blocks[mode]) attributes[slotName] = blocks[mode];
|
|
51
|
+
}
|
|
52
|
+
if (Object.keys(attributes).length === 0) Reflect.deleteProperty(style.platform[mode], ref);
|
|
53
|
+
else {
|
|
54
|
+
const styleItem = {
|
|
55
|
+
name: ref,
|
|
56
|
+
type: itemType,
|
|
57
|
+
attributes,
|
|
58
|
+
cache: ""
|
|
59
|
+
};
|
|
60
|
+
if (componentType !== void 0) styleItem.componentType = componentType;
|
|
61
|
+
styleItem.cache = processSelector(styleItem);
|
|
62
|
+
style.platform[mode][ref] = styleItem;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var mergeCss = (base, patch) => {
|
|
67
|
+
const merged = { ...base };
|
|
68
|
+
for (const [key, value] of Object.entries(expandShorthandPatch(patch ?? {}))) if (value === null) Reflect.deleteProperty(merged, key);
|
|
69
|
+
else merged[key] = value;
|
|
70
|
+
return Object.keys(merged).length > 0 ? merged : void 0;
|
|
71
|
+
};
|
|
72
|
+
var mergeDisplayMode = (base, patch) => {
|
|
73
|
+
const result = {};
|
|
74
|
+
for (const mode of MODES) {
|
|
75
|
+
const css = mergeCss(base?.[mode], patch?.[mode]);
|
|
76
|
+
if (css) result[mode] = css;
|
|
77
|
+
}
|
|
78
|
+
return result;
|
|
79
|
+
};
|
|
80
|
+
var mergeNamedModes = (base, patch) => {
|
|
81
|
+
const names = /* @__PURE__ */ new Set([...Object.keys(base ?? {}), ...Object.keys(patch ?? {})]);
|
|
82
|
+
const result = {};
|
|
83
|
+
for (const name of names) {
|
|
84
|
+
const dm = mergeDisplayMode(base?.[name], patch?.[name]);
|
|
85
|
+
if (Object.keys(dm).length > 0) result[name] = dm;
|
|
86
|
+
}
|
|
87
|
+
return Object.keys(result).length > 0 ? result : void 0;
|
|
88
|
+
};
|
|
89
|
+
var mergeSlot = (base, patch) => {
|
|
90
|
+
const merged = mergeDisplayMode(base, patch);
|
|
91
|
+
const states = mergeNamedModes(base?.states, patch.states);
|
|
92
|
+
if (states) merged.states = states;
|
|
93
|
+
const variants = mergeNamedModes(base?.variants, patch.variants);
|
|
94
|
+
if (variants) merged.variants = variants;
|
|
95
|
+
return merged;
|
|
96
|
+
};
|
|
97
|
+
var mergePatch = (existing, basePatch, slotsPatch) => {
|
|
98
|
+
const base = mergeSlot(existing, basePatch);
|
|
99
|
+
const slotNames = /* @__PURE__ */ new Set([...Object.keys(existing.slots ?? {}), ...Object.keys(slotsPatch ?? {})]);
|
|
100
|
+
const slots = {};
|
|
101
|
+
for (const name of slotNames) slots[name] = mergeSlot(existing.slots?.[name], slotsPatch?.[name] ?? {});
|
|
102
|
+
return {
|
|
103
|
+
base,
|
|
104
|
+
slots: Object.keys(slots).length > 0 ? slots : void 0
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
//#endregion
|
|
108
|
+
export { MODES, defUri, defsUri, globalUri, globalsUri, guardKind, idUri, idsUri, mergePatch, styleVarUri, styleVarsUri, writeStyleItem };
|