mcp4openapi 0.2.8 → 0.3.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 +143 -63
- package/dist/scripts/validate-profile.js +3 -3
- package/dist/scripts/validate-profile.js.map +1 -1
- package/dist/src/{oauth-provider.d.ts → auth/oauth-provider.d.ts} +7 -2
- package/dist/src/auth/oauth-provider.d.ts.map +1 -0
- package/dist/src/{oauth-provider.js → auth/oauth-provider.js} +30 -2
- package/dist/src/auth/oauth-provider.js.map +1 -0
- package/dist/src/core/cli-config.d.ts +9 -0
- package/dist/src/core/cli-config.d.ts.map +1 -0
- package/dist/src/core/cli-config.js +124 -0
- package/dist/src/core/cli-config.js.map +1 -0
- package/dist/src/{constants.d.ts → core/constants.d.ts} +1 -0
- package/dist/src/core/constants.d.ts.map +1 -0
- package/dist/src/{constants.js → core/constants.js} +1 -0
- package/dist/src/core/constants.js.map +1 -0
- package/dist/src/{errors.d.ts → core/errors.d.ts} +6 -0
- package/dist/src/core/errors.d.ts.map +1 -0
- package/dist/src/{errors.js → core/errors.js} +15 -6
- package/dist/src/core/errors.js.map +1 -0
- package/dist/src/core/filtering.d.ts +19 -0
- package/dist/src/core/filtering.d.ts.map +1 -0
- package/dist/src/core/filtering.js +292 -0
- package/dist/src/core/filtering.js.map +1 -0
- package/dist/src/core/index.d.ts +26 -0
- package/dist/src/core/index.d.ts.map +1 -0
- package/dist/src/core/index.js +275 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/core/lib.d.ts +8 -0
- package/dist/src/core/lib.d.ts.map +1 -0
- package/dist/src/core/lib.js +7 -0
- package/dist/src/core/lib.js.map +1 -0
- package/dist/src/{logger.d.ts → core/logger.d.ts} +6 -1
- package/dist/src/core/logger.d.ts.map +1 -0
- package/dist/src/{logger.js → core/logger.js} +30 -2
- package/dist/src/core/logger.js.map +1 -0
- package/dist/src/{metrics.d.ts → core/metrics.d.ts} +11 -0
- package/dist/src/core/metrics.d.ts.map +1 -0
- package/dist/src/{metrics.js → core/metrics.js} +61 -0
- package/dist/src/core/metrics.js.map +1 -0
- package/dist/src/core/naming-warnings.d.ts.map +1 -0
- package/dist/src/core/naming-warnings.js.map +1 -0
- package/dist/src/core/naming.d.ts.map +1 -0
- package/dist/src/core/naming.js.map +1 -0
- package/dist/src/generated-schemas.d.ts +245 -79
- package/dist/src/generated-schemas.d.ts.map +1 -1
- package/dist/src/generated-schemas.js +14 -2
- package/dist/src/generated-schemas.js.map +1 -1
- package/dist/src/index.d.ts +1 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -170
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +1 -7
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +1 -6
- package/dist/src/lib.js.map +1 -1
- package/dist/src/mcp/mcp-server-manager.d.ts +20 -0
- package/dist/src/mcp/mcp-server-manager.d.ts.map +1 -0
- package/dist/src/mcp/mcp-server-manager.js +38 -0
- package/dist/src/mcp/mcp-server-manager.js.map +1 -0
- package/dist/src/{mcp-server.d.ts → mcp/mcp-server.d.ts} +31 -1
- package/dist/src/mcp/mcp-server.d.ts.map +1 -0
- package/dist/src/{mcp-server.js → mcp/mcp-server.js} +547 -146
- package/dist/src/mcp/mcp-server.js.map +1 -0
- package/dist/src/{openapi-parser.d.ts → openapi/openapi-parser.d.ts} +1 -1
- package/dist/src/openapi/openapi-parser.d.ts.map +1 -0
- package/dist/src/{openapi-parser.js → openapi/openapi-parser.js} +2 -2
- package/dist/src/openapi/openapi-parser.js.map +1 -0
- package/dist/src/{profile-loader.d.ts → profile/profile-loader.d.ts} +3 -2
- package/dist/src/profile/profile-loader.d.ts.map +1 -0
- package/dist/src/{profile-loader.js → profile/profile-loader.js} +17 -6
- package/dist/src/profile/profile-loader.js.map +1 -0
- package/dist/src/profile/profile-registry.d.ts +18 -0
- package/dist/src/profile/profile-registry.d.ts.map +1 -0
- package/dist/src/profile/profile-registry.js +26 -0
- package/dist/src/profile/profile-registry.js.map +1 -0
- package/dist/src/profile/profile-resolver.d.ts +25 -0
- package/dist/src/profile/profile-resolver.d.ts.map +1 -0
- package/dist/src/profile/profile-resolver.js +204 -0
- package/dist/src/profile/profile-resolver.js.map +1 -0
- package/dist/src/profile/startup-profile.d.ts +17 -0
- package/dist/src/profile/startup-profile.d.ts.map +1 -0
- package/dist/src/profile/startup-profile.js +30 -0
- package/dist/src/profile/startup-profile.js.map +1 -0
- package/dist/src/profile/startup-validation.d.ts +11 -0
- package/dist/src/profile/startup-validation.d.ts.map +1 -0
- package/dist/src/profile/startup-validation.js +21 -0
- package/dist/src/profile/startup-validation.js.map +1 -0
- package/dist/src/testing/dynamic-mock-server.d.ts +24 -0
- package/dist/src/testing/dynamic-mock-server.d.ts.map +1 -0
- package/dist/src/testing/dynamic-mock-server.js +138 -0
- package/dist/src/testing/dynamic-mock-server.js.map +1 -0
- package/dist/src/testing/request-assertions.d.ts +5 -0
- package/dist/src/testing/request-assertions.d.ts.map +1 -0
- package/dist/src/testing/request-assertions.js +165 -0
- package/dist/src/testing/request-assertions.js.map +1 -0
- package/dist/src/testing/template-utils.d.ts +10 -0
- package/dist/src/testing/template-utils.d.ts.map +1 -0
- package/dist/src/testing/template-utils.js +72 -0
- package/dist/src/testing/template-utils.js.map +1 -0
- package/dist/src/testing/test-http-utils.d.ts +1 -1
- package/dist/src/testing/test-http-utils.d.ts.map +1 -1
- package/dist/src/testing/test-http-utils.js +1 -1
- package/dist/src/testing/test-http-utils.js.map +1 -1
- package/dist/src/testing/test-loader.d.ts +6 -0
- package/dist/src/testing/test-loader.d.ts.map +1 -0
- package/dist/src/testing/test-loader.js +212 -0
- package/dist/src/testing/test-loader.js.map +1 -0
- package/dist/src/testing/test-schema.d.ts +1270 -0
- package/dist/src/testing/test-schema.d.ts.map +1 -0
- package/dist/src/testing/test-schema.js +76 -0
- package/dist/src/testing/test-schema.js.map +1 -0
- package/dist/src/tool-filter/compat.d.ts +49 -0
- package/dist/src/tool-filter/compat.d.ts.map +1 -0
- package/dist/src/tool-filter/compat.js +72 -0
- package/dist/src/tool-filter/compat.js.map +1 -0
- package/dist/src/tool-filter/config/env-config-parser.d.ts +38 -0
- package/dist/src/tool-filter/config/env-config-parser.d.ts.map +1 -0
- package/dist/src/tool-filter/config/env-config-parser.js +103 -0
- package/dist/src/tool-filter/config/env-config-parser.js.map +1 -0
- package/dist/src/tool-filter/config/header-config-parser.d.ts +37 -0
- package/dist/src/tool-filter/config/header-config-parser.d.ts.map +1 -0
- package/dist/src/tool-filter/config/header-config-parser.js +118 -0
- package/dist/src/tool-filter/config/header-config-parser.js.map +1 -0
- package/dist/src/tool-filter/errors.d.ts +18 -0
- package/dist/src/tool-filter/errors.d.ts.map +1 -0
- package/dist/src/tool-filter/errors.js +21 -0
- package/dist/src/tool-filter/errors.js.map +1 -0
- package/dist/src/tool-filter/filter/filter-engine.d.ts +45 -0
- package/dist/src/tool-filter/filter/filter-engine.d.ts.map +1 -0
- package/dist/src/tool-filter/filter/filter-engine.js +94 -0
- package/dist/src/tool-filter/filter/filter-engine.js.map +1 -0
- package/dist/src/tool-filter/filter/filter-rules.d.ts +44 -0
- package/dist/src/tool-filter/filter/filter-rules.d.ts.map +1 -0
- package/dist/src/tool-filter/filter/filter-rules.js +72 -0
- package/dist/src/tool-filter/filter/filter-rules.js.map +1 -0
- package/dist/src/tool-filter/filter/global-tool-filter.d.ts +40 -0
- package/dist/src/tool-filter/filter/global-tool-filter.d.ts.map +1 -0
- package/dist/src/tool-filter/filter/global-tool-filter.js +92 -0
- package/dist/src/tool-filter/filter/global-tool-filter.js.map +1 -0
- package/dist/src/tool-filter/filter/session-tool-filter.d.ts +29 -0
- package/dist/src/tool-filter/filter/session-tool-filter.d.ts.map +1 -0
- package/dist/src/tool-filter/filter/session-tool-filter.js +69 -0
- package/dist/src/tool-filter/filter/session-tool-filter.js.map +1 -0
- package/dist/src/tool-filter/index.d.ts +25 -0
- package/dist/src/tool-filter/index.d.ts.map +1 -0
- package/dist/src/tool-filter/index.js +30 -0
- package/dist/src/tool-filter/index.js.map +1 -0
- package/dist/src/tool-filter/integration/tool-filter-service.d.ts +44 -0
- package/dist/src/tool-filter/integration/tool-filter-service.d.ts.map +1 -0
- package/dist/src/tool-filter/integration/tool-filter-service.js +68 -0
- package/dist/src/tool-filter/integration/tool-filter-service.js.map +1 -0
- package/dist/src/tool-filter/operation/operation-classifier.d.ts +20 -0
- package/dist/src/tool-filter/operation/operation-classifier.d.ts.map +1 -0
- package/dist/src/tool-filter/operation/operation-classifier.js +26 -0
- package/dist/src/tool-filter/operation/operation-classifier.js.map +1 -0
- package/dist/src/tool-filter/operation/operation-detector.d.ts +30 -0
- package/dist/src/tool-filter/operation/operation-detector.d.ts.map +1 -0
- package/dist/src/tool-filter/operation/operation-detector.js +96 -0
- package/dist/src/tool-filter/operation/operation-detector.js.map +1 -0
- package/dist/src/tool-filter/operation/operation-resolver.d.ts +22 -0
- package/dist/src/tool-filter/operation/operation-resolver.d.ts.map +1 -0
- package/dist/src/tool-filter/operation/operation-resolver.js +32 -0
- package/dist/src/tool-filter/operation/operation-resolver.js.map +1 -0
- package/dist/src/tool-filter/regex/regex-compiler.d.ts +22 -0
- package/dist/src/tool-filter/regex/regex-compiler.d.ts.map +1 -0
- package/dist/src/tool-filter/regex/regex-compiler.js +56 -0
- package/dist/src/tool-filter/regex/regex-compiler.js.map +1 -0
- package/dist/src/tool-filter/regex/regex-validator.d.ts +24 -0
- package/dist/src/tool-filter/regex/regex-validator.d.ts.map +1 -0
- package/dist/src/tool-filter/regex/regex-validator.js +58 -0
- package/dist/src/tool-filter/regex/regex-validator.js.map +1 -0
- package/dist/src/tool-filter/types.d.ts +92 -0
- package/dist/src/tool-filter/types.d.ts.map +1 -0
- package/dist/src/tool-filter/types.js +5 -0
- package/dist/src/tool-filter/types.js.map +1 -0
- package/dist/src/tool-filter/utils.d.ts +11 -0
- package/dist/src/tool-filter/utils.d.ts.map +1 -0
- package/dist/src/tool-filter/utils.js +13 -0
- package/dist/src/tool-filter/utils.js.map +1 -0
- package/dist/src/{composite-executor.d.ts → tooling/composite-executor.d.ts} +3 -3
- package/dist/src/tooling/composite-executor.d.ts.map +1 -0
- package/dist/src/{composite-executor.js → tooling/composite-executor.js} +1 -1
- package/dist/src/tooling/composite-executor.js.map +1 -0
- package/dist/src/{dag-executor.d.ts → tooling/dag-executor.d.ts} +1 -1
- package/dist/src/tooling/dag-executor.d.ts.map +1 -0
- package/dist/src/tooling/dag-executor.js.map +1 -0
- package/dist/src/{proxy-executor.d.ts → tooling/proxy-executor.d.ts} +2 -2
- package/dist/src/tooling/proxy-executor.d.ts.map +1 -0
- package/dist/src/{proxy-executor.js → tooling/proxy-executor.js} +8 -1
- package/dist/src/tooling/proxy-executor.js.map +1 -0
- package/dist/src/{tool-generator.d.ts → tooling/tool-generator.d.ts} +4 -3
- package/dist/src/tooling/tool-generator.d.ts.map +1 -0
- package/dist/src/{tool-generator.js → tooling/tool-generator.js} +23 -7
- package/dist/src/tooling/tool-generator.js.map +1 -0
- package/dist/src/{http-client-factory.d.ts → transport/http-client-factory.d.ts} +4 -1
- package/dist/src/transport/http-client-factory.d.ts.map +1 -0
- package/dist/src/{http-client-factory.js → transport/http-client-factory.js} +13 -3
- package/dist/src/transport/http-client-factory.js.map +1 -0
- package/dist/src/transport/http-transport-config.d.ts +6 -0
- package/dist/src/transport/http-transport-config.d.ts.map +1 -0
- package/dist/src/transport/http-transport-config.js +62 -0
- package/dist/src/transport/http-transport-config.js.map +1 -0
- package/dist/src/{http-transport.d.ts → transport/http-transport.d.ts} +72 -14
- package/dist/src/transport/http-transport.d.ts.map +1 -0
- package/dist/src/{http-transport.js → transport/http-transport.js} +1166 -493
- package/dist/src/transport/http-transport.js.map +1 -0
- package/dist/src/{interceptors.d.ts → transport/interceptors.d.ts} +6 -2
- package/dist/src/transport/interceptors.d.ts.map +1 -0
- package/dist/src/{interceptors.js → transport/interceptors.js} +72 -41
- package/dist/src/transport/interceptors.js.map +1 -0
- package/dist/src/types/http-transport.d.ts +25 -0
- package/dist/src/types/http-transport.d.ts.map +1 -1
- package/dist/src/types/profile.d.ts +13 -1
- package/dist/src/types/profile.d.ts.map +1 -1
- package/dist/src/validation/argument-normalizer.d.ts +6 -0
- package/dist/src/validation/argument-normalizer.d.ts.map +1 -0
- package/dist/src/validation/argument-normalizer.js +70 -0
- package/dist/src/validation/argument-normalizer.js.map +1 -0
- package/dist/src/validation/jsonrpc-validator.d.ts.map +1 -0
- package/dist/src/validation/jsonrpc-validator.js.map +1 -0
- package/dist/src/{schema-validator.d.ts → validation/schema-validator.d.ts} +2 -2
- package/dist/src/validation/schema-validator.d.ts.map +1 -0
- package/dist/src/validation/schema-validator.js.map +1 -0
- package/dist/src/validation/validation-utils.d.ts.map +1 -0
- package/dist/src/validation/validation-utils.js.map +1 -0
- package/package.json +9 -3
- package/profile-schema.json +63 -3
- package/profiles/gitlab/developer-profile-oauth.json +1520 -0
- package/profiles/gitlab/developer-profile-oauth.test.json +3432 -0
- package/profiles/gitlab/openapi.yaml +6891 -0
- package/profiles/n8n/openapi.yaml +2441 -0
- package/profiles/n8n/profile-optimized.json +965 -0
- package/profiles/n8n/profile-optimized.test.json +1078 -0
- package/profiles/n8n/profile.json +1033 -0
- package/profiles/n8n/profile.test.json +983 -0
- package/profiles/n8n-nodes/openapi.yaml +24 -0
- package/profiles/n8n-nodes/profile-nodes.json +44 -0
- package/profiles/n8n-nodes/profile-nodes.test.json +91 -0
- package/profiles/semgrep/openapi.yaml +4706 -0
- package/profiles/semgrep/profile.json +692 -0
- package/profiles/semgrep/profile.test.json +471 -0
- package/profiles/youtrack/openapi.json +16976 -0
- package/profiles/youtrack/profile.json +608 -0
- package/profiles/youtrack/profile.test.json +1926 -0
- package/dist/src/composite-executor.d.ts.map +0 -1
- package/dist/src/composite-executor.js.map +0 -1
- package/dist/src/constants.d.ts.map +0 -1
- package/dist/src/constants.js.map +0 -1
- package/dist/src/dag-executor.d.ts.map +0 -1
- package/dist/src/dag-executor.js.map +0 -1
- package/dist/src/errors.d.ts.map +0 -1
- package/dist/src/errors.js.map +0 -1
- package/dist/src/http-client-factory.d.ts.map +0 -1
- package/dist/src/http-client-factory.js.map +0 -1
- package/dist/src/http-transport.d.ts.map +0 -1
- package/dist/src/http-transport.js.map +0 -1
- package/dist/src/interceptors.d.ts.map +0 -1
- package/dist/src/interceptors.js.map +0 -1
- package/dist/src/jsonrpc-validator.d.ts.map +0 -1
- package/dist/src/jsonrpc-validator.js.map +0 -1
- package/dist/src/logger.d.ts.map +0 -1
- package/dist/src/logger.js.map +0 -1
- package/dist/src/mcp-server.d.ts.map +0 -1
- package/dist/src/mcp-server.js.map +0 -1
- package/dist/src/metrics.d.ts.map +0 -1
- package/dist/src/metrics.js.map +0 -1
- package/dist/src/naming-warnings.d.ts.map +0 -1
- package/dist/src/naming-warnings.js.map +0 -1
- package/dist/src/naming.d.ts.map +0 -1
- package/dist/src/naming.js.map +0 -1
- package/dist/src/oauth-provider.d.ts.map +0 -1
- package/dist/src/oauth-provider.js.map +0 -1
- package/dist/src/openapi-parser.d.ts.map +0 -1
- package/dist/src/openapi-parser.js.map +0 -1
- package/dist/src/profile-loader.d.ts.map +0 -1
- package/dist/src/profile-loader.js.map +0 -1
- package/dist/src/proxy-executor.d.ts.map +0 -1
- package/dist/src/proxy-executor.js.map +0 -1
- package/dist/src/schema-validator.d.ts.map +0 -1
- package/dist/src/schema-validator.js.map +0 -1
- package/dist/src/testing/fixtures.d.ts +0 -684
- package/dist/src/testing/fixtures.d.ts.map +0 -1
- package/dist/src/testing/fixtures.js +0 -528
- package/dist/src/testing/fixtures.js.map +0 -1
- package/dist/src/testing/mock-gitlab-server.d.ts +0 -43
- package/dist/src/testing/mock-gitlab-server.d.ts.map +0 -1
- package/dist/src/testing/mock-gitlab-server.js +0 -1026
- package/dist/src/testing/mock-gitlab-server.js.map +0 -1
- package/dist/src/testing/mock-semgrep-server.d.ts +0 -32
- package/dist/src/testing/mock-semgrep-server.d.ts.map +0 -1
- package/dist/src/testing/mock-semgrep-server.js +0 -213
- package/dist/src/testing/mock-semgrep-server.js.map +0 -1
- package/dist/src/testing/mock-youtrack-server.d.ts +0 -11
- package/dist/src/testing/mock-youtrack-server.d.ts.map +0 -1
- package/dist/src/testing/mock-youtrack-server.js +0 -152
- package/dist/src/testing/mock-youtrack-server.js.map +0 -1
- package/dist/src/tool-generator.d.ts.map +0 -1
- package/dist/src/tool-generator.js.map +0 -1
- package/dist/src/validation-utils.d.ts.map +0 -1
- package/dist/src/validation-utils.js.map +0 -1
- /package/dist/src/{naming-warnings.d.ts → core/naming-warnings.d.ts} +0 -0
- /package/dist/src/{naming-warnings.js → core/naming-warnings.js} +0 -0
- /package/dist/src/{naming.d.ts → core/naming.d.ts} +0 -0
- /package/dist/src/{naming.js → core/naming.js} +0 -0
- /package/dist/src/{dag-executor.js → tooling/dag-executor.js} +0 -0
- /package/dist/src/{jsonrpc-validator.d.ts → validation/jsonrpc-validator.d.ts} +0 -0
- /package/dist/src/{jsonrpc-validator.js → validation/jsonrpc-validator.js} +0 -0
- /package/dist/src/{schema-validator.js → validation/schema-validator.js} +0 -0
- /package/dist/src/{validation-utils.d.ts → validation/validation-utils.d.ts} +0 -0
- /package/dist/src/{validation-utils.js → validation/validation-utils.js} +0 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { ProfileTestDefinitionSchema } from './test-schema.js';
|
|
3
|
+
export async function loadTestDefinition(filepath) {
|
|
4
|
+
const content = await fs.promises.readFile(filepath, 'utf-8');
|
|
5
|
+
return parseContent(content, filepath);
|
|
6
|
+
}
|
|
7
|
+
export function loadTestDefinitionSync(filepath) {
|
|
8
|
+
const content = fs.readFileSync(filepath, 'utf-8');
|
|
9
|
+
return parseContent(content, filepath);
|
|
10
|
+
}
|
|
11
|
+
function parseContent(content, filepath) {
|
|
12
|
+
let json;
|
|
13
|
+
try {
|
|
14
|
+
json = JSON.parse(content);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
throw new Error(`Failed to parse test definition file ${filepath}: ${error}`);
|
|
18
|
+
}
|
|
19
|
+
const result = ProfileTestDefinitionSchema.safeParse(json);
|
|
20
|
+
if (!result.success) {
|
|
21
|
+
throw new Error(`Invalid test definition in ${filepath}: ${result.error.message}`);
|
|
22
|
+
}
|
|
23
|
+
return result.data;
|
|
24
|
+
}
|
|
25
|
+
export function validateTestAgainstProfile(testDef, profile) {
|
|
26
|
+
// Check if test definition name matches profile (warning only)
|
|
27
|
+
if (testDef.profile_name && testDef.profile_name !== profile.profile_name) {
|
|
28
|
+
console.warn(`Warning: Test definition profile_name '${testDef.profile_name}' does not match profile name '${profile.profile_name}'`);
|
|
29
|
+
}
|
|
30
|
+
const coveredOperations = new Set();
|
|
31
|
+
const aliasKeys = new Set(Object.values(profile.parameter_aliases ?? {}).flat());
|
|
32
|
+
for (const scenario of testDef.scenarios) {
|
|
33
|
+
// 1. Check if tool exists
|
|
34
|
+
const tool = profile.tools.find(t => t.name === scenario.tool);
|
|
35
|
+
if (!tool) {
|
|
36
|
+
throw new Error(`Test scenario '${scenario.name}' refers to non-existent tool '${scenario.tool}'`);
|
|
37
|
+
}
|
|
38
|
+
// 2. Simple argument validation (checking if required args are present)
|
|
39
|
+
// This is a basic check. The actual tool execution will do Zod validation.
|
|
40
|
+
// We can iterate over tool.parameters and check 'required' or 'required_for'.
|
|
41
|
+
const action = scenario.arguments['action'];
|
|
42
|
+
const expectSuccess = scenario.expect?.success ?? true;
|
|
43
|
+
for (const [paramName, paramDef] of Object.entries(tool.parameters)) {
|
|
44
|
+
let isRequired = paramDef.required;
|
|
45
|
+
// Check conditional requirements
|
|
46
|
+
if (!isRequired && paramDef.required_for && action) {
|
|
47
|
+
isRequired = paramDef.required_for.includes(action);
|
|
48
|
+
}
|
|
49
|
+
if (isRequired && !(paramName in scenario.arguments)) {
|
|
50
|
+
if (expectSuccess) {
|
|
51
|
+
throw new Error(`Test scenario '${scenario.name}' missing required argument '${paramName}' for tool '${scenario.tool}'`);
|
|
52
|
+
}
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
let operationKey;
|
|
57
|
+
if (tool.operations) {
|
|
58
|
+
operationKey = resolveOperationKey(tool, scenario.arguments);
|
|
59
|
+
if (operationKey) {
|
|
60
|
+
coveredOperations.add(`${tool.name}.${operationKey}`);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
const available = Object.keys(tool.operations);
|
|
64
|
+
throw new Error(`Test scenario '${scenario.name}' does not map to a known operation for tool '${scenario.tool}'. ` +
|
|
65
|
+
`Available operations: ${available.join(', ')}`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else if (tool.composite) {
|
|
69
|
+
coveredOperations.add(tool.name);
|
|
70
|
+
}
|
|
71
|
+
if (testDef.coverage?.require_request_assertions && shouldRequireRequestAssertions(tool, scenario, operationKey, aliasKeys)) {
|
|
72
|
+
const skipReason = resolveSkipRequestAssertions(testDef.coverage, scenario, tool, operationKey);
|
|
73
|
+
if (!skipReason && !hasRequestAssertions(scenario)) {
|
|
74
|
+
throw new Error(`Test scenario '${scenario.name}' must include request assertions (expect.request or expect.requests).`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
enforceCoverage(testDef.coverage, profile, coveredOperations);
|
|
79
|
+
enforceDestructiveCoverage(testDef.coverage, profile, coveredOperations);
|
|
80
|
+
}
|
|
81
|
+
function resolveOperationKey(tool, args) {
|
|
82
|
+
if (!tool.operations)
|
|
83
|
+
return undefined;
|
|
84
|
+
const action = args['action'];
|
|
85
|
+
const resourceType = args['resource_type'];
|
|
86
|
+
const operationKeys = Object.keys(tool.operations);
|
|
87
|
+
if (!action) {
|
|
88
|
+
return operationKeys.length === 1 ? operationKeys[0] : undefined;
|
|
89
|
+
}
|
|
90
|
+
if (resourceType) {
|
|
91
|
+
const compositeKey = `${action}_${resourceType}`;
|
|
92
|
+
if (tool.operations[compositeKey]) {
|
|
93
|
+
return compositeKey;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (tool.operations[action]) {
|
|
97
|
+
return action;
|
|
98
|
+
}
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
function enforceCoverage(coverage, profile, coveredOperations) {
|
|
102
|
+
if (!coverage?.require_all_actions) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const missing = [];
|
|
106
|
+
for (const tool of profile.tools) {
|
|
107
|
+
if (tool.composite) {
|
|
108
|
+
const coverageKey = tool.name;
|
|
109
|
+
const skipReason = coverage.skip_actions?.[coverageKey];
|
|
110
|
+
if (!skipReason && !coveredOperations.has(coverageKey)) {
|
|
111
|
+
missing.push(coverageKey);
|
|
112
|
+
}
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (!tool.operations)
|
|
116
|
+
continue;
|
|
117
|
+
for (const action of Object.keys(tool.operations)) {
|
|
118
|
+
const coverageKey = `${tool.name}.${action}`;
|
|
119
|
+
const skipReason = resolveSkipAction(coverage, coverageKey, action);
|
|
120
|
+
if (skipReason) {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
if (!coveredOperations.has(coverageKey)) {
|
|
124
|
+
missing.push(coverageKey);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (missing.length > 0) {
|
|
129
|
+
const skipList = Object.entries(coverage.skip_actions || {}).map(([key, reason]) => `${key} (${reason})`);
|
|
130
|
+
const skipMessage = skipList.length > 0 ? ` Skipped: ${skipList.join(', ')}.` : '';
|
|
131
|
+
throw new Error(`Test coverage incomplete. Missing scenarios for: ${missing.join(', ')}.${skipMessage}`);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function enforceDestructiveCoverage(coverage, profile, coveredOperations) {
|
|
135
|
+
const missing = [];
|
|
136
|
+
const destructiveActions = new Set();
|
|
137
|
+
for (const tool of profile.tools) {
|
|
138
|
+
if (!tool.operations)
|
|
139
|
+
continue;
|
|
140
|
+
for (const action of Object.keys(tool.operations)) {
|
|
141
|
+
if (!isDestructiveAction(action)) {
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
destructiveActions.add(`${tool.name}.${action}`);
|
|
145
|
+
const coverageKey = `${tool.name}.${action}`;
|
|
146
|
+
const skipReason = resolveSkipAction(coverage, coverageKey, action);
|
|
147
|
+
if (skipReason) {
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
if (!coveredOperations.has(coverageKey)) {
|
|
151
|
+
missing.push(coverageKey);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
if (missing.length > 0) {
|
|
156
|
+
const skipList = Object.entries(coverage?.skip_actions || {}).map(([key, reason]) => `${key} (${reason})`);
|
|
157
|
+
const skipMessage = skipList.length > 0 ? ` Skipped: ${skipList.join(', ')}.` : '';
|
|
158
|
+
throw new Error(`Destructive actions missing coverage: ${missing.join(', ')}.${skipMessage}`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function resolveSkipAction(coverage, coverageKey, action) {
|
|
162
|
+
if (!coverage?.skip_actions) {
|
|
163
|
+
return undefined;
|
|
164
|
+
}
|
|
165
|
+
if (coverage.skip_actions[coverageKey]) {
|
|
166
|
+
return coverage.skip_actions[coverageKey];
|
|
167
|
+
}
|
|
168
|
+
if (action && coverage.skip_actions[action]) {
|
|
169
|
+
return coverage.skip_actions[action];
|
|
170
|
+
}
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
173
|
+
function isDestructiveAction(action) {
|
|
174
|
+
const destructiveVerbs = ['delete', 'remove', 'revoke', 'cancel', 'reset', 'terminate', 'destroy', 'purge'];
|
|
175
|
+
const tokens = action.toLowerCase().split(/[^a-z0-9]+/);
|
|
176
|
+
return destructiveVerbs.some(verb => tokens.includes(verb));
|
|
177
|
+
}
|
|
178
|
+
function hasRequestAssertions(scenario) {
|
|
179
|
+
return Boolean(scenario.expect.request || (scenario.expect.requests && scenario.expect.requests.length > 0));
|
|
180
|
+
}
|
|
181
|
+
function shouldRequireRequestAssertions(tool, scenario, operationKey, aliasKeys) {
|
|
182
|
+
if (scenario.arguments && Object.keys(scenario.arguments).some(key => aliasKeys.has(key))) {
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
if (tool.send_response_fields_as_param && tool.response_fields) {
|
|
186
|
+
const action = scenario.arguments['action'];
|
|
187
|
+
if ((action && tool.response_fields[action]) || (operationKey && tool.response_fields[operationKey])) {
|
|
188
|
+
return true;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
if (operationKey && tool.operations) {
|
|
192
|
+
const operation = tool.operations[operationKey];
|
|
193
|
+
if (typeof operation === 'object' && operation?.type === 'proxy_download') {
|
|
194
|
+
return true;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
const metadataParams = tool.metadata_params ?? [];
|
|
198
|
+
const usesCustomMetadata = metadataParams.some(param => param !== 'action' && param !== 'resource_type');
|
|
199
|
+
if (usesCustomMetadata && metadataParams.some(param => param in scenario.arguments)) {
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
function resolveSkipRequestAssertions(coverage, scenario, tool, operationKey) {
|
|
205
|
+
if (!coverage.skip_request_assertions) {
|
|
206
|
+
return undefined;
|
|
207
|
+
}
|
|
208
|
+
return (coverage.skip_request_assertions[scenario.name] ??
|
|
209
|
+
(operationKey ? coverage.skip_request_assertions[`${tool.name}.${operationKey}`] : undefined) ??
|
|
210
|
+
coverage.skip_request_assertions[tool.name]);
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=test-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-loader.js","sourceRoot":"","sources":["../../../src/testing/test-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB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