@digital-science-dsl/dimensions-analytics-mcp 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -0
- package/README.md +152 -0
- package/bin/dimensions-analytics-mcp-http.js +2 -0
- package/bin/dimensions-analytics-mcp.js +2 -0
- package/dist/client/auth/config-loaders.d.ts +22 -0
- package/dist/client/auth/config-loaders.d.ts.map +1 -0
- package/dist/client/auth/config-loaders.js +68 -0
- package/dist/client/auth/config-loaders.js.map +1 -0
- package/dist/client/auth/decorators/index.d.ts +7 -0
- package/dist/client/auth/decorators/index.d.ts.map +1 -0
- package/dist/client/auth/decorators/index.js +6 -0
- package/dist/client/auth/decorators/index.js.map +1 -0
- package/dist/client/auth/decorators/with-caching.d.ts +81 -0
- package/dist/client/auth/decorators/with-caching.d.ts.map +1 -0
- package/dist/client/auth/decorators/with-caching.js +168 -0
- package/dist/client/auth/decorators/with-caching.js.map +1 -0
- package/dist/client/auth/factory.d.ts +13 -0
- package/dist/client/auth/factory.d.ts.map +1 -0
- package/dist/client/auth/factory.js +29 -0
- package/dist/client/auth/factory.js.map +1 -0
- package/dist/client/auth/index.d.ts +7 -0
- package/dist/client/auth/index.d.ts.map +1 -0
- package/dist/client/auth/index.js +6 -0
- package/dist/client/auth/index.js.map +1 -0
- package/dist/client/auth/jwt-utils.d.ts +17 -0
- package/dist/client/auth/jwt-utils.d.ts.map +1 -0
- package/dist/client/auth/jwt-utils.js +33 -0
- package/dist/client/auth/jwt-utils.js.map +1 -0
- package/dist/client/auth/node.d.ts +16 -0
- package/dist/client/auth/node.d.ts.map +1 -0
- package/dist/client/auth/node.js +15 -0
- package/dist/client/auth/node.js.map +1 -0
- package/dist/client/auth/providers/index.d.ts +2 -0
- package/dist/client/auth/providers/index.d.ts.map +1 -0
- package/dist/client/auth/providers/index.js +2 -0
- package/dist/client/auth/providers/index.js.map +1 -0
- package/dist/client/auth/providers/jwt-auth-provider.d.ts +70 -0
- package/dist/client/auth/providers/jwt-auth-provider.d.ts.map +1 -0
- package/dist/client/auth/providers/jwt-auth-provider.js +134 -0
- package/dist/client/auth/providers/jwt-auth-provider.js.map +1 -0
- package/dist/client/auth/schemas.d.ts +19 -0
- package/dist/client/auth/schemas.d.ts.map +1 -0
- package/dist/client/auth/schemas.js +23 -0
- package/dist/client/auth/schemas.js.map +1 -0
- package/dist/client/auth/types.d.ts +25 -0
- package/dist/client/auth/types.d.ts.map +1 -0
- package/dist/client/auth/types.js +9 -0
- package/dist/client/auth/types.js.map +1 -0
- package/dist/client/command.d.ts +44 -0
- package/dist/client/command.d.ts.map +1 -0
- package/dist/client/command.js +23 -0
- package/dist/client/command.js.map +1 -0
- package/dist/client/config/index.d.ts +11 -0
- package/dist/client/config/index.d.ts.map +1 -0
- package/dist/client/config/index.js +8 -0
- package/dist/client/config/index.js.map +1 -0
- package/dist/client/config/loader.d.ts +27 -0
- package/dist/client/config/loader.d.ts.map +1 -0
- package/dist/client/config/loader.js +128 -0
- package/dist/client/config/loader.js.map +1 -0
- package/dist/client/config/node.d.ts +18 -0
- package/dist/client/config/node.d.ts.map +1 -0
- package/dist/client/config/node.js +17 -0
- package/dist/client/config/node.js.map +1 -0
- package/dist/client/config/schemas.d.ts +23 -0
- package/dist/client/config/schemas.d.ts.map +1 -0
- package/dist/client/config/schemas.js +24 -0
- package/dist/client/config/schemas.js.map +1 -0
- package/dist/client/config/types.d.ts +37 -0
- package/dist/client/config/types.d.ts.map +1 -0
- package/dist/client/config/types.js +6 -0
- package/dist/client/config/types.js.map +1 -0
- package/dist/client/config/unified-loader.d.ts +41 -0
- package/dist/client/config/unified-loader.d.ts.map +1 -0
- package/dist/client/config/unified-loader.js +86 -0
- package/dist/client/config/unified-loader.js.map +1 -0
- package/dist/client/config.d.ts +43 -0
- package/dist/client/config.d.ts.map +1 -0
- package/dist/client/config.js +56 -0
- package/dist/client/config.js.map +1 -0
- package/dist/client/deployment-config.d.ts +36 -0
- package/dist/client/deployment-config.d.ts.map +1 -0
- package/dist/client/deployment-config.js +79 -0
- package/dist/client/deployment-config.js.map +1 -0
- package/dist/client/errors.d.ts +180 -0
- package/dist/client/errors.d.ts.map +1 -0
- package/dist/client/errors.js +253 -0
- package/dist/client/errors.js.map +1 -0
- package/dist/client/http-client.d.ts +215 -0
- package/dist/client/http-client.d.ts.map +1 -0
- package/dist/client/http-client.js +419 -0
- package/dist/client/http-client.js.map +1 -0
- package/dist/client/index.d.ts +28 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +18 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/internal-dsl-client.d.ts +30 -0
- package/dist/client/internal-dsl-client.d.ts.map +1 -0
- package/dist/client/internal-dsl-client.js +101 -0
- package/dist/client/internal-dsl-client.js.map +1 -0
- package/dist/client/rate-limiter.d.ts +79 -0
- package/dist/client/rate-limiter.d.ts.map +1 -0
- package/dist/client/rate-limiter.js +118 -0
- package/dist/client/rate-limiter.js.map +1 -0
- package/dist/client/resolve-api-key-user.d.ts +24 -0
- package/dist/client/resolve-api-key-user.d.ts.map +1 -0
- package/dist/client/resolve-api-key-user.js +80 -0
- package/dist/client/resolve-api-key-user.js.map +1 -0
- package/dist/client/types.d.ts +44 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/types.js +10 -0
- package/dist/client/types.js.map +1 -0
- package/dist/dsl/client.d.ts +330 -0
- package/dist/dsl/client.d.ts.map +1 -0
- package/dist/dsl/client.js +433 -0
- package/dist/dsl/client.js.map +1 -0
- package/dist/dsl/commands/apply-filters.d.ts +15 -0
- package/dist/dsl/commands/apply-filters.d.ts.map +1 -0
- package/dist/dsl/commands/apply-filters.js +29 -0
- package/dist/dsl/commands/apply-filters.js.map +1 -0
- package/dist/dsl/commands/facet/index.d.ts +6 -0
- package/dist/dsl/commands/facet/index.d.ts.map +1 -0
- package/dist/dsl/commands/facet/index.js +6 -0
- package/dist/dsl/commands/facet/index.js.map +1 -0
- package/dist/dsl/commands/facet/schemas.d.ts +71 -0
- package/dist/dsl/commands/facet/schemas.d.ts.map +1 -0
- package/dist/dsl/commands/facet/schemas.js +84 -0
- package/dist/dsl/commands/facet/schemas.js.map +1 -0
- package/dist/dsl/commands/functions/ClassifyCommand.d.ts +96 -0
- package/dist/dsl/commands/functions/ClassifyCommand.d.ts.map +1 -0
- package/dist/dsl/commands/functions/ClassifyCommand.js +95 -0
- package/dist/dsl/commands/functions/ClassifyCommand.js.map +1 -0
- package/dist/dsl/commands/functions/ExtractAffiliationsCommand.d.ts +86 -0
- package/dist/dsl/commands/functions/ExtractAffiliationsCommand.d.ts.map +1 -0
- package/dist/dsl/commands/functions/ExtractAffiliationsCommand.js +131 -0
- package/dist/dsl/commands/functions/ExtractAffiliationsCommand.js.map +1 -0
- package/dist/dsl/commands/functions/ExtractConceptsCommand.d.ts +73 -0
- package/dist/dsl/commands/functions/ExtractConceptsCommand.d.ts.map +1 -0
- package/dist/dsl/commands/functions/ExtractConceptsCommand.js +110 -0
- package/dist/dsl/commands/functions/ExtractConceptsCommand.js.map +1 -0
- package/dist/dsl/commands/functions/ExtractGrantsCommand.d.ts +66 -0
- package/dist/dsl/commands/functions/ExtractGrantsCommand.d.ts.map +1 -0
- package/dist/dsl/commands/functions/ExtractGrantsCommand.js +87 -0
- package/dist/dsl/commands/functions/ExtractGrantsCommand.js.map +1 -0
- package/dist/dsl/commands/functions/index.d.ts +10 -0
- package/dist/dsl/commands/functions/index.d.ts.map +1 -0
- package/dist/dsl/commands/functions/index.js +10 -0
- package/dist/dsl/commands/functions/index.js.map +1 -0
- package/dist/dsl/commands/index.d.ts +8 -0
- package/dist/dsl/commands/index.d.ts.map +1 -0
- package/dist/dsl/commands/index.js +7 -0
- package/dist/dsl/commands/index.js.map +1 -0
- package/dist/dsl/commands/validate-input.d.ts +18 -0
- package/dist/dsl/commands/validate-input.d.ts.map +1 -0
- package/dist/dsl/commands/validate-input.js +27 -0
- package/dist/dsl/commands/validate-input.js.map +1 -0
- package/dist/dsl/create-client.d.ts +32 -0
- package/dist/dsl/create-client.d.ts.map +1 -0
- package/dist/dsl/create-client.js +58 -0
- package/dist/dsl/create-client.js.map +1 -0
- package/dist/dsl/fluent-query-builder.d.ts +439 -0
- package/dist/dsl/fluent-query-builder.d.ts.map +1 -0
- package/dist/dsl/fluent-query-builder.js +534 -0
- package/dist/dsl/fluent-query-builder.js.map +1 -0
- package/dist/dsl/index.d.ts +32 -0
- package/dist/dsl/index.d.ts.map +1 -0
- package/dist/dsl/index.js +31 -0
- package/dist/dsl/index.js.map +1 -0
- package/dist/dsl/pagination.d.ts +82 -0
- package/dist/dsl/pagination.d.ts.map +1 -0
- package/dist/dsl/pagination.js +135 -0
- package/dist/dsl/pagination.js.map +1 -0
- package/dist/dsl/query-builder.d.ts +456 -0
- package/dist/dsl/query-builder.d.ts.map +1 -0
- package/dist/dsl/query-builder.js +994 -0
- package/dist/dsl/query-builder.js.map +1 -0
- package/dist/dsl/response-parser.d.ts +111 -0
- package/dist/dsl/response-parser.d.ts.map +1 -0
- package/dist/dsl/response-parser.js +210 -0
- package/dist/dsl/response-parser.js.map +1 -0
- package/dist/dsl/schema/cache.d.ts +52 -0
- package/dist/dsl/schema/cache.d.ts.map +1 -0
- package/dist/dsl/schema/cache.js +97 -0
- package/dist/dsl/schema/cache.js.map +1 -0
- package/dist/dsl/schema/extract.d.ts +18 -0
- package/dist/dsl/schema/extract.d.ts.map +1 -0
- package/dist/dsl/schema/extract.js +41 -0
- package/dist/dsl/schema/extract.js.map +1 -0
- package/dist/dsl/schema/index.d.ts +13 -0
- package/dist/dsl/schema/index.d.ts.map +1 -0
- package/dist/dsl/schema/index.js +12 -0
- package/dist/dsl/schema/index.js.map +1 -0
- package/dist/dsl/schema/load.d.ts +41 -0
- package/dist/dsl/schema/load.d.ts.map +1 -0
- package/dist/dsl/schema/load.js +119 -0
- package/dist/dsl/schema/load.js.map +1 -0
- package/dist/dsl/schema/store.d.ts +137 -0
- package/dist/dsl/schema/store.d.ts.map +1 -0
- package/dist/dsl/schema/store.js +204 -0
- package/dist/dsl/schema/store.js.map +1 -0
- package/dist/dsl/schema/structured-entities.d.ts +21 -0
- package/dist/dsl/schema/structured-entities.d.ts.map +1 -0
- package/dist/dsl/schema/structured-entities.js +39 -0
- package/dist/dsl/schema/structured-entities.js.map +1 -0
- package/dist/dsl/schema/summary.d.ts +51 -0
- package/dist/dsl/schema/summary.d.ts.map +1 -0
- package/dist/dsl/schema/summary.js +61 -0
- package/dist/dsl/schema/summary.js.map +1 -0
- package/dist/dsl/schema/types.d.ts +36 -0
- package/dist/dsl/schema/types.d.ts.map +1 -0
- package/dist/dsl/schema/types.js +6 -0
- package/dist/dsl/schema/types.js.map +1 -0
- package/dist/dsl/schema/validation.d.ts +21 -0
- package/dist/dsl/schema/validation.d.ts.map +1 -0
- package/dist/dsl/schema/validation.js +44 -0
- package/dist/dsl/schema/validation.js.map +1 -0
- package/dist/dsl/types/buckets.d.ts +18 -0
- package/dist/dsl/types/buckets.d.ts.map +1 -0
- package/dist/dsl/types/buckets.js +6 -0
- package/dist/dsl/types/buckets.js.map +1 -0
- package/dist/dsl/types/common.d.ts +91 -0
- package/dist/dsl/types/common.d.ts.map +1 -0
- package/dist/dsl/types/common.js +6 -0
- package/dist/dsl/types/common.js.map +1 -0
- package/dist/dsl/types/entities.d.ts +35 -0
- package/dist/dsl/types/entities.d.ts.map +1 -0
- package/dist/dsl/types/entities.js +11 -0
- package/dist/dsl/types/entities.js.map +1 -0
- package/dist/dsl/types/index.d.ts +12 -0
- package/dist/dsl/types/index.d.ts.map +1 -0
- package/dist/dsl/types/index.js +7 -0
- package/dist/dsl/types/index.js.map +1 -0
- package/dist/dsl/types/return-clauses.d.ts +107 -0
- package/dist/dsl/types/return-clauses.d.ts.map +1 -0
- package/dist/dsl/types/return-clauses.js +22 -0
- package/dist/dsl/types/return-clauses.js.map +1 -0
- package/dist/dsl/types/special-functions.d.ts +175 -0
- package/dist/dsl/types/special-functions.d.ts.map +1 -0
- package/dist/dsl/types/special-functions.js +25 -0
- package/dist/dsl/types/special-functions.js.map +1 -0
- package/dist/dsl/types/vocabulary.d.ts +21 -0
- package/dist/dsl/types/vocabulary.d.ts.map +1 -0
- package/dist/dsl/types/vocabulary.js +44 -0
- package/dist/dsl/types/vocabulary.js.map +1 -0
- package/dist/dsl/usage-policy.d.ts +87 -0
- package/dist/dsl/usage-policy.d.ts.map +1 -0
- package/dist/dsl/usage-policy.js +133 -0
- package/dist/dsl/usage-policy.js.map +1 -0
- package/dist/dsl/utils/escape.d.ts +24 -0
- package/dist/dsl/utils/escape.d.ts.map +1 -0
- package/dist/dsl/utils/escape.js +124 -0
- package/dist/dsl/utils/escape.js.map +1 -0
- package/dist/dsl/utils/sanitize.d.ts +13 -0
- package/dist/dsl/utils/sanitize.d.ts.map +1 -0
- package/dist/dsl/utils/sanitize.js +19 -0
- package/dist/dsl/utils/sanitize.js.map +1 -0
- package/dist/dsl/utils/string-utils.d.ts +35 -0
- package/dist/dsl/utils/string-utils.d.ts.map +1 -0
- package/dist/dsl/utils/string-utils.js +145 -0
- package/dist/dsl/utils/string-utils.js.map +1 -0
- package/dist/dsl/utils/validate-field-name.d.ts +11 -0
- package/dist/dsl/utils/validate-field-name.d.ts.map +1 -0
- package/dist/dsl/utils/validate-field-name.js +18 -0
- package/dist/dsl/utils/validate-field-name.js.map +1 -0
- package/dist/examples/dsl-examples.d.ts +11 -0
- package/dist/examples/dsl-examples.d.ts.map +1 -0
- package/dist/examples/dsl-examples.js +49 -0
- package/dist/examples/dsl-examples.js.map +1 -0
- package/dist/examples/usage-scenarios.d.ts +22 -0
- package/dist/examples/usage-scenarios.d.ts.map +1 -0
- package/dist/examples/usage-scenarios.js +173 -0
- package/dist/examples/usage-scenarios.js.map +1 -0
- package/dist/funder-org-names.d.ts +12 -0
- package/dist/funder-org-names.d.ts.map +1 -0
- package/dist/funder-org-names.js +30 -0
- package/dist/funder-org-names.js.map +1 -0
- package/dist/http-main.d.ts +7 -0
- package/dist/http-main.d.ts.map +1 -0
- package/dist/http-main.js +36 -0
- package/dist/http-main.js.map +1 -0
- package/dist/http.d.ts +29 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +173 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/kwq/build-query.d.ts +26 -0
- package/dist/kwq/build-query.d.ts.map +1 -0
- package/dist/kwq/build-query.js +37 -0
- package/dist/kwq/build-query.js.map +1 -0
- package/dist/kwq/concept-groups.d.ts +49 -0
- package/dist/kwq/concept-groups.d.ts.map +1 -0
- package/dist/kwq/concept-groups.js +55 -0
- package/dist/kwq/concept-groups.js.map +1 -0
- package/dist/kwq/dsl-assembler.d.ts +28 -0
- package/dist/kwq/dsl-assembler.d.ts.map +1 -0
- package/dist/kwq/dsl-assembler.js +124 -0
- package/dist/kwq/dsl-assembler.js.map +1 -0
- package/dist/kwq/ensemble.d.ts +38 -0
- package/dist/kwq/ensemble.d.ts.map +1 -0
- package/dist/kwq/ensemble.js +107 -0
- package/dist/kwq/ensemble.js.map +1 -0
- package/dist/kwq/index.d.ts +16 -0
- package/dist/kwq/index.d.ts.map +1 -0
- package/dist/kwq/index.js +14 -0
- package/dist/kwq/index.js.map +1 -0
- package/dist/kwq/types.d.ts +120 -0
- package/dist/kwq/types.d.ts.map +1 -0
- package/dist/kwq/types.js +11 -0
- package/dist/kwq/types.js.map +1 -0
- package/dist/lambda.d.ts +10 -0
- package/dist/lambda.d.ts.map +1 -0
- package/dist/lambda.js +4 -0
- package/dist/lambda.js.map +1 -0
- package/dist/main.d.ts +8 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +33 -0
- package/dist/main.js.map +1 -0
- package/dist/mcp/batch-fetch.d.ts +89 -0
- package/dist/mcp/batch-fetch.d.ts.map +1 -0
- package/dist/mcp/batch-fetch.js +178 -0
- package/dist/mcp/batch-fetch.js.map +1 -0
- package/dist/mcp/examples/dsl-examples.d.ts +21 -0
- package/dist/mcp/examples/dsl-examples.d.ts.map +1 -0
- package/dist/mcp/examples/dsl-examples.js +61 -0
- package/dist/mcp/examples/dsl-examples.js.map +1 -0
- package/dist/mcp/examples/usage-scenarios.d.ts +20 -0
- package/dist/mcp/examples/usage-scenarios.d.ts.map +1 -0
- package/dist/mcp/examples/usage-scenarios.js +169 -0
- package/dist/mcp/examples/usage-scenarios.js.map +1 -0
- package/dist/mcp/export-format.d.ts +43 -0
- package/dist/mcp/export-format.d.ts.map +1 -0
- package/dist/mcp/export-format.js +92 -0
- package/dist/mcp/export-format.js.map +1 -0
- package/dist/mcp/funder-org-names.d.ts +12 -0
- package/dist/mcp/funder-org-names.d.ts.map +1 -0
- package/dist/mcp/funder-org-names.js +30 -0
- package/dist/mcp/funder-org-names.js.map +1 -0
- package/dist/mcp/http-server.d.ts +20 -0
- package/dist/mcp/http-server.d.ts.map +1 -0
- package/dist/mcp/http-server.js +118 -0
- package/dist/mcp/http-server.js.map +1 -0
- package/dist/mcp/middleware/field-aliases.d.ts +97 -0
- package/dist/mcp/middleware/field-aliases.d.ts.map +1 -0
- package/dist/mcp/middleware/field-aliases.js +208 -0
- package/dist/mcp/middleware/field-aliases.js.map +1 -0
- package/dist/mcp/resources/schema.d.ts +13 -0
- package/dist/mcp/resources/schema.d.ts.map +1 -0
- package/dist/mcp/resources/schema.js +262 -0
- package/dist/mcp/resources/schema.js.map +1 -0
- package/dist/mcp/schema/context.d.ts +10 -0
- package/dist/mcp/schema/context.d.ts.map +1 -0
- package/dist/mcp/schema/context.js +6 -0
- package/dist/mcp/schema/context.js.map +1 -0
- package/dist/mcp/schema/index.d.ts +8 -0
- package/dist/mcp/schema/index.d.ts.map +1 -0
- package/dist/mcp/schema/index.js +6 -0
- package/dist/mcp/schema/index.js.map +1 -0
- package/dist/mcp/server.d.ts +56 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +168 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/shared-schema.d.ts +13 -0
- package/dist/mcp/shared-schema.d.ts.map +1 -0
- package/dist/mcp/shared-schema.js +28 -0
- package/dist/mcp/shared-schema.js.map +1 -0
- package/dist/mcp/tools/analytics-filters.d.ts +18 -0
- package/dist/mcp/tools/analytics-filters.d.ts.map +1 -0
- package/dist/mcp/tools/analytics-filters.js +35 -0
- package/dist/mcp/tools/analytics-filters.js.map +1 -0
- package/dist/mcp/tools/analytics.d.ts +16 -0
- package/dist/mcp/tools/analytics.d.ts.map +1 -0
- package/dist/mcp/tools/analytics.js +381 -0
- package/dist/mcp/tools/analytics.js.map +1 -0
- package/dist/mcp/tools/concept-profile.d.ts +14 -0
- package/dist/mcp/tools/concept-profile.d.ts.map +1 -0
- package/dist/mcp/tools/concept-profile.js +130 -0
- package/dist/mcp/tools/concept-profile.js.map +1 -0
- package/dist/mcp/tools/dataset-profile.d.ts +15 -0
- package/dist/mcp/tools/dataset-profile.d.ts.map +1 -0
- package/dist/mcp/tools/dataset-profile.js +194 -0
- package/dist/mcp/tools/dataset-profile.js.map +1 -0
- package/dist/mcp/tools/fetch-search-pages.d.ts +15 -0
- package/dist/mcp/tools/fetch-search-pages.d.ts.map +1 -0
- package/dist/mcp/tools/fetch-search-pages.js +237 -0
- package/dist/mcp/tools/fetch-search-pages.js.map +1 -0
- package/dist/mcp/tools/functions.d.ts +14 -0
- package/dist/mcp/tools/functions.d.ts.map +1 -0
- package/dist/mcp/tools/functions.js +87 -0
- package/dist/mcp/tools/functions.js.map +1 -0
- package/dist/mcp/tools/impact-chain.d.ts +15 -0
- package/dist/mcp/tools/impact-chain.d.ts.map +1 -0
- package/dist/mcp/tools/impact-chain.js +96 -0
- package/dist/mcp/tools/impact-chain.js.map +1 -0
- package/dist/mcp/tools/kwq.d.ts +19 -0
- package/dist/mcp/tools/kwq.d.ts.map +1 -0
- package/dist/mcp/tools/kwq.js +156 -0
- package/dist/mcp/tools/kwq.js.map +1 -0
- package/dist/mcp/tools/lookup.d.ts +14 -0
- package/dist/mcp/tools/lookup.d.ts.map +1 -0
- package/dist/mcp/tools/lookup.js +146 -0
- package/dist/mcp/tools/lookup.js.map +1 -0
- package/dist/mcp/tools/policy-profile.d.ts +15 -0
- package/dist/mcp/tools/policy-profile.d.ts.map +1 -0
- package/dist/mcp/tools/policy-profile.js +174 -0
- package/dist/mcp/tools/policy-profile.js.map +1 -0
- package/dist/mcp/tools/profile.d.ts +14 -0
- package/dist/mcp/tools/profile.d.ts.map +1 -0
- package/dist/mcp/tools/profile.js +349 -0
- package/dist/mcp/tools/profile.js.map +1 -0
- package/dist/mcp/tools/query.d.ts +16 -0
- package/dist/mcp/tools/query.d.ts.map +1 -0
- package/dist/mcp/tools/query.js +75 -0
- package/dist/mcp/tools/query.js.map +1 -0
- package/dist/mcp/tools/schema.d.ts +23 -0
- package/dist/mcp/tools/schema.d.ts.map +1 -0
- package/dist/mcp/tools/schema.js +124 -0
- package/dist/mcp/tools/schema.js.map +1 -0
- package/dist/mcp/tools/search-entity-metadata.d.ts +18 -0
- package/dist/mcp/tools/search-entity-metadata.d.ts.map +1 -0
- package/dist/mcp/tools/search-entity-metadata.js +221 -0
- package/dist/mcp/tools/search-entity-metadata.js.map +1 -0
- package/dist/mcp/tools/search-input.d.ts +58 -0
- package/dist/mcp/tools/search-input.d.ts.map +1 -0
- package/dist/mcp/tools/search-input.js +76 -0
- package/dist/mcp/tools/search-input.js.map +1 -0
- package/dist/mcp/tools/search.d.ts +24 -0
- package/dist/mcp/tools/search.d.ts.map +1 -0
- package/dist/mcp/tools/search.js +115 -0
- package/dist/mcp/tools/search.js.map +1 -0
- package/dist/mcp/utils.d.ts +82 -0
- package/dist/mcp/utils.d.ts.map +1 -0
- package/dist/mcp/utils.js +126 -0
- package/dist/mcp/utils.js.map +1 -0
- package/dist/middleware/field-aliases.d.ts +97 -0
- package/dist/middleware/field-aliases.d.ts.map +1 -0
- package/dist/middleware/field-aliases.js +208 -0
- package/dist/middleware/field-aliases.js.map +1 -0
- package/dist/resources/schema.d.ts +13 -0
- package/dist/resources/schema.d.ts.map +1 -0
- package/dist/resources/schema.js +204 -0
- package/dist/resources/schema.js.map +1 -0
- package/dist/schema/context.d.ts +10 -0
- package/dist/schema/context.d.ts.map +1 -0
- package/dist/schema/context.js +6 -0
- package/dist/schema/context.js.map +1 -0
- package/dist/schema/index.d.ts +9 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +6 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/load.d.ts +43 -0
- package/dist/schema/load.d.ts.map +1 -0
- package/dist/schema/load.js +139 -0
- package/dist/schema/load.js.map +1 -0
- package/dist/schema/store.d.ts +112 -0
- package/dist/schema/store.d.ts.map +1 -0
- package/dist/schema/store.js +173 -0
- package/dist/schema/store.js.map +1 -0
- package/dist/schema/structured-entities.d.ts +21 -0
- package/dist/schema/structured-entities.d.ts.map +1 -0
- package/dist/schema/structured-entities.js +39 -0
- package/dist/schema/structured-entities.js.map +1 -0
- package/dist/schema/types.d.ts +36 -0
- package/dist/schema/types.d.ts.map +1 -0
- package/dist/schema/types.js +6 -0
- package/dist/schema/types.js.map +1 -0
- package/dist/server.d.ts +57 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +144 -0
- package/dist/server.js.map +1 -0
- package/dist/telemetry.d.ts +172 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +233 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/tools/analytics-filters.d.ts +18 -0
- package/dist/tools/analytics-filters.d.ts.map +1 -0
- package/dist/tools/analytics-filters.js +35 -0
- package/dist/tools/analytics-filters.js.map +1 -0
- package/dist/tools/analytics.d.ts +16 -0
- package/dist/tools/analytics.d.ts.map +1 -0
- package/dist/tools/analytics.js +381 -0
- package/dist/tools/analytics.js.map +1 -0
- package/dist/tools/concept-profile.d.ts +14 -0
- package/dist/tools/concept-profile.d.ts.map +1 -0
- package/dist/tools/concept-profile.js +130 -0
- package/dist/tools/concept-profile.js.map +1 -0
- package/dist/tools/dataset-profile.d.ts +15 -0
- package/dist/tools/dataset-profile.d.ts.map +1 -0
- package/dist/tools/dataset-profile.js +194 -0
- package/dist/tools/dataset-profile.js.map +1 -0
- package/dist/tools/functions.d.ts +14 -0
- package/dist/tools/functions.d.ts.map +1 -0
- package/dist/tools/functions.js +294 -0
- package/dist/tools/functions.js.map +1 -0
- package/dist/tools/impact-chain.d.ts +15 -0
- package/dist/tools/impact-chain.d.ts.map +1 -0
- package/dist/tools/impact-chain.js +96 -0
- package/dist/tools/impact-chain.js.map +1 -0
- package/dist/tools/kwq.d.ts +19 -0
- package/dist/tools/kwq.d.ts.map +1 -0
- package/dist/tools/kwq.js +156 -0
- package/dist/tools/kwq.js.map +1 -0
- package/dist/tools/lookup.d.ts +14 -0
- package/dist/tools/lookup.d.ts.map +1 -0
- package/dist/tools/lookup.js +213 -0
- package/dist/tools/lookup.js.map +1 -0
- package/dist/tools/policy-profile.d.ts +15 -0
- package/dist/tools/policy-profile.d.ts.map +1 -0
- package/dist/tools/policy-profile.js +174 -0
- package/dist/tools/policy-profile.js.map +1 -0
- package/dist/tools/profile.d.ts +14 -0
- package/dist/tools/profile.d.ts.map +1 -0
- package/dist/tools/profile.js +349 -0
- package/dist/tools/profile.js.map +1 -0
- package/dist/tools/query.d.ts +16 -0
- package/dist/tools/query.d.ts.map +1 -0
- package/dist/tools/query.js +53 -0
- package/dist/tools/query.js.map +1 -0
- package/dist/tools/schema.d.ts +23 -0
- package/dist/tools/schema.d.ts.map +1 -0
- package/dist/tools/schema.js +124 -0
- package/dist/tools/schema.js.map +1 -0
- package/dist/tools/search-entity-metadata.d.ts +18 -0
- package/dist/tools/search-entity-metadata.d.ts.map +1 -0
- package/dist/tools/search-entity-metadata.js +221 -0
- package/dist/tools/search-entity-metadata.js.map +1 -0
- package/dist/tools/search.d.ts +23 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +110 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/solr-fields.d.ts +39 -0
- package/dist/tools/solr-fields.d.ts.map +1 -0
- package/dist/tools/solr-fields.js +40 -0
- package/dist/tools/solr-fields.js.map +1 -0
- package/dist/utils.d.ts +70 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +104 -0
- package/dist/utils.js.map +1 -0
- package/package.json +41 -0
- package/src/client/auth/config-loaders.ts +81 -0
- package/src/client/auth/decorators/index.ts +7 -0
- package/src/client/auth/decorators/with-caching.ts +237 -0
- package/src/client/auth/factory.ts +34 -0
- package/src/client/auth/index.ts +6 -0
- package/src/client/auth/jwt-utils.ts +36 -0
- package/src/client/auth/node.ts +16 -0
- package/src/client/auth/providers/index.ts +1 -0
- package/src/client/auth/providers/jwt-auth-provider.ts +153 -0
- package/src/client/auth/schemas.ts +25 -0
- package/src/client/auth/types.ts +30 -0
- package/src/client/command.ts +54 -0
- package/src/client/config/index.ts +15 -0
- package/src/client/config/loader.ts +155 -0
- package/src/client/config/node.ts +22 -0
- package/src/client/config/schemas.ts +28 -0
- package/src/client/config/types.ts +39 -0
- package/src/client/config/unified-loader.ts +118 -0
- package/src/client/config.ts +69 -0
- package/src/client/deployment-config.ts +98 -0
- package/src/client/errors.ts +295 -0
- package/src/client/http-client.ts +577 -0
- package/src/client/index.ts +68 -0
- package/src/client/internal-dsl-client.ts +128 -0
- package/src/client/rate-limiter.ts +139 -0
- package/src/client/resolve-api-key-user.ts +99 -0
- package/src/client/types.ts +44 -0
- package/src/dsl/client.ts +538 -0
- package/src/dsl/commands/apply-filters.ts +35 -0
- package/src/dsl/commands/facet/index.ts +12 -0
- package/src/dsl/commands/facet/schemas.ts +101 -0
- package/src/dsl/commands/functions/ClassifyCommand.ts +129 -0
- package/src/dsl/commands/functions/ExtractAffiliationsCommand.ts +163 -0
- package/src/dsl/commands/functions/ExtractConceptsCommand.ts +141 -0
- package/src/dsl/commands/functions/ExtractGrantsCommand.ts +112 -0
- package/src/dsl/commands/functions/index.ts +31 -0
- package/src/dsl/commands/index.ts +29 -0
- package/src/dsl/commands/validate-input.ts +29 -0
- package/src/dsl/create-client.ts +80 -0
- package/src/dsl/fluent-query-builder.ts +684 -0
- package/src/dsl/index.ts +206 -0
- package/src/dsl/pagination.ts +202 -0
- package/src/dsl/query-builder.ts +1120 -0
- package/src/dsl/response-parser.ts +299 -0
- package/src/dsl/schema/cache.ts +124 -0
- package/src/dsl/schema/extract.ts +44 -0
- package/src/dsl/schema/index.ts +50 -0
- package/src/dsl/schema/load.ts +160 -0
- package/src/dsl/schema/store.ts +253 -0
- package/src/dsl/schema/structured-entities.ts +44 -0
- package/src/dsl/schema/summary.ts +94 -0
- package/src/dsl/schema/types.ts +40 -0
- package/src/dsl/schema/validation.ts +56 -0
- package/src/dsl/types/buckets.ts +22 -0
- package/src/dsl/types/common.ts +99 -0
- package/src/dsl/types/entities.ts +43 -0
- package/src/dsl/types/index.ts +63 -0
- package/src/dsl/types/return-clauses.ts +147 -0
- package/src/dsl/types/special-functions.ts +220 -0
- package/src/dsl/types/vocabulary.ts +82 -0
- package/src/dsl/usage-policy.ts +219 -0
- package/src/dsl/utils/escape.ts +123 -0
- package/src/dsl/utils/sanitize.ts +21 -0
- package/src/dsl/utils/string-utils.ts +147 -0
- package/src/dsl/utils/validate-field-name.ts +19 -0
- package/src/http-main.ts +41 -0
- package/src/index.ts +14 -0
- package/src/main.ts +40 -0
- package/src/mcp/batch-fetch.ts +255 -0
- package/src/mcp/examples/dsl-examples.ts +66 -0
- package/src/mcp/examples/usage-scenarios.ts +185 -0
- package/src/mcp/export-format.ts +113 -0
- package/src/mcp/funder-org-names.ts +30 -0
- package/src/mcp/http-server.ts +148 -0
- package/src/mcp/middleware/field-aliases.ts +274 -0
- package/src/mcp/resources/schema.ts +364 -0
- package/src/mcp/schema/context.ts +11 -0
- package/src/mcp/schema/index.ts +38 -0
- package/src/mcp/server.ts +247 -0
- package/src/mcp/shared-schema.ts +34 -0
- package/src/mcp/tools/analytics-filters.ts +46 -0
- package/src/mcp/tools/analytics.ts +453 -0
- package/src/mcp/tools/fetch-search-pages.ts +329 -0
- package/src/mcp/tools/functions.ts +105 -0
- package/src/mcp/tools/lookup.ts +182 -0
- package/src/mcp/tools/query.ts +91 -0
- package/src/mcp/tools/schema.ts +147 -0
- package/src/mcp/tools/search-entity-metadata.ts +253 -0
- package/src/mcp/tools/search-input.ts +87 -0
- package/src/mcp/tools/search.ts +168 -0
- package/src/mcp/utils.ts +199 -0
- package/test/client/auth/config-loaders.test.ts +92 -0
- package/test/client/auth/decorators/with-caching.test.ts +482 -0
- package/test/client/auth/factory.test.ts +68 -0
- package/test/client/auth/providers/jwt-auth-provider.test.ts +398 -0
- package/test/client/auth/types.test.ts +18 -0
- package/test/client/command.test.ts +163 -0
- package/test/client/config/loader.test.ts +377 -0
- package/test/client/config/unified-loader.test.ts +136 -0
- package/test/client/deployment-config.test.ts +69 -0
- package/test/client/errors/index.test.ts +408 -0
- package/test/client/helpers/mock-fetch.ts +42 -0
- package/test/client/http-client.test.ts +1148 -0
- package/test/client/integration/auth-providers.integration.test.ts +186 -0
- package/test/client/internal-dsl-client.test.ts +76 -0
- package/test/client/rate-limiter.test.ts +204 -0
- package/test/client/resolve-api-key-user.test.ts +87 -0
- package/test/dsl/client.special-functions.test.ts +387 -0
- package/test/dsl/client.test.ts +457 -0
- package/test/dsl/commands/apply-filters.test.ts +147 -0
- package/test/dsl/commands/functions/ClassifyCommand.test.ts +170 -0
- package/test/dsl/commands/functions/ExtractAffiliationsCommand.test.ts +306 -0
- package/test/dsl/commands/functions/ExtractConceptsCommand.test.ts +136 -0
- package/test/dsl/commands/functions/ExtractGrantsCommand.test.ts +202 -0
- package/test/dsl/commands/search/filters.test.ts +42 -0
- package/test/dsl/fluent-query-builder.test.ts +865 -0
- package/test/dsl/integration/client.integration.test.ts +294 -0
- package/test/dsl/integration/facet-api.integration.test.ts +276 -0
- package/test/dsl/integration/field-existence.integration.test.ts +148 -0
- package/test/dsl/integration/fluent-api-docs-examples.integration.test.ts +988 -0
- package/test/dsl/integration/fluent-api.integration.test.ts +615 -0
- package/test/dsl/integration/search-helpers.ts +27 -0
- package/test/dsl/integration/special-functions.integration.test.ts +224 -0
- package/test/dsl/integration/test-config.ts +52 -0
- package/test/dsl/pagination.test.ts +86 -0
- package/test/dsl/query-builder.test.ts +1775 -0
- package/test/dsl/response-parser.test.ts +520 -0
- package/test/dsl/schema/cache.test.ts +53 -0
- package/test/dsl/schema/load.test.ts +165 -0
- package/test/dsl/schema/summary.test.ts +61 -0
- package/test/dsl/schema/validation.test.ts +46 -0
- package/test/dsl/time-series.test.ts +135 -0
- package/test/dsl/unnest.test.ts +151 -0
- package/test/dsl/usage-policy.test.ts +100 -0
- package/test/dsl/utils/escape.property.test.ts +109 -0
- package/test/dsl/utils/escape.test.ts +140 -0
- package/test/dsl/utils/validate-field-name.property.test.ts +99 -0
- package/test/dsl/utils/validate-field-name.test.ts +55 -0
- package/test/examples/dsl-examples.test.ts +29 -0
- package/test/examples/usage-scenarios.test.ts +90 -0
- package/test/fixtures/describe-schema.json +4000 -0
- package/test/funder-org-names.test.ts +20 -0
- package/test/helpers/schema-fixture.ts +18 -0
- package/test/helpers/tool-test-harness.ts +114 -0
- package/test/integration/assertions.ts +263 -0
- package/test/integration/env.ts +108 -0
- package/test/integration/harness.ts +307 -0
- package/test/integration/hosted-client.ts +56 -0
- package/test/integration/hosted-mocks.ts +81 -0
- package/test/integration/hosted-run.ts +86 -0
- package/test/integration/hosted.e2e.test.ts +101 -0
- package/test/integration/reporter.ts +100 -0
- package/test/integration/run.ts +74 -0
- package/test/integration/suites/analytics.integration.ts +72 -0
- package/test/integration/suites/functions.integration.ts +37 -0
- package/test/integration/suites/hosted-smoke.integration.ts +38 -0
- package/test/integration/suites/index.ts +22 -0
- package/test/integration/suites/lookup.integration.ts +57 -0
- package/test/integration/suites/query.integration.ts +49 -0
- package/test/integration/suites/resources.integration.ts +68 -0
- package/test/integration/suites/search.integration.ts +80 -0
- package/test/integration/types.ts +92 -0
- package/test/integration/verify-usage-scenarios.ts +162 -0
- package/test/mcp/export-format.test.ts +67 -0
- package/test/mcp/http-server.test.ts +80 -0
- package/test/middleware/field-aliases.test.ts +287 -0
- package/test/resources/schema.test.ts +28 -0
- package/test/schema/describe-contract.test.ts +24 -0
- package/test/schema/store.test.ts +45 -0
- package/test/server.test.ts +170 -0
- package/test/tools/analytics-filters.test.ts +35 -0
- package/test/tools/analytics.test.ts +419 -0
- package/test/tools/fetch-search-pages.test.ts +200 -0
- package/test/tools/functions.test.ts +153 -0
- package/test/tools/lookup.test.ts +296 -0
- package/test/tools/query.test.ts +100 -0
- package/test/tools/schema.test.ts +37 -0
- package/test/tools/search.test.ts +415 -0
- package/test/utils.test.ts +45 -0
- package/tsconfig.json +9 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Base class for all Dimensions API commands.
|
|
5
|
+
*
|
|
6
|
+
* Commands are self-contained units with:
|
|
7
|
+
* - Input schema (Zod) for validation
|
|
8
|
+
* - Typed input and output
|
|
9
|
+
* - Execution handled by DimensionsClient.send()
|
|
10
|
+
*/
|
|
11
|
+
export abstract class Command<TInput, TOutput> {
|
|
12
|
+
/**
|
|
13
|
+
* Zod schema for input validation.
|
|
14
|
+
* Must be defined on subclass.
|
|
15
|
+
*/
|
|
16
|
+
static readonly inputSchema: z.ZodType<unknown>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Validated input parameters.
|
|
20
|
+
*/
|
|
21
|
+
abstract readonly input: TInput;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Resolves the DSL query for this command.
|
|
25
|
+
* Override in subclasses that use DSL queries.
|
|
26
|
+
*/
|
|
27
|
+
resolveQuery?(): string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Resolves the API endpoint for this command.
|
|
31
|
+
* Default is DSL endpoint; override for special endpoints.
|
|
32
|
+
*/
|
|
33
|
+
resolveEndpoint(): string {
|
|
34
|
+
return "/api/dsl/v2";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Transforms raw API response to typed output.
|
|
39
|
+
* Override in subclasses.
|
|
40
|
+
*/
|
|
41
|
+
transformResponse?(response: unknown): TOutput;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Type helper to extract input type from a Command class.
|
|
46
|
+
*/
|
|
47
|
+
export type CommandInput<T extends Command<unknown, unknown>> =
|
|
48
|
+
T extends Command<infer I, unknown> ? I : never;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Type helper to extract output type from a Command class.
|
|
52
|
+
*/
|
|
53
|
+
export type CommandOutput<T extends Command<unknown, unknown>> =
|
|
54
|
+
T extends Command<unknown, infer O> ? O : never;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration schemas and loaders.
|
|
3
|
+
* @module core/config
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export { loadConfig, loadConfigFile } from "./loader.js";
|
|
7
|
+
export type { DslConfig } from "./schemas.js";
|
|
8
|
+
export { DslConfigSchema, RawConfigFileSchema } from "./schemas.js";
|
|
9
|
+
export type { ConfigLoaderOptions, ConfigResult, RawConfigFile } from "./types.js";
|
|
10
|
+
export type { DimensionsConfigFile, LoadDimensionsConfigOptions } from "./unified-loader.js";
|
|
11
|
+
export {
|
|
12
|
+
DimensionsConfigFileSchema,
|
|
13
|
+
loadDimensionsConfig,
|
|
14
|
+
loadServiceConfig,
|
|
15
|
+
} from "./unified-loader.js";
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration file loader with environment variable support.
|
|
3
|
+
* @module core/config/loader
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as fs from "node:fs/promises";
|
|
7
|
+
import * as os from "node:os";
|
|
8
|
+
import * as path from "node:path";
|
|
9
|
+
import type { z } from "zod";
|
|
10
|
+
import { ValidationError } from "../errors.js";
|
|
11
|
+
import { RawConfigFileSchema } from "./schemas.js";
|
|
12
|
+
import type { ConfigLoaderOptions, ConfigResult, RawConfigFile } from "./types.js";
|
|
13
|
+
|
|
14
|
+
const CONFIG_FILE_NAME = ".dimensions.config.json";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Environment variable mapping for each service.
|
|
18
|
+
*/
|
|
19
|
+
const ENV_VAR_MAP: Record<string, Record<string, string>> = {
|
|
20
|
+
dsl: {
|
|
21
|
+
apiKey: "DIMENSIONS_DSL_API_KEY",
|
|
22
|
+
baseUrl: "DIMENSIONS_DSL_BASE_URL",
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Loads and parses a JSON config file.
|
|
28
|
+
* @param filePath - Path to the config file
|
|
29
|
+
* @returns Parsed config object, or undefined if file not found
|
|
30
|
+
* @throws Error if file exists but cannot be parsed
|
|
31
|
+
*/
|
|
32
|
+
export async function loadConfigFile(filePath: string): Promise<RawConfigFile | undefined> {
|
|
33
|
+
try {
|
|
34
|
+
const content = await fs.readFile(filePath, "utf-8");
|
|
35
|
+
const parsed = JSON.parse(content);
|
|
36
|
+
return RawConfigFileSchema.parse(parsed);
|
|
37
|
+
} catch (error) {
|
|
38
|
+
if (
|
|
39
|
+
error instanceof Error &&
|
|
40
|
+
"code" in error &&
|
|
41
|
+
(error as NodeJS.ErrnoException).code === "ENOENT"
|
|
42
|
+
) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Loads config from environment variables for a service.
|
|
51
|
+
* @param service - Service name
|
|
52
|
+
* @returns Config object from env vars, or undefined if not set
|
|
53
|
+
*/
|
|
54
|
+
function loadFromEnv(service: string): Record<string, string> | undefined {
|
|
55
|
+
const mapping = ENV_VAR_MAP[service];
|
|
56
|
+
if (!mapping) {
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const config: Record<string, string> = {};
|
|
61
|
+
let hasAnyValue = false;
|
|
62
|
+
|
|
63
|
+
for (const [key, envVar] of Object.entries(mapping)) {
|
|
64
|
+
const value = process.env[envVar];
|
|
65
|
+
if (value) {
|
|
66
|
+
config[key] = value;
|
|
67
|
+
hasAnyValue = true;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return hasAnyValue ? config : undefined;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Loads configuration with priority:
|
|
76
|
+
* 1. Explicit configPath
|
|
77
|
+
* 2. Environment variables (DIMENSIONS_{SERVICE}_{KEY})
|
|
78
|
+
* 3. .dimensions.config.json in cwd
|
|
79
|
+
* 4. .dimensions.config.json in home directory
|
|
80
|
+
*
|
|
81
|
+
* @param options - Loader options (service is required to extract config from file)
|
|
82
|
+
* @param schema - Zod schema for validation
|
|
83
|
+
* @returns Config result with source, or undefined if not found or service not specified
|
|
84
|
+
* @throws ValidationError if config fails schema validation
|
|
85
|
+
*/
|
|
86
|
+
export async function loadConfig<T>(
|
|
87
|
+
options: ConfigLoaderOptions,
|
|
88
|
+
schema: z.ZodSchema<T>,
|
|
89
|
+
): Promise<ConfigResult<T> | undefined> {
|
|
90
|
+
const { configPath, service, cwd = process.cwd(), homedir = os.homedir() } = options;
|
|
91
|
+
|
|
92
|
+
if (configPath) {
|
|
93
|
+
const rawConfig = await loadConfigFile(configPath);
|
|
94
|
+
if (rawConfig && service) {
|
|
95
|
+
const serviceConfig = rawConfig[service as keyof RawConfigFile];
|
|
96
|
+
if (serviceConfig) {
|
|
97
|
+
return validateAndReturn(serviceConfig, schema, "explicit");
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (service) {
|
|
104
|
+
const envConfig = loadFromEnv(service);
|
|
105
|
+
if (envConfig) {
|
|
106
|
+
const result = schema.safeParse(envConfig);
|
|
107
|
+
if (result.success) {
|
|
108
|
+
return { config: result.data, source: "env" };
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const cwdConfigPath = path.join(cwd, CONFIG_FILE_NAME);
|
|
114
|
+
const cwdConfig = await loadConfigFile(cwdConfigPath);
|
|
115
|
+
if (cwdConfig && service) {
|
|
116
|
+
const serviceConfig = cwdConfig[service as keyof RawConfigFile];
|
|
117
|
+
if (serviceConfig) {
|
|
118
|
+
return validateAndReturn(serviceConfig, schema, "cwd");
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const homeConfigPath = path.join(homedir, CONFIG_FILE_NAME);
|
|
123
|
+
const homeConfig = await loadConfigFile(homeConfigPath);
|
|
124
|
+
if (homeConfig && service) {
|
|
125
|
+
const serviceConfig = homeConfig[service as keyof RawConfigFile];
|
|
126
|
+
if (serviceConfig) {
|
|
127
|
+
return validateAndReturn(serviceConfig, schema, "home");
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Validates config against schema and returns result.
|
|
136
|
+
* @param config - Raw config object
|
|
137
|
+
* @param schema - Zod schema
|
|
138
|
+
* @param source - Config source
|
|
139
|
+
* @returns Validated config result
|
|
140
|
+
* @throws ValidationError if validation fails
|
|
141
|
+
*/
|
|
142
|
+
function validateAndReturn<T>(
|
|
143
|
+
config: unknown,
|
|
144
|
+
schema: z.ZodSchema<T>,
|
|
145
|
+
source: ConfigResult<T>["source"],
|
|
146
|
+
): ConfigResult<T> {
|
|
147
|
+
const result = schema.safeParse(config);
|
|
148
|
+
if (!result.success) {
|
|
149
|
+
throw new ValidationError(
|
|
150
|
+
`Configuration validation failed (source: ${source}): ${result.error.message}`,
|
|
151
|
+
{ issues: result.error.issues, source },
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
return { config: result.data, source };
|
|
155
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Node.js-only configuration file loaders.
|
|
3
|
+
*
|
|
4
|
+
* These utilities read `.dimensions.config.json` from disk and merge with
|
|
5
|
+
* environment variables. They depend on `node:fs/promises` and must not be
|
|
6
|
+
* imported in browser/edge contexts.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import { loadDimensionsConfig, loadServiceConfig } from "./node.js";
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module core/config/node
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export { loadConfig, loadConfigFile } from "./loader.js";
|
|
17
|
+
export type { DimensionsConfigFile } from "./unified-loader.js";
|
|
18
|
+
export {
|
|
19
|
+
DimensionsConfigFileSchema,
|
|
20
|
+
loadDimensionsConfig,
|
|
21
|
+
loadServiceConfig,
|
|
22
|
+
} from "./unified-loader.js";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for config validation.
|
|
3
|
+
* @module core/config/schemas
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Schema for DSL service configuration.
|
|
10
|
+
*/
|
|
11
|
+
export const DslConfigSchema = z.object({
|
|
12
|
+
apiKey: z.string().min(1, "API key is required"),
|
|
13
|
+
baseUrl: z.string().url().optional().default("https://app.dimensions.ai"),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Schema for the raw config file structure.
|
|
18
|
+
*/
|
|
19
|
+
export const RawConfigFileSchema = z.object({
|
|
20
|
+
dsl: z
|
|
21
|
+
.object({
|
|
22
|
+
apiKey: z.string().optional(),
|
|
23
|
+
baseUrl: z.string().optional(),
|
|
24
|
+
})
|
|
25
|
+
.optional(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export type DslConfig = z.infer<typeof DslConfigSchema>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration loader types.
|
|
3
|
+
* @module core/config/types
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Options for loading configuration.
|
|
8
|
+
*/
|
|
9
|
+
export interface ConfigLoaderOptions {
|
|
10
|
+
/** Explicit path to config file */
|
|
11
|
+
configPath?: string;
|
|
12
|
+
/** Service to load config for (e.g., 'dsl') */
|
|
13
|
+
service?: string;
|
|
14
|
+
/** @internal Override cwd for tests; defaults to `process.cwd()`. */
|
|
15
|
+
cwd?: string;
|
|
16
|
+
/** @internal Override home directory for tests; defaults to `os.homedir()`. */
|
|
17
|
+
homedir?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Result of loading configuration.
|
|
22
|
+
*/
|
|
23
|
+
export interface ConfigResult<T> {
|
|
24
|
+
/** Loaded configuration */
|
|
25
|
+
readonly config: T;
|
|
26
|
+
/** Source of the configuration */
|
|
27
|
+
readonly source: "explicit" | "env" | "cwd" | "home";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Raw config file structure with nested service configs.
|
|
32
|
+
*/
|
|
33
|
+
export interface RawConfigFile {
|
|
34
|
+
/** DSL service configuration */
|
|
35
|
+
readonly dsl?: {
|
|
36
|
+
readonly apiKey?: string;
|
|
37
|
+
readonly baseUrl?: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified configuration loader for Dimensions DSL settings.
|
|
3
|
+
* Reads `.dimensions.config.json` with cwd → home fallback and env var override.
|
|
4
|
+
* @module core/config/unified-loader
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fs from "node:fs/promises";
|
|
8
|
+
import * as os from "node:os";
|
|
9
|
+
import * as path from "node:path";
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
|
|
12
|
+
const CONFIG_FILE_NAME = ".dimensions.config.json";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Schema for the Dimensions config file.
|
|
16
|
+
*/
|
|
17
|
+
export const DimensionsConfigFileSchema = z.object({
|
|
18
|
+
dsl: z
|
|
19
|
+
.object({
|
|
20
|
+
apiKey: z.string().optional(),
|
|
21
|
+
baseUrl: z.string().optional(),
|
|
22
|
+
})
|
|
23
|
+
.optional(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
/** Full config file type */
|
|
27
|
+
export type DimensionsConfigFile = z.infer<typeof DimensionsConfigFileSchema>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Options for `loadDimensionsConfig`. All fields are optional overrides
|
|
31
|
+
* intended for tests; production callers should omit `options` entirely.
|
|
32
|
+
*/
|
|
33
|
+
export interface LoadDimensionsConfigOptions {
|
|
34
|
+
/** @internal Override cwd for tests; defaults to `process.cwd()`. */
|
|
35
|
+
cwd?: string;
|
|
36
|
+
/** @internal Override home directory for tests; defaults to `os.homedir()`. */
|
|
37
|
+
homedir?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Loads and parses the Dimensions config file, checking cwd then home directory.
|
|
42
|
+
* @param options - Optional cwd/homedir overrides (test-only)
|
|
43
|
+
* @returns Parsed config file, or undefined if no file found
|
|
44
|
+
*/
|
|
45
|
+
export async function loadDimensionsConfig(
|
|
46
|
+
options: LoadDimensionsConfigOptions = {},
|
|
47
|
+
): Promise<DimensionsConfigFile | undefined> {
|
|
48
|
+
const { cwd = process.cwd(), homedir = os.homedir() } = options;
|
|
49
|
+
|
|
50
|
+
const cwdPath = path.join(cwd, CONFIG_FILE_NAME);
|
|
51
|
+
const cwdConfig = await readConfigFile(cwdPath);
|
|
52
|
+
if (cwdConfig) {
|
|
53
|
+
return cwdConfig;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const homePath = path.join(homedir, CONFIG_FILE_NAME);
|
|
57
|
+
const homeConfig = await readConfigFile(homePath);
|
|
58
|
+
if (homeConfig) {
|
|
59
|
+
return homeConfig;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Loads a specific service section from the config file with env var fallback.
|
|
67
|
+
* @param section - Config file section key (e.g., "dsl")
|
|
68
|
+
* @param envVars - Mapping from config field names to environment variable names
|
|
69
|
+
* @returns Merged service config, or undefined if nothing found
|
|
70
|
+
*/
|
|
71
|
+
export async function loadServiceConfig<K extends keyof DimensionsConfigFile>(
|
|
72
|
+
section: K,
|
|
73
|
+
envVars?: Record<string, string>,
|
|
74
|
+
options: LoadDimensionsConfigOptions = {},
|
|
75
|
+
): Promise<DimensionsConfigFile[K] | undefined> {
|
|
76
|
+
const fileConfig = await loadDimensionsConfig(options);
|
|
77
|
+
const sectionConfig = fileConfig?.[section] as Record<string, unknown> | undefined;
|
|
78
|
+
|
|
79
|
+
let merged: Record<string, unknown> | undefined = sectionConfig
|
|
80
|
+
? { ...sectionConfig }
|
|
81
|
+
: undefined;
|
|
82
|
+
|
|
83
|
+
if (envVars) {
|
|
84
|
+
for (const [field, envVar] of Object.entries(envVars)) {
|
|
85
|
+
const value = process.env[envVar];
|
|
86
|
+
if (value) {
|
|
87
|
+
if (!merged) {
|
|
88
|
+
merged = {};
|
|
89
|
+
}
|
|
90
|
+
merged[field] = value;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return merged as DimensionsConfigFile[K] | undefined;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Reads and parses a config file at the given path.
|
|
100
|
+
* @param filePath - Absolute path to the config file
|
|
101
|
+
* @returns Parsed config, or undefined if file not found or invalid
|
|
102
|
+
*/
|
|
103
|
+
async function readConfigFile(filePath: string): Promise<DimensionsConfigFile | undefined> {
|
|
104
|
+
try {
|
|
105
|
+
const content = await fs.readFile(filePath, "utf-8");
|
|
106
|
+
const parsed = JSON.parse(content);
|
|
107
|
+
return DimensionsConfigFileSchema.parse(parsed);
|
|
108
|
+
} catch (error) {
|
|
109
|
+
if (
|
|
110
|
+
error instanceof Error &&
|
|
111
|
+
"code" in error &&
|
|
112
|
+
(error as NodeJS.ErrnoException).code === "ENOENT"
|
|
113
|
+
) {
|
|
114
|
+
return undefined;
|
|
115
|
+
}
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration schema and types for DimensionsClient.
|
|
3
|
+
* @module config
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { InternalDslEnvSchema } from "./deployment-config.js";
|
|
8
|
+
|
|
9
|
+
const InternalClientConfigSchema = z.object({
|
|
10
|
+
service: InternalDslEnvSchema,
|
|
11
|
+
userEmail: z.string().min(1),
|
|
12
|
+
clientIp: z.string().optional(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Zod schema for DimensionsClient configuration.
|
|
17
|
+
* Validates and provides defaults for all configuration options.
|
|
18
|
+
*/
|
|
19
|
+
export const DimensionsClientConfigSchema = z
|
|
20
|
+
.object({
|
|
21
|
+
/** Dimensions API key (required for public backend) */
|
|
22
|
+
apiKey: z.string().min(1).optional(),
|
|
23
|
+
/** DSL backend: public JWT API or internal dsl-service */
|
|
24
|
+
backend: z.enum(["public", "internal"]).default("public"),
|
|
25
|
+
/** Internal dsl-service settings (required when backend is internal) */
|
|
26
|
+
internal: InternalClientConfigSchema.optional(),
|
|
27
|
+
/** Base URL for Dimensions API (public backend only) */
|
|
28
|
+
baseUrl: z.string().url().default("https://app.dimensions.ai"),
|
|
29
|
+
/** Request timeout in milliseconds */
|
|
30
|
+
timeout: z.number().positive().default(30000),
|
|
31
|
+
/** Maximum number of retry attempts */
|
|
32
|
+
maxRetries: z.number().nonnegative().default(3),
|
|
33
|
+
/** Delay between retries in milliseconds */
|
|
34
|
+
retryDelay: z.number().positive().default(1000),
|
|
35
|
+
/** Maximum requests per minute (public backend client-side limiter) */
|
|
36
|
+
rateLimitPerMinute: z.number().positive().default(30),
|
|
37
|
+
/** Validate DSL queries before sending. Default: true */
|
|
38
|
+
validateQueries: z.boolean().default(false),
|
|
39
|
+
})
|
|
40
|
+
.superRefine((value, ctx) => {
|
|
41
|
+
if (value.backend === "public") {
|
|
42
|
+
if (!value.apiKey) {
|
|
43
|
+
ctx.addIssue({
|
|
44
|
+
code: "custom",
|
|
45
|
+
message: "apiKey is required for public backend",
|
|
46
|
+
path: ["apiKey"],
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (!value.internal) {
|
|
53
|
+
ctx.addIssue({
|
|
54
|
+
code: "custom",
|
|
55
|
+
message: "internal config is required for internal backend",
|
|
56
|
+
path: ["internal"],
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Configuration options for DimensionsClient.
|
|
63
|
+
*/
|
|
64
|
+
export type DimensionsClientConfig = z.input<typeof DimensionsClientConfigSchema>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Validated configuration with defaults applied.
|
|
68
|
+
*/
|
|
69
|
+
export type ResolvedDimensionsClientConfig = z.output<typeof DimensionsClientConfigSchema>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deployment mode and hosted backend configuration from environment.
|
|
3
|
+
* @module client/deployment-config
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
|
|
8
|
+
export type DeploymentMode = "local" | "hosted";
|
|
9
|
+
|
|
10
|
+
export const InternalDslEnvSchema = z.object({
|
|
11
|
+
serviceUrl: z.string().url(),
|
|
12
|
+
username: z.string().min(1),
|
|
13
|
+
password: z.string().min(1),
|
|
14
|
+
dslSchema: z.string().min(1),
|
|
15
|
+
host: z.string().min(1),
|
|
16
|
+
variant: z.string().min(1),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export type InternalDslEnvConfig = z.infer<typeof InternalDslEnvSchema>;
|
|
20
|
+
|
|
21
|
+
export interface HostedEnvConfig {
|
|
22
|
+
readonly deploymentMode: "hosted";
|
|
23
|
+
readonly radarAuthUrl: string;
|
|
24
|
+
readonly internal: InternalDslEnvConfig;
|
|
25
|
+
readonly httpPort: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface LocalEnvConfig {
|
|
29
|
+
readonly deploymentMode: "local";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type AppDeploymentConfig = HostedEnvConfig | LocalEnvConfig;
|
|
33
|
+
|
|
34
|
+
function readDeploymentMode(): DeploymentMode {
|
|
35
|
+
const raw = process.env.DEPLOYMENT_MODE?.trim().toLowerCase();
|
|
36
|
+
return raw === "hosted" ? "hosted" : "local";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function readIntEnv(raw: string | undefined, fallback: number, min: number): number {
|
|
40
|
+
if (raw == null || raw.trim() === "") return fallback;
|
|
41
|
+
const value = Number.parseInt(raw, 10);
|
|
42
|
+
return Number.isFinite(value) && value >= min ? value : fallback;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* User identity for hosted schema warmup (`describe schema` at startup).
|
|
47
|
+
* dsl-service requires X-DIMENSIONS-USER before any MCP client has authenticated.
|
|
48
|
+
*/
|
|
49
|
+
export function hostedBootstrapUser(host: string): string {
|
|
50
|
+
return `mcp@${host}`;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Loads deployment configuration from environment variables.
|
|
55
|
+
* @throws {Error} When hosted mode is enabled but required vars are missing
|
|
56
|
+
*/
|
|
57
|
+
export function loadDeploymentConfig(): AppDeploymentConfig {
|
|
58
|
+
if (readDeploymentMode() !== "hosted") {
|
|
59
|
+
return { deploymentMode: "local" };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const serviceUrl = process.env.DSL_SERVICE_URL;
|
|
63
|
+
const username = process.env.DSL_SERVICE_USERNAME;
|
|
64
|
+
const password = process.env.DSL_SERVICE_PASSWORD;
|
|
65
|
+
const dslSchema = process.env.DSL_SCHEMA;
|
|
66
|
+
const host = process.env.DSL_HOST;
|
|
67
|
+
const variant = process.env.DSL_VARIANT;
|
|
68
|
+
const radarAuthUrl = process.env.RADAR_AUTH_URL;
|
|
69
|
+
|
|
70
|
+
const missing: string[] = [];
|
|
71
|
+
if (!serviceUrl) missing.push("DSL_SERVICE_URL");
|
|
72
|
+
if (!username) missing.push("DSL_SERVICE_USERNAME");
|
|
73
|
+
if (!password) missing.push("DSL_SERVICE_PASSWORD");
|
|
74
|
+
if (!dslSchema) missing.push("DSL_SCHEMA");
|
|
75
|
+
if (!host) missing.push("DSL_HOST");
|
|
76
|
+
if (!variant) missing.push("DSL_VARIANT");
|
|
77
|
+
if (!radarAuthUrl) missing.push("RADAR_AUTH_URL");
|
|
78
|
+
|
|
79
|
+
if (missing.length > 0) {
|
|
80
|
+
throw new Error(`Hosted deployment requires: ${missing.join(", ")}`);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const internal = InternalDslEnvSchema.parse({
|
|
84
|
+
serviceUrl,
|
|
85
|
+
username,
|
|
86
|
+
password,
|
|
87
|
+
dslSchema,
|
|
88
|
+
host,
|
|
89
|
+
variant,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
deploymentMode: "hosted",
|
|
94
|
+
radarAuthUrl: radarAuthUrl!.replace(/\/$/, ""),
|
|
95
|
+
internal,
|
|
96
|
+
httpPort: readIntEnv(process.env.MCP_HTTP_PORT, 8080, 1),
|
|
97
|
+
};
|
|
98
|
+
}
|