@lightdash-tools/mcp 0.6.0 → 0.8.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/README.md +205 -58
- package/dist/audit/audit.d.ts +5 -0
- package/dist/{audit.js → audit/audit.js} +1 -2
- package/dist/audit/tool-audit-context.d.ts +6 -0
- package/dist/audit/tool-audit-context.js +12 -0
- package/dist/audit/tool-audit-context.test.d.ts +1 -0
- package/dist/audit/tool-audit-context.test.js +19 -0
- package/dist/auth/auth-mode.d.ts +4 -0
- package/dist/auth/auth-mode.js +6 -0
- package/dist/auth/bearer.d.ts +3 -0
- package/dist/auth/bearer.js +13 -0
- package/dist/auth/lightdash-oauth-upstream-contract.d.ts +22 -0
- package/dist/auth/lightdash-oauth-upstream-contract.js +36 -0
- package/dist/auth/lightdash-oauth-upstream-contract.test.d.ts +1 -0
- package/dist/auth/lightdash-oauth-upstream-contract.test.js +56 -0
- package/dist/auth/oauth-broker/as-metadata.d.ts +14 -0
- package/dist/auth/oauth-broker/as-metadata.js +20 -0
- package/dist/auth/oauth-broker/lightdash-token.d.ts +20 -0
- package/dist/auth/oauth-broker/lightdash-token.js +76 -0
- package/dist/auth/oauth-broker/pending-store.d.ts +127 -0
- package/dist/auth/oauth-broker/pending-store.js +151 -0
- package/dist/auth/oauth-broker/pending-store.test.d.ts +6 -0
- package/dist/auth/oauth-broker/pending-store.test.js +146 -0
- package/dist/auth/oauth-broker/pkce.d.ts +2 -0
- package/dist/auth/oauth-broker/pkce.js +17 -0
- package/dist/auth/oauth-broker/routes.d.ts +13 -0
- package/dist/auth/oauth-broker/routes.js +452 -0
- package/dist/auth/oauth-broker/routes.test.d.ts +1 -0
- package/dist/auth/oauth-broker/routes.test.js +242 -0
- package/dist/auth/providers/bearer-context-provider.d.ts +24 -0
- package/dist/auth/providers/bearer-context-provider.js +52 -0
- package/dist/auth/providers/env-context-provider.d.ts +13 -0
- package/dist/auth/providers/env-context-provider.js +19 -0
- package/dist/auth/resource-server/lightdash-oauth-middleware.d.ts +23 -0
- package/dist/auth/resource-server/lightdash-oauth-middleware.js +115 -0
- package/dist/auth/resource-server/lightdash-oauth-middleware.test.d.ts +1 -0
- package/dist/auth/resource-server/lightdash-oauth-middleware.test.js +202 -0
- package/dist/auth/resource-server/lightdash-token-validation.d.ts +14 -0
- package/dist/auth/resource-server/lightdash-token-validation.js +82 -0
- package/dist/auth/resource-server/lightdash-token-validation.test.d.ts +1 -0
- package/dist/auth/resource-server/lightdash-token-validation.test.js +177 -0
- package/dist/auth/resource-server/oauth-protected-resource.d.ts +25 -0
- package/dist/auth/resource-server/oauth-protected-resource.js +67 -0
- package/dist/auth/resource-server/shared-key-middleware.d.ts +13 -0
- package/dist/auth/resource-server/shared-key-middleware.js +24 -0
- package/dist/auth/resource-server/token-scopes.d.ts +15 -0
- package/dist/auth/resource-server/token-scopes.js +76 -0
- package/dist/auth/resource-server/token-scopes.test.d.ts +1 -0
- package/dist/auth/resource-server/token-scopes.test.js +51 -0
- package/dist/auth/resource-server/token-validation-cache.d.ts +15 -0
- package/dist/auth/resource-server/token-validation-cache.js +44 -0
- package/dist/auth/resource-server/token-validation-cache.test.d.ts +1 -0
- package/dist/auth/resource-server/token-validation-cache.test.js +41 -0
- package/dist/auth/resource-server/token-validation-error.d.ts +6 -0
- package/dist/auth/resource-server/token-validation-error.js +13 -0
- package/dist/auth/resource-server/www-authenticate.d.ts +8 -0
- package/dist/auth/resource-server/www-authenticate.js +24 -0
- package/dist/auth/resource-server/www-authenticate.test.d.ts +1 -0
- package/dist/auth/resource-server/www-authenticate.test.js +70 -0
- package/dist/auth/token-hash.d.ts +2 -0
- package/dist/auth/token-hash.js +8 -0
- package/dist/bin.d.ts +0 -4
- package/dist/bin.js +62 -33
- package/dist/config/env.d.ts +57 -0
- package/dist/config/env.js +60 -0
- package/dist/config/load-mcp-config.d.ts +30 -0
- package/dist/config/load-mcp-config.js +286 -0
- package/dist/config/load-mcp-config.test.d.ts +1 -0
- package/dist/config/load-mcp-config.test.js +202 -0
- package/dist/config/normalize-url.d.ts +13 -0
- package/dist/config/normalize-url.js +52 -0
- package/dist/config/normalize-url.test.d.ts +1 -0
- package/dist/config/normalize-url.test.js +47 -0
- package/dist/config/public-url.d.ts +3 -0
- package/dist/config/public-url.js +10 -0
- package/dist/config/runtime.d.ts +15 -0
- package/dist/config/runtime.js +48 -0
- package/dist/config/runtime.test.d.ts +1 -0
- package/dist/config/runtime.test.js +69 -0
- package/dist/config/test-mcp-http-config.d.ts +3 -0
- package/dist/config/test-mcp-http-config.js +7 -0
- package/dist/destructive/capability.d.ts +13 -0
- package/dist/destructive/capability.js +37 -0
- package/dist/destructive/capability.test.d.ts +1 -0
- package/dist/destructive/capability.test.js +46 -0
- package/dist/destructive/confirmation-claim.d.ts +21 -0
- package/dist/destructive/confirmation-claim.js +87 -0
- package/dist/destructive/confirmation-claim.test.d.ts +1 -0
- package/dist/destructive/confirmation-claim.test.js +50 -0
- package/dist/destructive/confirmation.d.ts +58 -0
- package/dist/destructive/confirmation.js +99 -0
- package/dist/destructive/confirmation.test.d.ts +1 -0
- package/dist/destructive/confirmation.test.js +75 -0
- package/dist/destructive/content-promote.d.ts +8 -0
- package/dist/destructive/content-promote.js +144 -0
- package/dist/destructive/content-soft-delete.d.ts +7 -0
- package/dist/destructive/content-soft-delete.js +106 -0
- package/dist/destructive/destructive-contract.test.d.ts +1 -0
- package/dist/destructive/destructive-contract.test.js +269 -0
- package/dist/destructive/precondition.d.ts +14 -0
- package/dist/destructive/precondition.js +31 -0
- package/dist/destructive/precondition.test.d.ts +1 -0
- package/dist/destructive/precondition.test.js +72 -0
- package/dist/destructive/promote-contract.test.d.ts +1 -0
- package/dist/destructive/promote-contract.test.js +339 -0
- package/dist/destructive/register-destructive-tool.d.ts +54 -0
- package/dist/destructive/register-destructive-tool.js +301 -0
- package/dist/destructive/request-state.d.ts +16 -0
- package/dist/destructive/request-state.js +76 -0
- package/dist/destructive/types.d.ts +64 -0
- package/dist/destructive/types.js +10 -0
- package/dist/governance/mcp-client-session.d.ts +9 -0
- package/dist/governance/mcp-client-session.js +30 -0
- package/dist/governance/mcp-client-session.test.d.ts +1 -0
- package/dist/governance/mcp-client-session.test.js +31 -0
- package/dist/governance/project-pin.d.ts +14 -0
- package/dist/governance/project-pin.js +44 -0
- package/dist/governance/project-pin.test.d.ts +1 -0
- package/dist/governance/project-pin.test.js +35 -0
- package/dist/governance/project-scope.d.ts +38 -0
- package/dist/governance/project-scope.js +79 -0
- package/dist/governance/project-scope.test.d.ts +4 -0
- package/dist/governance/project-scope.test.js +103 -0
- package/dist/http.d.ts +1 -2
- package/dist/http.integration.test.d.ts +1 -0
- package/dist/http.integration.test.js +722 -0
- package/dist/http.js +3 -170
- package/dist/http.test.d.ts +4 -0
- package/dist/http.test.js +131 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.integration.test.js +73 -30
- package/dist/index.js +28 -27
- package/dist/index.test.js +3 -3
- package/dist/logging/structured.d.ts +27 -0
- package/dist/logging/structured.js +32 -0
- package/dist/logging/structured.test.d.ts +1 -0
- package/dist/logging/structured.test.js +33 -0
- package/dist/personas/content-developer/v1/index.d.ts +10 -0
- package/dist/personas/content-developer/v1/index.js +51 -0
- package/dist/personas/content-developer/v1/prompts.d.ts +5 -0
- package/dist/personas/content-developer/v1/prompts.js +138 -0
- package/dist/personas/content-developer/v1/prompts.test.d.ts +4 -0
- package/dist/personas/content-developer/v1/prompts.test.js +75 -0
- package/dist/personas/content-developer/v1/resources/playbooks/content-move.md +15 -0
- package/dist/personas/content-developer/v1/resources/playbooks/core.md +63 -0
- package/dist/personas/content-developer/v1/resources/playbooks/dashboards.md +55 -0
- package/dist/personas/content-developer/v1/resources/playbooks/index.md +13 -0
- package/dist/personas/content-developer/v1/resources/playbooks.d.ts +10 -0
- package/dist/personas/content-developer/v1/resources/playbooks.js +44 -0
- package/dist/personas/content-governance/v1/index.d.ts +9 -0
- package/dist/personas/content-governance/v1/index.js +29 -0
- package/dist/personas/content-governance/v1/prompts.d.ts +5 -0
- package/dist/personas/content-governance/v1/prompts.js +87 -0
- package/dist/personas/content-governance/v1/prompts.test.d.ts +4 -0
- package/dist/personas/content-governance/v1/prompts.test.js +75 -0
- package/dist/personas/content-governance/v1/resources/playbooks/charts.md +29 -0
- package/dist/personas/content-governance/v1/resources/playbooks/core.md +52 -0
- package/dist/personas/content-governance/v1/resources/playbooks/dashboards.md +48 -0
- package/dist/personas/content-governance/v1/resources/playbooks/index.md +13 -0
- package/dist/personas/content-governance/v1/resources/playbooks.d.ts +10 -0
- package/dist/personas/content-governance/v1/resources/playbooks.js +41 -0
- package/dist/personas/content-reader/v1/index.d.ts +8 -0
- package/dist/personas/content-reader/v1/index.js +37 -0
- package/dist/personas/content-reader/v1/prompts.d.ts +5 -0
- package/dist/personas/content-reader/v1/prompts.js +128 -0
- package/dist/personas/content-reader/v1/prompts.test.d.ts +4 -0
- package/dist/personas/content-reader/v1/prompts.test.js +25 -0
- package/dist/personas/content-reader/v1/resources/playbooks/compare.md +21 -0
- package/dist/personas/content-reader/v1/resources/playbooks/core.md +40 -0
- package/dist/personas/content-reader/v1/resources/playbooks/discover.md +13 -0
- package/dist/personas/content-reader/v1/resources/playbooks/explain-run.md +19 -0
- package/dist/personas/content-reader/v1/resources/playbooks/index.md +14 -0
- package/dist/personas/content-reader/v1/resources/playbooks.d.ts +10 -0
- package/dist/personas/content-reader/v1/resources/playbooks.js +49 -0
- package/dist/personas/index.d.ts +22 -0
- package/dist/personas/index.js +73 -0
- package/dist/personas/index.test.d.ts +1 -0
- package/dist/personas/index.test.js +109 -0
- package/dist/personas/lib/playbook-resources.d.ts +79 -0
- package/dist/personas/lib/playbook-resources.js +165 -0
- package/dist/personas/organization-audit/v1/index.d.ts +8 -0
- package/dist/personas/organization-audit/v1/index.js +42 -0
- package/dist/personas/organization-audit/v1/prompts.d.ts +5 -0
- package/dist/personas/organization-audit/v1/prompts.js +92 -0
- package/dist/personas/organization-audit/v1/prompts.test.d.ts +4 -0
- package/dist/personas/organization-audit/v1/prompts.test.js +25 -0
- package/dist/personas/organization-audit/v1/resources/playbooks/access.md +13 -0
- package/dist/personas/organization-audit/v1/resources/playbooks/content.md +9 -0
- package/dist/personas/organization-audit/v1/resources/playbooks/core.md +36 -0
- package/dist/personas/organization-audit/v1/resources/playbooks/deliveries.md +9 -0
- package/dist/personas/organization-audit/v1/resources/playbooks/index.md +14 -0
- package/dist/personas/organization-audit/v1/resources/playbooks.d.ts +10 -0
- package/dist/personas/organization-audit/v1/resources/playbooks.js +41 -0
- package/dist/personas/persona.parity.test.d.ts +1 -0
- package/dist/personas/persona.parity.test.js +26 -0
- package/dist/personas/semantic-layer/v1/index.d.ts +8 -0
- package/dist/personas/semantic-layer/v1/index.js +32 -0
- package/dist/personas/semantic-layer/v1/prompts.d.ts +5 -0
- package/dist/personas/semantic-layer/v1/prompts.js +85 -0
- package/dist/personas/semantic-layer/v1/prompts.test.d.ts +4 -0
- package/dist/personas/semantic-layer/v1/prompts.test.js +19 -0
- package/dist/personas/semantic-layer/v1/resources/playbooks/compose-compile.md +55 -0
- package/dist/personas/semantic-layer/v1/resources/playbooks/core.md +39 -0
- package/dist/personas/semantic-layer/v1/resources/playbooks/explore.md +76 -0
- package/dist/personas/semantic-layer/v1/resources/playbooks/index.md +13 -0
- package/dist/personas/semantic-layer/v1/resources/playbooks.d.ts +13 -0
- package/dist/personas/semantic-layer/v1/resources/playbooks.js +39 -0
- package/dist/personas/types.d.ts +19 -0
- package/dist/personas/types.js +5 -0
- package/dist/policy/content-developer.d.ts +35 -0
- package/dist/policy/content-developer.js +91 -0
- package/dist/policy/content-developer.test.d.ts +4 -0
- package/dist/policy/content-developer.test.js +48 -0
- package/dist/policy/content-reader.d.ts +24 -0
- package/dist/policy/content-reader.js +52 -0
- package/dist/policy/content-reader.test.d.ts +4 -0
- package/dist/policy/content-reader.test.js +22 -0
- package/dist/policy/envelope.d.ts +31 -0
- package/dist/policy/envelope.js +24 -0
- package/dist/policy/preview-ledger-fault.test.d.ts +1 -0
- package/dist/policy/preview-ledger-fault.test.js +527 -0
- package/dist/policy/preview-ledger.d.ts +118 -0
- package/dist/policy/preview-ledger.js +243 -0
- package/dist/policy/preview-ledger.test.d.ts +1 -0
- package/dist/policy/preview-ledger.test.js +267 -0
- package/dist/policy/result-limits.d.ts +27 -0
- package/dist/policy/result-limits.js +107 -0
- package/dist/policy/result-limits.test.d.ts +4 -0
- package/dist/policy/result-limits.test.js +28 -0
- package/dist/protocol-contract.test.d.ts +1 -0
- package/dist/protocol-contract.test.js +42 -0
- package/dist/server/capabilities.d.ts +15 -0
- package/dist/server/capabilities.js +19 -0
- package/dist/server/capabilities.test.d.ts +1 -0
- package/dist/server/capabilities.test.js +41 -0
- package/dist/server/errors.test.d.ts +1 -0
- package/dist/server/errors.test.js +53 -0
- package/dist/server/request-context.d.ts +13 -0
- package/dist/server/request-context.js +2 -0
- package/dist/server/server.d.ts +4 -0
- package/dist/server/server.js +28 -0
- package/dist/server/server.test.d.ts +1 -0
- package/dist/server/server.test.js +15 -0
- package/dist/server/version.d.ts +1 -0
- package/dist/server/version.js +7 -0
- package/dist/server/version.test.d.ts +1 -0
- package/dist/server/version.test.js +9 -0
- package/dist/stdio.process.test.d.ts +1 -0
- package/dist/stdio.process.test.js +274 -0
- package/dist/store/config.d.ts +11 -0
- package/dist/store/config.js +50 -0
- package/dist/store/config.test.d.ts +1 -0
- package/dist/store/config.test.js +56 -0
- package/dist/store/create-oauth-broker-store.d.ts +6 -0
- package/dist/store/create-oauth-broker-store.js +16 -0
- package/dist/store/create-preview-store.d.ts +10 -0
- package/dist/store/create-preview-store.js +30 -0
- package/dist/store/create-session-store.d.ts +19 -0
- package/dist/store/create-session-store.js +24 -0
- package/dist/store/in-memory-preview-store.d.ts +17 -0
- package/dist/store/in-memory-preview-store.js +72 -0
- package/dist/store/redis-client.d.ts +11 -0
- package/dist/store/redis-client.js +48 -0
- package/dist/store/redis-oauth-broker-store.d.ts +42 -0
- package/dist/store/redis-oauth-broker-store.js +167 -0
- package/dist/store/redis-oauth-broker-store.test.d.ts +1 -0
- package/dist/store/redis-oauth-broker-store.test.js +80 -0
- package/dist/store/redis-preview-store.d.ts +23 -0
- package/dist/store/redis-preview-store.js +94 -0
- package/dist/store/redis-preview-store.test.d.ts +1 -0
- package/dist/store/redis-preview-store.test.js +39 -0
- package/dist/store/redis-session-index.d.ts +33 -0
- package/dist/store/redis-session-index.js +49 -0
- package/dist/store/types.d.ts +13 -0
- package/dist/store/types.js +8 -0
- package/dist/tools/composition/explain-content.d.ts +6 -0
- package/dist/tools/composition/explain-content.js +108 -0
- package/dist/tools/index.d.ts +2 -4
- package/dist/tools/index.js +4 -30
- package/dist/tools/index.test.d.ts +1 -0
- package/dist/tools/index.test.js +72 -0
- package/dist/tools/lib/api-errors.d.ts +11 -0
- package/dist/tools/lib/api-errors.js +27 -0
- package/dist/tools/lib/api-shape.d.ts +16 -0
- package/dist/tools/lib/api-shape.js +47 -0
- package/dist/tools/lib/assert-safe.d.ts +13 -0
- package/dist/tools/lib/assert-safe.js +21 -0
- package/dist/tools/lib/assert-safe.test.d.ts +4 -0
- package/dist/tools/lib/assert-safe.test.js +32 -0
- package/dist/tools/lib/concurrency.d.ts +4 -0
- package/dist/tools/lib/concurrency.js +24 -0
- package/dist/tools/lib/contracts.d.ts +34 -0
- package/dist/tools/lib/contracts.js +30 -0
- package/dist/tools/lib/redaction.d.ts +107 -0
- package/dist/tools/lib/redaction.js +299 -0
- package/dist/tools/lib/redaction.test.d.ts +4 -0
- package/dist/tools/lib/redaction.test.js +216 -0
- package/dist/tools/lib/register-org-audit.d.ts +9 -0
- package/dist/tools/lib/register-org-audit.js +20 -0
- package/dist/tools/lib/schema-fields.d.ts +9 -0
- package/dist/tools/lib/schema-fields.js +19 -0
- package/dist/tools/lib/stable-stringify.d.ts +9 -0
- package/dist/tools/lib/stable-stringify.js +35 -0
- package/dist/tools/organization/binding.d.ts +14 -0
- package/dist/tools/organization/binding.js +31 -0
- package/dist/tools/organization/invariants.test.d.ts +4 -0
- package/dist/tools/organization/invariants.test.js +28 -0
- package/dist/tools/organization/inventory.d.ts +10 -0
- package/dist/tools/organization/inventory.js +189 -0
- package/dist/tools/organization/roles.d.ts +10 -0
- package/dist/tools/organization/roles.js +213 -0
- package/dist/tools/project/content.d.ts +9 -0
- package/dist/tools/project/content.js +192 -0
- package/dist/tools/project/delete-chart.d.ts +4 -0
- package/dist/tools/project/delete-chart.js +8 -0
- package/dist/tools/project/delete-dashboard.d.ts +4 -0
- package/dist/tools/project/delete-dashboard.js +8 -0
- package/dist/tools/project/developer-content-preview.d.ts +12 -0
- package/dist/tools/project/developer-content-preview.js +286 -0
- package/dist/tools/project/developer-content-shared.d.ts +18 -0
- package/dist/tools/project/developer-content-shared.js +46 -0
- package/dist/tools/project/developer-content-shared.test.d.ts +1 -0
- package/dist/tools/project/developer-content-shared.test.js +25 -0
- package/dist/tools/project/developer-content.d.ts +39 -0
- package/dist/tools/project/developer-content.js +584 -0
- package/dist/tools/project/developer-helpers.d.ts +180 -0
- package/dist/tools/project/developer-helpers.js +484 -0
- package/dist/tools/project/developer-helpers.test.d.ts +1 -0
- package/dist/tools/project/developer-helpers.test.js +509 -0
- package/dist/tools/project/get-dashboard-promote-diff.d.ts +6 -0
- package/dist/tools/project/get-dashboard-promote-diff.js +42 -0
- package/dist/tools/project/invariants.test.d.ts +4 -0
- package/dist/tools/project/invariants.test.js +42 -0
- package/dist/tools/project/parameters.d.ts +7 -0
- package/dist/tools/project/parameters.js +74 -0
- package/dist/tools/project/projects.d.ts +10 -0
- package/dist/tools/project/projects.js +102 -0
- package/dist/tools/project/projects.test.d.ts +1 -0
- package/dist/tools/project/projects.test.js +154 -0
- package/dist/tools/project/promote-dashboard.d.ts +4 -0
- package/dist/tools/project/promote-dashboard.js +8 -0
- package/dist/tools/project/reader-content.d.ts +9 -0
- package/dist/tools/project/reader-content.js +208 -0
- package/dist/tools/project/reader-execution.d.ts +7 -0
- package/dist/tools/project/reader-execution.js +214 -0
- package/dist/tools/project/schedulers.d.ts +7 -0
- package/dist/tools/project/schedulers.js +115 -0
- package/dist/tools/project/schemas/chart-upsert.d.ts +33 -0
- package/dist/tools/project/schemas/chart-upsert.js +66 -0
- package/dist/tools/project/schemas/dashboard-tile.d.ts +29 -0
- package/dist/tools/project/schemas/dashboard-tile.js +57 -0
- package/dist/tools/project/schemas/dashboard.d.ts +70 -0
- package/dist/tools/project/schemas/dashboard.js +101 -0
- package/dist/tools/project/schemas/duplicate.d.ts +30 -0
- package/dist/tools/project/schemas/duplicate.js +86 -0
- package/dist/tools/project/schemas/index.d.ts +7 -0
- package/dist/tools/project/schemas/index.js +26 -0
- package/dist/tools/project/schemas/parse-helpers.d.ts +14 -0
- package/dist/tools/project/schemas/parse-helpers.js +34 -0
- package/dist/tools/project/schemas/payload-schemas.test.d.ts +1 -0
- package/dist/tools/project/schemas/payload-schemas.test.js +204 -0
- package/dist/tools/project/spaces.d.ts +7 -0
- package/dist/tools/project/spaces.js +101 -0
- package/dist/tools/query/bounded-saved-query.d.ts +37 -0
- package/dist/tools/query/bounded-saved-query.js +80 -0
- package/dist/tools/query/bounded-saved-query.test.d.ts +4 -0
- package/dist/tools/query/bounded-saved-query.test.js +82 -0
- package/dist/tools/query/chart-source.d.ts +10 -0
- package/dist/tools/query/chart-source.js +36 -0
- package/dist/tools/query/chart-source.test.d.ts +1 -0
- package/dist/tools/query/chart-source.test.js +62 -0
- package/dist/tools/query/filter-overrides.d.ts +34 -0
- package/dist/tools/query/filter-overrides.js +75 -0
- package/dist/tools/query/filter-overrides.test.d.ts +1 -0
- package/dist/tools/query/filter-overrides.test.js +21 -0
- package/dist/tools/query/lifecycle.d.ts +7 -0
- package/dist/tools/query/lifecycle.js +112 -0
- package/dist/tools/query/query-ledger.d.ts +34 -0
- package/dist/tools/query/query-ledger.js +86 -0
- package/dist/tools/query/query-ledger.test.d.ts +1 -0
- package/dist/tools/query/query-ledger.test.js +73 -0
- package/dist/tools/query/reader-tool-helpers.d.ts +12 -0
- package/dist/tools/query/reader-tool-helpers.js +59 -0
- package/dist/tools/query/reader-tool-helpers.test.d.ts +1 -0
- package/dist/tools/query/reader-tool-helpers.test.js +49 -0
- package/dist/tools/query/result-normalizer.d.ts +27 -0
- package/dist/tools/query/result-normalizer.js +133 -0
- package/dist/tools/query/result-normalizer.test.d.ts +1 -0
- package/dist/tools/query/result-normalizer.test.js +41 -0
- package/dist/tools/query/wait-for-async.d.ts +10 -0
- package/dist/tools/query/wait-for-async.js +46 -0
- package/dist/tools/query/wait-for-async.test.d.ts +1 -0
- package/dist/tools/query/wait-for-async.test.js +45 -0
- package/dist/tools/registry.d.ts +225 -0
- package/dist/tools/registry.js +115 -0
- package/dist/tools/semantic/explore-helpers.d.ts +56 -0
- package/dist/tools/semantic/explore-helpers.js +115 -0
- package/dist/tools/semantic/explore-helpers.test.d.ts +1 -0
- package/dist/tools/semantic/explore-helpers.test.js +170 -0
- package/dist/tools/semantic/explores.d.ts +9 -0
- package/dist/tools/semantic/explores.js +80 -0
- package/dist/tools/semantic/metrics.d.ts +7 -0
- package/dist/tools/semantic/metrics.js +53 -0
- package/dist/tools/semantic/query.d.ts +6 -0
- package/dist/tools/semantic/query.js +42 -0
- package/dist/tools/semantic/schema-fields.d.ts +3 -0
- package/dist/tools/semantic/schema-fields.js +7 -0
- package/dist/tools/shared.d.ts +51 -15
- package/dist/tools/shared.js +171 -163
- package/dist/tools/shared.test.js +137 -184
- package/dist/tools/space/access.d.ts +66 -0
- package/dist/tools/space/access.js +322 -0
- package/dist/tools/space/access.test.d.ts +4 -0
- package/dist/tools/space/access.test.js +90 -0
- package/dist/transports/http-body.d.ts +5 -0
- package/dist/transports/http-body.js +50 -0
- package/dist/transports/http-request-utils.d.ts +2 -0
- package/dist/transports/http-request-utils.js +13 -0
- package/dist/transports/http-response.d.ts +6 -0
- package/dist/transports/http-response.js +56 -0
- package/dist/transports/session-store.d.ts +72 -0
- package/dist/transports/session-store.js +143 -0
- package/dist/transports/session-store.test.d.ts +1 -0
- package/dist/transports/session-store.test.js +111 -0
- package/dist/transports/streamable-http.d.ts +9 -0
- package/dist/transports/streamable-http.js +461 -0
- package/dist/transports/streamable-http.test.d.ts +1 -0
- package/dist/transports/streamable-http.test.js +100 -0
- package/package.json +26 -10
- package/dist/audit.d.ts +0 -6
- package/dist/config.d.ts +0 -47
- package/dist/config.js +0 -82
- package/dist/tools/ai-agents.d.ts +0 -6
- package/dist/tools/ai-agents.js +0 -388
- package/dist/tools/charts.d.ts +0 -6
- package/dist/tools/charts.js +0 -55
- package/dist/tools/content.d.ts +0 -6
- package/dist/tools/content.js +0 -37
- package/dist/tools/dashboards.d.ts +0 -6
- package/dist/tools/dashboards.js +0 -28
- package/dist/tools/explores.d.ts +0 -6
- package/dist/tools/explores.js +0 -65
- package/dist/tools/groups.d.ts +0 -6
- package/dist/tools/groups.js +0 -121
- package/dist/tools/metrics.d.ts +0 -6
- package/dist/tools/metrics.js +0 -45
- package/dist/tools/projects.d.ts +0 -6
- package/dist/tools/projects.js +0 -58
- package/dist/tools/query.d.ts +0 -6
- package/dist/tools/query.js +0 -34
- package/dist/tools/schedulers.d.ts +0 -6
- package/dist/tools/schedulers.js +0 -45
- package/dist/tools/spaces.d.ts +0 -6
- package/dist/tools/spaces.js +0 -128
- package/dist/tools/tags.d.ts +0 -6
- package/dist/tools/tags.js +0 -28
- package/dist/tools/users.d.ts +0 -6
- package/dist/tools/users.js +0 -50
- package/src/audit.ts +0 -6
- package/src/bin.ts +0 -58
- package/src/config.ts +0 -83
- package/src/errors.ts +0 -27
- package/src/http.ts +0 -187
- package/src/index.integration.test.ts +0 -57
- package/src/index.test.ts +0 -8
- package/src/index.ts +0 -31
- package/src/tools/ai-agents.ts +0 -759
- package/src/tools/charts.ts +0 -85
- package/src/tools/content.ts +0 -44
- package/src/tools/dashboards.ts +0 -25
- package/src/tools/explores.ts +0 -98
- package/src/tools/groups.ts +0 -180
- package/src/tools/index.ts +0 -35
- package/src/tools/metrics.ts +0 -42
- package/src/tools/projects.ts +0 -74
- package/src/tools/query.ts +0 -47
- package/src/tools/schedulers.ts +0 -42
- package/src/tools/shared.test.ts +0 -365
- package/src/tools/shared.ts +0 -274
- package/src/tools/spaces.ts +0 -217
- package/src/tools/tags.ts +0 -25
- package/src/tools/users.ts +0 -64
- package/tsconfig.json +0 -13
- /package/dist/{errors.d.ts → server/errors.d.ts} +0 -0
- /package/dist/{errors.js → server/errors.js} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Content-developer persona: project-scoped chart/dashboard authoring (ADR-0014).
|
|
4
|
+
* Hybrid authoring behind a hard preview -> validate -> apply gate; no SQL, no delete,
|
|
5
|
+
* no space create/update (spaces are Terraform / out-of-band).
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.contentDeveloperPersona = exports.CONTENT_DEVELOPER_TOOL_IDS = exports.CONTENT_DEVELOPER_PERSONA_PATH = void 0;
|
|
9
|
+
const prompts_js_1 = require("./prompts.js");
|
|
10
|
+
const playbooks_js_1 = require("./resources/playbooks.js");
|
|
11
|
+
exports.CONTENT_DEVELOPER_PERSONA_PATH = '/content-developer/v1/mcp';
|
|
12
|
+
/** Explicit allowlist — must stay a deliberate subset of the shared registry. */
|
|
13
|
+
exports.CONTENT_DEVELOPER_TOOL_IDS = [
|
|
14
|
+
'get_project',
|
|
15
|
+
'search_content',
|
|
16
|
+
'list_spaces',
|
|
17
|
+
'get_space',
|
|
18
|
+
'get_dashboard',
|
|
19
|
+
'get_chart',
|
|
20
|
+
'preview_chart_changes',
|
|
21
|
+
'preview_dashboard_changes',
|
|
22
|
+
'preview_content_move',
|
|
23
|
+
'validate_chart',
|
|
24
|
+
'validate_dashboard',
|
|
25
|
+
'confirm_preview',
|
|
26
|
+
'compare_chart_versions',
|
|
27
|
+
'compare_dashboard_versions',
|
|
28
|
+
'create_chart',
|
|
29
|
+
'update_chart',
|
|
30
|
+
'duplicate_chart',
|
|
31
|
+
'create_dashboard',
|
|
32
|
+
'update_dashboard',
|
|
33
|
+
'duplicate_dashboard',
|
|
34
|
+
'add_dashboard_tile',
|
|
35
|
+
'move_dashboard_tile',
|
|
36
|
+
'remove_dashboard_tile',
|
|
37
|
+
'resize_dashboard_tile',
|
|
38
|
+
'move_content',
|
|
39
|
+
];
|
|
40
|
+
exports.contentDeveloperPersona = {
|
|
41
|
+
id: 'content-developer',
|
|
42
|
+
path: exports.CONTENT_DEVELOPER_PERSONA_PATH,
|
|
43
|
+
serverName: 'lightdash-mcp-cdev',
|
|
44
|
+
toolIds: exports.CONTENT_DEVELOPER_TOOL_IDS,
|
|
45
|
+
registerPrompts: (server) => {
|
|
46
|
+
(0, prompts_js_1.registerContentDeveloperPrompts)(server);
|
|
47
|
+
},
|
|
48
|
+
registerResources: (server) => {
|
|
49
|
+
(0, playbooks_js_1.registerContentDeveloperPlaybook)(server);
|
|
50
|
+
},
|
|
51
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MCP prompts for content-developer workflows.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.registerContentDeveloperPrompts = registerContentDeveloperPrompts;
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-deprecated -- matches content-reader prompt registration pattern */
|
|
8
|
+
const zod_1 = require("zod");
|
|
9
|
+
const playbook_resources_js_1 = require("../../lib/playbook-resources.js");
|
|
10
|
+
const playbooks_js_1 = require("./resources/playbooks.js");
|
|
11
|
+
const userMessages = (0, playbook_resources_js_1.createPromptPlaybookEmbedder)({
|
|
12
|
+
core: playbooks_js_1.CONTENT_DEVELOPER_CORE_PLAYBOOK,
|
|
13
|
+
topics: playbooks_js_1.CONTENT_DEVELOPER_TOPIC_PLAYBOOKS,
|
|
14
|
+
});
|
|
15
|
+
const PREVIEW_VALIDATE_APPLY = `Hard rule: preview -> confirm_preview -> apply. Call the matching lightdash_preview_* tool first,
|
|
16
|
+
record the previewId and resourceKey. Unlock every write (create, update, duplicate, tile ops, content moves)
|
|
17
|
+
with lightdash_confirm_preview using that previewId and the exact resourceKind/resourceKey the preview was
|
|
18
|
+
created with. Then apply with the write tool using that previewId. Never call a write tool without a fresh,
|
|
19
|
+
confirmed previewId bound to that exact resource. lightdash_validate_chart / lightdash_validate_dashboard are
|
|
20
|
+
optional health checks on a saved UUID only — they do not unlock apply.`;
|
|
21
|
+
const DASHBOARD_FIRST = `Dashboard-first: the dashboard is the authoring and promotion unit. Create/update charts only as
|
|
22
|
+
tile prerequisites in this workflow; every new chart must be added as a dashboard tile before treating work as done.
|
|
23
|
+
Do not create or update spaces (Terraform / out-of-band) — place content in an existing spaceUuid from list_spaces/get_space.
|
|
24
|
+
Promote via the content-governance persona (form elicitation), not this persona.`;
|
|
25
|
+
function registerContentDeveloperPrompts(server) {
|
|
26
|
+
server.registerPrompt('create_dashboard', {
|
|
27
|
+
title: 'Create dashboard',
|
|
28
|
+
description: 'Create a dashboard in an existing space, authoring charts only as tiles on that dashboard',
|
|
29
|
+
argsSchema: {
|
|
30
|
+
goal: zod_1.z.string(),
|
|
31
|
+
spaceUuid: zod_1.z.string().optional(),
|
|
32
|
+
chartReferences: zod_1.z.string().optional(),
|
|
33
|
+
},
|
|
34
|
+
}, ({ goal, spaceUuid, chartReferences }) => userMessages(`Create a new dashboard for this goal:
|
|
35
|
+
|
|
36
|
+
${goal}
|
|
37
|
+
|
|
38
|
+
${playbooks_js_1.CONTENT_DEVELOPER_HARD_BANS}
|
|
39
|
+
|
|
40
|
+
${PREVIEW_VALIDATE_APPLY}
|
|
41
|
+
|
|
42
|
+
${DASHBOARD_FIRST}
|
|
43
|
+
|
|
44
|
+
Target existing space: ${spaceUuid !== null && spaceUuid !== void 0 ? spaceUuid : '(resolve with lightdash_list_spaces / lightdash_get_space — never create a space)'}.
|
|
45
|
+
Chart hints: ${chartReferences !== null && chartReferences !== void 0 ? chartReferences : '(none provided)'}.
|
|
46
|
+
Discover reusable charts with lightdash_search_content / lightdash_get_chart.
|
|
47
|
+
If a new semantic chart is required, preview_chart_changes → confirm_preview → create_chart, then immediately
|
|
48
|
+
preview_dashboard_changes / add_dashboard_tile so the chart is on this dashboard.
|
|
49
|
+
Preview dashboard create with lightdash_preview_dashboard_changes (resourceKey 'new'), confirm with
|
|
50
|
+
lightdash_confirm_preview (resourceKind 'dashboard', resourceKey 'new'), apply with lightdash_create_dashboard.
|
|
51
|
+
For each tile, preview the tile array, confirm_preview, then lightdash_add_dashboard_tile.
|
|
52
|
+
Report dashboard UUID/slug, tiles, and chart UUIDs — do not stop at orphan charts.`, 'dashboards'));
|
|
53
|
+
server.registerPrompt('improve_dashboard', {
|
|
54
|
+
title: 'Improve dashboard',
|
|
55
|
+
description: 'Improve an existing dashboard (layout, filters, or tile set)',
|
|
56
|
+
argsSchema: {
|
|
57
|
+
dashboardUuidOrSlug: zod_1.z.string(),
|
|
58
|
+
improvementGoal: zod_1.z.string(),
|
|
59
|
+
},
|
|
60
|
+
}, ({ dashboardUuidOrSlug, improvementGoal }) => userMessages(`Improve dashboard ${dashboardUuidOrSlug} for this goal:
|
|
61
|
+
|
|
62
|
+
${improvementGoal}
|
|
63
|
+
|
|
64
|
+
${playbooks_js_1.CONTENT_DEVELOPER_HARD_BANS}
|
|
65
|
+
|
|
66
|
+
${PREVIEW_VALIDATE_APPLY}
|
|
67
|
+
|
|
68
|
+
${DASHBOARD_FIRST}
|
|
69
|
+
|
|
70
|
+
Inspect current structure with lightdash_get_dashboard first.
|
|
71
|
+
If new charts are needed, author them as tile prerequisites then add tiles — never as a standalone publish.
|
|
72
|
+
Preview with lightdash_preview_dashboard_changes, unlock with lightdash_confirm_preview,
|
|
73
|
+
then apply with lightdash_update_dashboard and/or the tile tools (lightdash_add_dashboard_tile,
|
|
74
|
+
lightdash_move_dashboard_tile, lightdash_remove_dashboard_tile, lightdash_resize_dashboard_tile).
|
|
75
|
+
Optionally run lightdash_validate_dashboard afterward as a saved-resource health check.
|
|
76
|
+
Report what changed and any remaining validation warnings.`, 'dashboards'));
|
|
77
|
+
server.registerPrompt('refactor_dashboard', {
|
|
78
|
+
title: 'Refactor dashboard',
|
|
79
|
+
description: 'Refactor a dashboard by comparing versions and reconciling drift',
|
|
80
|
+
argsSchema: {
|
|
81
|
+
dashboardUuidOrSlug: zod_1.z.string(),
|
|
82
|
+
concern: zod_1.z.string().optional(),
|
|
83
|
+
},
|
|
84
|
+
}, ({ dashboardUuidOrSlug, concern }) => userMessages(`Refactor dashboard ${dashboardUuidOrSlug}.
|
|
85
|
+
|
|
86
|
+
${playbooks_js_1.CONTENT_DEVELOPER_HARD_BANS}
|
|
87
|
+
|
|
88
|
+
${PREVIEW_VALIDATE_APPLY}
|
|
89
|
+
|
|
90
|
+
${DASHBOARD_FIRST}
|
|
91
|
+
|
|
92
|
+
Concern: ${concern !== null && concern !== void 0 ? concern : '(general cleanup)'}.
|
|
93
|
+
Use lightdash_compare_dashboard_versions to understand recent drift before proposing changes.
|
|
94
|
+
Preview with lightdash_preview_dashboard_changes, confirm_preview, then apply with lightdash_update_dashboard
|
|
95
|
+
and the tile tools as needed. Do not remove tiles unless explicitly requested.`, 'dashboards'));
|
|
96
|
+
server.registerPrompt('move_content', {
|
|
97
|
+
title: 'Move content',
|
|
98
|
+
description: 'Move charts/dashboards into an existing space (no space create/update)',
|
|
99
|
+
argsSchema: {
|
|
100
|
+
goal: zod_1.z.string(),
|
|
101
|
+
spaceReferences: zod_1.z.string().optional(),
|
|
102
|
+
},
|
|
103
|
+
}, ({ goal, spaceReferences }) => userMessages(`Move content between existing spaces for this goal:
|
|
104
|
+
|
|
105
|
+
${goal}
|
|
106
|
+
|
|
107
|
+
${playbooks_js_1.CONTENT_DEVELOPER_HARD_BANS}
|
|
108
|
+
|
|
109
|
+
${PREVIEW_VALIDATE_APPLY}
|
|
110
|
+
|
|
111
|
+
Space hints: ${spaceReferences !== null && spaceReferences !== void 0 ? spaceReferences : '(discover with lightdash_list_spaces)'}.
|
|
112
|
+
Inspect with lightdash_list_spaces / lightdash_get_space. Target spaces must already exist —
|
|
113
|
+
do not call create_space or update_space (not available; Terraform / out-of-band).
|
|
114
|
+
Preview with lightdash_preview_content_move using itemUuids + targetSpaceUuid + contentTypes,
|
|
115
|
+
confirm with lightdash_confirm_preview (resourceKind 'content-move'), then apply with lightdash_move_content.
|
|
116
|
+
Report moved items and target space.`, 'content-move'));
|
|
117
|
+
server.registerPrompt('publish_content', {
|
|
118
|
+
title: 'Publish content',
|
|
119
|
+
description: 'Validate dashboard-scoped authored content before treating it as done',
|
|
120
|
+
argsSchema: {
|
|
121
|
+
contentReferences: zod_1.z.string(),
|
|
122
|
+
},
|
|
123
|
+
}, ({ contentReferences }) => userMessages(`Finalize and validate this authored Lightdash content before considering it done:
|
|
124
|
+
|
|
125
|
+
${contentReferences}
|
|
126
|
+
|
|
127
|
+
${playbooks_js_1.CONTENT_DEVELOPER_HARD_BANS}
|
|
128
|
+
|
|
129
|
+
${DASHBOARD_FIRST}
|
|
130
|
+
|
|
131
|
+
Run lightdash_validate_chart / lightdash_validate_dashboard on every touched chart and dashboard.
|
|
132
|
+
Every new/updated chart must appear on a dashboard tile — reject orphan chart-only done states.
|
|
133
|
+
Do not report success while validation errors remain outstanding.
|
|
134
|
+
Summarize validation results, remaining warnings, dashboard and chart UUIDs/slugs touched.
|
|
135
|
+
This persona cannot promote, publish permissions, or perform org-level release actions;
|
|
136
|
+
operators should use content-governance (lightdash_promote_dashboard) when promoting across projects.`, 'dashboards'));
|
|
137
|
+
}
|
|
138
|
+
/* eslint-enable @typescript-eslint/no-deprecated */
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Content-developer prompt/playbook invariants.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const vitest_1 = require("vitest");
|
|
40
|
+
const playbooks_js_1 = require("./resources/playbooks.js");
|
|
41
|
+
const index_js_1 = require("./index.js");
|
|
42
|
+
(0, vitest_1.describe)('content-developer prompts/playbook', () => {
|
|
43
|
+
(0, vitest_1.it)('playbooks reference only registered tool short ids', () => {
|
|
44
|
+
const md = (0, playbooks_js_1.getAllPlaybookMarkdown)();
|
|
45
|
+
for (const id of index_js_1.CONTENT_DEVELOPER_TOOL_IDS) {
|
|
46
|
+
(0, vitest_1.expect)(md.includes(id) || md.includes(`lightdash_${id}`)).toBe(true);
|
|
47
|
+
}
|
|
48
|
+
(0, vitest_1.expect)(md).not.toMatch(/\bldt__/);
|
|
49
|
+
(0, vitest_1.expect)(md.toLowerCase()).toContain('hard bans');
|
|
50
|
+
(0, vitest_1.expect)(playbooks_js_1.CONTENT_DEVELOPER_HARD_BANS.toLowerCase()).toContain('terraform');
|
|
51
|
+
});
|
|
52
|
+
(0, vitest_1.it)('forbids space create/update and orphan chart publish', () => {
|
|
53
|
+
const md = (0, playbooks_js_1.getAllPlaybookMarkdown)().toLowerCase();
|
|
54
|
+
(0, vitest_1.expect)(md).toContain('terraform');
|
|
55
|
+
(0, vitest_1.expect)(md).toContain('dashboard is the');
|
|
56
|
+
(0, vitest_1.expect)(md).not.toMatch(/`create_space`/);
|
|
57
|
+
(0, vitest_1.expect)(md).not.toMatch(/`update_space`/);
|
|
58
|
+
(0, vitest_1.expect)(index_js_1.CONTENT_DEVELOPER_TOOL_IDS).not.toContain('create_space');
|
|
59
|
+
(0, vitest_1.expect)(index_js_1.CONTENT_DEVELOPER_TOOL_IDS).not.toContain('update_space');
|
|
60
|
+
});
|
|
61
|
+
(0, vitest_1.it)('does not register standalone build_chart prompt', async () => {
|
|
62
|
+
const { registerContentDeveloperPrompts } = await Promise.resolve().then(() => __importStar(require('./prompts.js')));
|
|
63
|
+
const names = [];
|
|
64
|
+
const server = {
|
|
65
|
+
registerPrompt: (name) => {
|
|
66
|
+
names.push(name);
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
registerContentDeveloperPrompts(server);
|
|
70
|
+
(0, vitest_1.expect)(names).not.toContain('build_chart');
|
|
71
|
+
(0, vitest_1.expect)(names).toContain('move_content');
|
|
72
|
+
(0, vitest_1.expect)(names).toContain('create_dashboard');
|
|
73
|
+
(0, vitest_1.expect)(names).toContain('publish_content');
|
|
74
|
+
});
|
|
75
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Content-developer — content move
|
|
2
|
+
|
|
3
|
+
URI: `lightdash://playbooks/content-developer/content-move`
|
|
4
|
+
|
|
5
|
+
Move charts/dashboards into **existing** spaces. Never create, rename, or update spaces (Terraform / out-of-band).
|
|
6
|
+
|
|
7
|
+
## Steps
|
|
8
|
+
|
|
9
|
+
1. Discover with `list_spaces` / `get_space` / `search_content`. Confirm the **target space already exists**.
|
|
10
|
+
2. Preview with `preview_content_move`:
|
|
11
|
+
- Required: `itemUuids`, `targetSpaceUuid` (null = project root if supported), `contentTypes` (same length/order as `itemUuids`).
|
|
12
|
+
- Optional: `chartSources` (must match lengths of `itemUuids` and match apply exactly).
|
|
13
|
+
3. `confirm_preview` with `resourceKind: 'content-move'` and the preview's `resourceKey`.
|
|
14
|
+
4. Apply with `move_content` using the same payload hash fields.
|
|
15
|
+
5. Report moved item UUIDs and target space.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Content-developer core
|
|
2
|
+
|
|
3
|
+
URI: `lightdash://playbooks/content-developer/core`
|
|
4
|
+
|
|
5
|
+
## Hard bans
|
|
6
|
+
|
|
7
|
+
- Do not execute arbitrary metric queries, raw SQL, or underlying-data queries.
|
|
8
|
+
- Do not author or upsert SQL charts.
|
|
9
|
+
- Do not hard-delete, rollback, or promote content on this persona. For dashboard promote with form elicitation, use the **content-governance** persona (`lightdash-mcp content-governance` / `/content-governance/v1/mcp`) — see [How to promote content](https://docs.lightdash.com/guides/how-to-promote-content).
|
|
10
|
+
- Do not perform organization administration.
|
|
11
|
+
- Do not create or update spaces — spaces are managed outside this agent (e.g. Terraform). Use existing spaces only.
|
|
12
|
+
- Do not treat a standalone chart create/update as a finished publish unit. New charts must be attached as dashboard tiles in the same workflow (dashboard is the promotion unit).
|
|
13
|
+
- Do not apply a write tool without a validated, unexpired, session-owned `previewId` from the matching `preview_*` tool.
|
|
14
|
+
- Do not reuse a `previewId` after a successful apply (single-use: claim → mutate → mark applied) or after the underlying resource has drifted (`PREVIEW_STALE`).
|
|
15
|
+
- If apply fails with `PREVIEW_RECONCILIATION_REQUIRED`, inspect the resource and re-run preview → confirm (do not assume the write succeeded or failed).
|
|
16
|
+
- Every write (create, update, duplicate, tile ops, content-move) must be unlocked with `confirm_preview`, passing the exact `resourceKind`/`resourceKey` the preview was created with — never a different resource's preview.
|
|
17
|
+
- `validate_chart` / `validate_dashboard` are optional health checks on a **saved** UUID only; they do not unlock apply (upstream has no unsaved-payload validator).
|
|
18
|
+
- Do not reveal secrets, warehouse credentials, or hidden SQL.
|
|
19
|
+
|
|
20
|
+
## Tools
|
|
21
|
+
|
|
22
|
+
Use only these `lightdash_*` tools:
|
|
23
|
+
|
|
24
|
+
- `get_project`
|
|
25
|
+
- `search_content`
|
|
26
|
+
- `list_spaces`
|
|
27
|
+
- `get_space`
|
|
28
|
+
- `get_dashboard`
|
|
29
|
+
- `get_chart`
|
|
30
|
+
- `preview_chart_changes`
|
|
31
|
+
- `preview_dashboard_changes`
|
|
32
|
+
- `preview_content_move` (`itemUuids` + `targetSpaceUuid` + required `contentTypes`)
|
|
33
|
+
- `validate_chart`
|
|
34
|
+
- `validate_dashboard`
|
|
35
|
+
- `confirm_preview`
|
|
36
|
+
- `compare_chart_versions`
|
|
37
|
+
- `compare_dashboard_versions`
|
|
38
|
+
- `create_chart`
|
|
39
|
+
- `update_chart`
|
|
40
|
+
- `duplicate_chart`
|
|
41
|
+
- `create_dashboard`
|
|
42
|
+
- `update_dashboard`
|
|
43
|
+
- `duplicate_dashboard`
|
|
44
|
+
- `add_dashboard_tile`
|
|
45
|
+
- `move_dashboard_tile`
|
|
46
|
+
- `remove_dashboard_tile`
|
|
47
|
+
- `resize_dashboard_tile`
|
|
48
|
+
- `move_content`
|
|
49
|
+
|
|
50
|
+
## Phase 0 — Resolve project
|
|
51
|
+
|
|
52
|
+
1. Call `lightdash_get_project` (pin / `LIGHTDASH_TOOLS_PROJECT_UUID` / explicit UUID).
|
|
53
|
+
2. Record project UUID, pin, and `developerCapabilities`.
|
|
54
|
+
3. Stop when project scope is unresolved (`PROJECT_SCOPE_REQUIRED`).
|
|
55
|
+
4. Never enumerate organization projects.
|
|
56
|
+
|
|
57
|
+
## Preview → confirm → apply
|
|
58
|
+
|
|
59
|
+
1. Call the matching `preview_*` tool; record `previewId`, diff, expiry, `resourceKey`.
|
|
60
|
+
2. Unlock with `confirm_preview` using the exact `resourceKind`/`resourceKey` from the preview.
|
|
61
|
+
3. Apply with the write tool and the confirmed `previewId` (server claims the preview, mutates, then marks applied). Stale baseline/payload → `PREVIEW_STALE` (re-preview); uncertain mutation failure → `PREVIEW_RECONCILIATION_REQUIRED` (inspect + re-preview). Known client errors may release the preview so a retry with the same `previewId` can claim again.
|
|
62
|
+
4. Optionally run `validate_chart` / `validate_dashboard` on saved UUIDs as a health check (does not unlock).
|
|
63
|
+
5. Report UUIDs touched and outcomes; do not claim success without a successful apply response.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Content-developer — dashboards (and charts as tiles)
|
|
2
|
+
|
|
3
|
+
URI: `lightdash://playbooks/content-developer/dashboards`
|
|
4
|
+
|
|
5
|
+
Dashboard is the **authoring and promotion unit**. Promote via the **content-governance** persona (`lightdash_promote_dashboard` with form elicitation; copies the board and its charts). Do not leave orphan charts as the done state.
|
|
6
|
+
|
|
7
|
+
## Discover
|
|
8
|
+
|
|
9
|
+
Use `search_content`, `list_spaces`, `get_space`, `get_dashboard`, `get_chart` before creating or changing content. Prefer reusing existing charts when they already fit. Place new dashboards in an **existing** `spaceUuid` from `list_spaces` / `get_space` — never create a space.
|
|
10
|
+
|
|
11
|
+
## Chart authoring (tile prerequisite only)
|
|
12
|
+
|
|
13
|
+
Semantic (as-code) charts only. When a new or updated chart is required for a dashboard:
|
|
14
|
+
|
|
15
|
+
1. `preview_chart_changes` → `confirm_preview` → `create_chart` / `update_chart`.
|
|
16
|
+
- Create: pass `slug` only when the slug is free (`CHART_SLUG_EXISTS` otherwise — then pass `chartUuidOrSlug` and use update).
|
|
17
|
+
- Update: pass `chartUuidOrSlug`; confirm with the preview's UUID `resourceKey` (slug is an alias).
|
|
18
|
+
2. Immediately attach the chart as a tile: `preview_dashboard_changes` with the resulting tiles → `confirm_preview` → `add_dashboard_tile` / `update_dashboard`.
|
|
19
|
+
3. Do not stop after chart UUID alone — the workflow is incomplete until the chart is on a dashboard.
|
|
20
|
+
|
|
21
|
+
`compare_chart_versions` is allowed when improving an existing tiled chart; still finish on the dashboard.
|
|
22
|
+
|
|
23
|
+
## Duplicate chart
|
|
24
|
+
|
|
25
|
+
1. `preview_chart_changes` with `chartUuidOrSlug` = source and `changes` = `{ sourceChartUuidOrSlug, newSlug, newName? }` (must match apply args).
|
|
26
|
+
2. `confirm_preview` with `resourceKind: 'chart'` and `resourceKey` = source UUID from the preview.
|
|
27
|
+
3. `duplicate_chart` with the same source / `newSlug` / `newName` (`newSlug` must be free — `CHART_SLUG_EXISTS` otherwise; apply re-reads source baseline).
|
|
28
|
+
4. Attach the new chart as a dashboard tile before treating work as done.
|
|
29
|
+
|
|
30
|
+
## Create dashboard
|
|
31
|
+
|
|
32
|
+
1. Resolve target **existing** space.
|
|
33
|
+
2. Discover or create charts needed for tiles (rules above).
|
|
34
|
+
3. `preview_dashboard_changes` (resourceKey `new`) → `confirm_preview` → `create_dashboard`.
|
|
35
|
+
4. For each tile: preview the full tile array → `confirm_preview` → `add_dashboard_tile` (or compose via `update_dashboard`).
|
|
36
|
+
|
|
37
|
+
## Duplicate dashboard
|
|
38
|
+
|
|
39
|
+
1. `preview_dashboard_changes` with `dashboardUuidOrSlug` = source UUID and `changes` = `{ newName? }` (must match apply args).
|
|
40
|
+
2. `confirm_preview` with `resourceKind: 'dashboard'` and `resourceKey` = source UUID.
|
|
41
|
+
3. `duplicate_dashboard` with the same source UUID / proposed fields (apply re-reads source baseline; duplicate stays in the source space).
|
|
42
|
+
4. To relocate: `preview_content_move` → `confirm_preview` → `move_content` into an existing space.
|
|
43
|
+
|
|
44
|
+
## Improve / refactor dashboard
|
|
45
|
+
|
|
46
|
+
1. `get_dashboard` (and `compare_dashboard_versions` when reconciling drift).
|
|
47
|
+
2. Preview dashboard/tile changes → `confirm_preview` → `update_dashboard` and/or tile tools (`add_dashboard_tile`, `move_dashboard_tile`, `remove_dashboard_tile`, `resize_dashboard_tile`).
|
|
48
|
+
3. If new charts are needed mid-improve, author them as tile prerequisites (never as standalone publish).
|
|
49
|
+
4. Optionally `validate_dashboard` / `validate_chart` on saved UUIDs after apply (health check only).
|
|
50
|
+
|
|
51
|
+
## Done criteria
|
|
52
|
+
|
|
53
|
+
- Every new/updated chart in the session is referenced by a dashboard tile.
|
|
54
|
+
- Report dashboard UUID/slug, tiles, and chart UUIDs; resolve outstanding saved-resource validation warnings when using `validate_*`.
|
|
55
|
+
- Do not promote from this persona; tell operators to use content-governance `lightdash_promote_dashboard` when ready.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Content-developer playbooks
|
|
2
|
+
|
|
3
|
+
URI: `lightdash://playbooks/content-developer`
|
|
4
|
+
|
|
5
|
+
Workflow-scoped playbooks (always load **core** plus one topic with a prompt):
|
|
6
|
+
|
|
7
|
+
| Topic | URI |
|
|
8
|
+
| ---------------------------- | ------------------------------------------------------ |
|
|
9
|
+
| Core (gates & bans) | `lightdash://playbooks/content-developer/core` |
|
|
10
|
+
| Dashboards & charts-as-tiles | `lightdash://playbooks/content-developer/dashboards` |
|
|
11
|
+
| Content move | `lightdash://playbooks/content-developer/content-move` |
|
|
12
|
+
|
|
13
|
+
Spaces are **not** created or updated by this persona (Terraform / out-of-band). Use `list_spaces` / `get_space` to place content into existing spaces.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content-developer multi-playbook resources (core + topics + index).
|
|
3
|
+
*/
|
|
4
|
+
import type { McpServer } from '@modelcontextprotocol/server';
|
|
5
|
+
export type ContentDeveloperPlaybookTopic = 'content-move' | 'dashboards';
|
|
6
|
+
export declare const CONTENT_DEVELOPER_HARD_BANS: string;
|
|
7
|
+
export declare const getAllPlaybookMarkdown: () => string;
|
|
8
|
+
export declare const CONTENT_DEVELOPER_CORE_PLAYBOOK: import("../../../lib/playbook-resources.js").EmbeddedPlaybook;
|
|
9
|
+
export declare const CONTENT_DEVELOPER_TOPIC_PLAYBOOKS: Readonly<Record<ContentDeveloperPlaybookTopic, import("../../../lib/playbook-resources.js").EmbeddedPlaybook>>;
|
|
10
|
+
export declare function registerContentDeveloperPlaybook(server: McpServer): void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Content-developer multi-playbook resources (core + topics + index).
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CONTENT_DEVELOPER_TOPIC_PLAYBOOKS = exports.CONTENT_DEVELOPER_CORE_PLAYBOOK = exports.getAllPlaybookMarkdown = exports.CONTENT_DEVELOPER_HARD_BANS = void 0;
|
|
7
|
+
exports.registerContentDeveloperPlaybook = registerContentDeveloperPlaybook;
|
|
8
|
+
const playbook_resources_js_1 = require("../../../lib/playbook-resources.js");
|
|
9
|
+
const playbooks = (0, playbook_resources_js_1.definePersonaPlaybooks)({
|
|
10
|
+
personaId: 'content-developer',
|
|
11
|
+
moduleDir: __dirname,
|
|
12
|
+
hardBans: `Do not execute arbitrary metric queries, raw SQL, or underlying-data queries.
|
|
13
|
+
Do not author or upsert SQL charts.
|
|
14
|
+
Do not hard-delete, rollback, or promote content.
|
|
15
|
+
Do not perform organization administration.
|
|
16
|
+
Do not create or update spaces — spaces are managed outside this agent (e.g. Terraform).
|
|
17
|
+
Do not treat a standalone chart create/update as a finished publish unit; attach charts as dashboard tiles.
|
|
18
|
+
Do not apply a write tool without a confirmed, unexpired, session-owned previewId from the matching preview_* tool (confirm_preview unlocks every write).
|
|
19
|
+
Do not treat validate_chart / validate_dashboard as a preview unlock — they are saved-UUID health checks only.
|
|
20
|
+
Do not reuse a previewId after it has been consumed by apply (single-use) or after the underlying resource has drifted (PREVIEW_STALE).
|
|
21
|
+
Do not reveal secrets, warehouse credentials, or hidden SQL.`,
|
|
22
|
+
coreDescription: 'Hard bans, tools, project scope, and preview gate',
|
|
23
|
+
topics: [
|
|
24
|
+
{
|
|
25
|
+
id: 'dashboards',
|
|
26
|
+
title: 'Content-developer dashboards playbook',
|
|
27
|
+
description: 'Dashboard-first authoring with charts as tiles',
|
|
28
|
+
file: 'dashboards.md',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: 'content-move',
|
|
32
|
+
title: 'Content-developer content-move playbook',
|
|
33
|
+
description: 'Move content into existing spaces (no space CRUD)',
|
|
34
|
+
file: 'content-move.md',
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
});
|
|
38
|
+
exports.CONTENT_DEVELOPER_HARD_BANS = playbooks.HARD_BANS;
|
|
39
|
+
exports.getAllPlaybookMarkdown = playbooks.getAllPlaybookMarkdown;
|
|
40
|
+
exports.CONTENT_DEVELOPER_CORE_PLAYBOOK = playbooks.CORE_PLAYBOOK;
|
|
41
|
+
exports.CONTENT_DEVELOPER_TOPIC_PLAYBOOKS = playbooks.TOPIC_PLAYBOOKS;
|
|
42
|
+
function registerContentDeveloperPlaybook(server) {
|
|
43
|
+
playbooks.registerPlaybooks(server);
|
|
44
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content-governance persona: elicitation-gated soft-delete and dashboard promote
|
|
3
|
+
* (ADR-0015 / ADR-0017). Permanent purge and chart/SQL promote stay off MCP.
|
|
4
|
+
*/
|
|
5
|
+
import type { PersonaDefinition } from '../../types.js';
|
|
6
|
+
export declare const CONTENT_GOVERNANCE_PERSONA_PATH: "/content-governance/v1/mcp";
|
|
7
|
+
/** Explicit allowlist — must stay a deliberate subset of the shared registry. */
|
|
8
|
+
export declare const CONTENT_GOVERNANCE_TOOL_IDS: readonly ["delete_chart", "delete_dashboard", "get_dashboard_promote_diff", "promote_dashboard"];
|
|
9
|
+
export declare const contentGovernancePersona: PersonaDefinition;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Content-governance persona: elicitation-gated soft-delete and dashboard promote
|
|
4
|
+
* (ADR-0015 / ADR-0017). Permanent purge and chart/SQL promote stay off MCP.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.contentGovernancePersona = exports.CONTENT_GOVERNANCE_TOOL_IDS = exports.CONTENT_GOVERNANCE_PERSONA_PATH = void 0;
|
|
8
|
+
const prompts_js_1 = require("./prompts.js");
|
|
9
|
+
const playbooks_js_1 = require("./resources/playbooks.js");
|
|
10
|
+
exports.CONTENT_GOVERNANCE_PERSONA_PATH = '/content-governance/v1/mcp';
|
|
11
|
+
/** Explicit allowlist — must stay a deliberate subset of the shared registry. */
|
|
12
|
+
exports.CONTENT_GOVERNANCE_TOOL_IDS = [
|
|
13
|
+
'delete_chart',
|
|
14
|
+
'delete_dashboard',
|
|
15
|
+
'get_dashboard_promote_diff',
|
|
16
|
+
'promote_dashboard',
|
|
17
|
+
];
|
|
18
|
+
exports.contentGovernancePersona = {
|
|
19
|
+
id: 'content-governance',
|
|
20
|
+
path: exports.CONTENT_GOVERNANCE_PERSONA_PATH,
|
|
21
|
+
serverName: 'lightdash-mcp-gov',
|
|
22
|
+
toolIds: exports.CONTENT_GOVERNANCE_TOOL_IDS,
|
|
23
|
+
registerPrompts: (server) => {
|
|
24
|
+
(0, prompts_js_1.registerContentGovernancePrompts)(server);
|
|
25
|
+
},
|
|
26
|
+
registerResources: (server) => {
|
|
27
|
+
(0, playbooks_js_1.registerContentGovernancePlaybook)(server);
|
|
28
|
+
},
|
|
29
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MCP prompts for content-governance soft-delete and dashboard promote workflows.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.registerContentGovernancePrompts = registerContentGovernancePrompts;
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-deprecated -- matches content-reader prompt registration pattern */
|
|
8
|
+
const zod_1 = require("zod");
|
|
9
|
+
const playbook_resources_js_1 = require("../../lib/playbook-resources.js");
|
|
10
|
+
const playbooks_js_1 = require("./resources/playbooks.js");
|
|
11
|
+
const userMessages = (0, playbook_resources_js_1.createPromptPlaybookEmbedder)({
|
|
12
|
+
core: playbooks_js_1.CONTENT_GOVERNANCE_CORE_PLAYBOOK,
|
|
13
|
+
topics: playbooks_js_1.CONTENT_GOVERNANCE_TOPIC_PLAYBOOKS,
|
|
14
|
+
});
|
|
15
|
+
const TOPIC_CHARTS = 'charts';
|
|
16
|
+
const TOPIC_DASHBOARDS = 'dashboards';
|
|
17
|
+
const REASON_NONE = '(none provided)';
|
|
18
|
+
const DELETE_ELICITATION_RULES = `Hard rule: form elicitation only. Call the matching lightdash_delete_* tool;
|
|
19
|
+
the human must accept a form with decision=confirm_delete and confirmationText equal to the exact
|
|
20
|
+
resource name. Never invent confirmation flags or treat chat approval as sufficient.
|
|
21
|
+
If the client lacks form elicitation, expect ELICITATION_REQUIRED and stop.
|
|
22
|
+
If the resource drifts after binding, expect RESOURCE_CHANGED and re-invoke the tool.`;
|
|
23
|
+
const PROMOTE_ELICITATION_RULES = `Hard rule: form elicitation only. Optionally call lightdash_get_dashboard_promote_diff
|
|
24
|
+
first, then lightdash_promote_dashboard. The human must accept a form with decision=confirm_promote
|
|
25
|
+
and confirmationText equal to the exact dashboard name. Never invent confirmation flags.
|
|
26
|
+
If the client lacks form elicitation, expect ELICITATION_REQUIRED and stop.
|
|
27
|
+
If the dashboard or promoteDiff drifts after binding, expect RESOURCE_CHANGED and re-invoke.`;
|
|
28
|
+
function registerContentGovernancePrompts(server) {
|
|
29
|
+
server.registerPrompt('delete_chart', {
|
|
30
|
+
title: 'Soft-delete chart',
|
|
31
|
+
description: 'Soft-delete a saved chart after form elicitation (restorable from trash; no permanent purge)',
|
|
32
|
+
argsSchema: {
|
|
33
|
+
chartUuidOrSlug: zod_1.z.string(),
|
|
34
|
+
reason: zod_1.z.string().optional(),
|
|
35
|
+
},
|
|
36
|
+
}, ({ chartUuidOrSlug, reason }) => userMessages(`Soft-delete the Lightdash chart ${chartUuidOrSlug}.
|
|
37
|
+
|
|
38
|
+
${playbooks_js_1.CONTENT_GOVERNANCE_HARD_BANS}
|
|
39
|
+
|
|
40
|
+
${DELETE_ELICITATION_RULES}
|
|
41
|
+
|
|
42
|
+
Reason / context: ${reason !== null && reason !== void 0 ? reason : REASON_NONE}.
|
|
43
|
+
Resolve project scope (X-Lightdash-Project pin or projectUuid), then call
|
|
44
|
+
lightdash_delete_chart with chartUuidOrSlug.
|
|
45
|
+
Complete human form fields: decision (confirm_delete | do_not_delete) and confirmationText
|
|
46
|
+
(exact chart name). Report the deletion receipt or that nothing was deleted if declined/cancelled.
|
|
47
|
+
Do not permanently purge.`, TOPIC_CHARTS));
|
|
48
|
+
server.registerPrompt('delete_dashboard', {
|
|
49
|
+
title: 'Soft-delete dashboard',
|
|
50
|
+
description: 'Soft-delete a dashboard after form elicitation (restorable from trash; no permanent purge)',
|
|
51
|
+
argsSchema: {
|
|
52
|
+
dashboardUuidOrSlug: zod_1.z.string(),
|
|
53
|
+
reason: zod_1.z.string().optional(),
|
|
54
|
+
},
|
|
55
|
+
}, ({ dashboardUuidOrSlug, reason }) => userMessages(`Soft-delete the Lightdash dashboard ${dashboardUuidOrSlug}.
|
|
56
|
+
|
|
57
|
+
${playbooks_js_1.CONTENT_GOVERNANCE_HARD_BANS}
|
|
58
|
+
|
|
59
|
+
${DELETE_ELICITATION_RULES}
|
|
60
|
+
|
|
61
|
+
Reason / context: ${reason !== null && reason !== void 0 ? reason : REASON_NONE}.
|
|
62
|
+
Resolve project scope (X-Lightdash-Project pin or projectUuid), then call
|
|
63
|
+
lightdash_delete_dashboard with dashboardUuidOrSlug.
|
|
64
|
+
Complete human form fields: decision (confirm_delete | do_not_delete) and confirmationText
|
|
65
|
+
(exact dashboard name). Report the deletion receipt or that nothing was deleted if declined/cancelled.
|
|
66
|
+
Do not permanently purge, delete spaces, or bulk-delete.`, TOPIC_DASHBOARDS));
|
|
67
|
+
server.registerPrompt('promote_dashboard', {
|
|
68
|
+
title: 'Promote dashboard',
|
|
69
|
+
description: 'Promote a dashboard to its configured upstream project after form elicitation (dashboard-first release)',
|
|
70
|
+
argsSchema: {
|
|
71
|
+
dashboardUuidOrSlug: zod_1.z.string(),
|
|
72
|
+
reason: zod_1.z.string().optional(),
|
|
73
|
+
},
|
|
74
|
+
}, ({ dashboardUuidOrSlug, reason }) => userMessages(`Promote the Lightdash dashboard ${dashboardUuidOrSlug} to its configured upstream project.
|
|
75
|
+
|
|
76
|
+
${playbooks_js_1.CONTENT_GOVERNANCE_HARD_BANS}
|
|
77
|
+
|
|
78
|
+
${PROMOTE_ELICITATION_RULES}
|
|
79
|
+
|
|
80
|
+
Reason / context: ${reason !== null && reason !== void 0 ? reason : REASON_NONE}.
|
|
81
|
+
Resolve project scope, optionally call lightdash_get_dashboard_promote_diff, then
|
|
82
|
+
lightdash_promote_dashboard with dashboardUuidOrSlug.
|
|
83
|
+
Complete human form fields: decision (confirm_promote | do_not_promote) and confirmationText
|
|
84
|
+
(exact dashboard name). Report the promotion receipt or that nothing was promoted if declined/cancelled.
|
|
85
|
+
Do not promote charts or SQL charts via MCP.`, TOPIC_DASHBOARDS));
|
|
86
|
+
}
|
|
87
|
+
/* eslint-enable @typescript-eslint/no-deprecated */
|