@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
package/dist/tools/explores.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MCP tools: explores (list, get).
|
|
4
|
-
*/
|
|
5
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.registerExploresTools = registerExploresTools;
|
|
16
|
-
const zod_1 = require("zod");
|
|
17
|
-
const shared_js_1 = require("./shared.js");
|
|
18
|
-
function registerExploresTools(server, client) {
|
|
19
|
-
(0, shared_js_1.registerToolSafe)(server, 'list_explores', {
|
|
20
|
-
title: 'List explores',
|
|
21
|
-
description: 'List all explores in a project',
|
|
22
|
-
inputSchema: { projectUuid: zod_1.z.string().describe('Project UUID') },
|
|
23
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
24
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid }) {
|
|
25
|
-
const explores = yield c.v1.explores.listExplores(projectUuid);
|
|
26
|
-
return { content: [{ type: 'text', text: JSON.stringify(explores, null, 2) }] };
|
|
27
|
-
})));
|
|
28
|
-
(0, shared_js_1.registerToolSafe)(server, 'get_explore', {
|
|
29
|
-
title: 'Get explore',
|
|
30
|
-
description: 'Get an explore by project UUID and explore ID (includes tables, dimensions, and metrics)',
|
|
31
|
-
inputSchema: {
|
|
32
|
-
projectUuid: zod_1.z.string().describe('Project UUID'),
|
|
33
|
-
exploreId: zod_1.z.string().describe('Explore ID'),
|
|
34
|
-
},
|
|
35
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
36
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid, exploreId }) {
|
|
37
|
-
const explore = yield c.v1.explores.getExplore(projectUuid, exploreId);
|
|
38
|
-
return { content: [{ type: 'text', text: JSON.stringify(explore, null, 2) }] };
|
|
39
|
-
})));
|
|
40
|
-
(0, shared_js_1.registerToolSafe)(server, 'list_dimensions', {
|
|
41
|
-
title: 'List dimensions',
|
|
42
|
-
description: 'List all dimensions for a specific explore',
|
|
43
|
-
inputSchema: {
|
|
44
|
-
projectUuid: zod_1.z.string().describe('Project UUID'),
|
|
45
|
-
exploreId: zod_1.z.string().describe('Explore ID'),
|
|
46
|
-
},
|
|
47
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
48
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid, exploreId }) {
|
|
49
|
-
const result = yield c.v1.explores.listDimensions(projectUuid, exploreId);
|
|
50
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
51
|
-
})));
|
|
52
|
-
(0, shared_js_1.registerToolSafe)(server, 'get_field_lineage', {
|
|
53
|
-
title: 'Get field lineage',
|
|
54
|
-
description: 'Get upstream lineage for a specific field in an explore',
|
|
55
|
-
inputSchema: {
|
|
56
|
-
projectUuid: zod_1.z.string().describe('Project UUID'),
|
|
57
|
-
exploreId: zod_1.z.string().describe('Explore ID'),
|
|
58
|
-
fieldId: zod_1.z.string().describe('Field ID'),
|
|
59
|
-
},
|
|
60
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
61
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid, exploreId, fieldId, }) {
|
|
62
|
-
const result = yield c.v1.explores.getFieldLineage(projectUuid, exploreId, fieldId);
|
|
63
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
64
|
-
})));
|
|
65
|
-
}
|
package/dist/tools/groups.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP tools: groups (list, get).
|
|
3
|
-
*/
|
|
4
|
-
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
|
-
import type { LightdashClient } from '@lightdash-tools/client';
|
|
6
|
-
export declare function registerGroupTools(server: McpServer, client: LightdashClient): void;
|
package/dist/tools/groups.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MCP tools: groups (list, get).
|
|
4
|
-
*/
|
|
5
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.registerGroupTools = registerGroupTools;
|
|
16
|
-
const zod_1 = require("zod");
|
|
17
|
-
const shared_js_1 = require("./shared.js");
|
|
18
|
-
function registerGroupTools(server, client) {
|
|
19
|
-
(0, shared_js_1.registerToolSafe)(server, 'list_groups', {
|
|
20
|
-
title: 'List groups',
|
|
21
|
-
description: 'List organization groups (one page)',
|
|
22
|
-
inputSchema: {
|
|
23
|
-
page: zod_1.z.number().optional().describe('Page number'),
|
|
24
|
-
pageSize: zod_1.z.number().optional().describe('Page size'),
|
|
25
|
-
searchQuery: zod_1.z.string().optional().describe('Search query'),
|
|
26
|
-
},
|
|
27
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
28
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (params) => __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const result = yield c.v1.groups.listGroups(params !== null && params !== void 0 ? params : {});
|
|
30
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
31
|
-
})));
|
|
32
|
-
(0, shared_js_1.registerToolSafe)(server, 'get_group', {
|
|
33
|
-
title: 'Get group',
|
|
34
|
-
description: 'Get a group by UUID',
|
|
35
|
-
inputSchema: { groupUuid: zod_1.z.string().describe('Group UUID') },
|
|
36
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
37
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ groupUuid }) {
|
|
38
|
-
const group = yield c.v1.groups.getGroup(groupUuid);
|
|
39
|
-
return { content: [{ type: 'text', text: JSON.stringify(group, null, 2) }] };
|
|
40
|
-
})));
|
|
41
|
-
(0, shared_js_1.registerToolSafe)(server, 'create_group', {
|
|
42
|
-
title: 'Create group',
|
|
43
|
-
description: 'Create a new group in the organization',
|
|
44
|
-
inputSchema: {
|
|
45
|
-
name: zod_1.z.string().describe('Group name'),
|
|
46
|
-
},
|
|
47
|
-
annotations: shared_js_1.WRITE_IDEMPOTENT,
|
|
48
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ name }) {
|
|
49
|
-
const group = yield c.v1.groups.createGroup({ name });
|
|
50
|
-
return { content: [{ type: 'text', text: JSON.stringify(group, null, 2) }] };
|
|
51
|
-
})));
|
|
52
|
-
(0, shared_js_1.registerToolSafe)(server, 'update_group', {
|
|
53
|
-
title: 'Update group',
|
|
54
|
-
description: 'Update a group name',
|
|
55
|
-
inputSchema: {
|
|
56
|
-
groupUuid: zod_1.z.string().describe('Group UUID'),
|
|
57
|
-
name: zod_1.z.string().describe('New group name'),
|
|
58
|
-
},
|
|
59
|
-
annotations: shared_js_1.WRITE_IDEMPOTENT,
|
|
60
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ groupUuid, name }) {
|
|
61
|
-
const group = yield c.v1.groups.updateGroup(groupUuid, { name });
|
|
62
|
-
return { content: [{ type: 'text', text: JSON.stringify(group, null, 2) }] };
|
|
63
|
-
})));
|
|
64
|
-
(0, shared_js_1.registerToolSafe)(server, 'delete_group', {
|
|
65
|
-
title: 'Delete group',
|
|
66
|
-
description: 'Delete a group by UUID',
|
|
67
|
-
inputSchema: {
|
|
68
|
-
groupUuid: zod_1.z.string().describe('Group UUID'),
|
|
69
|
-
},
|
|
70
|
-
annotations: shared_js_1.WRITE_DESTRUCTIVE,
|
|
71
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ groupUuid }) {
|
|
72
|
-
yield c.v1.groups.deleteGroup(groupUuid);
|
|
73
|
-
return { content: [{ type: 'text', text: `Group ${groupUuid} deleted successfully` }] };
|
|
74
|
-
})));
|
|
75
|
-
(0, shared_js_1.registerToolSafe)(server, 'list_group_members', {
|
|
76
|
-
title: 'List group members',
|
|
77
|
-
description: 'List members of a group',
|
|
78
|
-
inputSchema: {
|
|
79
|
-
groupUuid: zod_1.z.string().describe('Group UUID'),
|
|
80
|
-
},
|
|
81
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
82
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ groupUuid }) {
|
|
83
|
-
const members = yield c.v1.groups.getGroupMembers(groupUuid);
|
|
84
|
-
return { content: [{ type: 'text', text: JSON.stringify(members, null, 2) }] };
|
|
85
|
-
})));
|
|
86
|
-
(0, shared_js_1.registerToolSafe)(server, 'add_user_to_group', {
|
|
87
|
-
title: 'Add user to group',
|
|
88
|
-
description: 'Add a user to a group',
|
|
89
|
-
inputSchema: {
|
|
90
|
-
groupUuid: zod_1.z.string().describe('Group UUID'),
|
|
91
|
-
userUuid: zod_1.z.string().describe('User UUID'),
|
|
92
|
-
},
|
|
93
|
-
annotations: shared_js_1.WRITE_IDEMPOTENT,
|
|
94
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ groupUuid, userUuid }) {
|
|
95
|
-
yield c.v1.groups.addUserToGroup(groupUuid, userUuid);
|
|
96
|
-
return {
|
|
97
|
-
content: [
|
|
98
|
-
{ type: 'text', text: `User ${userUuid} added to group ${groupUuid} successfully` },
|
|
99
|
-
],
|
|
100
|
-
};
|
|
101
|
-
})));
|
|
102
|
-
(0, shared_js_1.registerToolSafe)(server, 'remove_user_from_group', {
|
|
103
|
-
title: 'Remove user from group',
|
|
104
|
-
description: 'Remove a user from a group',
|
|
105
|
-
inputSchema: {
|
|
106
|
-
groupUuid: zod_1.z.string().describe('Group UUID'),
|
|
107
|
-
userUuid: zod_1.z.string().describe('User UUID'),
|
|
108
|
-
},
|
|
109
|
-
annotations: shared_js_1.WRITE_DESTRUCTIVE,
|
|
110
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ groupUuid, userUuid }) {
|
|
111
|
-
yield c.v1.groups.removeUserFromGroup(groupUuid, userUuid);
|
|
112
|
-
return {
|
|
113
|
-
content: [
|
|
114
|
-
{
|
|
115
|
-
type: 'text',
|
|
116
|
-
text: `User ${userUuid} removed from group ${groupUuid} successfully`,
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
};
|
|
120
|
-
})));
|
|
121
|
-
}
|
package/dist/tools/metrics.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP tools: metrics (list, get).
|
|
3
|
-
*/
|
|
4
|
-
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
|
-
import type { LightdashClient } from '@lightdash-tools/client';
|
|
6
|
-
export declare function registerMetricsTools(server: McpServer, client: LightdashClient): void;
|
package/dist/tools/metrics.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MCP tools: metrics (list, get).
|
|
4
|
-
*/
|
|
5
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
15
|
-
var t = {};
|
|
16
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
17
|
-
t[p] = s[p];
|
|
18
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
19
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
20
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
21
|
-
t[p[i]] = s[p[i]];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.registerMetricsTools = registerMetricsTools;
|
|
27
|
-
const zod_1 = require("zod");
|
|
28
|
-
const shared_js_1 = require("./shared.js");
|
|
29
|
-
function registerMetricsTools(server, client) {
|
|
30
|
-
(0, shared_js_1.registerToolSafe)(server, 'list_metrics', {
|
|
31
|
-
title: 'List metrics',
|
|
32
|
-
description: 'List metrics in a project data catalog',
|
|
33
|
-
inputSchema: {
|
|
34
|
-
projectUuid: zod_1.z.string().describe('Project UUID'),
|
|
35
|
-
search: zod_1.z.string().optional().describe('Search query'),
|
|
36
|
-
page: zod_1.z.number().optional().describe('Page number'),
|
|
37
|
-
pageSize: zod_1.z.number().optional().describe('Page size'),
|
|
38
|
-
},
|
|
39
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
40
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
var { projectUuid } = _a, params = __rest(_a, ["projectUuid"]);
|
|
42
|
-
const result = yield c.v1.metrics.listMetrics(projectUuid, params);
|
|
43
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
44
|
-
})));
|
|
45
|
-
}
|
package/dist/tools/projects.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP tools: projects (list, get).
|
|
3
|
-
*/
|
|
4
|
-
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
|
-
import type { LightdashClient } from '@lightdash-tools/client';
|
|
6
|
-
export declare function registerProjectTools(server: McpServer, client: LightdashClient): void;
|
package/dist/tools/projects.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MCP tools: projects (list, get).
|
|
4
|
-
*/
|
|
5
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.registerProjectTools = registerProjectTools;
|
|
16
|
-
const zod_1 = require("zod");
|
|
17
|
-
const shared_js_1 = require("./shared.js");
|
|
18
|
-
function registerProjectTools(server, client) {
|
|
19
|
-
(0, shared_js_1.registerToolSafe)(server, 'list_projects', {
|
|
20
|
-
title: 'List projects',
|
|
21
|
-
description: 'List all projects in the current organization',
|
|
22
|
-
inputSchema: {},
|
|
23
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
24
|
-
}, (0, shared_js_1.wrapTool)(client, () => () => __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const projects = yield client.v1.projects.listProjects();
|
|
26
|
-
return { content: [{ type: 'text', text: JSON.stringify(projects, null, 2) }] };
|
|
27
|
-
})));
|
|
28
|
-
(0, shared_js_1.registerToolSafe)(server, 'get_project', {
|
|
29
|
-
title: 'Get project',
|
|
30
|
-
description: 'Get a project by UUID',
|
|
31
|
-
inputSchema: { projectUuid: zod_1.z.string().describe('Project UUID') },
|
|
32
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
33
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid }) {
|
|
34
|
-
const project = yield c.v1.projects.getProject(projectUuid);
|
|
35
|
-
return { content: [{ type: 'text', text: JSON.stringify(project, null, 2) }] };
|
|
36
|
-
})));
|
|
37
|
-
(0, shared_js_1.registerToolSafe)(server, 'validate_project', {
|
|
38
|
-
title: 'Validate project',
|
|
39
|
-
description: 'Trigger a validation job for a project and return the job ID',
|
|
40
|
-
inputSchema: { projectUuid: zod_1.z.string().describe('Project UUID') },
|
|
41
|
-
annotations: shared_js_1.WRITE_IDEMPOTENT,
|
|
42
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid }) {
|
|
43
|
-
const result = yield c.v1.validation.validateProject(projectUuid);
|
|
44
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
45
|
-
})));
|
|
46
|
-
(0, shared_js_1.registerToolSafe)(server, 'get_validation_results', {
|
|
47
|
-
title: 'Get validation results',
|
|
48
|
-
description: 'Get the latest validation results for a project',
|
|
49
|
-
inputSchema: {
|
|
50
|
-
projectUuid: zod_1.z.string().describe('Project UUID'),
|
|
51
|
-
jobId: zod_1.z.string().optional().describe('Optional job ID to get results for'),
|
|
52
|
-
},
|
|
53
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
54
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid, jobId }) {
|
|
55
|
-
const result = yield c.v1.validation.getValidationResults(projectUuid, { jobId });
|
|
56
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
57
|
-
})));
|
|
58
|
-
}
|
package/dist/tools/query.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP tools: query (compile).
|
|
3
|
-
*/
|
|
4
|
-
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
|
-
import type { LightdashClient } from '@lightdash-tools/client';
|
|
6
|
-
export declare function registerQueryTools(server: McpServer, client: LightdashClient): void;
|
package/dist/tools/query.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MCP tools: query (compile).
|
|
4
|
-
*/
|
|
5
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.registerQueryTools = registerQueryTools;
|
|
16
|
-
const zod_1 = require("zod");
|
|
17
|
-
const shared_js_1 = require("./shared.js");
|
|
18
|
-
function registerQueryTools(server, client) {
|
|
19
|
-
(0, shared_js_1.registerToolSafe)(server, 'compile_query', {
|
|
20
|
-
title: 'Compile query',
|
|
21
|
-
description: 'Compile a metric query for an explore without executing it',
|
|
22
|
-
inputSchema: {
|
|
23
|
-
projectUuid: zod_1.z.string().describe('Project UUID'),
|
|
24
|
-
exploreId: zod_1.z.string().describe('Explore ID'),
|
|
25
|
-
metricQuery: zod_1.z
|
|
26
|
-
.record(zod_1.z.string(), zod_1.z.unknown())
|
|
27
|
-
.describe('Metric query object (dimensions, metrics, filters, etc.)'),
|
|
28
|
-
},
|
|
29
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
30
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid, exploreId, metricQuery, }) {
|
|
31
|
-
const result = yield c.v1.query.compileQuery(projectUuid, exploreId, metricQuery);
|
|
32
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
33
|
-
})));
|
|
34
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP tools: schedulers (list, get).
|
|
3
|
-
*/
|
|
4
|
-
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
|
-
import type { LightdashClient } from '@lightdash-tools/client';
|
|
6
|
-
export declare function registerSchedulersTools(server: McpServer, client: LightdashClient): void;
|
package/dist/tools/schedulers.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MCP tools: schedulers (list, get).
|
|
4
|
-
*/
|
|
5
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
15
|
-
var t = {};
|
|
16
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
17
|
-
t[p] = s[p];
|
|
18
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
19
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
20
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
21
|
-
t[p[i]] = s[p[i]];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.registerSchedulersTools = registerSchedulersTools;
|
|
27
|
-
const zod_1 = require("zod");
|
|
28
|
-
const shared_js_1 = require("./shared.js");
|
|
29
|
-
function registerSchedulersTools(server, client) {
|
|
30
|
-
(0, shared_js_1.registerToolSafe)(server, 'list_schedulers', {
|
|
31
|
-
title: 'List schedulers',
|
|
32
|
-
description: 'List scheduled deliveries in a project',
|
|
33
|
-
inputSchema: {
|
|
34
|
-
projectUuid: zod_1.z.string().describe('Project UUID'),
|
|
35
|
-
searchQuery: zod_1.z.string().optional().describe('Search query'),
|
|
36
|
-
page: zod_1.z.number().optional().describe('Page number'),
|
|
37
|
-
pageSize: zod_1.z.number().optional().describe('Page size'),
|
|
38
|
-
},
|
|
39
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
40
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
var { projectUuid } = _a, params = __rest(_a, ["projectUuid"]);
|
|
42
|
-
const result = yield c.v1.schedulers.listSchedulers(projectUuid, params);
|
|
43
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
44
|
-
})));
|
|
45
|
-
}
|
package/dist/tools/spaces.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP tools: spaces (list, get).
|
|
3
|
-
*/
|
|
4
|
-
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
|
-
import type { LightdashClient } from '@lightdash-tools/client';
|
|
6
|
-
export declare function registerSpaceTools(server: McpServer, client: LightdashClient): void;
|
package/dist/tools/spaces.js
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MCP tools: spaces (list, get).
|
|
4
|
-
*/
|
|
5
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.registerSpaceTools = registerSpaceTools;
|
|
16
|
-
const zod_1 = require("zod");
|
|
17
|
-
const shared_js_1 = require("./shared.js");
|
|
18
|
-
function registerSpaceTools(server, client) {
|
|
19
|
-
(0, shared_js_1.registerToolSafe)(server, 'list_spaces', {
|
|
20
|
-
title: 'List spaces',
|
|
21
|
-
description: 'List spaces in a project',
|
|
22
|
-
inputSchema: { projectUuid: zod_1.z.string().describe('Project UUID') },
|
|
23
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
24
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid }) {
|
|
25
|
-
const spaces = yield c.v1.spaces.listSpacesInProject(projectUuid);
|
|
26
|
-
return { content: [{ type: 'text', text: JSON.stringify(spaces, null, 2) }] };
|
|
27
|
-
})));
|
|
28
|
-
(0, shared_js_1.registerToolSafe)(server, 'get_space', {
|
|
29
|
-
title: 'Get space',
|
|
30
|
-
description: 'Get a space by project and space UUID',
|
|
31
|
-
inputSchema: {
|
|
32
|
-
projectUuid: zod_1.z.string().describe('Project UUID'),
|
|
33
|
-
spaceUuid: zod_1.z.string().describe('Space UUID'),
|
|
34
|
-
},
|
|
35
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
36
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid, spaceUuid }) {
|
|
37
|
-
const space = yield c.v1.spaces.getSpace(projectUuid, spaceUuid);
|
|
38
|
-
return { content: [{ type: 'text', text: JSON.stringify(space, null, 2) }] };
|
|
39
|
-
})));
|
|
40
|
-
(0, shared_js_1.registerToolSafe)(server, 'grant_user_space_access', {
|
|
41
|
-
title: 'Grant user access to space',
|
|
42
|
-
description: 'Grant a user access to a space',
|
|
43
|
-
inputSchema: {
|
|
44
|
-
projectUuid: zod_1.z.string().describe('Project UUID'),
|
|
45
|
-
spaceUuid: zod_1.z.string().describe('Space UUID'),
|
|
46
|
-
userUuid: zod_1.z.string().describe('User UUID'),
|
|
47
|
-
spaceRole: zod_1.z.enum(['viewer', 'editor', 'admin']).describe('Space role'),
|
|
48
|
-
},
|
|
49
|
-
annotations: shared_js_1.WRITE_IDEMPOTENT,
|
|
50
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid, spaceUuid, userUuid, spaceRole, }) {
|
|
51
|
-
yield c.v1.spaces.grantUserAccessToSpace(projectUuid, spaceUuid, {
|
|
52
|
-
userUuid,
|
|
53
|
-
spaceRole: spaceRole,
|
|
54
|
-
});
|
|
55
|
-
return {
|
|
56
|
-
content: [
|
|
57
|
-
{
|
|
58
|
-
type: 'text',
|
|
59
|
-
text: `Successfully granted ${spaceRole} access to user ${userUuid} in space ${spaceUuid}`,
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
};
|
|
63
|
-
})));
|
|
64
|
-
(0, shared_js_1.registerToolSafe)(server, 'revoke_user_space_access', {
|
|
65
|
-
title: 'Revoke user access to space',
|
|
66
|
-
description: "Revoke a user's access to a space",
|
|
67
|
-
inputSchema: {
|
|
68
|
-
projectUuid: zod_1.z.string().describe('Project UUID'),
|
|
69
|
-
spaceUuid: zod_1.z.string().describe('Space UUID'),
|
|
70
|
-
userUuid: zod_1.z.string().describe('User UUID'),
|
|
71
|
-
},
|
|
72
|
-
annotations: shared_js_1.WRITE_DESTRUCTIVE,
|
|
73
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid, spaceUuid, userUuid, }) {
|
|
74
|
-
yield c.v1.spaces.revokeUserAccessToSpace(projectUuid, spaceUuid, userUuid);
|
|
75
|
-
return {
|
|
76
|
-
content: [
|
|
77
|
-
{
|
|
78
|
-
type: 'text',
|
|
79
|
-
text: `Successfully revoked access for user ${userUuid} in space ${spaceUuid}`,
|
|
80
|
-
},
|
|
81
|
-
],
|
|
82
|
-
};
|
|
83
|
-
})));
|
|
84
|
-
(0, shared_js_1.registerToolSafe)(server, 'grant_group_space_access', {
|
|
85
|
-
title: 'Grant group access to space',
|
|
86
|
-
description: 'Grant a group access to a space',
|
|
87
|
-
inputSchema: {
|
|
88
|
-
projectUuid: zod_1.z.string().describe('Project UUID'),
|
|
89
|
-
spaceUuid: zod_1.z.string().describe('Space UUID'),
|
|
90
|
-
groupUuid: zod_1.z.string().describe('Group UUID'),
|
|
91
|
-
spaceRole: zod_1.z.enum(['viewer', 'editor', 'admin']).describe('Space role'),
|
|
92
|
-
},
|
|
93
|
-
annotations: shared_js_1.WRITE_IDEMPOTENT,
|
|
94
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid, spaceUuid, groupUuid, spaceRole, }) {
|
|
95
|
-
yield c.v1.spaces.grantGroupAccessToSpace(projectUuid, spaceUuid, {
|
|
96
|
-
groupUuid,
|
|
97
|
-
spaceRole: spaceRole,
|
|
98
|
-
});
|
|
99
|
-
return {
|
|
100
|
-
content: [
|
|
101
|
-
{
|
|
102
|
-
type: 'text',
|
|
103
|
-
text: `Successfully granted ${spaceRole} access to group ${groupUuid} in space ${spaceUuid}`,
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
};
|
|
107
|
-
})));
|
|
108
|
-
(0, shared_js_1.registerToolSafe)(server, 'revoke_group_space_access', {
|
|
109
|
-
title: 'Revoke group access to space',
|
|
110
|
-
description: "Revoke a group's access to a space",
|
|
111
|
-
inputSchema: {
|
|
112
|
-
projectUuid: zod_1.z.string().describe('Project UUID'),
|
|
113
|
-
spaceUuid: zod_1.z.string().describe('Space UUID'),
|
|
114
|
-
groupUuid: zod_1.z.string().describe('Group UUID'),
|
|
115
|
-
},
|
|
116
|
-
annotations: shared_js_1.WRITE_DESTRUCTIVE,
|
|
117
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid, spaceUuid, groupUuid, }) {
|
|
118
|
-
yield c.v1.spaces.revokeGroupAccessToSpace(projectUuid, spaceUuid, groupUuid);
|
|
119
|
-
return {
|
|
120
|
-
content: [
|
|
121
|
-
{
|
|
122
|
-
type: 'text',
|
|
123
|
-
text: `Successfully revoked access for group ${groupUuid} in space ${spaceUuid}`,
|
|
124
|
-
},
|
|
125
|
-
],
|
|
126
|
-
};
|
|
127
|
-
})));
|
|
128
|
-
}
|
package/dist/tools/tags.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP tools: tags (list).
|
|
3
|
-
*/
|
|
4
|
-
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
|
-
import type { LightdashClient } from '@lightdash-tools/client';
|
|
6
|
-
export declare function registerTagsTools(server: McpServer, client: LightdashClient): void;
|
package/dist/tools/tags.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MCP tools: tags (list).
|
|
4
|
-
*/
|
|
5
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.registerTagsTools = registerTagsTools;
|
|
16
|
-
const zod_1 = require("zod");
|
|
17
|
-
const shared_js_1 = require("./shared.js");
|
|
18
|
-
function registerTagsTools(server, client) {
|
|
19
|
-
(0, shared_js_1.registerToolSafe)(server, 'list_tags', {
|
|
20
|
-
title: 'List tags',
|
|
21
|
-
description: 'List all tags in a project',
|
|
22
|
-
inputSchema: { projectUuid: zod_1.z.string().describe('Project UUID') },
|
|
23
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
24
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ projectUuid }) {
|
|
25
|
-
const result = yield c.v1.tags.listTags(projectUuid);
|
|
26
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
27
|
-
})));
|
|
28
|
-
}
|
package/dist/tools/users.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP tools: users / organization members (list, get, delete).
|
|
3
|
-
*/
|
|
4
|
-
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
|
-
import type { LightdashClient } from '@lightdash-tools/client';
|
|
6
|
-
export declare function registerUserTools(server: McpServer, client: LightdashClient): void;
|
package/dist/tools/users.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MCP tools: users / organization members (list, get, delete).
|
|
4
|
-
*/
|
|
5
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.registerUserTools = registerUserTools;
|
|
16
|
-
const zod_1 = require("zod");
|
|
17
|
-
const shared_js_1 = require("./shared.js");
|
|
18
|
-
function registerUserTools(server, client) {
|
|
19
|
-
(0, shared_js_1.registerToolSafe)(server, 'list_organization_members', {
|
|
20
|
-
title: 'List organization members',
|
|
21
|
-
description: 'List organization members (one page)',
|
|
22
|
-
inputSchema: {
|
|
23
|
-
page: zod_1.z.number().optional().describe('Page number'),
|
|
24
|
-
pageSize: zod_1.z.number().optional().describe('Page size'),
|
|
25
|
-
searchQuery: zod_1.z.string().optional().describe('Search query'),
|
|
26
|
-
},
|
|
27
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
28
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (params) => __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const result = yield c.v1.users.listMembers(params !== null && params !== void 0 ? params : {});
|
|
30
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
31
|
-
})));
|
|
32
|
-
(0, shared_js_1.registerToolSafe)(server, 'get_member', {
|
|
33
|
-
title: 'Get member',
|
|
34
|
-
description: 'Get an organization member by UUID',
|
|
35
|
-
inputSchema: { userUuid: zod_1.z.string().describe('User UUID') },
|
|
36
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
37
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ userUuid }) {
|
|
38
|
-
const member = yield c.v1.users.getMemberByUuid(userUuid);
|
|
39
|
-
return { content: [{ type: 'text', text: JSON.stringify(member, null, 2) }] };
|
|
40
|
-
})));
|
|
41
|
-
(0, shared_js_1.registerToolSafe)(server, 'delete_member', {
|
|
42
|
-
title: 'Delete member (destructive)',
|
|
43
|
-
description: 'Permanently remove a user from the organization. Destructive; clients and agents should obtain explicit user confirmation before calling.',
|
|
44
|
-
inputSchema: { userUuid: zod_1.z.string().describe('User UUID') },
|
|
45
|
-
annotations: shared_js_1.WRITE_DESTRUCTIVE,
|
|
46
|
-
}, (0, shared_js_1.wrapTool)(client, (c) => (_a) => __awaiter(this, [_a], void 0, function* ({ userUuid }) {
|
|
47
|
-
yield c.v1.users.deleteMember(userUuid);
|
|
48
|
-
return { content: [{ type: 'text', text: 'Member deleted.' }] };
|
|
49
|
-
})));
|
|
50
|
-
}
|
package/src/audit.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Re-exports the shared audit logger from @lightdash-tools/common.
|
|
3
|
-
* The canonical implementation lives in common so the CLI can also use it.
|
|
4
|
-
*/
|
|
5
|
-
export { getSessionId, initAuditLog, logAuditEntry } from '@lightdash-tools/common';
|
|
6
|
-
export type { AuditLogEntry, AuditStatus } from '@lightdash-tools/common';
|