isRunningAsMCPServer detects if we're running as a subprocess of mcp-server This is a heuristic - we can't reliably detect this, so we're conservative
()
| 73 | // isRunningAsMCPServer detects if we're running as a subprocess of mcp-server |
| 74 | // This is a heuristic - we can't reliably detect this, so we're conservative |
| 75 | func isRunningAsMCPServer() bool { |
| 76 | // Check for MCP_SERVER environment variable that could be set by the MCP server |
| 77 | return os.Getenv("GH_AW_MCP_SERVER") != "" |
| 78 | } |
| 79 | |
| 80 | var ( |
| 81 | // getLastCheckFilePathFunc allows overriding in tests |