| 4 | import process from 'node:process'; |
| 5 | |
| 6 | function parseArgs(argv: string[]): { limit: number; callWindows: boolean } { |
| 7 | let limit = 20; |
| 8 | let callWindows = true; |
| 9 | for (let i = 2; i < argv.length; i += 1) { |
| 10 | const arg = argv[i]; |
| 11 | if (arg === '--limit' && argv[i + 1]) { |
| 12 | limit = Number(argv[i + 1]); |
| 13 | i += 1; |
| 14 | continue; |
| 15 | } |
| 16 | if (arg === '--no-windows') { |
| 17 | callWindows = false; |
| 18 | continue; |
| 19 | } |
| 20 | } |
| 21 | return { limit: Number.isFinite(limit) ? limit : 20, callWindows }; |
| 22 | } |
| 23 | |
| 24 | function mapXcodeEnvForMcpBridge(env: NodeJS.ProcessEnv): Record<string, string> { |
| 25 | const mapped: Record<string, string> = {}; |