UNPKG

repl-mcp

Version:

Universal REPL session manager MCP server

103 lines 2.71 kB
export const DEFAULT_REPL_CONFIGS = { pry: { name: 'Pry (Ruby)', type: 'pry', shell: process.platform === 'win32' ? 'cmd' : 'bash', commands: ['pry --no-pager'], timeout: 10000 }, irb: { name: 'IRB (Ruby)', type: 'irb', shell: process.platform === 'win32' ? 'cmd' : 'bash', commands: [ 'IRB.conf[:USE_READLINE] = false', 'IRB.conf[:PROMPT_MODE] = :DEFAULT', 'irb' ], timeout: 10000 }, cmd_test: { name: 'CMD Test', type: 'cmd', shell: 'cmd', commands: [], timeout: 10000 }, rails_console: { name: 'Rails Console', type: 'pry', shell: process.platform === 'win32' ? 'cmd' : 'bash', commands: [ 'bundle exec rails console' ], timeout: 10000 }, rails_console_production: { name: 'Rails Console (Production)', type: 'pry', shell: process.platform === 'win32' ? 'cmd' : 'bash', commands: [ 'RAILS_ENV=production bundle exec rails console' ], environment: { 'RAILS_ENV': 'production' }, timeout: 10000 }, ipython: { name: 'IPython (Python)', type: 'ipython', shell: process.platform === 'win32' ? 'cmd' : 'bash', commands: ['ipython'], timeout: 10000 }, node: { name: 'Node.js REPL', type: 'node', shell: process.platform === 'win32' ? 'cmd' : 'bash', commands: ['node'], timeout: 10000 }, python: { name: 'Python REPL', type: 'python', shell: process.platform === 'win32' ? 'cmd' : 'bash', commands: ['python'], timeout: 10000 }, bash: { name: 'Bash Shell', type: 'bash', shell: 'bash', commands: [], timeout: 30000 }, zsh: { name: 'Zsh Shell', type: 'zsh', shell: 'zsh', commands: [], timeout: 30000 } }; export function getConfigByName(name) { return DEFAULT_REPL_CONFIGS[name]; } export function listAvailableConfigs() { return Object.keys(DEFAULT_REPL_CONFIGS); } export function createCustomConfig(name, shell, commands, startingDirectory, environment, promptPattern, timeout, type // 明示的なtype指定を追加 ) { return { name, type: type || 'custom', // 指定されたtype、または'custom'をデフォルト shell, commands, startingDirectory, environment, promptPattern, timeout }; } //# sourceMappingURL=repl-configs.js.map