import type { McpIdTransform } from './tool-names';
export type McpEnvValue = {
    kind: 'literal';
    value: string;
} | {
    kind: 'from_env';
    env: string;
};
export type McpHeaderValue = {
    kind: 'literal';
    value: string;
} | {
    kind: 'from_env';
    env: string;
    prefix: string;
};
export type McpTransport = 'stdio' | 'streamable_http';
export type McpManualSectionConfig = {
    title: string;
    content: string;
};
export type McpManualConfig = {
    content?: string;
    contentFile?: string;
    sections: readonly McpManualSectionConfig[];
};
export type McpScopedTransformConfig = {
    kind: 'inherit';
} | {
    kind: 'override';
    transform: McpIdTransform[];
};
export declare function resolveMcpScopedTransforms(globalTransforms: readonly McpIdTransform[], scopedTransform: McpScopedTransformConfig): readonly McpIdTransform[];
export type McpPromptConfig = {
    whitelist: string[];
    blacklist: string[];
    transform: McpScopedTransformConfig;
};
export type McpResourceSkillsConfig = {
    enabled: boolean;
    whitelist: string[];
    blacklist: string[];
    transform: McpScopedTransformConfig;
};
export type McpResourceConfig = {
    whitelist: string[];
    blacklist: string[];
    transform: McpScopedTransformConfig;
    mimeTypes: string[];
    maxBytes?: number;
    skills: McpResourceSkillsConfig;
};
type McpServerConfigBase = {
    serverId: string;
    truelyStateless: boolean;
    tools: {
        whitelist: string[];
        blacklist: string[];
        transform: McpScopedTransformConfig;
    };
    transform: McpIdTransform[];
    /**
     * Optional manual metadata for this MCP server.
     * Missing manual is valid for standard Raw MCP toolsets: tool names,
     * descriptions, and parameter schemas come from MCP `tools/list`.
     * When `manual.contentFile` is set, the runtime builds a ManualSpec from the
     * i18n files alongside the entry point:
     *   - zh:  <baseDir>/index.md        (semantic baseline)
     *   - en:  <baseDir>/index.en.md
     * The `contentFile` value is a rtws-relative path.
     * Inline `content` / `sections` are enhancement guidance only (use cases,
     * guardrails, failure handling, team norms) and must not determine server availability.
     */
    manual?: McpManualConfig;
    prompts: McpPromptConfig;
    resources: McpResourceConfig;
};
export type McpStdioServerConfig = McpServerConfigBase & {
    transport: 'stdio';
    command: string;
    args: string[];
    cwd?: string;
    env: Record<string, McpEnvValue>;
};
export type McpStreamableHttpServerConfig = McpServerConfigBase & {
    transport: 'streamable_http';
    url: string;
    headers: Record<string, McpHeaderValue>;
    sessionId?: string;
};
export type McpServerConfig = McpStdioServerConfig | McpStreamableHttpServerConfig;
export type McpWorkspaceConfig = {
    version: 1;
    servers: Record<string, McpServerConfig>;
};
export type McpConfigLoadResult = {
    ok: true;
    config: McpWorkspaceConfig;
    invalidServers: ReadonlyArray<{
        serverId: string;
        errorText: string;
    }>;
    serverIdsInYamlOrder: ReadonlyArray<string>;
    validServerIdsInYamlOrder: ReadonlyArray<string>;
    disabledServerIdsInYamlOrder: ReadonlyArray<string>;
    rawText: string;
} | {
    ok: false;
    errorText: string;
    rawText?: string;
};
/**
 * NOTE: This loader parses external YAML (untrusted input). Runtime type checks are unavoidable
 * here to keep the core code statically safe.
 */
export declare function parseMcpYaml(rawText: string): McpConfigLoadResult;
export {};
