UNPKG

repl-mcp

Version:

Universal REPL session manager MCP server

55 lines 1.53 kB
import * as nodePty from 'node-pty'; export interface REPLConfig { name: string; type: 'pry' | 'irb' | 'ipython' | 'node' | 'python' | 'bash' | 'zsh' | 'cmd' | 'custom'; shell: 'bash' | 'zsh' | 'cmd' | 'powershell' | 'cmd.exe'; commands: string[]; startingDirectory?: string; environment?: Record<string, string>; promptPattern?: string; timeout?: number; } export interface SessionState { id: string; config: REPLConfig; displayName?: string; status: 'initializing' | 'ready' | 'executing' | 'error' | 'terminated'; process?: nodePty.IPty; currentDirectory: string; history: string[]; lastOutput: string; lastError?: string; createdAt: Date; lastActivity: Date; learnedPromptPatterns: string[]; } export interface CommandResult { success: boolean; rawOutput: string; error?: string; executionTime: number; question?: string; questionType?: 'timeout_analysis' | 'prompt_detection' | 'error_recovery'; context?: any; canContinue?: boolean; } export interface SessionCreationResult { success: boolean; sessionId?: string; error?: string; question?: string; questionType?: 'session_timeout' | 'prompt_detection'; context?: { sessionId: string; rawOutput: string; timeoutError: string; }; canContinue?: boolean; } export interface PromptInfo { detected: boolean; type: string; ready: boolean; prompt: string; } //# sourceMappingURL=types.d.ts.map