@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,94 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { OpResult, Space } from '../../../helpers';
|
|
3
|
+
import { Env } from '../../../types';
|
|
4
|
+
export declare const patchConnectorOp: z.ZodObject<{
|
|
5
|
+
type: z.ZodLiteral<"patchConnector">;
|
|
6
|
+
ref: z.ZodString;
|
|
7
|
+
name: z.ZodOptional<z.ZodString>;
|
|
8
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
9
|
+
connection: z.ZodOptional<z.ZodObject<{
|
|
10
|
+
credential: z.ZodOptional<z.ZodString>;
|
|
11
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
in: z.ZodEnum<{
|
|
13
|
+
query: "query";
|
|
14
|
+
header: "header";
|
|
15
|
+
}>;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
value: z.ZodString;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
20
|
+
pagination: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
page: "page";
|
|
22
|
+
cursor: "cursor";
|
|
23
|
+
offset: "offset";
|
|
24
|
+
}>>;
|
|
25
|
+
operators: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
26
|
+
mediaBaseUrl: z.ZodOptional<z.ZodString>;
|
|
27
|
+
fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
28
|
+
number: "number";
|
|
29
|
+
file: "file";
|
|
30
|
+
text: "text";
|
|
31
|
+
color: "color";
|
|
32
|
+
link: "link";
|
|
33
|
+
image: "image";
|
|
34
|
+
video: "video";
|
|
35
|
+
switch: "switch";
|
|
36
|
+
email: "email";
|
|
37
|
+
date: "date";
|
|
38
|
+
richText: "richText";
|
|
39
|
+
multiImage: "multiImage";
|
|
40
|
+
phone: "phone";
|
|
41
|
+
option: "option";
|
|
42
|
+
}>>>;
|
|
43
|
+
projection: z.ZodOptional<z.ZodLiteral<"full">>;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
endpoints: z.ZodOptional<z.ZodObject<{
|
|
46
|
+
read: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodObject<{
|
|
47
|
+
itemsPath: z.ZodOptional<z.ZodString>;
|
|
48
|
+
totalPath: z.ZodOptional<z.ZodString>;
|
|
49
|
+
idPath: z.ZodOptional<z.ZodString>;
|
|
50
|
+
valuesPath: z.ZodOptional<z.ZodString>;
|
|
51
|
+
path: z.ZodString;
|
|
52
|
+
method: z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
GET: "GET";
|
|
54
|
+
POST: "POST";
|
|
55
|
+
PUT: "PUT";
|
|
56
|
+
PATCH: "PATCH";
|
|
57
|
+
DELETE: "DELETE";
|
|
58
|
+
HEAD: "HEAD";
|
|
59
|
+
OPTIONS: "OPTIONS";
|
|
60
|
+
}>>;
|
|
61
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
62
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
63
|
+
body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
64
|
+
pagination: z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
page: "page";
|
|
66
|
+
cursor: "cursor";
|
|
67
|
+
offset: "offset";
|
|
68
|
+
}>>;
|
|
69
|
+
}, z.core.$strip>>>>;
|
|
70
|
+
write: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodObject<{
|
|
71
|
+
method: z.ZodEnum<{
|
|
72
|
+
GET: "GET";
|
|
73
|
+
POST: "POST";
|
|
74
|
+
PUT: "PUT";
|
|
75
|
+
PATCH: "PATCH";
|
|
76
|
+
DELETE: "DELETE";
|
|
77
|
+
HEAD: "HEAD";
|
|
78
|
+
OPTIONS: "OPTIONS";
|
|
79
|
+
}>;
|
|
80
|
+
path: z.ZodString;
|
|
81
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
82
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
83
|
+
bodyPath: z.ZodOptional<z.ZodString>;
|
|
84
|
+
response: z.ZodOptional<z.ZodObject<{
|
|
85
|
+
itemsPath: z.ZodOptional<z.ZodString>;
|
|
86
|
+
totalPath: z.ZodOptional<z.ZodString>;
|
|
87
|
+
idPath: z.ZodOptional<z.ZodString>;
|
|
88
|
+
valuesPath: z.ZodOptional<z.ZodString>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
}, z.core.$strip>>>>;
|
|
91
|
+
}, z.core.$strip>>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
export type PatchConnector = z.infer<typeof patchConnectorOp>;
|
|
94
|
+
export declare const patchConnector: (space: Space, env: Env, op: PatchConnector) => OpResult;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { findConnectorEntry } from "../../../helpers/space.js";
|
|
2
|
+
import { connectorUri, connectorsUri } from "../../../helpers/uris.js";
|
|
3
|
+
import { empty, fail } from "../../../helpers/opResult.js";
|
|
4
|
+
import { connectorConnection, readEndpoint, writeEndpoint } from "./manifest.js";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
//#region src/modules/mcp/tools/operations/connectors/patchConnector.ts
|
|
7
|
+
var patchConnectorOp = z.object({
|
|
8
|
+
type: z.literal("patchConnector"),
|
|
9
|
+
ref: z.string().describe("Identifier of the connector to change"),
|
|
10
|
+
name: z.string().optional(),
|
|
11
|
+
baseUrl: z.string().optional(),
|
|
12
|
+
connection: connectorConnection.optional().describe("Connection settings to change; the rest are preserved"),
|
|
13
|
+
endpoints: z.object({
|
|
14
|
+
read: z.record(z.string(), readEndpoint.nullable()).optional(),
|
|
15
|
+
write: z.record(z.string(), writeEndpoint.nullable()).optional()
|
|
16
|
+
}).optional().describe("Endpoints merged BY NAME: the ones you do not list are preserved, one set to null is removed")
|
|
17
|
+
}).describe("Change part of a connector, preserving everything you do not send — the way to add one endpoint to a large manifest without resending it. Never creates; use upsertConnector for that.");
|
|
18
|
+
/** Overlay endpoints by name onto the stored map: a listed name replaces, a null removes, an unlisted one is
|
|
19
|
+
* preserved. One helper for both maps — the merge rule is the same and only the value type differs. */
|
|
20
|
+
var mergeEndpoints = (current, patch) => {
|
|
21
|
+
if (!patch) return current;
|
|
22
|
+
const removed = new Set(Object.entries(patch).filter(([, endpoint]) => endpoint === null).map(([name]) => name));
|
|
23
|
+
const kept = Object.entries({
|
|
24
|
+
...current,
|
|
25
|
+
...patch
|
|
26
|
+
}).filter(([name]) => !removed.has(name));
|
|
27
|
+
return Object.fromEntries(kept);
|
|
28
|
+
};
|
|
29
|
+
var patchConnector = (space, env, op) => {
|
|
30
|
+
const entry = findConnectorEntry(space, op.ref);
|
|
31
|
+
if (!entry) return fail("ref", `Connector "${op.ref}" does not exist`, `Create it with upsertConnector, or read ${connectorsUri(env)} for the connectors this space has`, space.connectors.map((item) => item.id));
|
|
32
|
+
const { manifest } = entry;
|
|
33
|
+
if (op.name !== void 0) entry.name = op.name;
|
|
34
|
+
if (op.baseUrl !== void 0) manifest.baseUrl = op.baseUrl;
|
|
35
|
+
const connection = op.connection ?? {};
|
|
36
|
+
if (connection.credential !== void 0) manifest.credential = connection.credential;
|
|
37
|
+
if (connection.auth !== void 0) manifest.auth = connection.auth;
|
|
38
|
+
if (connection.headers !== void 0) manifest.headers = connection.headers;
|
|
39
|
+
if (connection.pagination !== void 0) manifest.pagination = connection.pagination;
|
|
40
|
+
if (connection.operators !== void 0) manifest.operators = connection.operators;
|
|
41
|
+
if (connection.mediaBaseUrl !== void 0) manifest.media = { baseUrl: connection.mediaBaseUrl };
|
|
42
|
+
if (connection.fields !== void 0) manifest.fields = connection.fields;
|
|
43
|
+
if (connection.projection !== void 0) manifest.projection = connection.projection;
|
|
44
|
+
const nextRead = mergeEndpoints(manifest.endpoints.read, op.endpoints?.read);
|
|
45
|
+
const nextWrite = mergeEndpoints(manifest.endpoints.write, op.endpoints?.write);
|
|
46
|
+
if (nextRead && Object.keys(nextRead).length === 0) return fail("endpoints.read", `This would leave connector "${op.ref}" with no read endpoint`, "A connector needs at least one read endpoint to feed an element. Delete the connector if that is the intent");
|
|
47
|
+
manifest.endpoints = {
|
|
48
|
+
read: nextRead ?? {},
|
|
49
|
+
...nextWrite === void 0 ? {} : { write: nextWrite }
|
|
50
|
+
};
|
|
51
|
+
return {
|
|
52
|
+
...empty(),
|
|
53
|
+
updated: 1,
|
|
54
|
+
staleResources: [connectorsUri(env), connectorUri(env, op.ref)]
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
export { patchConnector, patchConnectorOp };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { OpResult, Space } from '../../../helpers';
|
|
3
|
+
import { Env } from '../../../types';
|
|
4
|
+
import { ConnectorManifest } from '@plitzi/sdk-shared';
|
|
5
|
+
export declare const upsertConnectorOp: z.ZodObject<{
|
|
6
|
+
type: z.ZodLiteral<"upsertConnector">;
|
|
7
|
+
ref: z.ZodString;
|
|
8
|
+
name: z.ZodString;
|
|
9
|
+
baseUrl: z.ZodString;
|
|
10
|
+
connection: z.ZodOptional<z.ZodObject<{
|
|
11
|
+
credential: z.ZodOptional<z.ZodString>;
|
|
12
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
in: z.ZodEnum<{
|
|
14
|
+
query: "query";
|
|
15
|
+
header: "header";
|
|
16
|
+
}>;
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
value: z.ZodString;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
21
|
+
pagination: z.ZodOptional<z.ZodEnum<{
|
|
22
|
+
page: "page";
|
|
23
|
+
cursor: "cursor";
|
|
24
|
+
offset: "offset";
|
|
25
|
+
}>>;
|
|
26
|
+
operators: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
27
|
+
mediaBaseUrl: z.ZodOptional<z.ZodString>;
|
|
28
|
+
fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
29
|
+
number: "number";
|
|
30
|
+
file: "file";
|
|
31
|
+
text: "text";
|
|
32
|
+
color: "color";
|
|
33
|
+
link: "link";
|
|
34
|
+
image: "image";
|
|
35
|
+
video: "video";
|
|
36
|
+
switch: "switch";
|
|
37
|
+
email: "email";
|
|
38
|
+
date: "date";
|
|
39
|
+
richText: "richText";
|
|
40
|
+
multiImage: "multiImage";
|
|
41
|
+
phone: "phone";
|
|
42
|
+
option: "option";
|
|
43
|
+
}>>>;
|
|
44
|
+
projection: z.ZodOptional<z.ZodLiteral<"full">>;
|
|
45
|
+
}, z.core.$strip>>;
|
|
46
|
+
endpoints: z.ZodObject<{
|
|
47
|
+
read: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
48
|
+
itemsPath: z.ZodOptional<z.ZodString>;
|
|
49
|
+
totalPath: z.ZodOptional<z.ZodString>;
|
|
50
|
+
idPath: z.ZodOptional<z.ZodString>;
|
|
51
|
+
valuesPath: z.ZodOptional<z.ZodString>;
|
|
52
|
+
path: z.ZodString;
|
|
53
|
+
method: z.ZodOptional<z.ZodEnum<{
|
|
54
|
+
GET: "GET";
|
|
55
|
+
POST: "POST";
|
|
56
|
+
PUT: "PUT";
|
|
57
|
+
PATCH: "PATCH";
|
|
58
|
+
DELETE: "DELETE";
|
|
59
|
+
HEAD: "HEAD";
|
|
60
|
+
OPTIONS: "OPTIONS";
|
|
61
|
+
}>>;
|
|
62
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
63
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
64
|
+
body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
65
|
+
pagination: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
page: "page";
|
|
67
|
+
cursor: "cursor";
|
|
68
|
+
offset: "offset";
|
|
69
|
+
}>>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
write: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
72
|
+
method: z.ZodEnum<{
|
|
73
|
+
GET: "GET";
|
|
74
|
+
POST: "POST";
|
|
75
|
+
PUT: "PUT";
|
|
76
|
+
PATCH: "PATCH";
|
|
77
|
+
DELETE: "DELETE";
|
|
78
|
+
HEAD: "HEAD";
|
|
79
|
+
OPTIONS: "OPTIONS";
|
|
80
|
+
}>;
|
|
81
|
+
path: z.ZodString;
|
|
82
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
83
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
84
|
+
bodyPath: z.ZodOptional<z.ZodString>;
|
|
85
|
+
response: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
itemsPath: z.ZodOptional<z.ZodString>;
|
|
87
|
+
totalPath: z.ZodOptional<z.ZodString>;
|
|
88
|
+
idPath: z.ZodOptional<z.ZodString>;
|
|
89
|
+
valuesPath: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$strip>>;
|
|
91
|
+
}, z.core.$strip>>>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
export type UpsertConnector = z.infer<typeof upsertConnectorOp>;
|
|
95
|
+
/** The stored manifest the engine reads. `id` is stamped from the ref, never taken from the input, and the media
|
|
96
|
+
* origin is nested the way the engine expects it. */
|
|
97
|
+
export declare const toManifest: (op: UpsertConnector) => ConnectorManifest;
|
|
98
|
+
export declare const upsertConnector: (space: Space, env: Env, op: UpsertConnector) => OpResult;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { findConnectorEntry } from "../../../helpers/space.js";
|
|
2
|
+
import { connectorUri, connectorsUri } from "../../../helpers/uris.js";
|
|
3
|
+
import { empty } from "../../../helpers/opResult.js";
|
|
4
|
+
import { connectorConnection, readEndpoint, writeEndpoint } from "./manifest.js";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
//#region src/modules/mcp/tools/operations/connectors/upsertConnector.ts
|
|
7
|
+
var upsertConnectorOp = z.object({
|
|
8
|
+
type: z.literal("upsertConnector"),
|
|
9
|
+
ref: z.string().describe("Identifier of the connector, chosen by you and stable forever: it is what a provider element stores. Letters, numbers, hyphens and underscores, starting with a letter (e.g. \"strapi-blog\")."),
|
|
10
|
+
name: z.string().describe("Human name shown in the builder"),
|
|
11
|
+
baseUrl: z.string().describe("Origin every endpoint path is appended to, e.g. \"https://cms.example.com\""),
|
|
12
|
+
connection: connectorConnection.optional(),
|
|
13
|
+
endpoints: z.object({
|
|
14
|
+
read: z.record(z.string(), readEndpoint).describe("Read endpoints by name. `list` is the one an element addresses when it names none"),
|
|
15
|
+
write: z.record(z.string(), writeEndpoint).optional().describe("Omit for a read-only connector")
|
|
16
|
+
}).describe("Every request this connector knows how to make")
|
|
17
|
+
}).describe("Create a connector, or REPLACE the whole manifest of an existing one (send every endpoint you want to keep; use patchConnector to change part of it). A connector is a declarative REST client the SERVER executes: it holds the base URL, the auth template and the endpoints, so integrating a CMS is configuration, not code.");
|
|
18
|
+
/** The stored manifest the engine reads. `id` is stamped from the ref, never taken from the input, and the media
|
|
19
|
+
* origin is nested the way the engine expects it. */
|
|
20
|
+
var toManifest = (op) => {
|
|
21
|
+
const connection = op.connection ?? {};
|
|
22
|
+
return {
|
|
23
|
+
id: op.ref,
|
|
24
|
+
baseUrl: op.baseUrl,
|
|
25
|
+
...connection.credential === void 0 ? {} : { credential: connection.credential },
|
|
26
|
+
...connection.auth === void 0 ? {} : { auth: connection.auth },
|
|
27
|
+
...connection.headers === void 0 ? {} : { headers: connection.headers },
|
|
28
|
+
endpoints: {
|
|
29
|
+
read: op.endpoints.read,
|
|
30
|
+
...op.endpoints.write === void 0 ? {} : { write: op.endpoints.write }
|
|
31
|
+
},
|
|
32
|
+
...connection.pagination === void 0 ? {} : { pagination: connection.pagination },
|
|
33
|
+
...connection.operators === void 0 ? {} : { operators: connection.operators },
|
|
34
|
+
...connection.mediaBaseUrl === void 0 ? {} : { media: { baseUrl: connection.mediaBaseUrl } },
|
|
35
|
+
...connection.fields === void 0 ? {} : { fields: connection.fields },
|
|
36
|
+
...connection.projection === void 0 ? {} : { projection: connection.projection }
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
var upsertConnector = (space, env, op) => {
|
|
40
|
+
const manifest = toManifest(op);
|
|
41
|
+
const existing = findConnectorEntry(space, op.ref);
|
|
42
|
+
const stale = [connectorsUri(env), connectorUri(env, op.ref)];
|
|
43
|
+
if (existing) {
|
|
44
|
+
existing.name = op.name;
|
|
45
|
+
existing.manifest = manifest;
|
|
46
|
+
return {
|
|
47
|
+
...empty(),
|
|
48
|
+
updated: 1,
|
|
49
|
+
staleResources: stale
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
space.connectors.push({
|
|
53
|
+
id: op.ref,
|
|
54
|
+
name: op.name,
|
|
55
|
+
manifest
|
|
56
|
+
});
|
|
57
|
+
return {
|
|
58
|
+
...empty(),
|
|
59
|
+
created: 1,
|
|
60
|
+
staleResources: stale
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
export { toManifest, upsertConnector, upsertConnectorOp };
|