/** * @name McpClientId * @description Supported local MCP clients that can receive SAP MCP server config. */ export type McpClientId = 'claude' | 'hermes' | 'openclaw' | 'codex' | 'clawpump'; /** * @name McpClientConfigFormat * @description File formats supported by the MCP client injection pipeline. */ export type McpClientConfigFormat = 'json' | 'yaml' | 'toml'; /** * @name McpClientInjectionMode * @description Write strategy used when a config already contains a SAP MCP server entry. */ export type McpClientInjectionMode = 'merge' | 'override'; /** * @name McpClientTarget * @description A concrete MCP client config file that can be inspected or updated. */ export interface McpClientTarget { id: McpClientId; label: string; path: string; format: McpClientConfigFormat; exists: boolean; profileName?: string; } /** * @name McpServerInjectionConfig * @description Canonical SAP MCP server config injected into client files. */ export interface McpServerInjectionConfig { command: string; args: string[]; cwd?: string; env: Record; } /** * @name HostedMcpServerConfig * @description Remote Streamable HTTP MCP server config for clients that connect to OOBE hosted SAP MCP. */ export interface HostedMcpServerConfig { url: string; transport?: 'streamable-http'; } /** * @name McpClientInjectionPlan * @description Preview data generated before writing a client config file. */ export interface McpClientInjectionPlan { target: McpClientTarget; mode: McpClientInjectionMode; exists: boolean; hadSapConfig: boolean; legacyFindings: string[]; beforeSummary: string; afterSummary: string; nextContent: string; backupPath?: string; } /** * @name McpClientInjectionResult * @description Result returned after applying an injection plan. */ export interface McpClientInjectionResult { target: McpClientTarget; mode: McpClientInjectionMode; written: boolean; backupPath?: string; message: string; } /** * @name ManualMcpClientSnippet * @description Copy/paste MCP client config snippet shown when users prefer manual setup. */ export interface ManualMcpClientSnippet { title: string; description: string; content: string; } /** * @name McpClientAddonInstallResult * @description Files written when the wizard installs a local payment bridge reference bundle. */ export interface McpClientAddonInstallResult { addonId: 'x402-paid-call'; targetDir: string; files: string[]; } /** * @name HostedPaymentBridgeResolution * @description Result produced after building and auto-resolving hosted SAP MCP plus local sap_payments config. */ export interface HostedPaymentBridgeResolution { nextContent: string; hadSapConfig: boolean; resolvedIssues: string[]; } type SupportedPlatform = NodeJS.Platform; /** * @name HOSTED_SAP_MCP_URL * @description Public OOBE hosted SAP MCP Streamable HTTP endpoint used in manual client setup snippets. */ export declare const HOSTED_SAP_MCP_URL = "https://mcp.sap.oobeprotocol.ai/mcp"; /** * @name createCanonicalServerConfig * @description Builds a SAP MCP server config that follows the active profile manager. */ export declare function createCanonicalServerConfig(workspaceRoot?: string): McpServerInjectionConfig; /** * @name createManualMcpJsonSnippets * @description Builds copy/paste JSON snippets for hosted remote and local active-profile MCP client setup. */ export declare function createManualMcpJsonSnippets(canonical: McpServerInjectionConfig, hostedUrl?: string): ManualMcpClientSnippet[]; /** * @name createNpxCodexServerConfig * @description Builds a portable Codex stdio config that works without a source checkout. */ export declare function createNpxCodexServerConfig(): McpServerInjectionConfig; /** * @name createNpxPaymentBridgeServerConfig * @description Builds a portable local stdio MCP config that exposes only x402 payment helper tools. */ export declare function createNpxPaymentBridgeServerConfig(runtimeId?: string): McpServerInjectionConfig; /** * @name createX402PaidCallAddonSnippets * @description Builds manual snippets for clients that can call the native local SAP MCP payment bridge. */ export declare function createX402PaidCallAddonSnippets(): ManualMcpClientSnippet[]; /** * @name installX402PaidCallAddon * @description Installs a portable local reference bundle with manifest and client snippets for bridge repair/custom clients. */ export declare function installX402PaidCallAddon(targetDir?: string): McpClientAddonInstallResult; /** * @name getKnownClientTargets * @description Returns known MCP client config paths for the current operating system. */ export declare function getKnownClientTargets(homeDir?: string, platform?: SupportedPlatform): McpClientTarget[]; /** * @name discoverMcpClientTargets * @description Finds existing client config files and keeps create-capable standard targets. */ export declare function discoverMcpClientTargets(homeDir?: string, platform?: SupportedPlatform): McpClientTarget[]; /** * @name findLegacySignals * @description Detects stale SAP MCP paths and hardcoded environment overrides. */ export declare function findLegacySignals(content: string): string[]; /** * @name validateHostedPaymentBridgeContent * @description Verifies that a runtime config contains both hosted SAP MCP and the local sap_payments bridge. */ export declare function validateHostedPaymentBridgeContent(target: McpClientTarget, content: string, platform?: SupportedPlatform): string[]; /** * @name resolveHostedPaymentBridgeContent * @description Builds hosted SAP MCP plus local sap_payments config and auto-repairs stale runtime config. */ export declare function resolveHostedPaymentBridgeContent(target: McpClientTarget, content: string, platform?: SupportedPlatform): HostedPaymentBridgeResolution; /** * @name buildCodexHostedPaymentBridgeContent * @description Builds Codex TOML with hosted SAP MCP plus a local sap_payments x402 bridge. */ export declare function buildCodexHostedPaymentBridgeContent(content: string, hostedUrl?: string, platform?: SupportedPlatform): { nextContent: string; hadSapConfig: boolean; }; /** * @name installCodexHostedPaymentBridgeConfig * @description Writes Codex config.toml with hosted SAP MCP and the local x402 payment bridge. */ export declare function installCodexHostedPaymentBridgeConfig(homeDir?: string, platform?: SupportedPlatform): McpClientInjectionResult; /** * @name buildHostedPaymentBridgeContent * @description Builds runtime-specific config with hosted SAP MCP and local x402 bridge. */ export declare function buildHostedPaymentBridgeContent(target: McpClientTarget, content: string, platform?: SupportedPlatform): { nextContent: string; hadSapConfig: boolean; }; /** * @name installHostedPaymentBridgeConfig * @description Installs or repairs hosted SAP MCP plus local x402 bridge config for a concrete runtime target. */ export declare function installHostedPaymentBridgeConfig(target: McpClientTarget, platform?: SupportedPlatform): McpClientInjectionResult; /** * @name installHostedPaymentBridgeConfigs * @description Installs payment bridge configs for all selected runtime ids and detected/create-capable targets. */ export declare function installHostedPaymentBridgeConfigs(runtimeIds: readonly McpClientId[], homeDir?: string, platform?: SupportedPlatform): McpClientInjectionResult[]; /** * @name planMcpClientInjection * @description Creates a write plan with preview metadata but does not modify files. */ export declare function planMcpClientInjection(target: McpClientTarget, canonical: McpServerInjectionConfig, mode: McpClientInjectionMode): McpClientInjectionPlan; /** * @name applyMcpClientInjection * @description Applies a previously reviewed MCP client injection plan. */ export declare function applyMcpClientInjection(plan: McpClientInjectionPlan): McpClientInjectionResult; export {}; //# sourceMappingURL=mcp-client-injection.d.ts.map