/*
 * Copyright 2026, Jaime Terrats.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { pluginWorkflowLines, riskScaleLines } from './mdc-generator.js';
/** Generates `a4d_mcp_settings.json` content for Agentforce Vibes MCP configuration. */
export function generateA4dMcpSettings() {
    const settings = {
        mcpServers: {
            'https://github.com/salesforcecli/mcp': {
                disabled: false,
                timeout: 600,
                type: 'stdio',
                command: 'npx',
                args: ['-y', '@salesforce/mcp@latest', '--orgs', 'ALLOW_ALL_ORGS', '--toolsets', 'all'],
            },
            'https://github.com/forcedotcom/mcp-hosted/wiki/Salesforce-Hosted-MCP-Servers#salesforce-api-context': {
                disabled: true,
                type: 'streamableHttp',
                timeout: 600,
                url: 'https://api.salesforce.com/platform/mcp/v1-beta.2/platform/salesforce-api-context',
            },
            'https://github.com/forcedotcom/mcp-hosted/wiki/Salesforce-Hosted-MCP-Servers#metadata-experts': {
                disabled: true,
                type: 'streamableHttp',
                timeout: 600,
                url: 'https://api.salesforce.com/platform/mcp/v1-beta.2/platform/metadata-experts',
            },
        },
    };
    return JSON.stringify(settings, null, 2);
}
/** Generates `00-base-guidelines.md` content for `.a4drules/`. */
export function generateA4dBaseGuidelines(version) {
    return [
        `<!-- setup-agents: ${version} -->`,
        '# Base Agent Guidelines',
        '',
        '## General Principles',
        '- Always read existing code before making changes.',
        '- Prefer editing existing files over creating new ones.',
        '- Follow the coding conventions already present in this project.',
        '- Write concise, self-documenting code. Avoid unnecessary comments.',
        '',
        '## Code Quality',
        '- Ensure all new code is covered by tests.',
        '- Do not introduce linter errors or suppress warnings.',
        '- Handle errors explicitly; never swallow exceptions silently.',
        '',
        '## Security',
        '- Never hardcode credentials, tokens, or sensitive data.',
        '- Use environment variables or secret managers for sensitive values.',
        '',
        ...riskScaleLines(),
        '',
        ...pluginWorkflowLines(),
    ].join('\n');
}
//# sourceMappingURL=agentforce-generator.js.map