@lightdash-tools/mcp 0.8.0 → 0.11.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 +112 -236
- package/dist/audit/server-profile.d.ts +13 -0
- package/dist/audit/server-profile.js +28 -0
- package/dist/audit/server-profile.test.js +21 -0
- package/dist/auth/oauth-broker/pending-store.d.ts +6 -7
- package/dist/auth/oauth-broker/pending-store.js +3 -4
- package/dist/auth/oauth-broker/pending-store.test.d.ts +2 -3
- package/dist/auth/oauth-broker/pending-store.test.js +2 -39
- package/dist/auth/oauth-broker/routes.d.ts +1 -1
- package/dist/auth/oauth-broker/routes.js +3 -3
- package/dist/auth/oauth-broker/routes.test.js +1 -1
- package/dist/auth/request-state-key.d.ts +19 -0
- package/dist/auth/request-state-key.js +49 -0
- package/dist/auth/resource-server/lightdash-oauth-middleware.d.ts +1 -3
- package/dist/auth/resource-server/lightdash-oauth-middleware.js +1 -20
- package/dist/auth/resource-server/lightdash-oauth-middleware.test.js +14 -14
- package/dist/auth/resource-server/oauth-protected-resource.d.ts +6 -6
- package/dist/auth/resource-server/oauth-protected-resource.js +8 -8
- package/dist/auth/resource-server/token-scopes.d.ts +1 -1
- package/dist/auth/resource-server/token-scopes.js +1 -1
- package/dist/auth/resource-server/www-authenticate.test.js +11 -13
- package/dist/bin.js +54 -51
- package/dist/config/env.d.ts +8 -16
- package/dist/config/env.js +9 -17
- package/dist/config/load-mcp-config.d.ts +0 -4
- package/dist/config/load-mcp-config.js +9 -38
- package/dist/config/load-mcp-config.test.js +8 -2
- package/dist/config/normalize-url.d.ts +1 -1
- package/dist/config/normalize-url.js +1 -1
- package/dist/config/normalize-url.test.js +16 -13
- package/dist/config/obsolete-env.d.ts +5 -0
- package/dist/config/obsolete-env.js +48 -0
- package/dist/config/obsolete-env.test.js +22 -0
- package/dist/config/runtime.d.ts +3 -3
- package/dist/config/runtime.js +19 -23
- package/dist/config/runtime.test.js +23 -9
- package/dist/config/test-mcp-http-config.js +1 -1
- package/dist/destructive/content-promote.js +7 -1
- package/dist/destructive/promote-contract.test.js +106 -47
- package/dist/destructive/register-destructive-tool.js +6 -24
- package/dist/destructive/request-state.d.ts +2 -6
- package/dist/destructive/request-state.js +3 -38
- package/dist/destructive/types.d.ts +2 -1
- package/dist/governance/available-projects.d.ts +37 -0
- package/dist/governance/available-projects.js +132 -0
- package/dist/governance/available-projects.test.d.ts +4 -0
- package/dist/governance/available-projects.test.js +107 -0
- package/dist/governance/mcp-client-session.d.ts +3 -2
- package/dist/governance/mcp-client-session.js +3 -2
- package/dist/governance/mcp-post-factory-context.d.ts +15 -0
- package/dist/governance/mcp-post-factory-context.js +22 -0
- package/dist/governance/mcp-post-factory-context.test.js +34 -0
- package/dist/governance/project-scope.d.ts +8 -22
- package/dist/governance/project-scope.js +36 -44
- package/dist/governance/project-scope.test.d.ts +1 -1
- package/dist/governance/project-scope.test.js +21 -44
- package/dist/governance/promote-allowlist.d.ts +18 -0
- package/dist/governance/promote-allowlist.js +66 -0
- package/dist/governance/promote-allowlist.test.d.ts +4 -0
- package/dist/governance/promote-allowlist.test.js +87 -0
- package/dist/http.integration.test.js +116 -265
- package/dist/http.test.js +0 -12
- package/dist/index.d.ts +5 -1
- package/dist/index.integration.test.js +0 -4
- package/dist/index.js +31 -16
- package/dist/policy/content-developer.d.ts +3 -3
- package/dist/policy/content-developer.js +3 -3
- package/dist/policy/content-developer.test.js +10 -4
- package/dist/policy/content-reader.d.ts +15 -6
- package/dist/policy/content-reader.js +39 -10
- package/dist/policy/content-reader.test.js +5 -3
- package/dist/policy/envelope.d.ts +4 -2
- package/dist/policy/envelope.js +2 -2
- package/dist/policy/envelope.test.js +28 -0
- package/dist/policy/preview-ledger-fault.test.js +101 -426
- package/dist/policy/preview-ledger.d.ts +38 -74
- package/dist/policy/preview-ledger.js +108 -186
- package/dist/policy/preview-ledger.test.js +237 -111
- package/dist/policy/result-limits.d.ts +6 -1
- package/dist/policy/result-limits.js +28 -29
- package/dist/policy/result-limits.test.js +10 -1
- package/dist/profiles/ai-agent-ops/v1/index.d.ts +6 -0
- package/dist/profiles/ai-agent-ops/v1/index.js +20 -0
- package/dist/profiles/ai-agent-ops/v1/prompts.d.ts +5 -0
- package/dist/profiles/ai-agent-ops/v1/prompts.js +141 -0
- package/dist/profiles/ai-agent-ops/v1/prompts.test.d.ts +4 -0
- package/dist/profiles/ai-agent-ops/v1/prompts.test.js +26 -0
- package/dist/profiles/ai-agent-ops/v1/resources/playbooks/core.md +39 -0
- package/dist/profiles/ai-agent-ops/v1/resources/playbooks/evaluation.md +25 -0
- package/dist/profiles/ai-agent-ops/v1/resources/playbooks/index.md +14 -0
- package/dist/profiles/ai-agent-ops/v1/resources/playbooks/loop-engineering.md +28 -0
- package/dist/profiles/ai-agent-ops/v1/resources/playbooks/release-gate.md +22 -0
- package/dist/profiles/ai-agent-ops/v1/resources/playbooks.d.ts +10 -0
- package/dist/profiles/ai-agent-ops/v1/resources/playbooks.js +41 -0
- package/dist/profiles/content-developer/v1/index.d.ts +8 -0
- package/dist/profiles/content-developer/v1/index.js +22 -0
- package/dist/{personas → profiles}/content-developer/v1/prompts.d.ts +3 -0
- package/dist/profiles/content-developer/v1/prompts.js +157 -0
- package/dist/profiles/content-developer/v1/prompts.test.js +286 -0
- package/dist/profiles/content-developer/v1/resources/playbooks/chart-types.md +138 -0
- package/dist/profiles/content-developer/v1/resources/playbooks/content-move.md +22 -0
- package/dist/profiles/content-developer/v1/resources/playbooks/core.md +109 -0
- package/dist/profiles/content-developer/v1/resources/playbooks/dashboard-design.md +153 -0
- package/dist/profiles/content-developer/v1/resources/playbooks/dashboards.md +108 -0
- package/dist/profiles/content-developer/v1/resources/playbooks/index.md +15 -0
- package/dist/{personas → profiles}/content-developer/v1/resources/playbooks.d.ts +1 -1
- package/dist/profiles/content-developer/v1/resources/playbooks.js +65 -0
- package/dist/profiles/content-governance/v1/index.d.ts +7 -0
- package/dist/profiles/content-governance/v1/index.js +21 -0
- package/dist/{personas → profiles}/content-governance/v1/prompts.test.js +2 -2
- package/dist/{personas → profiles}/content-governance/v1/resources/playbooks/core.md +3 -3
- package/dist/{personas → profiles}/content-governance/v1/resources/playbooks/dashboards.md +1 -1
- package/dist/{personas → profiles}/content-governance/v1/resources/playbooks.js +4 -4
- package/dist/profiles/content-reader/v1/index.d.ts +6 -0
- package/dist/profiles/content-reader/v1/index.js +20 -0
- package/dist/profiles/content-reader/v1/prompts.js +162 -0
- package/dist/{personas → profiles}/content-reader/v1/prompts.test.js +2 -2
- package/dist/profiles/content-reader/v1/resources/playbooks/compare.md +36 -0
- package/dist/profiles/content-reader/v1/resources/playbooks/core.md +67 -0
- package/dist/profiles/content-reader/v1/resources/playbooks/discover.md +35 -0
- package/dist/profiles/content-reader/v1/resources/playbooks/explain-run.md +49 -0
- package/dist/profiles/content-reader/v1/resources/playbooks/index.md +14 -0
- package/dist/{personas → profiles}/content-reader/v1/resources/playbooks.js +4 -4
- package/dist/profiles/data-analyst/v1/index.d.ts +6 -0
- package/dist/profiles/data-analyst/v1/index.js +20 -0
- package/dist/profiles/data-analyst/v1/prompts.d.ts +5 -0
- package/dist/profiles/data-analyst/v1/prompts.js +41 -0
- package/dist/profiles/data-analyst/v1/prompts.test.d.ts +4 -0
- package/dist/profiles/data-analyst/v1/prompts.test.js +26 -0
- package/dist/profiles/data-analyst/v1/resources/playbooks/core.md +41 -0
- package/dist/profiles/data-analyst/v1/resources/playbooks/explore.md +26 -0
- package/dist/profiles/data-analyst/v1/resources/playbooks/index.md +8 -0
- package/dist/profiles/data-analyst/v1/resources/playbooks.d.ts +10 -0
- package/dist/profiles/data-analyst/v1/resources/playbooks.js +33 -0
- package/dist/profiles/index.d.ts +24 -0
- package/dist/profiles/index.js +73 -0
- package/dist/profiles/index.test.js +121 -0
- package/dist/{personas → profiles}/lib/playbook-resources.d.ts +12 -10
- package/dist/{personas → profiles}/lib/playbook-resources.js +28 -24
- package/dist/profiles/organization-audit/v1/index.d.ts +6 -0
- package/dist/profiles/organization-audit/v1/index.js +20 -0
- package/dist/profiles/organization-audit/v1/prompts.js +124 -0
- package/dist/{personas → profiles}/organization-audit/v1/prompts.test.js +2 -2
- package/dist/profiles/organization-audit/v1/resources/playbooks/access.md +21 -0
- package/dist/profiles/organization-audit/v1/resources/playbooks/content.md +19 -0
- package/dist/profiles/organization-audit/v1/resources/playbooks/core.md +69 -0
- package/dist/profiles/organization-audit/v1/resources/playbooks/deliveries.md +14 -0
- package/dist/profiles/organization-audit/v1/resources/playbooks/index.md +14 -0
- package/dist/{personas → profiles}/organization-audit/v1/resources/playbooks.js +3 -3
- package/dist/profiles/profile.membership.test.js +36 -0
- package/dist/profiles/semantic-layer/v1/index.d.ts +6 -0
- package/dist/profiles/semantic-layer/v1/index.js +19 -0
- package/dist/profiles/semantic-layer/v1/prompts.js +96 -0
- package/dist/{personas → profiles}/semantic-layer/v1/prompts.test.js +2 -2
- package/dist/profiles/semantic-layer/v1/resources/playbooks/compose-compile.md +60 -0
- package/dist/profiles/semantic-layer/v1/resources/playbooks/core.md +71 -0
- package/dist/profiles/semantic-layer/v1/resources/playbooks/explore.md +79 -0
- package/dist/profiles/semantic-layer/v1/resources/playbooks/index.md +13 -0
- package/dist/{personas → profiles}/semantic-layer/v1/resources/playbooks.js +4 -4
- package/dist/{personas → profiles}/types.d.ts +6 -7
- package/dist/{personas → profiles}/types.js +1 -1
- package/dist/protocol-contract.test.js +48 -3
- package/dist/server/capabilities.d.ts +6 -6
- package/dist/server/capabilities.js +11 -8
- package/dist/server/capabilities.test.js +8 -7
- package/dist/server/server.js +17 -13
- package/dist/server/upstream-errors.d.ts +17 -0
- package/dist/server/upstream-errors.js +60 -0
- package/dist/server/upstream-errors.test.js +50 -0
- package/dist/stdio.process.test.js +65 -9
- package/dist/tools/ai-agents/agents.d.ts +7 -0
- package/dist/tools/ai-agents/agents.js +32 -0
- package/dist/tools/ai-agents/agents.test.d.ts +1 -0
- package/dist/tools/ai-agents/agents.test.js +176 -0
- package/dist/tools/ai-agents/discovery.d.ts +9 -0
- package/dist/tools/ai-agents/discovery.js +73 -0
- package/dist/tools/ai-agents/evaluations.d.ts +14 -0
- package/dist/tools/ai-agents/evaluations.js +177 -0
- package/dist/tools/ai-agents/helpers.d.ts +63 -0
- package/dist/tools/ai-agents/helpers.js +321 -0
- package/dist/tools/ai-agents/threads.d.ts +7 -0
- package/dist/tools/ai-agents/threads.js +40 -0
- package/dist/tools/composition/explain-content.js +3 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/index.test.js +16 -10
- package/dist/tools/lib/schema-fields.d.ts +2 -0
- package/dist/tools/lib/schema-fields.js +4 -1
- package/dist/tools/lib/stable-stringify.d.ts +1 -1
- package/dist/tools/lib/stable-stringify.js +1 -1
- package/dist/tools/organization/invariants.test.d.ts +1 -1
- package/dist/tools/organization/invariants.test.js +5 -5
- package/dist/tools/organization/inventory.js +2 -1
- package/dist/tools/project/content.js +5 -1
- package/dist/tools/project/developer-content-preview.d.ts +3 -2
- package/dist/tools/project/developer-content-preview.js +41 -36
- package/dist/tools/project/developer-content-shared.d.ts +9 -3
- package/dist/tools/project/developer-content-shared.js +8 -4
- package/dist/tools/project/developer-content.d.ts +7 -8
- package/dist/tools/project/developer-content.js +72 -67
- package/dist/tools/project/developer-get-chart-as-code.d.ts +9 -0
- package/dist/tools/project/developer-get-chart-as-code.js +39 -0
- package/dist/tools/project/developer-get-chart-as-code.test.d.ts +4 -0
- package/dist/tools/project/developer-get-chart-as-code.test.js +70 -0
- package/dist/tools/project/developer-helpers.d.ts +1 -1
- package/dist/tools/project/developer-helpers.js +1 -1
- package/dist/tools/project/get-dashboard-promote-diff.js +12 -2
- package/dist/tools/project/invariants.test.d.ts +1 -1
- package/dist/tools/project/invariants.test.js +12 -10
- package/dist/tools/project/parameters.js +8 -3
- package/dist/tools/project/projects.d.ts +1 -4
- package/dist/tools/project/projects.js +37 -15
- package/dist/tools/project/projects.test.js +70 -8
- package/dist/tools/project/reader-content.js +6 -3
- package/dist/tools/project/reader-execution.js +4 -2
- package/dist/tools/project/reader-export-chart-image.d.ts +6 -0
- package/dist/tools/project/reader-export-chart-image.js +78 -0
- package/dist/tools/project/reader-export-chart-image.test.d.ts +4 -0
- package/dist/tools/project/reader-export-chart-image.test.js +149 -0
- package/dist/tools/project/spaces.js +12 -4
- package/dist/tools/project/spaces.test.d.ts +1 -0
- package/dist/tools/project/spaces.test.js +47 -0
- package/dist/tools/query/bounded-saved-query.d.ts +4 -3
- package/dist/tools/query/bounded-saved-query.js +4 -6
- package/dist/tools/query/lifecycle.d.ts +1 -1
- package/dist/tools/query/lifecycle.js +25 -31
- package/dist/tools/query/query-ledger.d.ts +17 -9
- package/dist/tools/query/query-ledger.js +21 -15
- package/dist/tools/query/query-ledger.test.js +13 -11
- package/dist/tools/query/reader-tool-helpers.d.ts +4 -2
- package/dist/tools/query/reader-tool-helpers.js +11 -8
- package/dist/tools/query/reader-tool-helpers.test.js +8 -4
- package/dist/tools/query/run-metric-query.d.ts +6 -0
- package/dist/tools/query/run-metric-query.js +94 -0
- package/dist/tools/query/run-metric-query.test.d.ts +4 -0
- package/dist/tools/query/run-metric-query.test.js +116 -0
- package/dist/tools/registry.d.ts +71 -8
- package/dist/tools/registry.js +36 -6
- package/dist/tools/semantic/explores.js +43 -17
- package/dist/tools/semantic/metrics.js +22 -8
- package/dist/tools/semantic/query.js +25 -17
- package/dist/tools/shared.d.ts +28 -9
- package/dist/tools/shared.js +62 -29
- package/dist/tools/shared.test.js +100 -4
- package/dist/transports/streamable-http.js +75 -223
- package/dist/transports/streamable-http.test.js +19 -12
- package/package.json +5 -6
- package/dist/destructive/confirmation-claim.d.ts +0 -21
- package/dist/destructive/confirmation-claim.js +0 -87
- package/dist/destructive/confirmation-claim.test.js +0 -50
- package/dist/personas/content-developer/v1/index.d.ts +0 -10
- package/dist/personas/content-developer/v1/index.js +0 -51
- package/dist/personas/content-developer/v1/prompts.js +0 -138
- package/dist/personas/content-developer/v1/prompts.test.js +0 -75
- package/dist/personas/content-developer/v1/resources/playbooks/content-move.md +0 -15
- package/dist/personas/content-developer/v1/resources/playbooks/core.md +0 -63
- package/dist/personas/content-developer/v1/resources/playbooks/dashboards.md +0 -55
- package/dist/personas/content-developer/v1/resources/playbooks/index.md +0 -13
- package/dist/personas/content-developer/v1/resources/playbooks.js +0 -44
- package/dist/personas/content-governance/v1/index.d.ts +0 -9
- package/dist/personas/content-governance/v1/index.js +0 -29
- package/dist/personas/content-reader/v1/index.d.ts +0 -8
- package/dist/personas/content-reader/v1/index.js +0 -37
- package/dist/personas/content-reader/v1/prompts.js +0 -128
- package/dist/personas/content-reader/v1/resources/playbooks/compare.md +0 -21
- package/dist/personas/content-reader/v1/resources/playbooks/core.md +0 -40
- package/dist/personas/content-reader/v1/resources/playbooks/discover.md +0 -13
- package/dist/personas/content-reader/v1/resources/playbooks/explain-run.md +0 -19
- package/dist/personas/content-reader/v1/resources/playbooks/index.md +0 -14
- package/dist/personas/index.d.ts +0 -22
- package/dist/personas/index.js +0 -73
- package/dist/personas/index.test.js +0 -109
- package/dist/personas/organization-audit/v1/index.d.ts +0 -8
- package/dist/personas/organization-audit/v1/index.js +0 -42
- package/dist/personas/organization-audit/v1/prompts.js +0 -92
- package/dist/personas/organization-audit/v1/resources/playbooks/access.md +0 -13
- package/dist/personas/organization-audit/v1/resources/playbooks/content.md +0 -9
- package/dist/personas/organization-audit/v1/resources/playbooks/core.md +0 -36
- package/dist/personas/organization-audit/v1/resources/playbooks/deliveries.md +0 -9
- package/dist/personas/organization-audit/v1/resources/playbooks/index.md +0 -14
- package/dist/personas/persona.parity.test.js +0 -26
- package/dist/personas/semantic-layer/v1/index.d.ts +0 -8
- package/dist/personas/semantic-layer/v1/index.js +0 -32
- package/dist/personas/semantic-layer/v1/prompts.js +0 -85
- package/dist/personas/semantic-layer/v1/resources/playbooks/compose-compile.md +0 -55
- package/dist/personas/semantic-layer/v1/resources/playbooks/core.md +0 -39
- package/dist/personas/semantic-layer/v1/resources/playbooks/explore.md +0 -76
- package/dist/personas/semantic-layer/v1/resources/playbooks/index.md +0 -13
- package/dist/store/config.d.ts +0 -11
- package/dist/store/config.js +0 -50
- package/dist/store/config.test.js +0 -56
- package/dist/store/create-oauth-broker-store.d.ts +0 -6
- package/dist/store/create-oauth-broker-store.js +0 -16
- package/dist/store/create-preview-store.d.ts +0 -10
- package/dist/store/create-preview-store.js +0 -30
- package/dist/store/create-session-store.d.ts +0 -19
- package/dist/store/create-session-store.js +0 -24
- package/dist/store/in-memory-preview-store.d.ts +0 -17
- package/dist/store/in-memory-preview-store.js +0 -72
- package/dist/store/redis-client.d.ts +0 -11
- package/dist/store/redis-client.js +0 -48
- package/dist/store/redis-oauth-broker-store.d.ts +0 -42
- package/dist/store/redis-oauth-broker-store.js +0 -167
- package/dist/store/redis-oauth-broker-store.test.js +0 -80
- package/dist/store/redis-preview-store.d.ts +0 -23
- package/dist/store/redis-preview-store.js +0 -94
- package/dist/store/redis-preview-store.test.js +0 -39
- package/dist/store/redis-session-index.d.ts +0 -33
- package/dist/store/redis-session-index.js +0 -49
- package/dist/store/types.d.ts +0 -13
- package/dist/store/types.js +0 -8
- package/dist/transports/http-request-utils.d.ts +0 -2
- package/dist/transports/http-request-utils.js +0 -13
- package/dist/transports/session-store.d.ts +0 -72
- package/dist/transports/session-store.js +0 -143
- package/dist/transports/session-store.test.js +0 -111
- /package/dist/{destructive/confirmation-claim.test.d.ts → audit/server-profile.test.d.ts} +0 -0
- /package/dist/{personas/index.test.d.ts → config/obsolete-env.test.d.ts} +0 -0
- /package/dist/{personas/persona.parity.test.d.ts → governance/mcp-post-factory-context.test.d.ts} +0 -0
- /package/dist/{store/config.test.d.ts → policy/envelope.test.d.ts} +0 -0
- /package/dist/{personas → profiles}/content-developer/v1/prompts.test.d.ts +0 -0
- /package/dist/{personas → profiles}/content-governance/v1/prompts.d.ts +0 -0
- /package/dist/{personas → profiles}/content-governance/v1/prompts.js +0 -0
- /package/dist/{personas → profiles}/content-governance/v1/prompts.test.d.ts +0 -0
- /package/dist/{personas → profiles}/content-governance/v1/resources/playbooks/charts.md +0 -0
- /package/dist/{personas → profiles}/content-governance/v1/resources/playbooks/index.md +0 -0
- /package/dist/{personas → profiles}/content-governance/v1/resources/playbooks.d.ts +0 -0
- /package/dist/{personas → profiles}/content-reader/v1/prompts.d.ts +0 -0
- /package/dist/{personas → profiles}/content-reader/v1/prompts.test.d.ts +0 -0
- /package/dist/{personas → profiles}/content-reader/v1/resources/playbooks.d.ts +0 -0
- /package/dist/{store/redis-oauth-broker-store.test.d.ts → profiles/index.test.d.ts} +0 -0
- /package/dist/{personas → profiles}/organization-audit/v1/prompts.d.ts +0 -0
- /package/dist/{personas → profiles}/organization-audit/v1/prompts.test.d.ts +0 -0
- /package/dist/{personas → profiles}/organization-audit/v1/resources/playbooks.d.ts +0 -0
- /package/dist/{store/redis-preview-store.test.d.ts → profiles/profile.membership.test.d.ts} +0 -0
- /package/dist/{personas → profiles}/semantic-layer/v1/prompts.d.ts +0 -0
- /package/dist/{personas → profiles}/semantic-layer/v1/prompts.test.d.ts +0 -0
- /package/dist/{personas → profiles}/semantic-layer/v1/resources/playbooks.d.ts +0 -0
- /package/dist/{transports/session-store.test.d.ts → server/upstream-errors.test.d.ts} +0 -0
|
@@ -8,6 +8,6 @@ export interface OAuthBroker {
|
|
|
8
8
|
export declare function isOAuthBrokerPath(path: string): boolean;
|
|
9
9
|
/**
|
|
10
10
|
* Creates the OAuth broker request handler for co-located AS façade routes.
|
|
11
|
-
*
|
|
11
|
+
* Pending state is process-local (InMemoryOAuthBrokerStore); sticky `/oauth/*` for multi-instance.
|
|
12
12
|
*/
|
|
13
13
|
export declare function createOAuthBroker(config: McpHttpConfig, store?: OAuthBrokerStore): OAuthBroker;
|
|
@@ -4,11 +4,11 @@ exports.isOAuthBrokerPath = isOAuthBrokerPath;
|
|
|
4
4
|
exports.createOAuthBroker = createOAuthBroker;
|
|
5
5
|
const env_js_1 = require("../../config/env.js");
|
|
6
6
|
const normalize_url_js_1 = require("../../config/normalize-url.js");
|
|
7
|
-
const create_oauth_broker_store_js_1 = require("../../store/create-oauth-broker-store.js");
|
|
8
7
|
const http_body_js_1 = require("../../transports/http-body.js");
|
|
9
8
|
const http_response_js_1 = require("../../transports/http-response.js");
|
|
10
9
|
const as_metadata_js_1 = require("./as-metadata.js");
|
|
11
10
|
const lightdash_token_js_1 = require("./lightdash-token.js");
|
|
11
|
+
const pending_store_js_1 = require("./pending-store.js");
|
|
12
12
|
const pkce_js_1 = require("./pkce.js");
|
|
13
13
|
/** Schemes that must never be used as OAuth redirect targets. */
|
|
14
14
|
const BLOCKED_REDIRECT_SCHEMES = new Set(['javascript:', 'data:', 'vbscript:', 'file:']);
|
|
@@ -414,9 +414,9 @@ function isOAuthBrokerPath(path) {
|
|
|
414
414
|
}
|
|
415
415
|
/**
|
|
416
416
|
* Creates the OAuth broker request handler for co-located AS façade routes.
|
|
417
|
-
*
|
|
417
|
+
* Pending state is process-local (InMemoryOAuthBrokerStore); sticky `/oauth/*` for multi-instance.
|
|
418
418
|
*/
|
|
419
|
-
function createOAuthBroker(config, store =
|
|
419
|
+
function createOAuthBroker(config, store = new pending_store_js_1.InMemoryOAuthBrokerStore()) {
|
|
420
420
|
return {
|
|
421
421
|
async handle(req, res, path) {
|
|
422
422
|
if (!isOAuthBrokerPath(path)) {
|
|
@@ -11,7 +11,7 @@ const pending_store_js_1 = require("./pending-store.js");
|
|
|
11
11
|
const pkce_js_1 = require("./pkce.js");
|
|
12
12
|
const routes_js_1 = require("./routes.js");
|
|
13
13
|
function baseConfig(overrides = {}) {
|
|
14
|
-
return (0, test_mcp_http_config_js_1.makeTestMcpHttpConfig)(Object.assign({ host: '0.0.0.0', oauthClientId: 'ld-client', oauthClientSecret: new client_1.SecretString('ld-secret'), maxBodyBytes: 1024 * 1024,
|
|
14
|
+
return (0, test_mcp_http_config_js_1.makeTestMcpHttpConfig)(Object.assign({ host: '0.0.0.0', oauthClientId: 'ld-client', oauthClientSecret: new client_1.SecretString('ld-secret'), maxBodyBytes: 1024 * 1024, requiredScopes: [], scopesSupported: [], tokenValidationCacheTtlMs: 10000 }, overrides));
|
|
15
15
|
}
|
|
16
16
|
function mockRes() {
|
|
17
17
|
const state = {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared HMAC key for MCP opaque tokens (previewToken + destructive requestState).
|
|
3
|
+
* Env: LIGHTDASH_TOOLS_MCP_REQUEST_STATE_KEY (≥32 bytes).
|
|
4
|
+
*/
|
|
5
|
+
import { ENV_LIGHTDASH_TOOLS_MCP_REQUEST_STATE_KEY } from '../config/env.js';
|
|
6
|
+
export declare const PREVIEW_TOKEN_KEY_PURPOSE = "content-developer preview tokens are enabled";
|
|
7
|
+
export declare const DESTRUCTIVE_REQUEST_STATE_KEY_PURPOSE = "content-governance destructive tools are enabled";
|
|
8
|
+
/** HTTP ships all profiles; preview + destructive elicitation share one signing key. */
|
|
9
|
+
export declare const HTTP_SIGNED_STATE_KEY_PURPOSE = "HTTP MCP exposes content-developer preview tokens and content-governance destructive tools";
|
|
10
|
+
/** Resolve the HMAC signing key (configured env or test fallback). */
|
|
11
|
+
export declare function resolveRequestStateKey(purpose: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Fail closed when content-governance / content-developer signed tokens are needed.
|
|
14
|
+
* Vitest/NODE_ENV=test may use a deterministic fallback (checked via resolve).
|
|
15
|
+
*/
|
|
16
|
+
export declare function assertRequestStateKeyConfigured(purpose: string): void;
|
|
17
|
+
/** Fail fast when HTTP starts with profiles that require signed preview/destructive tokens. */
|
|
18
|
+
export declare function assertHttpSignedStateKeyConfigured(): void;
|
|
19
|
+
export { ENV_LIGHTDASH_TOOLS_MCP_REQUEST_STATE_KEY };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared HMAC key for MCP opaque tokens (previewToken + destructive requestState).
|
|
4
|
+
* Env: LIGHTDASH_TOOLS_MCP_REQUEST_STATE_KEY (≥32 bytes).
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.ENV_LIGHTDASH_TOOLS_MCP_REQUEST_STATE_KEY = exports.HTTP_SIGNED_STATE_KEY_PURPOSE = exports.DESTRUCTIVE_REQUEST_STATE_KEY_PURPOSE = exports.PREVIEW_TOKEN_KEY_PURPOSE = void 0;
|
|
8
|
+
exports.resolveRequestStateKey = resolveRequestStateKey;
|
|
9
|
+
exports.assertRequestStateKeyConfigured = assertRequestStateKeyConfigured;
|
|
10
|
+
exports.assertHttpSignedStateKeyConfigured = assertHttpSignedStateKeyConfigured;
|
|
11
|
+
const env_js_1 = require("../config/env.js");
|
|
12
|
+
Object.defineProperty(exports, "ENV_LIGHTDASH_TOOLS_MCP_REQUEST_STATE_KEY", { enumerable: true, get: function () { return env_js_1.ENV_LIGHTDASH_TOOLS_MCP_REQUEST_STATE_KEY; } });
|
|
13
|
+
const TEST_FALLBACK_KEY = 'lightdash-tools-dev-request-state-key!!';
|
|
14
|
+
exports.PREVIEW_TOKEN_KEY_PURPOSE = 'content-developer preview tokens are enabled';
|
|
15
|
+
exports.DESTRUCTIVE_REQUEST_STATE_KEY_PURPOSE = 'content-governance destructive tools are enabled';
|
|
16
|
+
/** HTTP ships all profiles; preview + destructive elicitation share one signing key. */
|
|
17
|
+
exports.HTTP_SIGNED_STATE_KEY_PURPOSE = 'HTTP MCP exposes content-developer preview tokens and content-governance destructive tools';
|
|
18
|
+
function isTestRuntime() {
|
|
19
|
+
return process.env.VITEST === 'true' || process.env.NODE_ENV === 'test';
|
|
20
|
+
}
|
|
21
|
+
function readConfiguredKey() {
|
|
22
|
+
const key = process.env.LIGHTDASH_TOOLS_MCP_REQUEST_STATE_KEY;
|
|
23
|
+
return typeof key === 'string' ? key : undefined;
|
|
24
|
+
}
|
|
25
|
+
function isUsableKey(key) {
|
|
26
|
+
return key !== undefined && key.length >= 32;
|
|
27
|
+
}
|
|
28
|
+
/** Resolve the HMAC signing key (configured env or test fallback). */
|
|
29
|
+
function resolveRequestStateKey(purpose) {
|
|
30
|
+
const configured = readConfiguredKey();
|
|
31
|
+
if (isUsableKey(configured)) {
|
|
32
|
+
return configured;
|
|
33
|
+
}
|
|
34
|
+
if (isTestRuntime()) {
|
|
35
|
+
return TEST_FALLBACK_KEY;
|
|
36
|
+
}
|
|
37
|
+
throw new Error(`${env_js_1.ENV_LIGHTDASH_TOOLS_MCP_REQUEST_STATE_KEY} must be set to a secret of at least 32 bytes when ${purpose}`);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Fail closed when content-governance / content-developer signed tokens are needed.
|
|
41
|
+
* Vitest/NODE_ENV=test may use a deterministic fallback (checked via resolve).
|
|
42
|
+
*/
|
|
43
|
+
function assertRequestStateKeyConfigured(purpose) {
|
|
44
|
+
resolveRequestStateKey(purpose);
|
|
45
|
+
}
|
|
46
|
+
/** Fail fast when HTTP starts with profiles that require signed preview/destructive tokens. */
|
|
47
|
+
function assertHttpSignedStateKeyConfigured() {
|
|
48
|
+
assertRequestStateKeyConfigured(exports.HTTP_SIGNED_STATE_KEY_PURPOSE);
|
|
49
|
+
}
|
|
@@ -15,9 +15,7 @@ export interface OAuthAuthFailure {
|
|
|
15
15
|
headers?: Record<string, string>;
|
|
16
16
|
}
|
|
17
17
|
export type OAuthAuthResult = OAuthAuthFailure | OAuthAuthSuccess;
|
|
18
|
-
/** Builds the standard missing-Bearer challenge for a
|
|
18
|
+
/** Builds the standard missing-Bearer challenge for a profile MCP path. */
|
|
19
19
|
export declare function buildBearerRequiredFailure(config: McpHttpConfig, mcpPath: string): OAuthAuthFailure;
|
|
20
|
-
/** Builds an invalid_token challenge (e.g. session subject/org mismatch). */
|
|
21
|
-
export declare function buildInvalidTokenFailure(config: McpHttpConfig, mcpPath: string, errorDescription: string): OAuthAuthFailure;
|
|
22
20
|
export declare function authenticateLightdashOAuth(req: IncomingMessage, config: McpHttpConfig, mcpPath: string): Promise<OAuthAuthResult>;
|
|
23
21
|
export declare function writeOAuthAuthFailure(res: ServerResponse, failure: OAuthAuthFailure): void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildBearerRequiredFailure = buildBearerRequiredFailure;
|
|
4
|
-
exports.buildInvalidTokenFailure = buildInvalidTokenFailure;
|
|
5
4
|
exports.authenticateLightdashOAuth = authenticateLightdashOAuth;
|
|
6
5
|
exports.writeOAuthAuthFailure = writeOAuthAuthFailure;
|
|
7
6
|
const http_response_js_1 = require("../../transports/http-response.js");
|
|
@@ -11,7 +10,7 @@ const oauth_protected_resource_js_1 = require("./oauth-protected-resource.js");
|
|
|
11
10
|
const token_scopes_js_1 = require("./token-scopes.js");
|
|
12
11
|
const token_validation_error_js_1 = require("./token-validation-error.js");
|
|
13
12
|
const www_authenticate_js_1 = require("./www-authenticate.js");
|
|
14
|
-
/** Builds the standard missing-Bearer challenge for a
|
|
13
|
+
/** Builds the standard missing-Bearer challenge for a profile MCP path. */
|
|
15
14
|
function buildBearerRequiredFailure(config, mcpPath) {
|
|
16
15
|
const resourceMetadataUrl = (0, oauth_protected_resource_js_1.getProtectedResourceMetadataPathUrl)(config, mcpPath);
|
|
17
16
|
const scope = config.requiredScopes.join(' ');
|
|
@@ -25,24 +24,6 @@ function buildBearerRequiredFailure(config, mcpPath) {
|
|
|
25
24
|
wwwAuthenticate: (0, www_authenticate_js_1.buildWwwAuthenticateHeader)({ resourceMetadataUrl, scope }),
|
|
26
25
|
};
|
|
27
26
|
}
|
|
28
|
-
/** Builds an invalid_token challenge (e.g. session subject/org mismatch). */
|
|
29
|
-
function buildInvalidTokenFailure(config, mcpPath, errorDescription) {
|
|
30
|
-
const resourceMetadataUrl = (0, oauth_protected_resource_js_1.getProtectedResourceMetadataPathUrl)(config, mcpPath);
|
|
31
|
-
return {
|
|
32
|
-
ok: false,
|
|
33
|
-
status: 401,
|
|
34
|
-
body: {
|
|
35
|
-
error: 'invalid_token',
|
|
36
|
-
error_description: errorDescription,
|
|
37
|
-
},
|
|
38
|
-
wwwAuthenticate: (0, www_authenticate_js_1.buildWwwAuthenticateHeader)({
|
|
39
|
-
resourceMetadataUrl,
|
|
40
|
-
scope: config.requiredScopes.join(' '),
|
|
41
|
-
error: 'invalid_token',
|
|
42
|
-
errorDescription,
|
|
43
|
-
}),
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
27
|
async function authenticateLightdashOAuth(req, config, mcpPath) {
|
|
47
28
|
const resourceMetadataUrl = (0, oauth_protected_resource_js_1.getProtectedResourceMetadataPathUrl)(config, mcpPath);
|
|
48
29
|
const scope = config.requiredScopes.join(' ');
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const vitest_1 = require("vitest");
|
|
4
4
|
const test_mcp_http_config_js_1 = require("../../config/test-mcp-http-config.js");
|
|
5
|
-
const index_js_1 = require("../../
|
|
6
|
-
const index_js_2 = require("../../
|
|
5
|
+
const index_js_1 = require("../../profiles/organization-audit/v1/index.js");
|
|
6
|
+
const index_js_2 = require("../../profiles/semantic-layer/v1/index.js");
|
|
7
7
|
const lightdash_oauth_middleware_js_1 = require("./lightdash-oauth-middleware.js");
|
|
8
8
|
const lightdash_token_validation_js_1 = require("./lightdash-token-validation.js");
|
|
9
9
|
const token_validation_error_js_1 = require("./token-validation-error.js");
|
|
@@ -25,7 +25,7 @@ function createRequest(authorization) {
|
|
|
25
25
|
}
|
|
26
26
|
(0, vitest_1.describe)('authenticateLightdashOAuth', () => {
|
|
27
27
|
(0, vitest_1.it)('returns 401 with WWW-Authenticate resource_metadata when token is missing', async () => {
|
|
28
|
-
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest(), baseConfig, index_js_2.
|
|
28
|
+
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest(), baseConfig, index_js_2.SEMANTIC_LAYER_PROFILE_PATH);
|
|
29
29
|
(0, vitest_1.expect)(result.ok).toBe(false);
|
|
30
30
|
if (result.ok)
|
|
31
31
|
return;
|
|
@@ -38,8 +38,8 @@ function createRequest(authorization) {
|
|
|
38
38
|
(0, vitest_1.expect)(result.wwwAuthenticate).toContain('https://mcp.example.com/.well-known/oauth-protected-resource/semantic-layer/v1/mcp');
|
|
39
39
|
(0, vitest_1.expect)(result.wwwAuthenticate).not.toContain('scope=');
|
|
40
40
|
});
|
|
41
|
-
(0, vitest_1.it)('points resource_metadata at the requested
|
|
42
|
-
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest(), baseConfig, index_js_1.
|
|
41
|
+
(0, vitest_1.it)('points resource_metadata at the requested profile path', async () => {
|
|
42
|
+
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest(), baseConfig, index_js_1.ORGANIZATION_AUDIT_PROFILE_PATH);
|
|
43
43
|
(0, vitest_1.expect)(result.ok).toBe(false);
|
|
44
44
|
if (result.ok)
|
|
45
45
|
return;
|
|
@@ -49,7 +49,7 @@ function createRequest(authorization) {
|
|
|
49
49
|
(0, vitest_1.it)('returns 401 without echoing the bearer token when validation fails', async () => {
|
|
50
50
|
vitest_1.vi.mocked(lightdash_token_validation_js_1.validateLightdashAccessToken).mockRejectedValue(new token_validation_error_js_1.TokenValidationError('invalid_token', 'Invalid or expired Lightdash access token'));
|
|
51
51
|
const token = 'secret-oauth-token';
|
|
52
|
-
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest(`Bearer ${token}`), baseConfig, index_js_2.
|
|
52
|
+
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest(`Bearer ${token}`), baseConfig, index_js_2.SEMANTIC_LAYER_PROFILE_PATH);
|
|
53
53
|
(0, vitest_1.expect)(result.ok).toBe(false);
|
|
54
54
|
if (result.ok)
|
|
55
55
|
return;
|
|
@@ -61,7 +61,7 @@ function createRequest(authorization) {
|
|
|
61
61
|
});
|
|
62
62
|
(0, vitest_1.it)('returns 503 when Lightdash upstream is unavailable', async () => {
|
|
63
63
|
vitest_1.vi.mocked(lightdash_token_validation_js_1.validateLightdashAccessToken).mockRejectedValue(new token_validation_error_js_1.TokenValidationError('upstream_unavailable', 'Lightdash is temporarily unavailable'));
|
|
64
|
-
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest('Bearer token'), baseConfig, index_js_2.
|
|
64
|
+
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest('Bearer token'), baseConfig, index_js_2.SEMANTIC_LAYER_PROFILE_PATH);
|
|
65
65
|
(0, vitest_1.expect)(result.ok).toBe(false);
|
|
66
66
|
if (result.ok)
|
|
67
67
|
return;
|
|
@@ -74,7 +74,7 @@ function createRequest(authorization) {
|
|
|
74
74
|
});
|
|
75
75
|
(0, vitest_1.it)('returns 503 with Retry-After when upstream is rate limited', async () => {
|
|
76
76
|
vitest_1.vi.mocked(lightdash_token_validation_js_1.validateLightdashAccessToken).mockRejectedValue(new token_validation_error_js_1.TokenValidationError('upstream_unavailable', 'Lightdash is temporarily unavailable', 60));
|
|
77
|
-
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest('Bearer token'), baseConfig, index_js_2.
|
|
77
|
+
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest('Bearer token'), baseConfig, index_js_2.SEMANTIC_LAYER_PROFILE_PATH);
|
|
78
78
|
(0, vitest_1.expect)(result.ok).toBe(false);
|
|
79
79
|
if (result.ok)
|
|
80
80
|
return;
|
|
@@ -87,7 +87,7 @@ function createRequest(authorization) {
|
|
|
87
87
|
email: 'user@example.com',
|
|
88
88
|
});
|
|
89
89
|
const token = jwtWithScope('mcp:read mcp:write');
|
|
90
|
-
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest(`Bearer ${token}`), baseConfig, index_js_2.
|
|
90
|
+
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest(`Bearer ${token}`), baseConfig, index_js_2.SEMANTIC_LAYER_PROFILE_PATH);
|
|
91
91
|
(0, vitest_1.expect)(result).toEqual({
|
|
92
92
|
ok: true,
|
|
93
93
|
accessToken: token,
|
|
@@ -101,7 +101,7 @@ function createRequest(authorization) {
|
|
|
101
101
|
userUuid: 'user-uuid-1',
|
|
102
102
|
email: 'user@example.com',
|
|
103
103
|
});
|
|
104
|
-
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest('Bearer opaque-token'), baseConfig, index_js_2.
|
|
104
|
+
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest('Bearer opaque-token'), baseConfig, index_js_2.SEMANTIC_LAYER_PROFILE_PATH);
|
|
105
105
|
(0, vitest_1.expect)(result).toEqual({
|
|
106
106
|
ok: true,
|
|
107
107
|
accessToken: 'opaque-token',
|
|
@@ -117,7 +117,7 @@ function createRequest(authorization) {
|
|
|
117
117
|
const header = Buffer.from(JSON.stringify({ alg: 'none', typ: 'JWT' })).toString('base64url');
|
|
118
118
|
const payload = Buffer.from(JSON.stringify({ sub: 'user-uuid-1' })).toString('base64url');
|
|
119
119
|
const token = `${header}.${payload}.signature`;
|
|
120
|
-
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest(`Bearer ${token}`), baseConfig, index_js_2.
|
|
120
|
+
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest(`Bearer ${token}`), baseConfig, index_js_2.SEMANTIC_LAYER_PROFILE_PATH);
|
|
121
121
|
(0, vitest_1.expect)(result.ok).toBe(true);
|
|
122
122
|
if (!result.ok)
|
|
123
123
|
return;
|
|
@@ -129,7 +129,7 @@ function createRequest(authorization) {
|
|
|
129
129
|
email: 'user@example.com',
|
|
130
130
|
});
|
|
131
131
|
const scopedConfig = Object.assign(Object.assign({}, baseConfig), { requiredScopes: ['mcp:read'] });
|
|
132
|
-
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest('Bearer opaque-token'), scopedConfig, index_js_2.
|
|
132
|
+
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest('Bearer opaque-token'), scopedConfig, index_js_2.SEMANTIC_LAYER_PROFILE_PATH);
|
|
133
133
|
(0, vitest_1.expect)(result.ok).toBe(false);
|
|
134
134
|
if (result.ok)
|
|
135
135
|
return;
|
|
@@ -146,7 +146,7 @@ function createRequest(authorization) {
|
|
|
146
146
|
const payload = Buffer.from(JSON.stringify({ scope: 'mcp:write' })).toString('base64url');
|
|
147
147
|
const token = `${header}.${payload}.signature`;
|
|
148
148
|
const scopedConfig = Object.assign(Object.assign({}, baseConfig), { requiredScopes: ['mcp:read'] });
|
|
149
|
-
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest(`Bearer ${token}`), scopedConfig, index_js_2.
|
|
149
|
+
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest(`Bearer ${token}`), scopedConfig, index_js_2.SEMANTIC_LAYER_PROFILE_PATH);
|
|
150
150
|
(0, vitest_1.expect)(result.ok).toBe(false);
|
|
151
151
|
if (result.ok)
|
|
152
152
|
return;
|
|
@@ -160,7 +160,7 @@ function createRequest(authorization) {
|
|
|
160
160
|
email: 'user@example.com',
|
|
161
161
|
});
|
|
162
162
|
const token = jwtWithScope('mcp:read mcp:write');
|
|
163
|
-
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest(`bearer ${token}`), baseConfig, index_js_2.
|
|
163
|
+
const result = await (0, lightdash_oauth_middleware_js_1.authenticateLightdashOAuth)(createRequest(`bearer ${token}`), baseConfig, index_js_2.SEMANTIC_LAYER_PROFILE_PATH);
|
|
164
164
|
(0, vitest_1.expect)(result.ok).toBe(true);
|
|
165
165
|
if (!result.ok)
|
|
166
166
|
return;
|
|
@@ -8,17 +8,17 @@ export interface OAuthProtectedResourceMetadata {
|
|
|
8
8
|
scopes_supported: string[];
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* Builds MCP OAuth protected-resource metadata for a
|
|
12
|
-
* Callers must pass an explicit
|
|
11
|
+
* Builds MCP OAuth protected-resource metadata for a profile MCP path.
|
|
12
|
+
* Callers must pass an explicit profile path (root PRM uses `config.mcpPath`).
|
|
13
13
|
*/
|
|
14
14
|
export declare function buildOAuthProtectedResourceMetadata(config: McpHttpConfig, mcpPath: string): OAuthProtectedResourceMetadata;
|
|
15
15
|
export declare function getProtectedResourceMetadataUrl(config: McpHttpConfig): string;
|
|
16
|
-
/** Path-specific PRM URL for a
|
|
16
|
+
/** Path-specific PRM URL for a profile MCP endpoint. */
|
|
17
17
|
export declare function getProtectedResourceMetadataPathUrl(config: McpHttpConfig, mcpPath: string): string;
|
|
18
18
|
/**
|
|
19
|
-
* Resolves the
|
|
20
|
-
* Root PRM maps to the default
|
|
21
|
-
* is served only for shipped
|
|
19
|
+
* Resolves the profile MCP path for a PRM well-known request.
|
|
20
|
+
* Root PRM maps to the default profile (`config.mcpPath`); path-specific PRM
|
|
21
|
+
* is served only for shipped profile paths.
|
|
22
22
|
*/
|
|
23
23
|
export declare function resolveProtectedResourceMcpPath(path: string, config: McpHttpConfig): string | undefined;
|
|
24
24
|
/** Well-known OAuth Authorization Server Metadata URL for an AS origin. */
|
|
@@ -9,13 +9,13 @@ exports.getAuthorizationServerMetadataUrl = getAuthorizationServerMetadataUrl;
|
|
|
9
9
|
const env_js_1 = require("../../config/env.js");
|
|
10
10
|
const normalize_url_js_1 = require("../../config/normalize-url.js");
|
|
11
11
|
const public_url_js_1 = require("../../config/public-url.js");
|
|
12
|
-
const index_js_1 = require("../../
|
|
12
|
+
const index_js_1 = require("../../profiles/index.js");
|
|
13
13
|
const OAUTH_PROTECTED_RESOURCE_CONTEXT = 'OAuth protected resource metadata';
|
|
14
14
|
/** Well-known OAuth protected-resource metadata root path. */
|
|
15
15
|
exports.OAUTH_PROTECTED_RESOURCE_ROOT = '/.well-known/oauth-protected-resource';
|
|
16
16
|
/**
|
|
17
|
-
* Builds MCP OAuth protected-resource metadata for a
|
|
18
|
-
* Callers must pass an explicit
|
|
17
|
+
* Builds MCP OAuth protected-resource metadata for a profile MCP path.
|
|
18
|
+
* Callers must pass an explicit profile path (root PRM uses `config.mcpPath`).
|
|
19
19
|
*/
|
|
20
20
|
function buildOAuthProtectedResourceMetadata(config, mcpPath) {
|
|
21
21
|
const publicUrl = (0, public_url_js_1.requirePublicUrl)(config, OAUTH_PROTECTED_RESOURCE_CONTEXT);
|
|
@@ -34,16 +34,16 @@ function buildOAuthProtectedResourceMetadata(config, mcpPath) {
|
|
|
34
34
|
function getProtectedResourceMetadataUrl(config) {
|
|
35
35
|
return `${(0, public_url_js_1.requirePublicUrl)(config, OAUTH_PROTECTED_RESOURCE_CONTEXT)}${exports.OAUTH_PROTECTED_RESOURCE_ROOT}`;
|
|
36
36
|
}
|
|
37
|
-
/** Path-specific PRM URL for a
|
|
37
|
+
/** Path-specific PRM URL for a profile MCP endpoint. */
|
|
38
38
|
function getProtectedResourceMetadataPathUrl(config, mcpPath) {
|
|
39
39
|
const publicUrl = (0, public_url_js_1.requirePublicUrl)(config, OAUTH_PROTECTED_RESOURCE_CONTEXT);
|
|
40
40
|
const resourcePath = (0, normalize_url_js_1.normalizeMcpPath)(mcpPath).replace(/^\//, '');
|
|
41
41
|
return `${publicUrl}${exports.OAUTH_PROTECTED_RESOURCE_ROOT}/${resourcePath}`;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* Resolves the
|
|
45
|
-
* Root PRM maps to the default
|
|
46
|
-
* is served only for shipped
|
|
44
|
+
* Resolves the profile MCP path for a PRM well-known request.
|
|
45
|
+
* Root PRM maps to the default profile (`config.mcpPath`); path-specific PRM
|
|
46
|
+
* is served only for shipped profile paths.
|
|
47
47
|
*/
|
|
48
48
|
function resolveProtectedResourceMcpPath(path, config) {
|
|
49
49
|
var _a;
|
|
@@ -58,7 +58,7 @@ function resolveProtectedResourceMcpPath(path, config) {
|
|
|
58
58
|
return undefined;
|
|
59
59
|
}
|
|
60
60
|
const resourcePath = `/${path.slice(prefix.length)}`;
|
|
61
|
-
return (_a = (0, index_js_1.
|
|
61
|
+
return (_a = (0, index_js_1.getProfileByPath)(resourcePath)) === null || _a === void 0 ? void 0 : _a.path;
|
|
62
62
|
}
|
|
63
63
|
/** Well-known OAuth Authorization Server Metadata URL for an AS origin. */
|
|
64
64
|
function getAuthorizationServerMetadataUrl(authorizationServerOrigin) {
|
|
@@ -6,7 +6,7 @@ export interface ExtractTokenScopesOptions {
|
|
|
6
6
|
* Extracts OAuth scopes from JWT claims when present.
|
|
7
7
|
*
|
|
8
8
|
* For `lightdash-oauth`, Lightdash access tokens are typically opaque and this returns
|
|
9
|
-
* `undefined` — MCP-local scope enforcement is skipped and authorization relies on the
|
|
9
|
+
* `undefined` — MCP-local scope enforcement is skipped and authorization relies on the profile
|
|
10
10
|
* tool surface plus Lightdash RBAC (ADR-0006 / ADR-0008). Do not treat decoded JWT scopes as
|
|
11
11
|
* validated Lightdash OAuth authorization unless Lightdash formally issues resource-bound JWT
|
|
12
12
|
* access tokens.
|
|
@@ -54,7 +54,7 @@ function scopesWhenUnknown(scopesSupported, grantAllWhenUnknown) {
|
|
|
54
54
|
* Extracts OAuth scopes from JWT claims when present.
|
|
55
55
|
*
|
|
56
56
|
* For `lightdash-oauth`, Lightdash access tokens are typically opaque and this returns
|
|
57
|
-
* `undefined` — MCP-local scope enforcement is skipped and authorization relies on the
|
|
57
|
+
* `undefined` — MCP-local scope enforcement is skipped and authorization relies on the profile
|
|
58
58
|
* tool surface plus Lightdash RBAC (ADR-0006 / ADR-0008). Do not treat decoded JWT scopes as
|
|
59
59
|
* validated Lightdash OAuth authorization unless Lightdash formally issues resource-bound JWT
|
|
60
60
|
* access tokens.
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const vitest_1 = require("vitest");
|
|
4
4
|
const test_mcp_http_config_js_1 = require("../../config/test-mcp-http-config.js");
|
|
5
|
-
const index_js_1 = require("../../
|
|
6
|
-
const index_js_2 = require("../../
|
|
7
|
-
const index_js_3 = require("../../
|
|
5
|
+
const index_js_1 = require("../../profiles/content-reader/v1/index.js");
|
|
6
|
+
const index_js_2 = require("../../profiles/organization-audit/v1/index.js");
|
|
7
|
+
const index_js_3 = require("../../profiles/semantic-layer/v1/index.js");
|
|
8
8
|
const oauth_protected_resource_js_1 = require("./oauth-protected-resource.js");
|
|
9
9
|
const www_authenticate_js_1 = require("./www-authenticate.js");
|
|
10
10
|
const baseConfig = (0, test_mcp_http_config_js_1.makeTestMcpHttpConfig)({
|
|
11
11
|
host: '0.0.0.0',
|
|
12
|
-
sessionTtlMs: 1000,
|
|
13
|
-
sessionCleanupMs: 1000,
|
|
14
12
|
});
|
|
15
13
|
(0, vitest_1.describe)('getAuthorizationServerMetadataUrl', () => {
|
|
16
14
|
(0, vitest_1.it)('builds the well-known AS metadata URL for a Lightdash issuer', () => {
|
|
@@ -20,23 +18,23 @@ const baseConfig = (0, test_mcp_http_config_js_1.makeTestMcpHttpConfig)({
|
|
|
20
18
|
});
|
|
21
19
|
(0, vitest_1.describe)('buildOAuthProtectedResourceMetadata', () => {
|
|
22
20
|
(0, vitest_1.it)('includes resource and MCP host as authorization_servers', () => {
|
|
23
|
-
const metadata = (0, oauth_protected_resource_js_1.buildOAuthProtectedResourceMetadata)(baseConfig, index_js_3.
|
|
21
|
+
const metadata = (0, oauth_protected_resource_js_1.buildOAuthProtectedResourceMetadata)(baseConfig, index_js_3.SEMANTIC_LAYER_PROFILE_PATH);
|
|
24
22
|
(0, vitest_1.expect)(metadata).toEqual({
|
|
25
|
-
resource: `https://mcp.example.com${index_js_3.
|
|
23
|
+
resource: `https://mcp.example.com${index_js_3.SEMANTIC_LAYER_PROFILE_PATH}`,
|
|
26
24
|
authorization_servers: ['https://mcp.example.com'],
|
|
27
25
|
bearer_methods_supported: ['header'],
|
|
28
26
|
scopes_supported: ['mcp:read', 'mcp:write'],
|
|
29
27
|
});
|
|
30
28
|
(0, vitest_1.expect)((0, oauth_protected_resource_js_1.getAuthorizationServerMetadataUrl)(metadata.authorization_servers[0])).toBe('https://mcp.example.com/.well-known/oauth-authorization-server');
|
|
31
29
|
});
|
|
32
|
-
(0, vitest_1.it)('builds
|
|
33
|
-
const metadata = (0, oauth_protected_resource_js_1.buildOAuthProtectedResourceMetadata)(baseConfig, index_js_2.
|
|
34
|
-
(0, vitest_1.expect)(metadata.resource).toBe(`https://mcp.example.com${index_js_2.
|
|
30
|
+
(0, vitest_1.it)('builds profile-specific resource metadata for organization-audit', () => {
|
|
31
|
+
const metadata = (0, oauth_protected_resource_js_1.buildOAuthProtectedResourceMetadata)(baseConfig, index_js_2.ORGANIZATION_AUDIT_PROFILE_PATH);
|
|
32
|
+
(0, vitest_1.expect)(metadata.resource).toBe(`https://mcp.example.com${index_js_2.ORGANIZATION_AUDIT_PROFILE_PATH}`);
|
|
35
33
|
(0, vitest_1.expect)(metadata.authorization_servers).toEqual(['https://mcp.example.com']);
|
|
36
34
|
});
|
|
37
|
-
(0, vitest_1.it)('builds
|
|
38
|
-
const metadata = (0, oauth_protected_resource_js_1.buildOAuthProtectedResourceMetadata)(baseConfig, index_js_1.
|
|
39
|
-
(0, vitest_1.expect)(metadata.resource).toBe(`https://mcp.example.com${index_js_1.
|
|
35
|
+
(0, vitest_1.it)('builds profile-specific resource metadata for content-reader', () => {
|
|
36
|
+
const metadata = (0, oauth_protected_resource_js_1.buildOAuthProtectedResourceMetadata)(baseConfig, index_js_1.CONTENT_READER_PROFILE_PATH);
|
|
37
|
+
(0, vitest_1.expect)(metadata.resource).toBe(`https://mcp.example.com${index_js_1.CONTENT_READER_PROFILE_PATH}`);
|
|
40
38
|
(0, vitest_1.expect)(metadata.authorization_servers).toEqual(['https://mcp.example.com']);
|
|
41
39
|
});
|
|
42
40
|
});
|
package/dist/bin.js
CHANGED
|
@@ -33,16 +33,44 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const common_1 = require("@lightdash-tools/common");
|
|
36
37
|
const commander_1 = require("commander");
|
|
37
38
|
const program = new commander_1.Command();
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
const DEFAULT_STDIO_PROFILE = 'semantic-layer';
|
|
40
|
+
const PROFILE_STDIO_DESCRIPTIONS = new Map([
|
|
41
|
+
['semantic-layer', 'Run semantic-layer profile on stdio'],
|
|
42
|
+
['organization-audit', 'Run organization-audit profile on stdio (read-only org governance)'],
|
|
43
|
+
[
|
|
44
|
+
'content-reader',
|
|
45
|
+
'Run content-reader profile on stdio (saved-content discovery and bounded execution)',
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
'content-developer',
|
|
49
|
+
'Run content-developer profile on stdio (chart/dashboard/space authoring behind preview -> validate -> apply)',
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
'content-governance',
|
|
53
|
+
'Run content-governance profile on stdio (elicitation-gated soft-delete of charts and dashboards)',
|
|
54
|
+
],
|
|
55
|
+
[
|
|
56
|
+
'ai-agent-ops',
|
|
57
|
+
'Run ai-agent-ops profile on stdio (thin AI-agent APIs and product evaluation runs)',
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
'data-analyst',
|
|
61
|
+
'Run data-analyst profile on stdio (explore discovery and bounded ad-hoc metric queries)',
|
|
62
|
+
],
|
|
63
|
+
]);
|
|
64
|
+
function profileStdioDescription(profileId) {
|
|
65
|
+
const description = PROFILE_STDIO_DESCRIPTIONS.get(profileId);
|
|
66
|
+
if (description === undefined) {
|
|
67
|
+
throw new Error(`Missing stdio description for profile '${profileId}'`);
|
|
68
|
+
}
|
|
69
|
+
return description;
|
|
70
|
+
}
|
|
71
|
+
function runStdio(profileId) {
|
|
72
|
+
if (profileId) {
|
|
73
|
+
process.env.LIGHTDASH_TOOLS_MCP_STDIO_PROFILE = profileId;
|
|
46
74
|
}
|
|
47
75
|
void Promise.resolve().then(() => __importStar(require('./index.js')));
|
|
48
76
|
}
|
|
@@ -51,58 +79,33 @@ function runHttp() {
|
|
|
51
79
|
}
|
|
52
80
|
program
|
|
53
81
|
.name('lightdash-mcp')
|
|
54
|
-
.description(
|
|
55
|
-
.version('0.
|
|
56
|
-
program
|
|
57
|
-
.command('stdio')
|
|
58
|
-
.description('Run MCP server on stdio with the default semantic-layer persona')
|
|
59
|
-
.action(() => {
|
|
60
|
-
runStdio(PERSONA_SEMANTIC_LAYER);
|
|
61
|
-
});
|
|
62
|
-
program
|
|
63
|
-
.command(PERSONA_SEMANTIC_LAYER)
|
|
64
|
-
.description('Run semantic-layer persona on stdio')
|
|
65
|
-
.action(() => {
|
|
66
|
-
runStdio(PERSONA_SEMANTIC_LAYER);
|
|
67
|
-
});
|
|
68
|
-
program
|
|
69
|
-
.command(PERSONA_ORGANIZATION_AUDIT)
|
|
70
|
-
.description('Run organization-audit persona on stdio (read-only org governance)')
|
|
71
|
-
.action(() => {
|
|
72
|
-
runStdio(PERSONA_ORGANIZATION_AUDIT);
|
|
73
|
-
});
|
|
82
|
+
.description(`MCP server for Lightdash (${common_1.PROFILE_IDS.join(', ')}). Default stdio profile is ${DEFAULT_STDIO_PROFILE}.`)
|
|
83
|
+
.version('0.11.0');
|
|
74
84
|
program
|
|
75
|
-
.command(
|
|
76
|
-
.description(
|
|
85
|
+
.command('stdio', { isDefault: true })
|
|
86
|
+
.description(`Run MCP server on stdio with the default ${DEFAULT_STDIO_PROFILE} profile`)
|
|
77
87
|
.action(() => {
|
|
78
|
-
runStdio(
|
|
79
|
-
});
|
|
80
|
-
program
|
|
81
|
-
.command(PERSONA_CONTENT_DEVELOPER)
|
|
82
|
-
.description('Run content-developer persona on stdio (chart/dashboard/space authoring behind preview -> validate -> apply)')
|
|
83
|
-
.action(() => {
|
|
84
|
-
runStdio(PERSONA_CONTENT_DEVELOPER);
|
|
88
|
+
runStdio(DEFAULT_STDIO_PROFILE);
|
|
85
89
|
});
|
|
90
|
+
for (const profileId of common_1.PROFILE_IDS) {
|
|
91
|
+
program
|
|
92
|
+
.command(profileId)
|
|
93
|
+
.description(profileStdioDescription(profileId))
|
|
94
|
+
.action(() => {
|
|
95
|
+
runStdio(profileId);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
86
98
|
program
|
|
87
|
-
.command(
|
|
88
|
-
.description('Run
|
|
99
|
+
.command('http')
|
|
100
|
+
.description('Run MCP server over Streamable HTTP (all fixed profile paths)')
|
|
89
101
|
.action(() => {
|
|
90
|
-
|
|
102
|
+
runHttp();
|
|
91
103
|
});
|
|
92
104
|
program
|
|
93
105
|
.command('serve-http')
|
|
94
|
-
.description('
|
|
106
|
+
.description('Deprecated alias for `http`')
|
|
95
107
|
.action(() => {
|
|
108
|
+
console.warn('Warning: `serve-http` is deprecated; use `lightdash-mcp http`.');
|
|
96
109
|
runHttp();
|
|
97
110
|
});
|
|
98
|
-
program
|
|
99
|
-
.option('--http', 'Run as HTTP server instead of Stdio (alias for serve-http)')
|
|
100
|
-
.action((options) => {
|
|
101
|
-
if (options.http) {
|
|
102
|
-
runHttp();
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
runStdio();
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
111
|
program.parse(process.argv);
|
package/dist/config/env.d.ts
CHANGED
|
@@ -5,32 +5,25 @@
|
|
|
5
5
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_HTTP_HOST = "LIGHTDASH_TOOLS_MCP_HTTP_HOST";
|
|
6
6
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_HTTP_PORT = "LIGHTDASH_TOOLS_MCP_HTTP_PORT";
|
|
7
7
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_PUBLIC_URL = "LIGHTDASH_TOOLS_MCP_PUBLIC_URL";
|
|
8
|
-
/** Rejected at config load — MCP path is
|
|
8
|
+
/** Rejected at config load — MCP path is profile-owned (see profiles/). */
|
|
9
9
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_PATH = "LIGHTDASH_TOOLS_MCP_PATH";
|
|
10
10
|
/** Rejected — auth mode is inferred from credentials (ADR-0007). */
|
|
11
11
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_AUTH_MODE = "LIGHTDASH_TOOLS_MCP_AUTH_MODE";
|
|
12
12
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_SHARED_KEY = "LIGHTDASH_TOOLS_MCP_SHARED_KEY";
|
|
13
|
+
/** HMAC key for previewToken + destructive requestState (≥32 bytes). */
|
|
14
|
+
export declare const ENV_LIGHTDASH_TOOLS_MCP_REQUEST_STATE_KEY = "LIGHTDASH_TOOLS_MCP_REQUEST_STATE_KEY";
|
|
13
15
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_ALLOWED_ORIGINS = "LIGHTDASH_TOOLS_MCP_ALLOWED_ORIGINS";
|
|
14
16
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_MAX_BODY_BYTES = "LIGHTDASH_TOOLS_MCP_MAX_BODY_BYTES";
|
|
15
|
-
export declare const ENV_LIGHTDASH_TOOLS_MCP_SESSION_TTL_MS = "LIGHTDASH_TOOLS_MCP_SESSION_TTL_MS";
|
|
16
|
-
export declare const ENV_LIGHTDASH_TOOLS_MCP_MAX_SESSIONS = "LIGHTDASH_TOOLS_MCP_MAX_SESSIONS";
|
|
17
|
-
export declare const ENV_LIGHTDASH_TOOLS_MCP_MAX_SESSIONS_PER_SUBJECT = "LIGHTDASH_TOOLS_MCP_MAX_SESSIONS_PER_SUBJECT";
|
|
18
|
-
export declare const ENV_LIGHTDASH_TOOLS_MCP_SESSION_CLEANUP_MS = "LIGHTDASH_TOOLS_MCP_SESSION_CLEANUP_MS";
|
|
19
17
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_REQUIRED_SCOPES = "LIGHTDASH_TOOLS_MCP_REQUIRED_SCOPES";
|
|
20
18
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_SCOPES_SUPPORTED = "LIGHTDASH_TOOLS_MCP_SCOPES_SUPPORTED";
|
|
21
19
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_VALIDATE_TOKEN = "LIGHTDASH_TOOLS_MCP_VALIDATE_TOKEN";
|
|
22
20
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_TOKEN_VALIDATION_CACHE_TTL_MS = "LIGHTDASH_TOOLS_MCP_TOKEN_VALIDATION_CACHE_TTL_MS";
|
|
23
|
-
/**
|
|
24
|
-
* Ephemeral store backend for HTTP preview ledger / sessions / OAuth pending (ADR-0016).
|
|
25
|
-
* `memory` (default) or `redis`.
|
|
26
|
-
*/
|
|
27
|
-
export declare const ENV_LIGHTDASH_TOOLS_MCP_STORE = "LIGHTDASH_TOOLS_MCP_STORE";
|
|
28
|
-
/** Required when LIGHTDASH_TOOLS_MCP_STORE=redis. */
|
|
29
|
-
export declare const ENV_LIGHTDASH_TOOLS_MCP_REDIS_URL = "LIGHTDASH_TOOLS_MCP_REDIS_URL";
|
|
30
21
|
/** Lightdash OAuth application credentials (server-held confidential client). */
|
|
31
22
|
export declare const ENV_LIGHTDASH_TOOLS_OAUTH_CLIENT_ID = "LIGHTDASH_TOOLS_OAUTH_CLIENT_ID";
|
|
32
23
|
export declare const ENV_LIGHTDASH_TOOLS_OAUTH_CLIENT_SECRET = "LIGHTDASH_TOOLS_OAUTH_CLIENT_SECRET";
|
|
33
|
-
/** Obsolete — rejected at startup
|
|
24
|
+
/** Obsolete — rejected at startup (ADR-0019 removed Redis store; others are legacy auth flags). */
|
|
25
|
+
export declare const ENV_LIGHTDASH_TOOLS_MCP_STORE = "LIGHTDASH_TOOLS_MCP_STORE";
|
|
26
|
+
export declare const ENV_LIGHTDASH_TOOLS_MCP_REDIS_URL = "LIGHTDASH_TOOLS_MCP_REDIS_URL";
|
|
34
27
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_INSECURE_DEV = "LIGHTDASH_TOOLS_MCP_INSECURE_DEV";
|
|
35
28
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_DANGEROUSLY_SKIP_TOKEN_VALIDATION = "LIGHTDASH_TOOLS_MCP_DANGEROUSLY_SKIP_TOKEN_VALIDATION";
|
|
36
29
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_DANGEROUSLY_GRANT_ALL_SCOPES = "LIGHTDASH_TOOLS_MCP_DANGEROUSLY_GRANT_ALL_SCOPES";
|
|
@@ -38,6 +31,8 @@ export declare const ENV_LIGHTDASH_TOOLS_MCP_DANGEROUSLY_ALLOW_UNAUTHENTICATED =
|
|
|
38
31
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_DANGEROUSLY_ALLOW_ANY_ORIGIN = "LIGHTDASH_TOOLS_MCP_DANGEROUSLY_ALLOW_ANY_ORIGIN";
|
|
39
32
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_EXPERIMENTAL_IDENTITY_OAUTH = "LIGHTDASH_TOOLS_MCP_EXPERIMENTAL_IDENTITY_OAUTH";
|
|
40
33
|
export declare const ENV_LIGHTDASH_TOOLS_MCP_ALLOW_INSECURE_PUBLIC_URL = "LIGHTDASH_TOOLS_MCP_ALLOW_INSECURE_PUBLIC_URL";
|
|
34
|
+
/** Obsolete stdio selector (renamed to LIGHTDASH_TOOLS_MCP_STDIO_PROFILE). */
|
|
35
|
+
export declare const ENV_LIGHTDASH_TOOLS_MCP_STDIO_PERSONA = "LIGHTDASH_TOOLS_MCP_STDIO_PERSONA";
|
|
41
36
|
/** Legacy aliases (deprecated). */
|
|
42
37
|
export declare const ENV_MCP_HTTP_PORT = "MCP_HTTP_PORT";
|
|
43
38
|
export declare const ENV_MCP_SERVER_PORT = "MCP_SERVER_PORT";
|
|
@@ -46,9 +41,6 @@ export declare const ENV_MCP_AUTH_ENABLED = "MCP_AUTH_ENABLED";
|
|
|
46
41
|
export declare const ENV_MCP_API_KEY = "MCP_API_KEY";
|
|
47
42
|
export declare const ENV_MCP_ALLOWED_ORIGINS = "MCP_ALLOWED_ORIGINS";
|
|
48
43
|
export declare const ENV_MCP_MAX_BODY_BYTES = "MCP_MAX_BODY_BYTES";
|
|
49
|
-
export declare const ENV_MCP_SESSION_TTL_MS = "MCP_SESSION_TTL_MS";
|
|
50
|
-
export declare const ENV_MCP_MAX_SESSIONS = "MCP_MAX_SESSIONS";
|
|
51
|
-
export declare const ENV_MCP_SESSION_CLEANUP_MS = "MCP_SESSION_CLEANUP_MS";
|
|
52
44
|
export declare const OAUTH_CALLBACK_PATH: "/oauth/callback";
|
|
53
45
|
export declare const OAUTH_AUTHORIZE_PATH: "/oauth/authorize";
|
|
54
46
|
export declare const OAUTH_TOKEN_PATH: "/oauth/token";
|