/** * Type definitions for mcpGraph configuration */ export interface ExecutionLimits { maxNodeExecutions?: number; maxExecutionTimeMs?: number; } export interface McpGraphConfig { version: string; server: ServerMetadata; mcpServers?: Record; executionLimits?: ExecutionLimits; tools: ToolDefinition[]; } export interface ServerMetadata { name: string; version: string; title?: string; instructions?: string; } export type ServerConfig = StdioServerConfig | SseServerConfig | StreamableHttpServerConfig; /** * ServerConfig with optional source tracking metadata * Used internally to track whether a server came from the graph file or external MCP file */ export type ServerConfigWithSource = ServerConfig & { _source?: 'graph' | 'external'; }; export interface StdioServerConfig { type?: "stdio"; command: string; args: string[]; cwd?: string; } export interface SseServerConfig { type: "sse"; url: string; headers?: Record; eventSourceInit?: Record; requestInit?: Record; } export interface StreamableHttpServerConfig { type: "streamableHttp"; url: string; headers?: Record; requestInit?: Record; } export interface ToolDefinition { name: string; description: string; inputSchema: JsonSchema; outputSchema: JsonSchema; nodes: NodeDefinition[]; } export interface JsonSchema { type: string; properties?: Record; required?: string[]; description?: string; } export interface JsonSchemaProperty { type: string; description?: string; } export type NodeDefinition = EntryNode | ExitNode | McpNode | TransformNode | SwitchNode; export interface BaseNode { id: string; type: string; next?: string; } export interface EntryNode extends BaseNode { type: "entry"; next: string; } export interface ExitNode extends BaseNode { type: "exit"; } export interface McpNode extends BaseNode { type: "mcp"; server: string; tool: string; args: Record; next: string; } export interface TransformNode extends BaseNode { type: "transform"; transform: { expr: string; }; next: string; } export interface SwitchNode extends BaseNode { type: "switch"; conditions: SwitchCondition[]; next: string; } export interface SwitchCondition { rule: JsonLogicRule; next: string; } export type JsonLogicRule = unknown; //# sourceMappingURL=config.d.ts.map