@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,46 @@
|
|
|
1
|
+
import { findConnectorEntry } from "../helpers/space.js";
|
|
2
|
+
import { afterPrefix, connectorUri, connectorsUri } from "../helpers/uris.js";
|
|
3
|
+
import { envelope } from "./envelope.js";
|
|
4
|
+
import { connectorPresets, connectorTokens } from "@plitzi/sdk-shared/connectors";
|
|
5
|
+
//#region src/modules/mcp/resources/connectors.ts
|
|
6
|
+
/** What a provider element needs to know about a connector without opening it: which endpoints it can address,
|
|
7
|
+
* which operators its filters may use, and which fields it publishes. The listing carries this for every
|
|
8
|
+
* connector so choosing one — and wiring an apiContainer to it — takes a single read. */
|
|
9
|
+
var summarize = (entry) => {
|
|
10
|
+
const { manifest } = entry;
|
|
11
|
+
return {
|
|
12
|
+
ref: entry.id,
|
|
13
|
+
name: entry.name,
|
|
14
|
+
baseUrl: manifest.baseUrl,
|
|
15
|
+
read: Object.keys(manifest.endpoints.read),
|
|
16
|
+
write: Object.keys(manifest.endpoints.write ?? {}),
|
|
17
|
+
operators: Object.keys(manifest.operators ?? {}),
|
|
18
|
+
pagination: manifest.pagination,
|
|
19
|
+
credential: manifest.credential,
|
|
20
|
+
fields: manifest.fields
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
var connectorSummaries = (space) => ({ connectors: space.connectors.map(summarize) });
|
|
24
|
+
/** Connector reads: the space's connector listing and one full manifest. Undefined when the URI belongs to
|
|
25
|
+
* another family, null when the shape is ours but the ref does not resolve.
|
|
26
|
+
*
|
|
27
|
+
* The item read returns the manifest verbatim, endpoints and auth template included. That is server-side state
|
|
28
|
+
* the browser never sees, but an agent authoring one has to read back what it wrote — and the manifest holds no
|
|
29
|
+
* secret either way: `credential` names a secret, it does not carry it. */
|
|
30
|
+
var readConnectorResource = (space, env, uri) => {
|
|
31
|
+
if (uri === "plitzi://connector-presets") return envelope({
|
|
32
|
+
presets: connectorPresets.filter((preset) => preset.id !== "blank"),
|
|
33
|
+
tokens: connectorTokens
|
|
34
|
+
});
|
|
35
|
+
if (uri === connectorsUri(env)) return envelope(connectorSummaries(space));
|
|
36
|
+
const ref = afterPrefix(uri, connectorUri(env, ""));
|
|
37
|
+
if (ref === void 0) return;
|
|
38
|
+
const entry = findConnectorEntry(space, ref);
|
|
39
|
+
return entry ? envelope({
|
|
40
|
+
ref: entry.id,
|
|
41
|
+
name: entry.name,
|
|
42
|
+
manifest: entry.manifest
|
|
43
|
+
}) : null;
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { connectorSummaries, readConnectorResource };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Space } from '../helpers';
|
|
2
|
+
import { ResourceEnvelope } from '../types';
|
|
3
|
+
/** Space-independent singletons: the usage guide, the observed type registry and the CSS property catalog.
|
|
4
|
+
* Returns undefined when the URI is not one of these, so the router falls through to the next resolver. */
|
|
5
|
+
export declare const readCoreResource: (space: Space, uri: string) => ResourceEnvelope<unknown> | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cssProperties, cssShorthands } from "../catalogs/cssCatalog/index.js";
|
|
2
|
+
import { buildTypeRegistry } from "../catalogs/registry.js";
|
|
3
|
+
import "../helpers/uris.js";
|
|
4
|
+
import { guideText } from "../helpers/guide.js";
|
|
5
|
+
import { envelope } from "./envelope.js";
|
|
6
|
+
//#region src/modules/mcp/resources/core.ts
|
|
7
|
+
/** Space-independent singletons: the usage guide, the observed type registry and the CSS property catalog.
|
|
8
|
+
* Returns undefined when the URI is not one of these, so the router falls through to the next resolver. */
|
|
9
|
+
var readCoreResource = (space, uri) => {
|
|
10
|
+
if (uri === "plitzi://guide") return envelope(guideText);
|
|
11
|
+
if (uri === "plitzi://types") return envelope(buildTypeRegistry(space.schema, space.catalog));
|
|
12
|
+
if (uri === "plitzi://css-properties") return envelope({
|
|
13
|
+
properties: cssProperties,
|
|
14
|
+
shorthands: cssShorthands
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { readCoreResource };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ResourceEnvelope } from '../types';
|
|
2
|
+
/** Wrap any read projection with the version its optimistic-concurrency checks key on. */
|
|
3
|
+
export declare const envelope: <T>(data: T) => ResourceEnvelope<T>;
|
|
4
|
+
export declare const jsonContents: (uri: string, data: unknown) => {
|
|
5
|
+
contents: {
|
|
6
|
+
uri: string;
|
|
7
|
+
mimeType: string;
|
|
8
|
+
text: string;
|
|
9
|
+
}[];
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { computeVersion } from "../helpers/computeVersion.js";
|
|
2
|
+
//#region src/modules/mcp/resources/envelope.ts
|
|
3
|
+
/** Wrap any read projection with the version its optimistic-concurrency checks key on. */
|
|
4
|
+
var envelope = (data) => ({
|
|
5
|
+
stateVersion: computeVersion(data),
|
|
6
|
+
data
|
|
7
|
+
});
|
|
8
|
+
var jsonContents = (uri, data) => ({ contents: [{
|
|
9
|
+
uri,
|
|
10
|
+
mimeType: "application/json",
|
|
11
|
+
text: JSON.stringify(data)
|
|
12
|
+
}] });
|
|
13
|
+
//#endregion
|
|
14
|
+
export { envelope, jsonContents };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { readPublicResource, readResource, resourceVersion } from './router';
|
|
2
|
+
export { connectorSummaries } from './connectors';
|
|
3
|
+
export { registerResources } from './register';
|
|
4
|
+
export { resourceErrorMessage } from './canonical';
|
|
5
|
+
export { RENDER_GUIDE_URI, RENDER_TYPES_URI } from './renderGuide';
|
|
6
|
+
export { buildTypeRegistry, cssProperties, cssShorthands, expandShorthand, isCssProperty, suggestCssProperty } from '../catalogs';
|
|
7
|
+
export type { TypeInfo, TypePropInfo, TypeRegistry } from '../catalogs';
|
|
8
|
+
export * from '../tools/operations/schema/translator';
|
|
9
|
+
export * from '../tools/operations/style/translator';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Space } from '../helpers';
|
|
2
|
+
import { Env, ResourceEnvelope } from '../types';
|
|
3
|
+
/** The cold-start bundle: everything the guide says to read before the first write, in one round-trip.
|
|
4
|
+
* Summaries only — never full page/element trees (those are opened on demand), so it stays cheap even on a
|
|
5
|
+
* large space. Carries the condensed `guideQuickstart` (not the full guideText, which the agent reads on demand at
|
|
6
|
+
* plitzi://guide) to keep the bundle small. Returns undefined when the URI is not the primer. */
|
|
7
|
+
export declare const readPrimerResource: (space: Space, env: Env, uri: string) => ResourceEnvelope<unknown> | undefined;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { cssProperties, cssShorthands } from "../catalogs/cssCatalog/index.js";
|
|
2
|
+
import { buildDataSourceCatalog, buildInteractionCatalog } from "../catalogs/observed.js";
|
|
3
|
+
import { buildTypeRegistry } from "../catalogs/registry.js";
|
|
4
|
+
import { guideQuickstart } from "../helpers/guide.js";
|
|
5
|
+
import { envelope } from "./envelope.js";
|
|
6
|
+
import { connectorSummaries } from "./connectors.js";
|
|
7
|
+
import { definitionRefs, styleVariablesToAI } from "../tools/operations/style/translator.js";
|
|
8
|
+
import { foldersToAI, pageSummariesToAI, schemaVariablesToAI, settingsToAI } from "../tools/operations/schema/translator.js";
|
|
9
|
+
//#region src/modules/mcp/resources/primer.ts
|
|
10
|
+
/** The cold-start bundle: everything the guide says to read before the first write, in one round-trip.
|
|
11
|
+
* Summaries only — never full page/element trees (those are opened on demand), so it stays cheap even on a
|
|
12
|
+
* large space. Carries the condensed `guideQuickstart` (not the full guideText, which the agent reads on demand at
|
|
13
|
+
* plitzi://guide) to keep the bundle small. Returns undefined when the URI is not the primer. */
|
|
14
|
+
var readPrimerResource = (space, env, uri) => {
|
|
15
|
+
if (uri !== `plitzi://primer/${env}`) return;
|
|
16
|
+
return envelope({
|
|
17
|
+
guide: guideQuickstart,
|
|
18
|
+
types: buildTypeRegistry(space.schema, space.catalog),
|
|
19
|
+
cssProperties,
|
|
20
|
+
cssShorthands,
|
|
21
|
+
pages: pageSummariesToAI(space.schema),
|
|
22
|
+
folders: foldersToAI(space.schema),
|
|
23
|
+
definitions: definitionRefs(space.style),
|
|
24
|
+
styleVariables: styleVariablesToAI(space.style),
|
|
25
|
+
schemaVariables: schemaVariablesToAI(space.schema, false),
|
|
26
|
+
settings: settingsToAI(space.schema),
|
|
27
|
+
interactions: buildInteractionCatalog(space.schema),
|
|
28
|
+
dataSources: buildDataSourceCatalog(space.schema),
|
|
29
|
+
...connectorSummaries(space)
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { readPrimerResource };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { McpLog, Space } from '../helpers';
|
|
2
|
+
import { Env } from '../types';
|
|
3
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
4
|
+
/** Register every resource on the MCP server: fixed listings plus templated per-item reads. The space is
|
|
5
|
+
* loaded lazily via getSpace, so listing resources never touches the store — only reading one does.
|
|
6
|
+
*
|
|
7
|
+
* `hasSpace` is false when the connection reaches no space (a guest / widgets-only grant): the space-dependent
|
|
8
|
+
* families are then not registered at all, so the catalog the agent browses holds only what it can actually
|
|
9
|
+
* open — no listing that answers every read with the same refusal. */
|
|
10
|
+
export declare const registerResources: (server: McpServer, getSpace: () => Promise<Space>, env: Env, log: McpLog, hasSpace: boolean) => void;
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { cssProperties, cssShorthands } from "../catalogs/cssCatalog/index.js";
|
|
2
|
+
import { guideText } from "../helpers/guide.js";
|
|
3
|
+
import { resourceErrorMessage } from "./canonical.js";
|
|
4
|
+
import { envelope, jsonContents } from "./envelope.js";
|
|
5
|
+
import { registerRenderResources } from "./renderGuide.js";
|
|
6
|
+
import { readResource } from "./router.js";
|
|
7
|
+
import { ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
8
|
+
//#region src/modules/mcp/resources/register.ts
|
|
9
|
+
/** Register every resource on the MCP server: fixed listings plus templated per-item reads. The space is
|
|
10
|
+
* loaded lazily via getSpace, so listing resources never touches the store — only reading one does.
|
|
11
|
+
*
|
|
12
|
+
* `hasSpace` is false when the connection reaches no space (a guest / widgets-only grant): the space-dependent
|
|
13
|
+
* families are then not registered at all, so the catalog the agent browses holds only what it can actually
|
|
14
|
+
* open — no listing that answers every read with the same refusal. */
|
|
15
|
+
var registerResources = (server, getSpace, env, log, hasSpace) => {
|
|
16
|
+
const emit = async (uri) => {
|
|
17
|
+
const start = performance.now();
|
|
18
|
+
try {
|
|
19
|
+
const result = readResource(await getSpace(), env, uri);
|
|
20
|
+
if (!result) throw new Error(resourceErrorMessage(env, uri));
|
|
21
|
+
log.resourceRead(uri, performance.now() - start);
|
|
22
|
+
return jsonContents(uri, result);
|
|
23
|
+
} catch (error) {
|
|
24
|
+
log.resourceRead(uri, performance.now() - start, error);
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const emitStatic = (uri, read) => {
|
|
29
|
+
const start = performance.now();
|
|
30
|
+
const result = read();
|
|
31
|
+
log.resourceRead(uri, performance.now() - start);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
server.registerResource("Guide", "plitzi://guide", {
|
|
35
|
+
description: "How to read and write this space with mcp-ai",
|
|
36
|
+
mimeType: "text/markdown"
|
|
37
|
+
}, () => emitStatic("plitzi://guide", () => ({ contents: [{
|
|
38
|
+
uri: "plitzi://guide",
|
|
39
|
+
mimeType: "text/markdown",
|
|
40
|
+
text: guideText
|
|
41
|
+
}] })));
|
|
42
|
+
server.registerResource("CSS properties", "plitzi://css-properties", {
|
|
43
|
+
description: "Valid kebab-case CSS property keys, plus the shorthands that are accepted and auto-expanded",
|
|
44
|
+
mimeType: "application/json"
|
|
45
|
+
}, () => emitStatic("plitzi://css-properties", () => jsonContents("plitzi://css-properties", envelope({
|
|
46
|
+
properties: cssProperties,
|
|
47
|
+
shorthands: cssShorthands
|
|
48
|
+
}))));
|
|
49
|
+
registerRenderResources(server, log);
|
|
50
|
+
if (!hasSpace) return;
|
|
51
|
+
const fixed = [
|
|
52
|
+
[
|
|
53
|
+
"Primer",
|
|
54
|
+
`plitzi://primer/${env}`,
|
|
55
|
+
"Read this FIRST. Cold-start bundle in one call: guide, types, css-properties and SUMMARIES of pages, definitions and variables — summaries only, never full page/element trees, so it stays small even on a large space. Open a page or element on demand afterwards."
|
|
56
|
+
],
|
|
57
|
+
[
|
|
58
|
+
"Element types",
|
|
59
|
+
"plitzi://types",
|
|
60
|
+
"Observed element types with props, slots and subTypes"
|
|
61
|
+
],
|
|
62
|
+
[
|
|
63
|
+
"Pages",
|
|
64
|
+
`plitzi://schema/${env}/pages`,
|
|
65
|
+
"Page summaries (ref, label, elementCount) — no element trees"
|
|
66
|
+
],
|
|
67
|
+
[
|
|
68
|
+
"Folders",
|
|
69
|
+
`plitzi://folders/${env}`,
|
|
70
|
+
"Page folders (the sidebar tree): ref, name, slug, parentId"
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
"Style definitions",
|
|
74
|
+
`plitzi://definitions/${env}`,
|
|
75
|
+
"Style definition refs (names)"
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"Global styles",
|
|
79
|
+
`plitzi://global-styles/${env}`,
|
|
80
|
+
"Element types that have a site-wide global style"
|
|
81
|
+
],
|
|
82
|
+
[
|
|
83
|
+
"Id styles",
|
|
84
|
+
`plitzi://id-styles/${env}`,
|
|
85
|
+
"DOM ids that have an id rule (#id) targeting a single element"
|
|
86
|
+
],
|
|
87
|
+
[
|
|
88
|
+
"Style variables",
|
|
89
|
+
`plitzi://style-variables/${env}`,
|
|
90
|
+
"Design tokens by category"
|
|
91
|
+
],
|
|
92
|
+
[
|
|
93
|
+
"Schema variables",
|
|
94
|
+
`plitzi://schema-variables/${env}`,
|
|
95
|
+
"Space-level values referenced via {{name}}"
|
|
96
|
+
],
|
|
97
|
+
[
|
|
98
|
+
"Settings",
|
|
99
|
+
`plitzi://settings/${env}`,
|
|
100
|
+
"Space-level settings: global customCss and state/auth configuration"
|
|
101
|
+
],
|
|
102
|
+
[
|
|
103
|
+
"Interactions catalog",
|
|
104
|
+
`plitzi://interactions/${env}`,
|
|
105
|
+
"Interaction actions (observed, grouped by node type) plus the built-in vocabularies — globalCallbacks (with their source module), element callbacks and utilities — each with its full param schema, the vocabulary for upsertInteractionFlow"
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
"Data sources catalog",
|
|
109
|
+
`plitzi://data-sources/${env}`,
|
|
110
|
+
"Data-source paths and binding targets observed in this space — the vocabulary for upsertBinding"
|
|
111
|
+
],
|
|
112
|
+
[
|
|
113
|
+
"Connector presets",
|
|
114
|
+
"plitzi://connector-presets",
|
|
115
|
+
"Working starting manifests for Strapi, WordPress, Directus, Contentful and a plain REST API, plus every template token the connector engine binds — read this before writing a connector by hand"
|
|
116
|
+
],
|
|
117
|
+
[
|
|
118
|
+
"Connectors",
|
|
119
|
+
`plitzi://connectors/${env}`,
|
|
120
|
+
"Server-side CMS/API connectors configured for this space: each with the read/write endpoints it can address, the filter operators it accepts and the fields it publishes — what a server-rendered apiContainer points at"
|
|
121
|
+
],
|
|
122
|
+
[
|
|
123
|
+
"Style definitions (schema alias)",
|
|
124
|
+
`plitzi://schema/${env}/definitions`,
|
|
125
|
+
"Alias of plitzi://definitions/{env}"
|
|
126
|
+
],
|
|
127
|
+
[
|
|
128
|
+
"Style variables (schema alias)",
|
|
129
|
+
`plitzi://schema/${env}/style-variables`,
|
|
130
|
+
"Alias of plitzi://style-variables/{env}"
|
|
131
|
+
],
|
|
132
|
+
[
|
|
133
|
+
"Schema variables (schema alias)",
|
|
134
|
+
`plitzi://schema/${env}/schema-variables`,
|
|
135
|
+
"Alias of plitzi://schema-variables/{env}"
|
|
136
|
+
]
|
|
137
|
+
];
|
|
138
|
+
for (const [name, uri, description] of fixed) server.registerResource(name, uri, {
|
|
139
|
+
description,
|
|
140
|
+
mimeType: "application/json"
|
|
141
|
+
}, () => emit(uri));
|
|
142
|
+
const templates = [
|
|
143
|
+
[
|
|
144
|
+
"Page",
|
|
145
|
+
`plitzi://schema/${env}/pages/{ref}`,
|
|
146
|
+
"One page as a skeleton tree (ref/type/label/children), no props"
|
|
147
|
+
],
|
|
148
|
+
[
|
|
149
|
+
"Page styles",
|
|
150
|
+
`plitzi://schema/${env}/pages/{ref}/styles`,
|
|
151
|
+
"Every style a page uses in one read: class definitions its elements attach (with CSS) + global styles"
|
|
152
|
+
],
|
|
153
|
+
[
|
|
154
|
+
"Element",
|
|
155
|
+
`plitzi://schema/${env}/elements/{ref}`,
|
|
156
|
+
"One element in full detail (props, style) by ref or id"
|
|
157
|
+
],
|
|
158
|
+
[
|
|
159
|
+
"Folder",
|
|
160
|
+
`plitzi://folders/${env}/{ref}`,
|
|
161
|
+
"One page folder (name, slug, parentId) by folder id"
|
|
162
|
+
],
|
|
163
|
+
[
|
|
164
|
+
"Connector",
|
|
165
|
+
`plitzi://connectors/${env}/{ref}`,
|
|
166
|
+
"One connector manifest in full: baseUrl, auth template, every read/write endpoint and its response mapping"
|
|
167
|
+
],
|
|
168
|
+
[
|
|
169
|
+
"Style definition",
|
|
170
|
+
`plitzi://definitions/${env}/{ref}`,
|
|
171
|
+
"One style definition (CSS) by class ref"
|
|
172
|
+
],
|
|
173
|
+
[
|
|
174
|
+
"Global style",
|
|
175
|
+
`plitzi://global-styles/${env}/{componentType}`,
|
|
176
|
+
"The site-wide CSS applied to every element of one type"
|
|
177
|
+
],
|
|
178
|
+
[
|
|
179
|
+
"Id style",
|
|
180
|
+
`plitzi://id-styles/${env}/{targetId}`,
|
|
181
|
+
"The CSS of an id rule (#id) targeting a single element"
|
|
182
|
+
],
|
|
183
|
+
[
|
|
184
|
+
"Style variables by category",
|
|
185
|
+
`plitzi://style-variables/${env}/{category}`,
|
|
186
|
+
"Design tokens for one category"
|
|
187
|
+
],
|
|
188
|
+
[
|
|
189
|
+
"Style definition (schema alias)",
|
|
190
|
+
`plitzi://schema/${env}/definitions/{ref}`,
|
|
191
|
+
"Alias of plitzi://definitions/{env}/{ref}"
|
|
192
|
+
],
|
|
193
|
+
[
|
|
194
|
+
"Style variables by category (schema alias)",
|
|
195
|
+
`plitzi://schema/${env}/style-variables/{category}`,
|
|
196
|
+
"Alias of plitzi://style-variables/{env}/{category}"
|
|
197
|
+
]
|
|
198
|
+
];
|
|
199
|
+
for (const [name, tpl, description] of templates) server.registerResource(name, new ResourceTemplate(tpl, { list: void 0 }), {
|
|
200
|
+
description,
|
|
201
|
+
mimeType: "application/json"
|
|
202
|
+
}, (uri) => emit(uri.href));
|
|
203
|
+
};
|
|
204
|
+
//#endregion
|
|
205
|
+
export { registerResources };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { McpLog } from '../helpers';
|
|
2
|
+
import { ResourceEnvelope } from '../types';
|
|
3
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
4
|
+
export declare const RENDER_GUIDE_URI = "plitzi://render/guide";
|
|
5
|
+
export declare const RENDER_TYPES_URI = "plitzi://render/types";
|
|
6
|
+
/** The same two documents through the READ path (the router, hence plitzi_read), not only as MCP resources: an
|
|
7
|
+
* agent that reaches for the batch-read tool — the reflex the guide itself teaches — must not be told its own
|
|
8
|
+
* authoring guide does not exist. Space-independent, like the core singletons. */
|
|
9
|
+
export declare const readRenderResource: (uri: string) => ResourceEnvelope<unknown> | undefined;
|
|
10
|
+
export declare const registerRenderResources: (server: McpServer, log: McpLog) => void;
|