sfcc-dev-mcp 1.0.21 → 1.1.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/CHANGELOG.md +73 -4
- package/README.md +101 -31
- package/dist/ai-instructions/skills/sfcc-script-evaluation/SKILL.md +1 -0
- package/dist/clients/agent-instructions-client.d.ts +3 -0
- package/dist/clients/agent-instructions-client.d.ts.map +1 -1
- package/dist/clients/agent-instructions-client.js +42 -10
- package/dist/clients/agent-instructions-client.js.map +1 -1
- package/dist/clients/base/abstract-documentation-client.d.ts +4 -0
- package/dist/clients/base/abstract-documentation-client.d.ts.map +1 -1
- package/dist/clients/base/abstract-documentation-client.js +9 -1
- package/dist/clients/base/abstract-documentation-client.js.map +1 -1
- package/dist/clients/base/http-client.d.ts +10 -3
- package/dist/clients/base/http-client.d.ts.map +1 -1
- package/dist/clients/base/http-client.js +94 -16
- package/dist/clients/base/http-client.js.map +1 -1
- package/dist/clients/base/oauth-token.d.ts +3 -0
- package/dist/clients/base/oauth-token.d.ts.map +1 -1
- package/dist/clients/base/oauth-token.js +23 -3
- package/dist/clients/base/oauth-token.js.map +1 -1
- package/dist/clients/base/ocapi-auth-client.d.ts.map +1 -1
- package/dist/clients/base/ocapi-auth-client.js +22 -2
- package/dist/clients/base/ocapi-auth-client.js.map +1 -1
- package/dist/clients/docs/class-name-resolver.d.ts +7 -4
- package/dist/clients/docs/class-name-resolver.d.ts.map +1 -1
- package/dist/clients/docs/class-name-resolver.js.map +1 -1
- package/dist/clients/docs/documentation-scanner.d.ts +2 -0
- package/dist/clients/docs/documentation-scanner.d.ts.map +1 -1
- package/dist/clients/docs/documentation-scanner.js +39 -17
- package/dist/clients/docs/documentation-scanner.js.map +1 -1
- package/dist/clients/docs-client.d.ts +4 -3
- package/dist/clients/docs-client.d.ts.map +1 -1
- package/dist/clients/docs-client.js.map +1 -1
- package/dist/clients/logs/log-client.d.ts +1 -0
- package/dist/clients/logs/log-client.d.ts.map +1 -1
- package/dist/clients/logs/log-client.js +13 -21
- package/dist/clients/logs/log-client.js.map +1 -1
- package/dist/clients/logs/log-file-discovery.d.ts +1 -0
- package/dist/clients/logs/log-file-discovery.d.ts.map +1 -1
- package/dist/clients/logs/log-file-discovery.js +19 -6
- package/dist/clients/logs/log-file-discovery.js.map +1 -1
- package/dist/clients/logs/log-file-reader.d.ts +2 -0
- package/dist/clients/logs/log-file-reader.d.ts.map +1 -1
- package/dist/clients/logs/log-file-reader.js +31 -8
- package/dist/clients/logs/log-file-reader.js.map +1 -1
- package/dist/clients/logs/log-formatter.d.ts +2 -2
- package/dist/clients/logs/log-formatter.d.ts.map +1 -1
- package/dist/clients/logs/log-formatter.js.map +1 -1
- package/dist/clients/logs/log-types.d.ts +4 -0
- package/dist/clients/logs/log-types.d.ts.map +1 -1
- package/dist/clients/logs/webdav-client-manager.d.ts.map +1 -1
- package/dist/clients/logs/webdav-client-manager.js.map +1 -1
- package/dist/clients/ocapi/code-versions-client.d.ts +23 -4
- package/dist/clients/ocapi/code-versions-client.d.ts.map +1 -1
- package/dist/clients/ocapi/code-versions-client.js +2 -2
- package/dist/clients/ocapi/code-versions-client.js.map +1 -1
- package/dist/clients/ocapi/site-preferences-client.d.ts +2 -42
- package/dist/clients/ocapi/site-preferences-client.d.ts.map +1 -1
- package/dist/clients/ocapi/site-preferences-client.js.map +1 -1
- package/dist/clients/ocapi/system-objects-client.d.ts +7 -39
- package/dist/clients/ocapi/system-objects-client.d.ts.map +1 -1
- package/dist/clients/ocapi/system-objects-client.js.map +1 -1
- package/dist/clients/script-debugger/script-debugger-client.d.ts +30 -1
- package/dist/clients/script-debugger/script-debugger-client.d.ts.map +1 -1
- package/dist/clients/script-debugger/script-debugger-client.js +266 -132
- package/dist/clients/script-debugger/script-debugger-client.js.map +1 -1
- package/dist/clients/sfra-client.d.ts.map +1 -1
- package/dist/clients/sfra-client.js.map +1 -1
- package/dist/config/cli-options.d.ts +16 -0
- package/dist/config/cli-options.d.ts.map +1 -0
- package/dist/config/cli-options.js +56 -0
- package/dist/config/cli-options.js.map +1 -0
- package/dist/config/configuration-factory.d.ts +2 -0
- package/dist/config/configuration-factory.d.ts.map +1 -1
- package/dist/config/configuration-factory.js +30 -6
- package/dist/config/configuration-factory.js.map +1 -1
- package/dist/config/credential-validation.d.ts +25 -0
- package/dist/config/credential-validation.d.ts.map +1 -0
- package/dist/config/credential-validation.js +42 -0
- package/dist/config/credential-validation.js.map +1 -0
- package/dist/config/dw-json-loader.d.ts.map +1 -1
- package/dist/config/dw-json-loader.js +25 -68
- package/dist/config/dw-json-loader.js.map +1 -1
- package/dist/config/path-security-policy.d.ts +6 -0
- package/dist/config/path-security-policy.d.ts.map +1 -0
- package/dist/config/path-security-policy.js +63 -0
- package/dist/config/path-security-policy.js.map +1 -0
- package/dist/config/workspace-roots.d.ts +1 -0
- package/dist/config/workspace-roots.d.ts.map +1 -1
- package/dist/config/workspace-roots.js +26 -77
- package/dist/config/workspace-roots.js.map +1 -1
- package/dist/core/handlers/abstract-client-handler.d.ts +23 -2
- package/dist/core/handlers/abstract-client-handler.d.ts.map +1 -1
- package/dist/core/handlers/abstract-client-handler.js +33 -3
- package/dist/core/handlers/abstract-client-handler.js.map +1 -1
- package/dist/core/handlers/agent-instructions-handler.d.ts +1 -1
- package/dist/core/handlers/agent-instructions-handler.d.ts.map +1 -1
- package/dist/core/handlers/agent-instructions-handler.js +2 -2
- package/dist/core/handlers/agent-instructions-handler.js.map +1 -1
- package/dist/core/handlers/base-handler.d.ts +14 -11
- package/dist/core/handlers/base-handler.d.ts.map +1 -1
- package/dist/core/handlers/base-handler.js +38 -22
- package/dist/core/handlers/base-handler.js.map +1 -1
- package/dist/core/handlers/cartridge-handler.d.ts +3 -8
- package/dist/core/handlers/cartridge-handler.d.ts.map +1 -1
- package/dist/core/handlers/cartridge-handler.js +10 -18
- package/dist/core/handlers/cartridge-handler.js.map +1 -1
- package/dist/core/handlers/code-version-handler.d.ts +3 -9
- package/dist/core/handlers/code-version-handler.d.ts.map +1 -1
- package/dist/core/handlers/code-version-handler.js +10 -21
- package/dist/core/handlers/code-version-handler.js.map +1 -1
- package/dist/core/handlers/job-log-handler.d.ts +3 -9
- package/dist/core/handlers/job-log-handler.d.ts.map +1 -1
- package/dist/core/handlers/job-log-handler.js +10 -21
- package/dist/core/handlers/job-log-handler.js.map +1 -1
- package/dist/core/handlers/lifecycle-utils.d.ts +5 -0
- package/dist/core/handlers/lifecycle-utils.d.ts.map +1 -0
- package/dist/core/handlers/lifecycle-utils.js +18 -0
- package/dist/core/handlers/lifecycle-utils.js.map +1 -0
- package/dist/core/handlers/log-handler.d.ts +3 -9
- package/dist/core/handlers/log-handler.d.ts.map +1 -1
- package/dist/core/handlers/log-handler.js +10 -21
- package/dist/core/handlers/log-handler.js.map +1 -1
- package/dist/core/handlers/script-debugger-handler.d.ts +3 -9
- package/dist/core/handlers/script-debugger-handler.d.ts.map +1 -1
- package/dist/core/handlers/script-debugger-handler.js +10 -21
- package/dist/core/handlers/script-debugger-handler.js.map +1 -1
- package/dist/core/handlers/simple-client-handler.d.ts +3 -3
- package/dist/core/handlers/simple-client-handler.d.ts.map +1 -1
- package/dist/core/handlers/simple-client-handler.js +5 -3
- package/dist/core/handlers/simple-client-handler.js.map +1 -1
- package/dist/core/handlers/system-object-handler.d.ts +3 -9
- package/dist/core/handlers/system-object-handler.d.ts.map +1 -1
- package/dist/core/handlers/system-object-handler.js +10 -21
- package/dist/core/handlers/system-object-handler.js.map +1 -1
- package/dist/core/handlers/validation-helpers.d.ts +5 -26
- package/dist/core/handlers/validation-helpers.d.ts.map +1 -1
- package/dist/core/handlers/validation-helpers.js +79 -81
- package/dist/core/handlers/validation-helpers.js.map +1 -1
- package/dist/core/instruction-advisor.d.ts +3 -0
- package/dist/core/instruction-advisor.d.ts.map +1 -1
- package/dist/core/instruction-advisor.js +25 -2
- package/dist/core/instruction-advisor.js.map +1 -1
- package/dist/core/server-tool-call-lifecycle.d.ts +38 -0
- package/dist/core/server-tool-call-lifecycle.d.ts.map +1 -0
- package/dist/core/server-tool-call-lifecycle.js +128 -0
- package/dist/core/server-tool-call-lifecycle.js.map +1 -0
- package/dist/core/server-tool-catalog.d.ts +19 -0
- package/dist/core/server-tool-catalog.d.ts.map +1 -0
- package/dist/core/server-tool-catalog.js +52 -0
- package/dist/core/server-tool-catalog.js.map +1 -0
- package/dist/core/server-workspace-discovery.d.ts +38 -0
- package/dist/core/server-workspace-discovery.d.ts.map +1 -0
- package/dist/core/server-workspace-discovery.js +68 -0
- package/dist/core/server-workspace-discovery.js.map +1 -0
- package/dist/core/server.d.ts +27 -3
- package/dist/core/server.d.ts.map +1 -1
- package/dist/core/server.js +247 -165
- package/dist/core/server.js.map +1 -1
- package/dist/core/tool-argument-validator.d.ts +24 -0
- package/dist/core/tool-argument-validator.d.ts.map +1 -0
- package/dist/core/tool-argument-validator.js +186 -0
- package/dist/core/tool-argument-validator.js.map +1 -0
- package/dist/core/tool-error-response.d.ts +21 -0
- package/dist/core/tool-error-response.d.ts.map +1 -0
- package/dist/core/tool-error-response.js +64 -0
- package/dist/core/tool-error-response.js.map +1 -0
- package/dist/core/tool-schemas/agent-instruction-tools.d.ts +4 -0
- package/dist/core/tool-schemas/agent-instruction-tools.d.ts.map +1 -1
- package/dist/core/tool-schemas/agent-instruction-tools.js +6 -2
- package/dist/core/tool-schemas/agent-instruction-tools.js.map +1 -1
- package/dist/core/tool-schemas/cartridge-tools.d.ts +3 -0
- package/dist/core/tool-schemas/cartridge-tools.d.ts.map +1 -1
- package/dist/core/tool-schemas/cartridge-tools.js +3 -0
- package/dist/core/tool-schemas/cartridge-tools.js.map +1 -1
- package/dist/core/tool-schemas/code-version-tools.d.ts +1 -0
- package/dist/core/tool-schemas/code-version-tools.d.ts.map +1 -1
- package/dist/core/tool-schemas/code-version-tools.js +1 -0
- package/dist/core/tool-schemas/code-version-tools.js.map +1 -1
- package/dist/core/tool-schemas/documentation-tools.d.ts +6 -0
- package/dist/core/tool-schemas/documentation-tools.d.ts.map +1 -1
- package/dist/core/tool-schemas/documentation-tools.js +6 -0
- package/dist/core/tool-schemas/documentation-tools.js.map +1 -1
- package/dist/core/tool-schemas/isml-tools.d.ts +3 -0
- package/dist/core/tool-schemas/isml-tools.d.ts.map +1 -1
- package/dist/core/tool-schemas/isml-tools.js +4 -1
- package/dist/core/tool-schemas/isml-tools.js.map +1 -1
- package/dist/core/tool-schemas/log-tools.d.ts +28 -0
- package/dist/core/tool-schemas/log-tools.d.ts.map +1 -1
- package/dist/core/tool-schemas/log-tools.js +21 -7
- package/dist/core/tool-schemas/log-tools.js.map +1 -1
- package/dist/core/tool-schemas/script-debugger-tools.d.ts +12 -0
- package/dist/core/tool-schemas/script-debugger-tools.d.ts.map +1 -1
- package/dist/core/tool-schemas/script-debugger-tools.js +19 -2
- package/dist/core/tool-schemas/script-debugger-tools.js.map +1 -1
- package/dist/core/tool-schemas/sfra-tools.d.ts +3 -0
- package/dist/core/tool-schemas/sfra-tools.d.ts.map +1 -1
- package/dist/core/tool-schemas/sfra-tools.js +3 -0
- package/dist/core/tool-schemas/sfra-tools.js.map +1 -1
- package/dist/core/tool-schemas/shared-schemas.d.ts +72 -4
- package/dist/core/tool-schemas/shared-schemas.d.ts.map +1 -1
- package/dist/core/tool-schemas/shared-schemas.js +29 -3
- package/dist/core/tool-schemas/shared-schemas.js.map +1 -1
- package/dist/core/tool-schemas/system-object-tools.d.ts +93 -4
- package/dist/core/tool-schemas/system-object-tools.d.ts.map +1 -1
- package/dist/core/tool-schemas/system-object-tools.js +13 -6
- package/dist/core/tool-schemas/system-object-tools.js.map +1 -1
- package/dist/docs/dw_extensions.payments/SalesforcePaymentsMgr.md +52 -0
- package/dist/docs/dw_system/Request.md +4 -0
- package/dist/docs/dw_web/Cookie.md +54 -15
- package/dist/docs/isml/isprint.md +1 -1
- package/dist/docs/isml/isredirect.md +1 -1
- package/dist/docs/isml/isremove.md +1 -1
- package/dist/docs/isml/isreplace.md +1 -1
- package/dist/docs/isml/isscript.md +1 -1
- package/dist/main.js +18 -33
- package/dist/main.js.map +1 -1
- package/dist/tool-configs/agent-instructions-tool-config.d.ts +1 -1
- package/dist/tool-configs/agent-instructions-tool-config.d.ts.map +1 -1
- package/dist/tool-configs/agent-instructions-tool-config.js +0 -33
- package/dist/tool-configs/agent-instructions-tool-config.js.map +1 -1
- package/dist/tool-configs/cartridge-tool-config.d.ts +1 -1
- package/dist/tool-configs/cartridge-tool-config.d.ts.map +1 -1
- package/dist/tool-configs/cartridge-tool-config.js +3 -5
- package/dist/tool-configs/cartridge-tool-config.js.map +1 -1
- package/dist/tool-configs/code-version-tool-config.d.ts +1 -1
- package/dist/tool-configs/code-version-tool-config.d.ts.map +1 -1
- package/dist/tool-configs/code-version-tool-config.js +0 -4
- package/dist/tool-configs/code-version-tool-config.js.map +1 -1
- package/dist/tool-configs/docs-tool-config.d.ts +1 -1
- package/dist/tool-configs/docs-tool-config.d.ts.map +1 -1
- package/dist/tool-configs/docs-tool-config.js +0 -13
- package/dist/tool-configs/docs-tool-config.js.map +1 -1
- package/dist/tool-configs/isml-tool-config.d.ts +1 -1
- package/dist/tool-configs/isml-tool-config.d.ts.map +1 -1
- package/dist/tool-configs/isml-tool-config.js +0 -10
- package/dist/tool-configs/isml-tool-config.js.map +1 -1
- package/dist/tool-configs/job-log-tool-config.d.ts +1 -1
- package/dist/tool-configs/job-log-tool-config.d.ts.map +1 -1
- package/dist/tool-configs/job-log-tool-config.js +1 -21
- package/dist/tool-configs/job-log-tool-config.js.map +1 -1
- package/dist/tool-configs/log-tool-config.d.ts +1 -1
- package/dist/tool-configs/log-tool-config.d.ts.map +1 -1
- package/dist/tool-configs/log-tool-config.js +6 -16
- package/dist/tool-configs/log-tool-config.js.map +1 -1
- package/dist/tool-configs/script-debugger-tool-config.d.ts +1 -1
- package/dist/tool-configs/script-debugger-tool-config.d.ts.map +1 -1
- package/dist/tool-configs/script-debugger-tool-config.js +1 -8
- package/dist/tool-configs/script-debugger-tool-config.js.map +1 -1
- package/dist/tool-configs/sfra-tool-config.d.ts +1 -1
- package/dist/tool-configs/sfra-tool-config.d.ts.map +1 -1
- package/dist/tool-configs/sfra-tool-config.js +0 -10
- package/dist/tool-configs/sfra-tool-config.js.map +1 -1
- package/dist/tool-configs/system-object-tool-config.d.ts +1 -1
- package/dist/tool-configs/system-object-tool-config.d.ts.map +1 -1
- package/dist/tool-configs/system-object-tool-config.js +14 -24
- package/dist/tool-configs/system-object-tool-config.js.map +1 -1
- package/dist/types/ocapi-search.d.ts +50 -0
- package/dist/types/ocapi-search.d.ts.map +1 -0
- package/dist/types/ocapi-search.js +7 -0
- package/dist/types/ocapi-search.js.map +1 -0
- package/dist/types/types.d.ts +13 -5
- package/dist/types/types.d.ts.map +1 -1
- package/dist/utils/abort-utils.d.ts +18 -0
- package/dist/utils/abort-utils.d.ts.map +1 -0
- package/dist/utils/abort-utils.js +66 -0
- package/dist/utils/abort-utils.js.map +1 -0
- package/dist/utils/cache.d.ts +7 -7
- package/dist/utils/cache.d.ts.map +1 -1
- package/dist/utils/cache.js +1 -0
- package/dist/utils/cache.js.map +1 -1
- package/dist/utils/category-utils.d.ts +0 -10
- package/dist/utils/category-utils.d.ts.map +1 -1
- package/dist/utils/category-utils.js +0 -12
- package/dist/utils/category-utils.js.map +1 -1
- package/dist/utils/log-tool-constants.d.ts +3 -4
- package/dist/utils/log-tool-constants.d.ts.map +1 -1
- package/dist/utils/log-tool-constants.js +2 -13
- package/dist/utils/log-tool-constants.js.map +1 -1
- package/dist/utils/logger.d.ts +20 -7
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +72 -11
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/query-builder.d.ts +2 -5
- package/dist/utils/query-builder.d.ts.map +1 -1
- package/dist/utils/query-builder.js +1 -4
- package/dist/utils/query-builder.js.map +1 -1
- package/dist/utils/validator.d.ts +5 -3
- package/dist/utils/validator.d.ts.map +1 -1
- package/dist/utils/validator.js +20 -14
- package/dist/utils/validator.js.map +1 -1
- package/package.json +23 -11
- package/dist/clients/docs/index.d.ts +0 -10
- package/dist/clients/docs/index.d.ts.map +0 -1
- package/dist/clients/docs/index.js +0 -10
- package/dist/clients/docs/index.js.map +0 -1
- package/dist/constants/index.d.ts +0 -1
- package/dist/constants/index.d.ts.map +0 -1
- package/dist/constants/index.js +0 -3
- package/dist/constants/index.js.map +0 -1
- package/dist/utils/path-validation.d.ts +0 -40
- package/dist/utils/path-validation.d.ts.map +0 -1
- package/dist/utils/path-validation.js +0 -84
- package/dist/utils/path-validation.js.map +0 -1
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { ValidationError } from '../utils/validator.js';
|
|
2
|
+
function isRecord(value) {
|
|
3
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
4
|
+
}
|
|
5
|
+
function toSchemaObject(schema) {
|
|
6
|
+
if (!isRecord(schema)) {
|
|
7
|
+
return { type: 'object', properties: {} };
|
|
8
|
+
}
|
|
9
|
+
return schema;
|
|
10
|
+
}
|
|
11
|
+
function isPlainObject(value) {
|
|
12
|
+
return isRecord(value);
|
|
13
|
+
}
|
|
14
|
+
export class ToolArgumentValidationError extends ValidationError {
|
|
15
|
+
constructor(toolName, issues) {
|
|
16
|
+
const issueSummary = issues
|
|
17
|
+
.slice(0, 3)
|
|
18
|
+
.map(issue => {
|
|
19
|
+
const readablePath = issue.path.replace(/^\$\./, '').replace(/^\$$/, 'arguments');
|
|
20
|
+
return `${readablePath} ${issue.message}`;
|
|
21
|
+
})
|
|
22
|
+
.join('; ');
|
|
23
|
+
const suffix = issues.length > 3 ? ` (+${issues.length - 3} more)` : '';
|
|
24
|
+
super(`Invalid arguments for tool "${toolName}"${issueSummary ? ` - ${issueSummary}${suffix}` : ''}`, 'INVALID_TOOL_ARGUMENTS', { toolName, issues });
|
|
25
|
+
this.name = 'ToolArgumentValidationError';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export class ToolArgumentValidator {
|
|
29
|
+
toolSchemas;
|
|
30
|
+
constructor(definitions) {
|
|
31
|
+
for (const definition of definitions) {
|
|
32
|
+
this.assertValidSchemaPatterns(definition.name, definition.inputSchema, '$');
|
|
33
|
+
}
|
|
34
|
+
this.toolSchemas = new Map(definitions.map(definition => [definition.name, toSchemaObject(definition.inputSchema)]));
|
|
35
|
+
}
|
|
36
|
+
assertValidSchemaPatterns(toolName, schema, path) {
|
|
37
|
+
const schemaObject = toSchemaObject(schema);
|
|
38
|
+
if (schemaObject.pattern) {
|
|
39
|
+
try {
|
|
40
|
+
// Validate pattern at startup so malformed schema doesn't silently weaken runtime validation.
|
|
41
|
+
void new RegExp(schemaObject.pattern);
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
45
|
+
throw new Error(`Invalid schema pattern for tool "${toolName}" at ${path}: ${reason}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (schemaObject.items) {
|
|
49
|
+
this.assertValidSchemaPatterns(toolName, schemaObject.items, `${path}.items`);
|
|
50
|
+
}
|
|
51
|
+
for (const [key, propertySchema] of Object.entries(schemaObject.properties ?? {})) {
|
|
52
|
+
this.assertValidSchemaPatterns(toolName, propertySchema, `${path}.${key}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
validate(toolName, args) {
|
|
56
|
+
const schema = this.toolSchemas.get(toolName);
|
|
57
|
+
if (!schema) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const normalizedArgs = args ?? {};
|
|
61
|
+
const issues = this.validateNode(normalizedArgs, schema, '$');
|
|
62
|
+
if (issues.length > 0) {
|
|
63
|
+
throw new ToolArgumentValidationError(toolName, issues);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
validateNode(value, schema, path) {
|
|
67
|
+
const issues = [];
|
|
68
|
+
const declaredType = schema.type;
|
|
69
|
+
if (declaredType === 'string') {
|
|
70
|
+
if (typeof value !== 'string') {
|
|
71
|
+
issues.push({ path, message: 'must be a string' });
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
this.validateEnum(value, schema, path, issues);
|
|
75
|
+
this.validateStringConstraints(value, schema, path, issues);
|
|
76
|
+
}
|
|
77
|
+
return issues;
|
|
78
|
+
}
|
|
79
|
+
if (declaredType === 'number' || declaredType === 'integer') {
|
|
80
|
+
if (typeof value !== 'number' || Number.isNaN(value)) {
|
|
81
|
+
issues.push({ path, message: 'must be a number' });
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
if (declaredType === 'integer' && !Number.isInteger(value)) {
|
|
85
|
+
issues.push({ path, message: 'must be an integer' });
|
|
86
|
+
return issues;
|
|
87
|
+
}
|
|
88
|
+
this.validateEnum(value, schema, path, issues);
|
|
89
|
+
this.validateNumberConstraints(value, schema, path, issues);
|
|
90
|
+
}
|
|
91
|
+
return issues;
|
|
92
|
+
}
|
|
93
|
+
if (declaredType === 'boolean') {
|
|
94
|
+
if (typeof value !== 'boolean') {
|
|
95
|
+
issues.push({ path, message: 'must be a boolean' });
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
this.validateEnum(value, schema, path, issues);
|
|
99
|
+
}
|
|
100
|
+
return issues;
|
|
101
|
+
}
|
|
102
|
+
if (declaredType === 'array') {
|
|
103
|
+
if (!Array.isArray(value)) {
|
|
104
|
+
issues.push({ path, message: 'must be an array' });
|
|
105
|
+
return issues;
|
|
106
|
+
}
|
|
107
|
+
this.validateEnum(value, schema, path, issues);
|
|
108
|
+
if (schema.items) {
|
|
109
|
+
value.forEach((item, index) => {
|
|
110
|
+
issues.push(...this.validateNode(item, schema.items, `${path}[${index}]`));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return issues;
|
|
114
|
+
}
|
|
115
|
+
const isObjectSchema = declaredType === 'object' || (declaredType === undefined && schema.properties !== undefined);
|
|
116
|
+
if (!isObjectSchema) {
|
|
117
|
+
return issues;
|
|
118
|
+
}
|
|
119
|
+
if (!isPlainObject(value)) {
|
|
120
|
+
issues.push({ path, message: 'must be an object' });
|
|
121
|
+
return issues;
|
|
122
|
+
}
|
|
123
|
+
this.validateEnum(value, schema, path, issues);
|
|
124
|
+
const properties = schema.properties ?? {};
|
|
125
|
+
const required = schema.required ?? [];
|
|
126
|
+
const hasDefinedProperties = schema.properties !== undefined;
|
|
127
|
+
const strictObjectKeys = schema.additionalProperties === false ||
|
|
128
|
+
(schema.additionalProperties !== true && hasDefinedProperties);
|
|
129
|
+
for (const requiredKey of required) {
|
|
130
|
+
if (!(requiredKey in value)) {
|
|
131
|
+
const requiredSchema = properties[requiredKey];
|
|
132
|
+
const message = requiredSchema?.type === 'string' && typeof requiredSchema?.minLength === 'number' && requiredSchema.minLength > 0
|
|
133
|
+
? `must be at least ${requiredSchema.minLength} characters`
|
|
134
|
+
: 'is required';
|
|
135
|
+
issues.push({ path: `${path}.${requiredKey}`, message });
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if (strictObjectKeys) {
|
|
139
|
+
const unknownKeys = Object.keys(value).filter(key => !(key in properties));
|
|
140
|
+
for (const key of unknownKeys) {
|
|
141
|
+
issues.push({ path: `${path}.${key}`, message: 'is not allowed' });
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
for (const [key, childSchema] of Object.entries(properties)) {
|
|
145
|
+
if (!(key in value)) {
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
const childValue = value[key];
|
|
149
|
+
issues.push(...this.validateNode(childValue, childSchema, `${path}.${key}`));
|
|
150
|
+
}
|
|
151
|
+
return issues;
|
|
152
|
+
}
|
|
153
|
+
validateEnum(value, schema, path, issues) {
|
|
154
|
+
if (!schema.enum || schema.enum.length === 0) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const isAllowed = schema.enum.some(enumValue => Object.is(enumValue, value));
|
|
158
|
+
if (!isAllowed) {
|
|
159
|
+
const allowedValues = schema.enum.map(enumValue => JSON.stringify(enumValue)).join(', ');
|
|
160
|
+
issues.push({ path, message: `must be one of: ${allowedValues}` });
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
validateNumberConstraints(value, schema, path, issues) {
|
|
164
|
+
if (typeof schema.minimum === 'number' && value < schema.minimum) {
|
|
165
|
+
issues.push({ path, message: `must be >= ${schema.minimum}` });
|
|
166
|
+
}
|
|
167
|
+
if (typeof schema.maximum === 'number' && value > schema.maximum) {
|
|
168
|
+
issues.push({ path, message: `must be <= ${schema.maximum}` });
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
validateStringConstraints(value, schema, path, issues) {
|
|
172
|
+
if (typeof schema.minLength === 'number' && value.length < schema.minLength) {
|
|
173
|
+
issues.push({ path, message: `must be at least ${schema.minLength} characters` });
|
|
174
|
+
}
|
|
175
|
+
if (typeof schema.maxLength === 'number' && value.length > schema.maxLength) {
|
|
176
|
+
issues.push({ path, message: `must be at most ${schema.maxLength} characters` });
|
|
177
|
+
}
|
|
178
|
+
if (schema.pattern) {
|
|
179
|
+
const regex = new RegExp(schema.pattern);
|
|
180
|
+
if (!regex.test(value)) {
|
|
181
|
+
issues.push({ path, message: `must match pattern: ${schema.pattern}` });
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=tool-argument-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-argument-validator.js","sourceRoot":"","sources":["../../src/core/tool-argument-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA0BxD,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,cAAc,CAAC,MAAe;IACrC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EA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,EAAE,CAAC,CAAC;QACpF,CAAC;QAED,IAAI,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;YAC5E,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,mBAAmB,MAAM,CAAC,SAAS,aAAa,EAAE,CAAC,CAAC;QACnF,CAAC;QAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACzC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBACvB,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,uBAAuB,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAC1E,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface StructuredToolError {
|
|
2
|
+
code: string;
|
|
3
|
+
message: string;
|
|
4
|
+
toolName: string;
|
|
5
|
+
details?: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface ToolErrorResponseShape {
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
content: Array<{
|
|
10
|
+
type: 'text';
|
|
11
|
+
text: string;
|
|
12
|
+
}>;
|
|
13
|
+
isError: true;
|
|
14
|
+
structuredContent?: {
|
|
15
|
+
error: StructuredToolError;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare const INCLUDE_STRUCTURED_ERRORS: boolean;
|
|
19
|
+
export declare function createStructuredToolError(toolName: string, error: unknown): StructuredToolError;
|
|
20
|
+
export declare function createToolErrorResponse(toolName: string, error: unknown): ToolErrorResponseShape;
|
|
21
|
+
//# sourceMappingURL=tool-error-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-error-response.d.ts","sourceRoot":"","sources":["../../src/core/tool-error-response.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,EAAE,IAAI,CAAC;IACd,iBAAiB,CAAC,EAAE;QAAE,KAAK,EAAE,mBAAmB,CAAA;KAAE,CAAC;CACpD;AAED,eAAO,MAAM,yBAAyB,SAAqD,CAAC;AAkC5F,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,mBAAmB,CAuB/F;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,sBAAsB,CAehG"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ValidationError } from '../utils/validator.js';
|
|
2
|
+
export const INCLUDE_STRUCTURED_ERRORS = process.env.SFCC_MCP_STRUCTURED_ERRORS !== 'false';
|
|
3
|
+
const SENSITIVE_MESSAGE_PATTERNS = [
|
|
4
|
+
{ pattern: /Bearer\s+[^\s]+/gi, replacement: 'Bearer [REDACTED]' },
|
|
5
|
+
{ pattern: /Basic\s+[A-Za-z0-9+/=]+/gi, replacement: 'Basic [REDACTED]' },
|
|
6
|
+
{ pattern: /(client[-_]?secret\s*[:=]\s*)\S+/gi, replacement: '$1[REDACTED]' },
|
|
7
|
+
{ pattern: /(password\s*[:=]\s*)\S+/gi, replacement: '$1[REDACTED]' },
|
|
8
|
+
{ pattern: /(access[-_]?token\s*[:=]\s*)\S+/gi, replacement: '$1[REDACTED]' },
|
|
9
|
+
{ pattern: /(api[-_]?key\s*[:=]\s*)\S+/gi, replacement: '$1[REDACTED]' },
|
|
10
|
+
];
|
|
11
|
+
function sanitizeToolErrorMessage(message) {
|
|
12
|
+
let sanitized = message.trim();
|
|
13
|
+
if (/^Request failed(?: after retry)?:\s*\d{3}\b/i.test(sanitized)) {
|
|
14
|
+
const separatorIndex = sanitized.indexOf(' - ');
|
|
15
|
+
if (separatorIndex >= 0) {
|
|
16
|
+
sanitized = sanitized.slice(0, separatorIndex);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
for (const { pattern, replacement } of SENSITIVE_MESSAGE_PATTERNS) {
|
|
20
|
+
sanitized = sanitized.replace(pattern, replacement);
|
|
21
|
+
}
|
|
22
|
+
if (!sanitized) {
|
|
23
|
+
return 'Tool execution failed';
|
|
24
|
+
}
|
|
25
|
+
return sanitized.length > 500
|
|
26
|
+
? `${sanitized.slice(0, 500)}...`
|
|
27
|
+
: sanitized;
|
|
28
|
+
}
|
|
29
|
+
export function createStructuredToolError(toolName, error) {
|
|
30
|
+
if (error instanceof ValidationError) {
|
|
31
|
+
return {
|
|
32
|
+
code: error.code,
|
|
33
|
+
message: error.message,
|
|
34
|
+
toolName,
|
|
35
|
+
details: error.details,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
if (error instanceof Error) {
|
|
39
|
+
return {
|
|
40
|
+
code: 'TOOL_EXECUTION_ERROR',
|
|
41
|
+
message: sanitizeToolErrorMessage(error.message),
|
|
42
|
+
toolName,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
code: 'TOOL_EXECUTION_ERROR',
|
|
47
|
+
message: sanitizeToolErrorMessage(String(error)),
|
|
48
|
+
toolName,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export function createToolErrorResponse(toolName, error) {
|
|
52
|
+
const structuredError = createStructuredToolError(toolName, error);
|
|
53
|
+
const response = {
|
|
54
|
+
content: [{ type: 'text', text: `Error: ${structuredError.message}` }],
|
|
55
|
+
isError: true,
|
|
56
|
+
};
|
|
57
|
+
if (INCLUDE_STRUCTURED_ERRORS) {
|
|
58
|
+
response.structuredContent = {
|
|
59
|
+
error: structuredError,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return response;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=tool-error-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-error-response.js","sourceRoot":"","sources":["../../src/core/tool-error-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAgBxD,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B,KAAK,OAAO,CAAC;AAE5F,MAAM,0BAA0B,GAAoD;IAClF,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,mBAAmB,EAAE;IAClE,EAAE,OAAO,EAAE,2BAA2B,EAAE,WAAW,EAAE,kBAAkB,EAAE;IACzE,EAAE,OAAO,EAAE,oCAAoC,EAAE,WAAW,EAAE,cAAc,EAAE;IAC9E,EAAE,OAAO,EAAE,2BAA2B,EAAE,WAAW,EAAE,cAAc,EAAE;IACrE,EAAE,OAAO,EAAE,mCAAmC,EAAE,WAAW,EAAE,cAAc,EAAE;IAC7E,EAAE,OAAO,EAAE,8BAA8B,EAAE,WAAW,EAAE,cAAc,EAAE;CACzE,CAAC;AAEF,SAAS,wBAAwB,CAAC,OAAe;IAC/C,IAAI,SAAS,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAE/B,IAAI,8CAA8C,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACnE,MAAM,cAAc,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAChD,IAAI,cAAc,IAAI,CAAC,EAAE,CAAC;YACxB,SAAS,GAAG,SAAS,CAA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AAU,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC;QACtE,OAAO,EAAE,IAAI;KACd,CAAC;IAEF,IAAI,yBAAyB,EAAE,CAAC;QAC9B,QAAQ,CAAC,iBAAiB,GAAG;YAC3B,KAAK,EAAE,eAAe;SACvB,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -15,10 +15,12 @@ export declare const AGENT_INSTRUCTION_TOOLS: ({
|
|
|
15
15
|
};
|
|
16
16
|
preferredRoot: {
|
|
17
17
|
type: string;
|
|
18
|
+
minLength: number;
|
|
18
19
|
description: string;
|
|
19
20
|
};
|
|
20
21
|
skillsDir: {
|
|
21
22
|
type: string;
|
|
23
|
+
minLength: number;
|
|
22
24
|
description: string;
|
|
23
25
|
};
|
|
24
26
|
mergeStrategy: {
|
|
@@ -49,6 +51,7 @@ export declare const AGENT_INSTRUCTION_TOOLS: ({
|
|
|
49
51
|
};
|
|
50
52
|
tempDir: {
|
|
51
53
|
type: string;
|
|
54
|
+
minLength: number;
|
|
52
55
|
description: string;
|
|
53
56
|
};
|
|
54
57
|
};
|
|
@@ -61,6 +64,7 @@ export declare const AGENT_INSTRUCTION_TOOLS: ({
|
|
|
61
64
|
properties: {
|
|
62
65
|
preferredRoot: {
|
|
63
66
|
type: string;
|
|
67
|
+
minLength: number;
|
|
64
68
|
description: string;
|
|
65
69
|
};
|
|
66
70
|
destinationType?: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-instruction-tools.d.ts","sourceRoot":"","sources":["../../../src/core/tool-schemas/agent-instruction-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"agent-instruction-tools.d.ts","sourceRoot":"","sources":["../../../src/core/tool-schemas/agent-instruction-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuEnC,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export const AGENT_INSTRUCTION_TOOLS = [
|
|
5
5
|
{
|
|
6
6
|
name: 'sync_agent_instructions',
|
|
7
|
-
description: 'ONLY FOR SALESFORCE B2C COMMERCE (SFCC) PROJECTS. IMPORTANT: Before calling this tool, ALWAYS ASK THE USER if they want to install AGENTS.md and bundled SFCC skills into their project. If the user declines, do NOT call this tool - instead call disable_agent_sync to permanently disable this suggestion. This tool installs/merges AGENTS.md and bundled SFCC skills into the project (or a temp dir for manual merge). Supports dry-run planning, append/replace/skip merge strategies, and selecting skills directory (.github/skills, .
|
|
7
|
+
description: 'ONLY FOR SALESFORCE B2C COMMERCE (SFCC) PROJECTS. IMPORTANT: Before calling this tool, ALWAYS ASK THE USER if they want to install AGENTS.md and bundled SFCC skills into their project. If the user declines, do NOT call this tool - instead call disable_agent_sync to permanently disable this suggestion. This tool installs/merges AGENTS.md and bundled SFCC skills into the project (or a temp dir for manual merge). Supports dry-run planning, append/replace/skip merge strategies, and selecting skills directory (.github/skills, .agents/skills, .claude/skills, .agent/skills, .cursor/skills, and user-home defaults like ~/.copilot/skills).',
|
|
8
8
|
inputSchema: {
|
|
9
9
|
type: 'object',
|
|
10
10
|
properties: {
|
|
@@ -16,11 +16,13 @@ export const AGENT_INSTRUCTION_TOOLS = [
|
|
|
16
16
|
},
|
|
17
17
|
preferredRoot: {
|
|
18
18
|
type: 'string',
|
|
19
|
+
minLength: 1,
|
|
19
20
|
description: 'Optional workspace root path or name to target when multiple roots are available.',
|
|
20
21
|
},
|
|
21
22
|
skillsDir: {
|
|
22
23
|
type: 'string',
|
|
23
|
-
|
|
24
|
+
minLength: 1,
|
|
25
|
+
description: 'Optional relative skills directory (default prefers existing .github/skills, .agents/skills, .claude/skills, .agent/skills, .cursor/skills; for destinationType=user also checks .copilot/skills).',
|
|
24
26
|
},
|
|
25
27
|
mergeStrategy: {
|
|
26
28
|
type: 'string',
|
|
@@ -50,6 +52,7 @@ export const AGENT_INSTRUCTION_TOOLS = [
|
|
|
50
52
|
},
|
|
51
53
|
tempDir: {
|
|
52
54
|
type: 'string',
|
|
55
|
+
minLength: 1,
|
|
53
56
|
description: 'Custom directory to use when destinationType is temp.',
|
|
54
57
|
},
|
|
55
58
|
},
|
|
@@ -63,6 +66,7 @@ export const AGENT_INSTRUCTION_TOOLS = [
|
|
|
63
66
|
properties: {
|
|
64
67
|
preferredRoot: {
|
|
65
68
|
type: 'string',
|
|
69
|
+
minLength: 1,
|
|
66
70
|
description: 'Optional workspace root path or name to target when multiple roots are available.',
|
|
67
71
|
},
|
|
68
72
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-instruction-tools.js","sourceRoot":"","sources":["../../../src/core/tool-schemas/agent-instruction-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC;QACE,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"agent-instruction-tools.js","sourceRoot":"","sources":["../../../src/core/tool-schemas/agent-instruction-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC;QACE,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,+nBAA+nB;QAC5oB,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,eAAe,EAAE;oBACf,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC;oBACjC,WAAW,EAAE,6FAA6F;oBAC1G,OAAO,EAAE,SAAS;iBACnB;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,CAAC;oBACZ,WAAW,EAAE,mFAAmF;iBACjG;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,CAAC;oBACZ,WAAW,EAAE,oMAAoM;iBAClN;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC;oBACnC,WAAW,EAAE,uDAAuD;oBACpE,OAAO,EAAE,QAAQ;iBAClB;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,2CAA2C;oBACxD,OAAO,EAAE,IAAI;iBACd;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,wCAAwC;oBACrD,OAAO,EAAE,IAAI;iBACd;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,4FAA4F;oBACzG,OAAO,EAAE,IAAI;iBACd;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,oDAAoD;oBACjE,OAAO,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,CAAC;oBACZ,WAAW,EAAE,uDAAuD;iBACrE;aACF;SACF;KACF;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,0OAA0O;QACvP,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,CAAC;oBACZ,WAAW,EAAE,mFAAmF;iBACjG;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -9,10 +9,13 @@ export declare const CARTRIDGE_GENERATION_TOOLS: {
|
|
|
9
9
|
properties: {
|
|
10
10
|
cartridgeName: {
|
|
11
11
|
type: string;
|
|
12
|
+
minLength: number;
|
|
13
|
+
pattern: string;
|
|
12
14
|
description: string;
|
|
13
15
|
};
|
|
14
16
|
targetPath: {
|
|
15
17
|
type: string;
|
|
18
|
+
minLength: number;
|
|
16
19
|
description: string;
|
|
17
20
|
};
|
|
18
21
|
fullProjectSetup: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartridge-tools.d.ts","sourceRoot":"","sources":["../../../src/core/tool-schemas/cartridge-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"cartridge-tools.d.ts","sourceRoot":"","sources":["../../../src/core/tool-schemas/cartridge-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;GA2BtC,CAAC"}
|
|
@@ -10,10 +10,13 @@ export const CARTRIDGE_GENERATION_TOOLS = [
|
|
|
10
10
|
properties: {
|
|
11
11
|
cartridgeName: {
|
|
12
12
|
type: 'string',
|
|
13
|
+
minLength: 1,
|
|
14
|
+
pattern: '^[a-zA-Z][a-zA-Z0-9_-]*$',
|
|
13
15
|
description: 'Name of the cartridge (e.g., "plugin_example")',
|
|
14
16
|
},
|
|
15
17
|
targetPath: {
|
|
16
18
|
type: 'string',
|
|
19
|
+
minLength: 1,
|
|
17
20
|
description: 'Target directory path where the cartridge files should be placed. If not specified, files will be placed in the current working directory. Use absolute paths for best results (e.g., "/Users/username/projects/my-sfcc-project/").',
|
|
18
21
|
},
|
|
19
22
|
fullProjectSetup: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartridge-tools.js","sourceRoot":"","sources":["../../../src/core/tool-schemas/cartridge-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC;QACE,IAAI,EAAE,8BAA8B;QACpC,WAAW,EAAE,4JAA4J;QACzK,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,gDAAgD;iBAC9D;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,qOAAqO;iBACnP;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,0QAA0Q;oBACvR,OAAO,EAAE,IAAI;iBACd;aACF;YACD,QAAQ,EAAE,CAAC,eAAe,CAAC;SAC5B;KACF;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"cartridge-tools.js","sourceRoot":"","sources":["../../../src/core/tool-schemas/cartridge-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC;QACE,IAAI,EAAE,8BAA8B;QACpC,WAAW,EAAE,4JAA4J;QACzK,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,CAAC;oBACZ,OAAO,EAAE,0BAA0B;oBACnC,WAAW,EAAE,gDAAgD;iBAC9D;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,CAAC;oBACZ,WAAW,EAAE,qOAAqO;iBACnP;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,0QAA0Q;oBACvR,OAAO,EAAE,IAAI;iBACd;aACF;YACD,QAAQ,EAAE,CAAC,eAAe,CAAC;SAC5B;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-version-tools.d.ts","sourceRoot":"","sources":["../../../src/core/tool-schemas/code-version-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"code-version-tools.d.ts","sourceRoot":"","sources":["../../../src/core/tool-schemas/code-version-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;IAwB9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-version-tools.js","sourceRoot":"","sources":["../../../src/core/tool-schemas/code-version-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,yIAAyI;QACtJ,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EAAE,oKAAoK;QACjL,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,8CAA8C;iBAC5D;aACF;YACD,QAAQ,EAAE,CAAC,eAAe,CAAC;SAC5B;KACF;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"code-version-tools.js","sourceRoot":"","sources":["../../../src/core/tool-schemas/code-version-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,yIAAyI;QACtJ,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EAAE,oKAAoK;QACjL,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,CAAC;oBACZ,WAAW,EAAE,8CAA8C;iBAC5D;aACF;YACD,QAAQ,EAAE,CAAC,eAAe,CAAC;SAC5B;KACF;CACF,CAAC"}
|
|
@@ -9,6 +9,7 @@ export declare const SFCC_DOCUMENTATION_TOOLS: ({
|
|
|
9
9
|
properties: {
|
|
10
10
|
className: {
|
|
11
11
|
type: string;
|
|
12
|
+
minLength: number;
|
|
12
13
|
description: string;
|
|
13
14
|
};
|
|
14
15
|
expand: {
|
|
@@ -43,6 +44,7 @@ export declare const SFCC_DOCUMENTATION_TOOLS: ({
|
|
|
43
44
|
};
|
|
44
45
|
search: {
|
|
45
46
|
type: string;
|
|
47
|
+
minLength: number;
|
|
46
48
|
description: string;
|
|
47
49
|
};
|
|
48
50
|
query?: undefined;
|
|
@@ -58,6 +60,7 @@ export declare const SFCC_DOCUMENTATION_TOOLS: ({
|
|
|
58
60
|
properties: {
|
|
59
61
|
query: {
|
|
60
62
|
type: string;
|
|
63
|
+
minLength: number;
|
|
61
64
|
description: string;
|
|
62
65
|
};
|
|
63
66
|
className?: undefined;
|
|
@@ -80,6 +83,8 @@ export declare const SFCC_DOCUMENTATION_TOOLS: ({
|
|
|
80
83
|
properties: {
|
|
81
84
|
methodName: {
|
|
82
85
|
type: string;
|
|
86
|
+
minLength: number;
|
|
87
|
+
pattern: string;
|
|
83
88
|
description: string;
|
|
84
89
|
};
|
|
85
90
|
className?: undefined;
|
|
@@ -121,6 +126,7 @@ export declare const SFCC_DOCUMENTATION_TOOLS: ({
|
|
|
121
126
|
properties: {
|
|
122
127
|
className: {
|
|
123
128
|
type: string;
|
|
129
|
+
minLength: number;
|
|
124
130
|
description: string;
|
|
125
131
|
};
|
|
126
132
|
expand?: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentation-tools.d.ts","sourceRoot":"","sources":["../../../src/core/tool-schemas/documentation-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"documentation-tools.d.ts","sourceRoot":"","sources":["../../../src/core/tool-schemas/documentation-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyGpC,CAAC"}
|
|
@@ -10,6 +10,7 @@ export const SFCC_DOCUMENTATION_TOOLS = [
|
|
|
10
10
|
properties: {
|
|
11
11
|
className: {
|
|
12
12
|
type: 'string',
|
|
13
|
+
minLength: 1,
|
|
13
14
|
description: "The SFCC class name (e.g., 'Catalog', 'dw.catalog.Catalog')",
|
|
14
15
|
},
|
|
15
16
|
expand: {
|
|
@@ -44,6 +45,7 @@ export const SFCC_DOCUMENTATION_TOOLS = [
|
|
|
44
45
|
},
|
|
45
46
|
search: {
|
|
46
47
|
type: 'string',
|
|
48
|
+
minLength: 1,
|
|
47
49
|
description: 'Filter class members by keyword (case-insensitive). Single word only, e.g., "price", "get", "custom".',
|
|
48
50
|
},
|
|
49
51
|
},
|
|
@@ -58,6 +60,7 @@ export const SFCC_DOCUMENTATION_TOOLS = [
|
|
|
58
60
|
properties: {
|
|
59
61
|
query: {
|
|
60
62
|
type: 'string',
|
|
63
|
+
minLength: 1,
|
|
61
64
|
description: 'Single keyword to search class names, e.g., "catalog", "order", "basket".',
|
|
62
65
|
},
|
|
63
66
|
},
|
|
@@ -72,6 +75,8 @@ export const SFCC_DOCUMENTATION_TOOLS = [
|
|
|
72
75
|
properties: {
|
|
73
76
|
methodName: {
|
|
74
77
|
type: 'string',
|
|
78
|
+
minLength: 1,
|
|
79
|
+
pattern: '.*\\S.*',
|
|
75
80
|
description: 'Method name to search, e.g., "getProduct", "addItem", "calculate".',
|
|
76
81
|
},
|
|
77
82
|
},
|
|
@@ -94,6 +99,7 @@ export const SFCC_DOCUMENTATION_TOOLS = [
|
|
|
94
99
|
properties: {
|
|
95
100
|
className: {
|
|
96
101
|
type: 'string',
|
|
102
|
+
minLength: 1,
|
|
97
103
|
description: 'The SFCC class name',
|
|
98
104
|
},
|
|
99
105
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentation-tools.js","sourceRoot":"","sources":["../../../src/core/tool-schemas/documentation-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,2QAA2Q;QACxR,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6DAA6D;iBAC3E;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,oGAAoG;oBACjH,OAAO,EAAE,KAAK;iBACf;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,0EAA0E;oBACvF,OAAO,EAAE,IAAI;iBACd;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,8DAA8D;oBAC3E,OAAO,EAAE,IAAI;iBACd;gBACD,iBAAiB,EAAE;oBACjB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,+DAA+D;oBAC5E,OAAO,EAAE,IAAI;iBACd;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,4DAA4D;oBACzE,OAAO,EAAE,IAAI;iBACd;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,0EAA0E;oBACvF,OAAO,EAAE,IAAI;iBACd;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uGAAuG;iBACrH;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,CAAC;SACxB;KACF;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,yKAAyK;QACtL,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,2EAA2E;iBACzF;aACF;YACD,QAAQ,EAAE,CAAC,OAAO,CAAC;SACpB;KACF;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,kHAAkH;QAC/H,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oEAAoE;iBAClF;aACF;YACD,QAAQ,EAAE,CAAC,YAAY,CAAC;SACzB;KACF;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,wIAAwI;QACrJ,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAAI,EAAE,8BAA8B;QACpC,WAAW,EAAE,sJAAsJ;QACnK,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,qBAAqB;iBACnC;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,CAAC;SACxB;KACF;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"documentation-tools.js","sourceRoot":"","sources":["../../../src/core/tool-schemas/documentation-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,2QAA2Q;QACxR,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,CAAC;oBACZ,WAAW,EAAE,6DAA6D;iBAC3E;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,oGAAoG;oBACjH,OAAO,EAAE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Y,CAAC;SACzB;KACF;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,wIAAwI;QACrJ,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAAI,EAAE,8BAA8B;QACpC,WAAW,EAAE,sJAAsJ;QACnK,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,CAAC;oBACZ,WAAW,EAAE,qBAAqB;iBACnC;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,CAAC;SACxB;KACF;CACF,CAAC"}
|
|
@@ -25,6 +25,7 @@ export declare const ISML_DOCUMENTATION_TOOLS: ({
|
|
|
25
25
|
properties: {
|
|
26
26
|
elementName: {
|
|
27
27
|
type: string;
|
|
28
|
+
minLength: number;
|
|
28
29
|
description: string;
|
|
29
30
|
};
|
|
30
31
|
includeContent: {
|
|
@@ -56,6 +57,7 @@ export declare const ISML_DOCUMENTATION_TOOLS: ({
|
|
|
56
57
|
properties: {
|
|
57
58
|
query: {
|
|
58
59
|
type: string;
|
|
60
|
+
minLength: number;
|
|
59
61
|
description: string;
|
|
60
62
|
};
|
|
61
63
|
category: {
|
|
@@ -65,6 +67,7 @@ export declare const ISML_DOCUMENTATION_TOOLS: ({
|
|
|
65
67
|
};
|
|
66
68
|
limit: {
|
|
67
69
|
type: string;
|
|
70
|
+
minimum: number;
|
|
68
71
|
description: string;
|
|
69
72
|
};
|
|
70
73
|
elementName?: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isml-tools.d.ts","sourceRoot":"","sources":["../../../src/core/tool-schemas/isml-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"isml-tools.d.ts","sourceRoot":"","sources":["../../../src/core/tool-schemas/isml-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuFpC,CAAC"}
|
|
@@ -18,6 +18,7 @@ export const ISML_DOCUMENTATION_TOOLS = [
|
|
|
18
18
|
properties: {
|
|
19
19
|
elementName: {
|
|
20
20
|
type: 'string',
|
|
21
|
+
minLength: 1,
|
|
21
22
|
description: 'The ISML element name (e.g., \'isif\', \'isloop\', \'isprint\', \'isinclude\', \'iscomponent\'). The \'is\' prefix is optional.',
|
|
22
23
|
},
|
|
23
24
|
includeContent: {
|
|
@@ -47,6 +48,7 @@ export const ISML_DOCUMENTATION_TOOLS = [
|
|
|
47
48
|
properties: {
|
|
48
49
|
query: {
|
|
49
50
|
type: 'string',
|
|
51
|
+
minLength: 1,
|
|
50
52
|
description: 'Search term or concept (e.g., \'loop\', \'conditional\', \'format\', \'cache\', \'redirect\')',
|
|
51
53
|
},
|
|
52
54
|
category: {
|
|
@@ -55,7 +57,8 @@ export const ISML_DOCUMENTATION_TOOLS = [
|
|
|
55
57
|
enum: ['control-flow', 'output', 'includes', 'scripting', 'cache', 'decorators', 'special', 'payment', 'analytics'],
|
|
56
58
|
},
|
|
57
59
|
limit: {
|
|
58
|
-
type: '
|
|
60
|
+
type: 'integer',
|
|
61
|
+
minimum: 1,
|
|
59
62
|
description: 'Maximum number of results to return',
|
|
60
63
|
},
|
|
61
64
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isml-tools.js","sourceRoot":"","sources":["../../../src/core/tool-schemas/isml-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,yLAAyL;QACtM,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,uGAAuG;QACpH,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,iIAAiI;iBAC/I;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,+DAA+D;oBAC5E,OAAO,EAAE,IAAI;iBACd;gBACD,eAAe,EAAE;oBACf,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,qDAAqD;oBAClE,OAAO,EAAE,IAAI;iBACd;gBACD,iBAAiB,EAAE;oBACjB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,0DAA0D;oBACvE,OAAO,EAAE,IAAI;iBACd;aACF;YACD,QAAQ,EAAE,CAAC,aAAa,CAAC;SAC1B;KACF;IACD;QACE,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EAAE,uHAAuH;QACpI,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,+FAA+F;iBAC7G;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,wHAAwH;oBACrI,IAAI,EAAE,CAAC,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC;iBACpH;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"isml-tools.js","sourceRoot":"","sources":["../../../src/core/tool-schemas/isml-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,yLAAyL;QACtM,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