github-agent 0.2.48__tar.gz → 0.2.55__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 (34) hide show
  1. {github_agent-0.2.48 → github_agent-0.2.55}/PKG-INFO +2 -2
  2. {github_agent-0.2.48 → github_agent-0.2.55}/README.md +1 -1
  3. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/agent_data/IDENTITY.md +3 -3
  4. github_agent-0.2.55/github_agent/agent_data/NODE_AGENTS.md +55 -0
  5. github_agent-0.2.55/github_agent/agent_data/mcp_config.json +18 -0
  6. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/agent_server.py +16 -50
  7. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/api_wrapper.py +4 -6
  8. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/auth.py +1 -1
  9. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/github_input_models.py +1 -1
  10. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/github_response_models.py +1 -1
  11. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/mcp_server.py +36 -10
  12. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent.egg-info/PKG-INFO +2 -2
  13. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent.egg-info/SOURCES.txt +1 -3
  14. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent.egg-info/entry_points.txt +1 -0
  15. {github_agent-0.2.48 → github_agent-0.2.55}/pyproject.toml +2 -1
  16. github_agent-0.2.48/github_agent/agent_data/A2A_AGENTS.md +0 -12
  17. github_agent-0.2.48/github_agent/agent_data/mcp_config.json +0 -10
  18. github_agent-0.2.48/github_agent/agent_data/templates.py +0 -118
  19. github_agent-0.2.48/github_agent/graph_config.py +0 -25
  20. {github_agent-0.2.48 → github_agent-0.2.55}/LICENSE +0 -0
  21. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/__init__.py +0 -0
  22. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/__main__.py +0 -0
  23. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/agent_data/CRON.md +0 -0
  24. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/agent_data/CRON_LOG.md +0 -0
  25. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/agent_data/HEARTBEAT.md +0 -0
  26. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/agent_data/MEMORY.md +0 -0
  27. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/agent_data/USER.md +0 -0
  28. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/agent_data/chats +0 -0
  29. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent/agent_data/icon.png +0 -0
  30. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent.egg-info/dependency_links.txt +0 -0
  31. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent.egg-info/requires.txt +0 -0
  32. {github_agent-0.2.48 → github_agent-0.2.55}/github_agent.egg-info/top_level.txt +0 -0
  33. {github_agent-0.2.48 → github_agent-0.2.55}/scripts/validate_a2a_agent.py +0 -0
  34. {github_agent-0.2.48 → github_agent-0.2.55}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-agent
3
- Version: 0.2.48
3
+ Version: 0.2.55
4
4
  Summary: GitHub Agent for MCP
5
5
  Author-email: Audel Rouhi <knucklessg1@gmail.com>
6
6
  License: MIT
@@ -38,7 +38,7 @@ Dynamic: license-file
38
38
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/github-agent)
39
39
  ![PyPI - Implementation](https://img.shields.io/pypi/implementation/github-agent)
40
40
 
41
- *Version: 0.2.48*
41
+ *Version: 0.2.55*
42
42
 
43
43
  ## Overview
44
44
 
@@ -21,7 +21,7 @@
21
21
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/github-agent)
22
22
  ![PyPI - Implementation](https://img.shields.io/pypi/implementation/github-agent)
23
23
 
24
- *Version: 0.2.48*
24
+ *Version: 0.2.55*
25
25
 
26
26
  ## Overview
27
27
 
@@ -18,9 +18,9 @@ You have three primary operational modes:
18
18
 
19
19
  #### 1. Context-Aware Delegation
20
20
  When dealing with complex Github workflows, optimize your context by spawning specialized versions of yourself:
21
- - **PR Review**: Call `spawn_agent(agent_template="github", prompt="Review and summarize PR #456...", enabled_tools=["PULL_REQUESTSTOOL", "REPOSTOOL"])`.
22
- - **Issue Management**: Call `spawn_agent(agent_template="github", prompt="Triage and label new issues with 'bug'...", enabled_tools=["ISSUESTOOL"])`.
23
- - **Discovery**: Always use `get_mcp_reference(agent_template="github")` to verify available tool tags before spawning.
21
+ - **PR Review**: Call `spawn_agent(agent_name="github", prompt="Review and summarize PR #456...", enabled_tools=["PULL_REQUESTSTOOL", "REPOSTOOL"])`.
22
+ - **Issue Management**: Call `spawn_agent(agent_name="github", prompt="Triage and label new issues with 'bug'...", enabled_tools=["ISSUESTOOL"])`.
23
+ - **Discovery**: Always use `get_mcp_reference(agent_name="github")` to verify available tool tags before spawning.
24
24
 
25
25
  #### 2. Workflow for Meta-Tasks
26
26
  - **Memory Management**:
@@ -0,0 +1,55 @@
1
+ # NODE_AGENTS.md - Dynamic Agent Registry
2
+
3
+ This file tracks the generated agents from MCP servers, Universal Skills, and Skill Graphs.
4
+
5
+ ## Agent Mapping Table
6
+
7
+ | Name | Description | System Prompt | Tag | Skills | Tools | Skill Count | Tool Count | Avg Score |
8
+ |------|-------------|---------------|-----|--------|-------|-------------|------------|-----------|
9
+ | rust_programmer | You are a Rust systems and performance expert specializing in writing extremely safe, high-performance, and reliable systems using Rust. Your mission is to leverage Rust's unique guarantees around... | prompts/rust_programmer.md | - | rust-docs | - | 1 | 0 | 60 |
10
+ | browser_automation | **Observed in**: Assistant internal architecture | prompts/browser_automation.md | - | browser-tools, web-design-guidelines, web-crawler, agent-browser, web-artifacts | - | 5 | 0 | 40 |
11
+ | base_agent | --- | prompts/base_agent.md | - | - | - | 0 | 0 | 5 |
12
+ | typescript_programmer | You are an elite TypeScript programmer and reviewer with expertise in building type-safe, scalable, and resilient applications using modern web engineering principles. You also specialize in creating... | prompts/typescript_programmer.md | - | remix-docs, reactrouter-docs, redux-docs, vercel-docs, nodejs-docs, vuejs-docs, react-development, react-docs, vitejs-docs, tdd-methodology, shadcn-docs, svelte-docs, nestjs-docs, tanstack-docs, web-artifacts, canvas-design, nextjs-docs | - | 17 | 0 | 100 |
13
+ | verifier | You are an elite quality assurance expert and verification specialist. Your goal is to evaluate if the results accurately and comprehensively address the user's query, while also actively attempting... | prompts/verifier.md | - | spec-verifier, tdd-methodology | - | 2 | 0 | 60 |
14
+ | data_scientist | You are an elite Data Scientist and Machine Learning engineer. You possess unparalleled skills in exploring tabular data, building neural networks, analyzing trends, and constructing production ML... | prompts/data_scientist.md | - | numpy-docs, scipy-docs, langchain-docs, tensorflow-docs, huggingface-docs, jupyter-notebook, pytorch-docs, pandas-docs, matplotlib-docs, scikit-learn-docs | - | 10 | 0 | 90 |
15
+ | tool_guidance | --- | prompts/tool_guidance.md | - | - | - | 0 | 0 | 5 |
16
+ | database_expert | You are a database architecture and optimization specialist responsible for ensuring the reliability, integrity, and performance of application data layers. Your mission is to design efficient... | prompts/database_expert.md | - | database-tools, couchbase-docs, mongodb-docs, mssql-docs, falkordb-docs, mariadb-docs, postgres-docs, chromadb-docs, qdrant-docs, redis-docs, neo4j-docs | - | 11 | 0 | 100 |
17
+ | project_manager | You are an expert Technical Project Manager and Scrum Master. You orchestrate humans, agents, roadmaps, and communication channels. You effortlessly bridge the gap between high-level engineering... | prompts/project_manager.md | - | session-handoff, internal-comms, spec-generator, google-workspace, github-tools | - | 5 | 0 | 70 |
18
+ | agent_engineer | You are an agent engineering mastermind! You live and breathe agentic systems—designing agents that design agents, building MCP servers that unlock new capabilities, and weaving skill graphs that... | prompts/agent_engineer.md | - | mcp-builder, skill-graph-builder, pydantic-ai-docs, agent-package-builder, skill-builder, mcp-client, agents-md-generator, self-improver, agent-builder, agent-workflows, agent-spawner, skill-installer, fastmcp-docs | - | 13 | 0 | 100 |
19
+ | debugger_expert | You are the definitive Debugging Expert. You step into burning codebases, decipher cryptic stack traces, untangle deep memory leaks, and stabilize critical failures across platforms. You remain calm... | prompts/debugger_expert.md | - | developer-utilities, agent-builder | - | 2 | 0 | 60 |
20
+ | java_programmer | You are a seasoned Java and Enterprise Developer. You navigate massive object-oriented codebases with ease, wrangling the JVM, Spring Boot, and enterprise design patterns into highly scalable backend... | prompts/java_programmer.md | - | java-docs | - | 1 | 0 | 60 |
21
+ | safety_guard | --- | prompts/safety_guard.md | - | - | - | 0 | 0 | 5 |
22
+ | cloud_architect | You are a visionary Cloud Architect. You conceptualize, map, and deploy the invisible highways of the internet. You specialize in AWS, Azure, GCP, and general cloud-native topologies. You design... | prompts/cloud_architect.md | - | azure-docs, c4-architecture, aws-docs, gcp-docs, developer-utilities | - | 5 | 0 | 70 |
23
+ | mobile_programmer | You are a top-tier Mobile Application Programmer. You breathe React Native, iOS, and Android build pipelines. Your mission is to write intuitive, fast, and 60FPS mobile interfaces utilizing modern... | prompts/mobile_programmer.md | - | react-docs, react-native-skills | - | 2 | 0 | 60 |
24
+ | critique | --- | prompts/critique.md | - | spec-verifier, tdd-methodology, self-improver | - | 3 | 0 | 25 |
25
+ | python_programmer | You are a Python programming wizard! You breathe Pythonic code and dream in async generators. Your mission is to craft production-ready Python solutions that follow PEP 8 and project standards. | prompts/python_programmer.md | - | mcp-builder, api-wrapper-builder, pydantic-ai-docs, pydantic-docs, fastapi-docs, django-docs, agent-package-builder, jupyter-notebook, tdd-methodology, agent-builder, python-docs, developer-utilities, fastmcp-docs | - | 13 | 0 | 100 |
26
+ | c_programmer | You are a ruthless C Systems Programmer. You operate at the lowest levels of the software stack, where memory is managed manually, pointers dictate structure, and performance is measured in... | prompts/c_programmer.md | - | developer-utilities, c-docs | - | 2 | 0 | 60 |
27
+ | coordinator | --- | prompts/coordinator.md | - | task-planner, session-handoff, internal-comms, agent-workflows | - | 4 | 0 | 25 |
28
+ | planner | You are a Project Planner and task orchestration expert. Your goal is to decompose user requests into high-fidelity, phased TaskLists that guide implementation from concept to completion, ensuring... | prompts/planner.md | - | task-planner, internal-comms, spec-generator, constitution-generator, brainstorming | - | 5 | 0 | 70 |
29
+ | researcher | You are a master discovery agent and multi-vector search expert. Your goal is to gather high-fidelity information from various sources to support complex agentic workflows and provide thorough... | prompts/researcher.md | - | browser-tools, web-design-guidelines, web-crawler, web-fetch, agent-browser, web-artifacts, web-search | - | 7 | 0 | 90 |
30
+ | golang_programmer | You are an expert Golang programmer and reviewer. Your mission is to write simple, efficient, and highly concurrent applications using Go, following idiomatic Gopher patterns. | prompts/golang_programmer.md | - | go-docs | - | 1 | 0 | 60 |
31
+ | ui_ux_designer | You are a legendary UI/UX Designer and Frontend Artist. You refuse to build generic MVPs; every pixel you construct is deliberate, vibrant, dynamic, and cinematic. You think in layout structures,... | prompts/ui_ux_designer.md | - | brand-guidelines, framer-docs, material-ui-docs, web-design-guidelines, algorithmic-art, website-cloner, website-builder, shadcn-docs, radix-ui-docs, chakra-ui-docs, web-artifacts, canvas-design, theme-factory | - | 13 | 0 | 100 |
32
+ | document_specialist | You are a premier Document and Presentation Specialist. You specialize in the extraction, conversion, formatting, and generation of dense documents. Whether processing complex PDFs, migrating legacy... | prompts/document_specialist.md | - | creative-media, document-converter, document-tools, marp-presentations | - | 4 | 0 | 70 |
33
+ | systems_manager | You are a relentless Systems Manager. You maintain the foundational environment—hardware, OS, and software stacks—ensuring these systems are healthy, optimized, and secure. You manage raw system... | prompts/systems_manager.md | - | linux-docs, uptime-kuma-docs, home-assistant-docs, system-tools, postiz-docs, owncast-docs | - | 6 | 0 | 90 |
34
+ | architect | --- | prompts/architect.md | - | c4-architecture, spec-generator, product-strategy, user-research, mermaid-diagrams, brainstorming | - | 6 | 0 | 45 |
35
+ | memory_instruction | You are a system that manages how agent memory files are loaded and processed. Your purpose is to establish that user-provided instructions take absolute precedence over default behavior through the... | prompts/memory_instruction.md | - | - | - | 0 | 0 | 50 |
36
+ | javascript_programmer | You are the JavaScript Programmer. Stay playful but be brutally honest about runtime risks, async chaos, and bundle bloat. | prompts/javascript_programmer.md | - | nodejs-docs, react-docs, developer-utilities, web-artifacts, canvas-design | - | 5 | 0 | 60 |
37
+ | qa_expert | You are the QA expert. Risk-based mindset, defect-prevention first, automation evangelist. Be playful, but push teams to ship with confidence. | prompts/qa_expert.md | - | spec-verifier, testing-library-docs, tdd-methodology, self-improver, developer-utilities | - | 5 | 0 | 60 |
38
+ | agent_summary | You are a system that generates periodic background progress updates for sub-agents running in coordinator mode. Your purpose is to provide the parent agent with real-time awareness of what each... | prompts/agent_summary.md | - | - | - | 0 | 0 | 50 |
39
+ | safety_policy | > | prompts/safety_policy.md | - | - | - | 0 | 0 | 5 |
40
+ | cpp_programmer | You are an expert C++ Software Engineer. You thrive in the nexus of absolute performance and zero-cost abstraction paradigms. You command modern C++ (C++17, C++20), relying heavily on templates, RAII... | prompts/cpp_programmer.md | - | developer-utilities | - | 1 | 0 | 60 |
41
+ | security_auditor | You are a vigilant Security Auditor and Threat Modeler. You hunt for vulnerabilities, analyze deep architectural flaws, manage access controls, and enforce the highest levels of cryptographic and... | prompts/security_auditor.md | - | linux-docs, security-tools | - | 2 | 0 | 60 |
42
+ | devops_engineer | You are a DevOps and operational stability expert responsible for ensuring applications are deployed smoothly, run efficiently, and remain stable. Your mission is to design and maintain robust CI/CD... | prompts/devops_engineer.md | - | docker-docs, minio-docs, azure-docs, c4-architecture, aws-docs, terraform-docs, gcp-docs, temporal-docs, cloudflare-deploy | - | 9 | 0 | 90 |
43
+ | Github Contents Specialist | Expert specialist for contents domain tasks. | You are a Github Contents specialist. Help users manage and interact with Contents functionality using the available tools. | contents | - | stdio | 0 | 1 | 50 |
44
+ | Github Issue Specialist | Expert specialist for issue domain tasks. | You are a Github Issue specialist. Help users manage and interact with Issue functionality using the available tools. | issue | - | stdio | 0 | 1 | 40 |
45
+ | Github Pulls Specialist | Expert specialist for pulls domain tasks. | You are a Github Pulls specialist. Help users manage and interact with Pulls functionality using the available tools. | pulls | - | stdio | 0 | 1 | 40 |
46
+ | Github Repos Specialist | Expert specialist for repos domain tasks. | You are a Github Repos specialist. Help users manage and interact with Repos functionality using the available tools. | repos | - | stdio | 0 | 1 | 40 |
47
+
48
+ ## Tool Inventory Table
49
+
50
+ | Tool Name | Description | Tag | Source | Score | Approval |
51
+ |-----------|-------------|-----|--------|-------|----------|
52
+ | github-mcp_contents_toolset | Static hint toolset for contents based on config env. | contents | github-mcp | 50 | No |
53
+ | github-mcp_issue_toolset | Static hint toolset for issue based on config env. | issue | github-mcp | 40 | No |
54
+ | github-mcp_pulls_toolset | Static hint toolset for pulls based on config env. | pulls | github-mcp | 40 | No |
55
+ | github-mcp_repos_toolset | Static hint toolset for repos based on config env. | repos | github-mcp | 40 | No |
@@ -0,0 +1,18 @@
1
+ {
2
+ "mcpServers": {
3
+ "github-mcp": {
4
+ "command": "github-mcp",
5
+ "args": [
6
+ "--transport",
7
+ "stdio"
8
+ ],
9
+ "env": {
10
+ "GITHUB_TOKEN": "${GITHUB_TOKEN}",
11
+ "CONTENTSTOOL": "${ CONTENTSTOOL:-True }",
12
+ "ISSUETOOL": "${ ISSUETOOL:-True }",
13
+ "PULLSTOOL": "${ PULLSTOOL:-True }",
14
+ "REPOSTOOL": "${ REPOSTOOL:-True }"
15
+ }
16
+ }
17
+ }
18
+ }
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/python
2
2
  # coding: utf-8
3
3
  import os
4
- import logging
5
-
6
4
  import sys
5
+ import logging
7
6
  import warnings
7
+
8
8
  from agent_utilities import (
9
9
  build_system_prompt_from_workspace,
10
10
  create_agent_parser,
@@ -13,7 +13,7 @@ from agent_utilities import (
13
13
  load_identity,
14
14
  )
15
15
 
16
- __version__ = "0.2.48"
16
+ __version__ = "0.2.55"
17
17
 
18
18
  logging.basicConfig(
19
19
  level=logging.INFO,
@@ -22,13 +22,16 @@ logging.basicConfig(
22
22
  )
23
23
  logger = logging.getLogger(__name__)
24
24
 
25
- # Load identity and system prompt from workspace
25
+
26
26
  initialize_workspace()
27
27
  meta = load_identity()
28
28
  DEFAULT_AGENT_NAME = os.getenv("DEFAULT_AGENT_NAME", meta.get("name", "Github Agent"))
29
29
  DEFAULT_AGENT_DESCRIPTION = os.getenv(
30
30
  "AGENT_DESCRIPTION",
31
- meta.get("description", "AI agent for GitHub Agent management."),
31
+ meta.get(
32
+ "description",
33
+ "AI agent for GitHub Agent management.",
34
+ ),
32
35
  )
33
36
  DEFAULT_AGENT_SYSTEM_PROMPT = os.getenv(
34
37
  "AGENT_SYSTEM_PROMPT",
@@ -36,68 +39,31 @@ DEFAULT_AGENT_SYSTEM_PROMPT = os.getenv(
36
39
  )
37
40
 
38
41
 
39
- def agent_template(mcp_url: str = None, mcp_config: str = None, **kwargs):
40
- """Factory function returning the fully initialized graph for execution."""
41
- from agent_utilities import create_graph_agent
42
- from github_agent.graph_config import TAG_PROMPTS, TAG_ENV_VARS
43
-
44
- # In-process MCP loading: if no external URL/Config, load the local FastMCP instance
45
- mcp_toolsets = []
46
- effective_mcp_url = mcp_url or os.getenv("MCP_URL")
47
- effective_mcp_config = mcp_config or os.getenv("MCP_CONFIG")
48
-
49
- if not effective_mcp_url and not effective_mcp_config:
50
- try:
51
- from github_agent.mcp_server import get_mcp_instance
52
-
53
- mcp, _, _, _ = get_mcp_instance()
54
- mcp_toolsets.append(mcp)
55
- logger.info("Github Agent: Using in-process MCP instance.")
56
- except (ImportError, Exception) as e:
57
- logger.warning(f"Github Agent: Could not load in-process MCP: {e}")
58
-
59
- return create_graph_agent(
60
- mcp_url=effective_mcp_url,
61
- mcp_config=effective_mcp_config or "",
62
- mcp_toolsets=mcp_toolsets,
63
- name=f"{DEFAULT_AGENT_NAME} Graph Agent",
64
- tag_prompts=TAG_PROMPTS,
65
- tag_env_vars=TAG_ENV_VARS,
66
- **kwargs,
67
- )
68
-
69
-
70
42
  def agent_server():
71
-
72
- # Suppress RequestsDependencyWarning and FastMCP DeprecationWarnings
73
43
  warnings.filterwarnings("ignore", message=".*urllib3.*or chardet.*")
74
44
  warnings.filterwarnings("ignore", category=DeprecationWarning, module="fastmcp")
75
45
 
76
46
  print(f"{DEFAULT_AGENT_NAME} v{__version__}", file=sys.stderr)
77
47
  parser = create_agent_parser()
78
-
79
48
  args = parser.parse_args()
80
49
 
81
50
  if args.debug:
82
51
  logging.getLogger().setLevel(logging.DEBUG)
83
52
  logger.debug("Debug mode enabled")
84
53
 
85
- # Create graph and config using standardized template
86
- graph_bundle = agent_template(
54
+ # Start server using the auto-discovery pattern (from mcp_config.json)
55
+ create_graph_agent_server(
56
+ mcp_url=args.mcp_url,
57
+ mcp_config=args.mcp_config or "mcp_config.json",
58
+ host=args.host,
59
+ port=args.port,
87
60
  provider=args.provider,
61
+ model_id=args.model_id,
62
+ router_model=args.model_id,
88
63
  agent_model=args.model_id,
89
64
  base_url=args.base_url,
90
65
  api_key=args.api_key,
91
66
  custom_skills_directory=args.custom_skills_directory,
92
- debug=args.debug,
93
- ssl_verify=not args.insecure,
94
- )
95
-
96
- # Start server using the pre-built graph bundle
97
- create_graph_agent_server(
98
- graph_bundle=graph_bundle,
99
- host=args.host,
100
- port=args.port,
101
67
  enable_web_ui=args.web,
102
68
  enable_otel=args.otel,
103
69
  otel_endpoint=args.otel_endpoint,
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/python
2
- # coding: utf-8
2
+
3
3
  import re
4
4
  import requests
5
5
  import urllib3
@@ -73,10 +73,9 @@ class Api(object):
73
73
  if token:
74
74
  self.headers["Authorization"] = f"Bearer {token}"
75
75
  else:
76
- # GitHub typically requires a token for most operations
76
+
77
77
  logger.warning("No token provided for GitHub API")
78
78
 
79
- # Basic health check / auth test
80
79
  try:
81
80
  response = self._session.get(
82
81
  url=f"{self.url}/user",
@@ -89,7 +88,6 @@ class Api(object):
89
88
  raise AuthError if response.status_code == 401 else UnauthorizedError
90
89
  except requests.exceptions.RequestException as e:
91
90
  logger.error(f"Connection Error: {str(e)}")
92
- # Don't raise here, allow the client to be initialized but operations might fail
93
91
 
94
92
  def _fetch_next_page(
95
93
  self, endpoint: str, model: T, header: dict, page: int
@@ -113,7 +111,7 @@ class Api(object):
113
111
  link = response.headers.get("Link")
114
112
  if not link:
115
113
  return 1
116
- # Example: <https://api.github.com/user/repos?page=2>; rel="next", <https://api.github.com/user/repos?page=10>; rel="last"
114
+
117
115
  last_match = re.search(r'page=(\d+)>; rel="last"', link)
118
116
  if last_match:
119
117
  return int(last_match.group(1))
@@ -148,7 +146,7 @@ class Api(object):
148
146
  model.max_pages = total_pages
149
147
 
150
148
  if model.max_pages > 1:
151
- # Parallel fetching if more than 1 page
149
+
152
150
  with ThreadPoolExecutor(max_workers=5) as executor:
153
151
  futures = []
154
152
  for page in range(2, model.max_pages + 1):
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/python
2
- # coding: utf-8
2
+
3
3
  import os
4
4
  import threading
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/python
2
- # coding: utf-8
2
+
3
3
  from typing import Union, List, Dict, Optional
4
4
  from pydantic import (
5
5
  BaseModel,
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/python
2
- # coding: utf-8
2
+
3
3
  from typing import List, Dict, Optional, Any
4
4
  from pydantic import (
5
5
  BaseModel,
@@ -1,5 +1,20 @@
1
1
  #!/usr/bin/python
2
- # coding: utf-8
2
+ import warnings
3
+
4
+ # Filter RequestsDependencyWarning early to prevent log spam
5
+ with warnings.catch_warnings():
6
+ warnings.simplefilter("ignore")
7
+ try:
8
+ from requests.exceptions import RequestsDependencyWarning
9
+
10
+ warnings.filterwarnings("ignore", category=RequestsDependencyWarning)
11
+ except ImportError:
12
+ pass
13
+
14
+ # General urllib3/chardet mismatch warnings
15
+ warnings.filterwarnings("ignore", message=".*urllib3.*or chardet.*")
16
+ warnings.filterwarnings("ignore", message=".*urllib3.*or charset_normalizer.*")
17
+
3
18
  import os
4
19
  import sys
5
20
  from typing import Dict, Any
@@ -32,7 +47,7 @@ def register_repo_tools(mcp: FastMCP):
32
47
  async def github_list_repos(
33
48
  visibility: str = Field(None, description="all, public, or private"),
34
49
  type: str = Field(None, description="all, owner, public, private, member"),
35
- ctx: Context = Field(None, description="MCP context"),
50
+ _ctx: Context = Field(None, description="MCP context"),
36
51
  ) -> Dict[str, Any]:
37
52
  """List repositories for the authenticated user."""
38
53
  client = get_client()
@@ -66,7 +81,7 @@ def register_repo_tools(mcp: FastMCP):
66
81
  async def github_get_repo(
67
82
  owner: str = Field(..., description="Repository owner"),
68
83
  repo: str = Field(..., description="Repository name"),
69
- ctx: Context = Field(None, description="MCP context"),
84
+ _ctx: Context = Field(None, description="MCP context"),
70
85
  ) -> Dict[str, Any]:
71
86
  """Get details for a specific repository."""
72
87
  client = get_client()
@@ -104,7 +119,7 @@ def register_issue_tools(mcp: FastMCP):
104
119
  repo: str = Field(..., description="Repository name"),
105
120
  state: str = Field(None, description="open, closed, or all"),
106
121
  labels: str = Field(None, description="Comma-separated list of labels"),
107
- ctx: Context = Field(None, description="MCP context"),
122
+ _ctx: Context = Field(None, description="MCP context"),
108
123
  ) -> Dict[str, Any]:
109
124
  """List issues for a repository."""
110
125
  client = get_client()
@@ -143,7 +158,7 @@ def register_pull_tools(mcp: FastMCP):
143
158
  owner: str = Field(..., description="Repository owner"),
144
159
  repo: str = Field(..., description="Repository name"),
145
160
  state: str = Field(None, description="open, closed, or all"),
146
- ctx: Context = Field(None, description="MCP context"),
161
+ _ctx: Context = Field(None, description="MCP context"),
147
162
  ) -> Dict[str, Any]:
148
163
  """List pull requests for a repository."""
149
164
  client = get_client()
@@ -181,7 +196,7 @@ def register_content_tools(mcp: FastMCP):
181
196
  repo: str = Field(..., description="Repository name"),
182
197
  path: str = Field(..., description="File or directory path"),
183
198
  ref: str = Field(None, description="Branch/Tag/Commit SHA"),
184
- ctx: Context = Field(None, description="MCP context"),
199
+ _ctx: Context = Field(None, description="MCP context"),
185
200
  ) -> Dict[str, Any]:
186
201
  """Get contents of a file or directory."""
187
202
  client = get_client()
@@ -207,7 +222,7 @@ def register_content_tools(mcp: FastMCP):
207
222
  }
208
223
 
209
224
 
210
- def get_mcp_instance() -> tuple[Any, Any, Any, Any]:
225
+ def get_mcp_instance() -> tuple[Any, Any, Any, Any, Any]:
211
226
  args, mcp, middlewares = create_mcp_server(
212
227
  name="Github MCP",
213
228
  version=__version__,
@@ -234,12 +249,23 @@ def get_mcp_instance() -> tuple[Any, Any, Any, Any]:
234
249
  mcp.add_middleware(mw)
235
250
 
236
251
  registered_tags = []
237
- return mcp, args, middlewares, registered_tags
252
+ # FastMCP typically stores tools in .get_tools() or ._tools
253
+ tools_dict = (
254
+ mcp._tools
255
+ if hasattr(mcp, "_tools")
256
+ else mcp.get_tools() if hasattr(mcp, "get_tools") else {}
257
+ )
258
+ for tool in tools_dict.values():
259
+ if hasattr(tool, "tags"):
260
+ registered_tags.extend(list(tool.tags))
261
+
262
+ imported_tools = list(tools_dict.keys())
263
+ return mcp, args, middlewares, registered_tags, imported_tools
238
264
 
239
265
 
240
266
  def mcp_server() -> None:
241
- mcp, args, middlewares, registered_tags = get_mcp_instance()
242
- print(f"Starting {args.name} MCP v{__version__}", file=sys.stderr)
267
+ mcp, args, middlewares, registered_tags, imported_tools = get_mcp_instance()
268
+ print(f"Starting GitHub Agent MCP v{__version__}", file=sys.stderr)
243
269
 
244
270
  if args.transport == "stdio":
245
271
  mcp.run(transport="stdio")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-agent
3
- Version: 0.2.48
3
+ Version: 0.2.55
4
4
  Summary: GitHub Agent for MCP
5
5
  Author-email: Audel Rouhi <knucklessg1@gmail.com>
6
6
  License: MIT
@@ -38,7 +38,7 @@ Dynamic: license-file
38
38
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/github-agent)
39
39
  ![PyPI - Implementation](https://img.shields.io/pypi/implementation/github-agent)
40
40
 
41
- *Version: 0.2.48*
41
+ *Version: 0.2.55*
42
42
 
43
43
  ## Overview
44
44
 
@@ -8,7 +8,6 @@ github_agent/api_wrapper.py
8
8
  github_agent/auth.py
9
9
  github_agent/github_input_models.py
10
10
  github_agent/github_response_models.py
11
- github_agent/graph_config.py
12
11
  github_agent/mcp_server.py
13
12
  github_agent.egg-info/PKG-INFO
14
13
  github_agent.egg-info/SOURCES.txt
@@ -16,15 +15,14 @@ github_agent.egg-info/dependency_links.txt
16
15
  github_agent.egg-info/entry_points.txt
17
16
  github_agent.egg-info/requires.txt
18
17
  github_agent.egg-info/top_level.txt
19
- github_agent/agent_data/A2A_AGENTS.md
20
18
  github_agent/agent_data/CRON.md
21
19
  github_agent/agent_data/CRON_LOG.md
22
20
  github_agent/agent_data/HEARTBEAT.md
23
21
  github_agent/agent_data/IDENTITY.md
24
22
  github_agent/agent_data/MEMORY.md
23
+ github_agent/agent_data/NODE_AGENTS.md
25
24
  github_agent/agent_data/USER.md
26
25
  github_agent/agent_data/chats
27
26
  github_agent/agent_data/icon.png
28
27
  github_agent/agent_data/mcp_config.json
29
- github_agent/agent_data/templates.py
30
28
  scripts/validate_a2a_agent.py
@@ -1,2 +1,3 @@
1
1
  [console_scripts]
2
2
  github-agent = github_agent.agent_server:agent_server
3
+ github-mcp = github_agent.mcp_server:mcp_server
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "github-agent"
7
- version = "0.2.48"
7
+ version = "0.2.55"
8
8
  readme = "README.md"
9
9
  description = "GitHub Agent for MCP"
10
10
  requires-python = ">=3.10"
@@ -20,6 +20,7 @@ dependencies = [
20
20
  "agent-utilities[agent,logfire]>=0.2.31"]
21
21
 
22
22
  [project.scripts]
23
+ github-mcp = "github_agent.mcp_server:mcp_server"
23
24
  github-agent = "github_agent.agent_server:agent_server"
24
25
 
25
26
  [tool.setuptools.packages.find]
@@ -1,12 +0,0 @@
1
- # AGENTS.md - Known A2A Peer Agents
2
- Last updated: 2026-02-21 01:19
3
-
4
- This file is the local registry of other A2A agents this agent can discover and call.
5
-
6
- ## Registered A2A Peers
7
-
8
- | Name | Endpoint URL | Description | Capabilities | Auth | Notes / Last Connected |
9
- |-----------------|---------------------------------|--------------------------------------|----------------------------------|-----------|------------------------|
10
- | SearchMaster | http://search-agent:9000/a2a | Advanced web researcher | web_search, summarize, browse | none | 2026-02-20 |
11
-
12
- *Add new rows manually or let the agent call `register_a2a_peer(...)`.*
@@ -1,10 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "github": {
4
- "serverUrl": "https://api.githubcopilot.com/mcp/",
5
- "headers": {
6
- "Authorization": "Bearer ${GITHUB_TOKEN}"
7
- }
8
- }
9
- }
10
- }
@@ -1,118 +0,0 @@
1
- import asyncio
2
- from typing import Dict
3
- from github_agent.models import PeriodicTask
4
-
5
- # Core files we care about most
6
- CORE_FILES = {
7
- "IDENTITY": "IDENTITY.md",
8
- "USER": "USER.md",
9
- "CRON": "CRON.md",
10
- "CRON_LOG": "CRON_LOG.md",
11
- "AGENTS": "AGENTS.md",
12
- "MEMORY": "MEMORY.md",
13
- "MCP_CONFIG": "mcp_config.json",
14
- }
15
-
16
- # ============== IN-MEMORY PERIODIC SCHEDULER STATE ==============
17
- tasks: list[PeriodicTask] = []
18
- lock = asyncio.Lock()
19
-
20
- # Templates for workspace initialization
21
- TEMPLATES: Dict[str, str] = {
22
- "IDENTITY": """# IDENTITY.md - Who I Am, Core Personality, & Boundaries
23
-
24
- * **Name:** Github Agent Agent
25
- * **Role:** A research specialist agent for web search and information gathering using Github Agent.
26
- * **Emoji:** 🔍
27
- * **Vibe:** Precise, objective, concise
28
-
29
- ## System Prompt
30
- You are a Research Specialist Agent for Github Agent.
31
- You have access to a powerful metasearch engine to find information on the web.
32
- Your responsibilities:
33
- 1. Analyze the user's research topic or query.
34
- 2. Use the 'web_search' tool (or related skills) to find relevant information.
35
- 3. Synthesize the search results into a clear, concise, and well-cited answer.
36
- 4. Be objective and provide multiple perspectives if the topic is complex.
37
- 5. If initial results are insufficient, refine your search queries and try again.
38
- 6. Always include the URLs of the sources you used.
39
- 7. MEMORY: You have long-term memory in MEMORY.md. If the user says 'remember', 'recall', or mentions past interactions, read MEMORY.md to retrieve context. Save important decisions, outcomes, and user preferences to MEMORY.md using append_note_to_file.
40
- """,
41
- "USER": """# USER.md - About the Human
42
-
43
- * **Name:** User
44
- * **Preferred name:** User
45
- * **Timezone:** America/Chicago
46
- * **Location:** Chicago, Illinois
47
- * **Style:** Technical, concise, no fluff
48
- """,
49
- "CRON": """# CRON.md - Persistent Scheduled Tasks
50
- Last updated: {now}
51
-
52
- ## Active Tasks
53
-
54
- | ID | Name | Interval (min) | Prompt | Last run | Next approx |
55
- |-------------|-------------------|----------------|-------------------------------------|-------------------|-------------|
56
- | heartbeat | Heartbeat | 30 | @HEARTBEAT.md | — | — |
57
- | log-cleanup | Log Cleanup | 720 | __internal:cleanup_cron_log | — | — |
58
-
59
- *Edit this table to add/remove tasks. The agent reloads it periodically.*
60
- *Use `@filename.md` in the Prompt column to load a multi-line prompt from a workspace file.*
61
- """,
62
- "AGENTS": """# AGENTS.md - Known A2A Peer Agents
63
- Last updated: {now}
64
-
65
- This file is the local registry of other A2A agents this agent can discover and call.
66
-
67
- ## Registered A2A Peers
68
-
69
- | Name | Endpoint URL | Description | Capabilities | Auth | Notes / Last Connected |
70
- |-----------------|---------------------------------|--------------------------------------|----------------------------------|-----------|------------------------|
71
- | SearchMaster | http://search-agent:9000/a2a | Advanced web researcher | web_search, summarize, browse | none | 2026-02-20 |
72
-
73
- *Add new rows manually or let the agent call `register_a2a_peer(...)`.*
74
- """,
75
- "MEMORY": """# MEMORY.md - Long-term Memory
76
- Last updated: {now}
77
-
78
- This file stores important decisions, user preferences, and historical outcomes.
79
- The agent should read this if the user asks "remember when" or similar.
80
-
81
- ## Log of Important Events
82
- - [2026-02-21] Workspace initialized with advanced agent features.
83
- """,
84
- "mcp_config": """{
85
- "mcpServers": {}
86
- }
87
- """,
88
- "CRON_LOG": """# CRON_LOG.md - Periodic Task Output Log
89
- Last updated: {now}
90
-
91
- This file stores the output of periodic/cron tasks.
92
- The agent can read this to review what background tasks have done.
93
- Old entries are automatically pruned to keep only the most recent results.
94
-
95
- ---
96
- """,
97
- }
98
-
99
- NEW_SKILL_TEMPLATE = """---
100
- name: {name}
101
- description: {description}
102
- version: 0.1.0
103
- tags: [{tags}]
104
- input_modes: [text]
105
- output_modes: [text]
106
- ---
107
-
108
- # {name} Skill
109
-
110
- ## When to use
111
- {when_to_use}
112
-
113
- ## How to use
114
- {how_to_use}
115
-
116
- ## Examples
117
- - Example 1: ...
118
- """
@@ -1,25 +0,0 @@
1
- """GitHub graph configuration — tag prompts and env var mappings."""
2
-
3
- # ── Tag → System Prompt Mapping ──────────────────────────────────────
4
- TAG_PROMPTS: dict[str, str] = {
5
- "repos": (
6
- "You are a GitHub Repositories specialist. Help users manage and interact with Repository functionality using the available tools."
7
- ),
8
- "issues": (
9
- "You are a GitHub Issues specialist. Help users manage and interact with Issues functionality using the available tools."
10
- ),
11
- "pulls": (
12
- "You are a GitHub Pull Requests specialist. Help users manage and interact with Pull Request functionality using the available tools."
13
- ),
14
- "contents": (
15
- "You are a GitHub Contents specialist. Help users manage and interact with Repository Content (files/directories) using the available tools."
16
- ),
17
- }
18
-
19
- # ── Tag → Environment Variable Mapping ────────────────────────────────
20
- TAG_ENV_VARS: dict[str, str] = {
21
- "repos": "REPOSTOOL",
22
- "issues": "ISSUETOOL",
23
- "pulls": "PULLSTOOL",
24
- "contents": "CONTENTSTOOL",
25
- }
File without changes
File without changes