github-mcp-agent 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/PKG-INFO +1 -1
  2. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/github_mcp_agent/providers/copilot.py +17 -2
  3. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/pyproject.toml +1 -1
  4. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/.claude/settings.json +0 -0
  5. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/.claude/settings.local.json +0 -0
  6. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/.env.example +0 -0
  7. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/.gitignore +0 -0
  8. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/LICENSE +0 -0
  9. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/README.md +0 -0
  10. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/assets/demo1.png +0 -0
  11. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/assets/demo2.png +0 -0
  12. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/assets/demo3.png +0 -0
  13. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/github_mcp_agent/__init__.py +0 -0
  14. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/github_mcp_agent/agent.py +0 -0
  15. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/github_mcp_agent/cli.py +0 -0
  16. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/github_mcp_agent/providers/__init__.py +0 -0
  17. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/github_mcp_agent/providers/anthropic.py +0 -0
  18. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/github_mcp_agent/providers/bedrock.py +0 -0
  19. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/github_mcp_agent/providers/gemini.py +0 -0
  20. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/github_mcp_agent/providers/ollama.py +0 -0
  21. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/github_mcp_agent/providers/openai.py +0 -0
  22. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/github_mcp_agent/setup_wizard.py +0 -0
  23. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/github_mcp_agent/system_prompt.txt +0 -0
  24. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/github_mcp_agent/tools.py +0 -0
  25. {github_mcp_agent-0.2.1 → github_mcp_agent-0.2.2}/system_prompt.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-mcp-agent
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Talk to your GitHub repos, issues, and project boards in plain English from your terminal
5
5
  Project-URL: Homepage, https://github.com/OmarCodes022/GitHub-MCP-Agent
6
6
  Project-URL: Repository, https://github.com/OmarCodes022/GitHub-MCP-Agent
@@ -81,13 +81,28 @@ def _get_copilot_token(oauth_token: str) -> str:
81
81
  )
82
82
 
83
83
 
84
+ def _reauth(reason: str) -> str:
85
+ import os
86
+ from rich.console import Console
87
+ Console().print(f"\n [yellow]{reason} - opening browser login...[/yellow]")
88
+ oauth_token = _device_flow()
89
+ from github_mcp_agent.setup_wizard import _write_config
90
+ _write_config({"COPILOT_OAUTH_TOKEN": oauth_token})
91
+ os.environ["COPILOT_OAUTH_TOKEN"] = oauth_token
92
+ return oauth_token
93
+
94
+
84
95
  def build_model(model_id: str):
85
96
  import os
86
97
  from strands.models.litellm import LiteLLMModel
87
98
  oauth_token = os.environ.get("COPILOT_OAUTH_TOKEN")
88
99
  if not oauth_token:
89
- raise RuntimeError("Copilot token not set. Run 'github-agent provider' and pick GitHub Copilot.")
90
- token = _get_copilot_token(oauth_token)
100
+ oauth_token = _reauth("Copilot not authenticated")
101
+ try:
102
+ token = _get_copilot_token(oauth_token)
103
+ except RuntimeError:
104
+ oauth_token = _reauth("Copilot token invalid or revoked")
105
+ token = _get_copilot_token(oauth_token)
91
106
  return LiteLLMModel(
92
107
  model_id=f"openai/{model_id}",
93
108
  params={
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "github-mcp-agent"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "Talk to your GitHub repos, issues, and project boards in plain English from your terminal"
5
5
  readme = "README.md"
6
6
  license = { text = "MIT" }