fastmcp-agents-library-agent-github 0.5.1__tar.gz → 0.5.5__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.
- {fastmcp_agents_library_agent_github-0.5.1 → fastmcp_agents_library_agent_github-0.5.5}/PKG-INFO +5 -3
- {fastmcp_agents_library_agent_github-0.5.1 → fastmcp_agents_library_agent_github-0.5.5}/pyproject.toml +8 -11
- {fastmcp_agents_library_agent_github-0.5.1 → fastmcp_agents_library_agent_github-0.5.5/src}/fastmcp_agents/library/agent/github/gather_background.py +5 -0
- {fastmcp_agents_library_agent_github-0.5.1 → fastmcp_agents_library_agent_github-0.5.5/src}/fastmcp_agents/library/agent/github/investigate_issue.py +5 -0
- fastmcp_agents_library_agent_github-0.5.1/.gitignore +0 -183
- fastmcp_agents_library_agent_github-0.5.1/fastmcp_agents/library/agent/github/agents.py.disabled +0 -22
- fastmcp_agents_library_agent_github-0.5.1/fastmcp_agents/library/agent/github/issue_triage.py.disabled +0 -191
- {fastmcp_agents_library_agent_github-0.5.1 → fastmcp_agents_library_agent_github-0.5.5}/README.md +0 -0
- {fastmcp_agents_library_agent_github-0.5.1 → fastmcp_agents_library_agent_github-0.5.5/src}/fastmcp_agents/library/agent/github/__init__.py +0 -0
- {fastmcp_agents_library_agent_github-0.5.1 → fastmcp_agents_library_agent_github-0.5.5/src}/fastmcp_agents/library/agent/github/respond_to_issue.py +0 -0
- {fastmcp_agents_library_agent_github-0.5.1 → fastmcp_agents_library_agent_github-0.5.5/src}/fastmcp_agents/library/agent/github/shared/git.py +0 -0
- {fastmcp_agents_library_agent_github-0.5.1 → fastmcp_agents_library_agent_github-0.5.5/src}/fastmcp_agents/library/agent/github/shared/helpers.py +0 -0
- {fastmcp_agents_library_agent_github-0.5.1 → fastmcp_agents_library_agent_github-0.5.5/src}/fastmcp_agents/library/agent/github/shared/logging.py +0 -0
- {fastmcp_agents_library_agent_github-0.5.1 → fastmcp_agents_library_agent_github-0.5.5/src}/fastmcp_agents/library/agent/github/shared/mcp.py +0 -0
- {fastmcp_agents_library_agent_github-0.5.1 → fastmcp_agents_library_agent_github-0.5.5/src}/fastmcp_agents/library/agent/github/shared/prompts.py +0 -0
{fastmcp_agents_library_agent_github-0.5.1 → fastmcp_agents_library_agent_github-0.5.5}/PKG-INFO
RENAMED
@@ -1,10 +1,12 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: fastmcp-agents-library-agent-github
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.5
|
4
4
|
Summary: Agents for GitHub
|
5
|
-
Requires-Python: >=3.13
|
6
5
|
Requires-Dist: asyncstdlib>=3.13.1
|
7
6
|
Requires-Dist: fastmcp-agents-library-agent-simple-code
|
8
7
|
Requires-Dist: fastmcp-agents-library-mcp
|
9
8
|
Requires-Dist: fastmcp-ai-agent-bridge-pydantic-ai>=0.1.2
|
10
9
|
Requires-Dist: gitpython>=3.1.44
|
10
|
+
Requires-Python: >=3.13
|
11
|
+
Description-Content-Type: text/markdown
|
12
|
+
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "fastmcp-agents-library-agent-github"
|
3
|
-
version = "0.5.
|
3
|
+
version = "0.5.5"
|
4
4
|
description = "Agents for GitHub"
|
5
5
|
readme = "README.md"
|
6
6
|
requires-python = ">=3.13"
|
@@ -14,8 +14,8 @@ dependencies = [
|
|
14
14
|
]
|
15
15
|
|
16
16
|
[project.scripts]
|
17
|
-
github-issue
|
18
|
-
github-gather-background = "fastmcp_agents.library.agent.github.gather_background:
|
17
|
+
github-investigate-issue = "fastmcp_agents.library.agent.github.investigate_issue:run"
|
18
|
+
github-gather-background = "fastmcp_agents.library.agent.github.gather_background:run"
|
19
19
|
|
20
20
|
[dependency-groups]
|
21
21
|
dev = [
|
@@ -28,10 +28,6 @@ dev = [
|
|
28
28
|
fastmcp-agents-library-agent-simple-code = { workspace = true }
|
29
29
|
fastmcp-agents-library-mcp = { workspace = true }
|
30
30
|
|
31
|
-
[build-system]
|
32
|
-
requires = ["hatchling"]
|
33
|
-
build-backend = "hatchling.build"
|
34
|
-
|
35
31
|
[tool.pytest.ini_options]
|
36
32
|
markers = [
|
37
33
|
"skip_on_ci: Skip running the test when running on CI",
|
@@ -41,11 +37,12 @@ ignore = ["./playground"]
|
|
41
37
|
addopts = "-s"
|
42
38
|
env_files = [".env"]
|
43
39
|
|
44
|
-
[
|
45
|
-
|
40
|
+
[build-system]
|
41
|
+
requires = ["uv_build>=0.8.2,<0.9.0"]
|
42
|
+
build-backend = "uv_build"
|
46
43
|
|
47
|
-
[tool.
|
48
|
-
|
44
|
+
[tool.uv.build-backend]
|
45
|
+
module-name = "fastmcp_agents.library.agent.github"
|
49
46
|
|
50
47
|
[tool.ruff]
|
51
48
|
extend="../../../pyproject.toml"
|
@@ -1,183 +0,0 @@
|
|
1
|
-
# Byte-compiled / optimized / DLL files
|
2
|
-
__pycache__/
|
3
|
-
*.py[cod]
|
4
|
-
*$py.class
|
5
|
-
|
6
|
-
# C extensions
|
7
|
-
*.so
|
8
|
-
|
9
|
-
# Distribution / packaging
|
10
|
-
.Python
|
11
|
-
build/
|
12
|
-
develop-eggs/
|
13
|
-
dist/
|
14
|
-
downloads/
|
15
|
-
eggs/
|
16
|
-
.eggs/
|
17
|
-
lib/
|
18
|
-
lib64/
|
19
|
-
parts/
|
20
|
-
sdist/
|
21
|
-
var/
|
22
|
-
wheels/
|
23
|
-
share/python-wheels/
|
24
|
-
*.egg-info/
|
25
|
-
.installed.cfg
|
26
|
-
*.egg
|
27
|
-
MANIFEST
|
28
|
-
|
29
|
-
# PyInstaller
|
30
|
-
# Usually these files are written by a python script from a template
|
31
|
-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
32
|
-
*.manifest
|
33
|
-
*.spec
|
34
|
-
|
35
|
-
# Installer logs
|
36
|
-
pip-log.txt
|
37
|
-
pip-delete-this-directory.txt
|
38
|
-
|
39
|
-
# Unit test / coverage reports
|
40
|
-
htmlcov/
|
41
|
-
.tox/
|
42
|
-
.nox/
|
43
|
-
.coverage
|
44
|
-
.coverage.*
|
45
|
-
.cache
|
46
|
-
nosetests.xml
|
47
|
-
coverage.xml
|
48
|
-
*.cover
|
49
|
-
*.py,cover
|
50
|
-
.hypothesis/
|
51
|
-
.pytest_cache/
|
52
|
-
cover/
|
53
|
-
|
54
|
-
# Translations
|
55
|
-
*.mo
|
56
|
-
*.pot
|
57
|
-
|
58
|
-
# Django stuff:
|
59
|
-
*.log
|
60
|
-
local_settings.py
|
61
|
-
db.sqlite3
|
62
|
-
db.sqlite3-journal
|
63
|
-
|
64
|
-
# Flask stuff:
|
65
|
-
instance/
|
66
|
-
.webassets-cache
|
67
|
-
|
68
|
-
# Scrapy stuff:
|
69
|
-
.scrapy
|
70
|
-
|
71
|
-
# Sphinx documentation
|
72
|
-
docs/_build/
|
73
|
-
|
74
|
-
# PyBuilder
|
75
|
-
.pybuilder/
|
76
|
-
target/
|
77
|
-
|
78
|
-
# Jupyter Notebook
|
79
|
-
.ipynb_checkpoints
|
80
|
-
|
81
|
-
# IPython
|
82
|
-
profile_default/
|
83
|
-
ipython_config.py
|
84
|
-
|
85
|
-
# pyenv
|
86
|
-
# For a library or package, you might want to ignore these files since the code is
|
87
|
-
# intended to run in multiple environments; otherwise, check them in:
|
88
|
-
# .python-version
|
89
|
-
|
90
|
-
# pipenv
|
91
|
-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
92
|
-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
93
|
-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
94
|
-
# install all needed dependencies.
|
95
|
-
#Pipfile.lock
|
96
|
-
|
97
|
-
# UV
|
98
|
-
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
99
|
-
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
100
|
-
# commonly ignored for libraries.
|
101
|
-
#uv.lock
|
102
|
-
|
103
|
-
# poetry
|
104
|
-
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
105
|
-
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
106
|
-
# commonly ignored for libraries.
|
107
|
-
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
108
|
-
#poetry.lock
|
109
|
-
|
110
|
-
# pdm
|
111
|
-
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
112
|
-
#pdm.lock
|
113
|
-
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
114
|
-
# in version control.
|
115
|
-
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
116
|
-
.pdm.toml
|
117
|
-
.pdm-python
|
118
|
-
.pdm-build/
|
119
|
-
|
120
|
-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
121
|
-
__pypackages__/
|
122
|
-
|
123
|
-
# Celery stuff
|
124
|
-
celerybeat-schedule
|
125
|
-
celerybeat.pid
|
126
|
-
|
127
|
-
# SageMath parsed files
|
128
|
-
*.sage.py
|
129
|
-
|
130
|
-
# Environments
|
131
|
-
.env
|
132
|
-
.env.*
|
133
|
-
.venv
|
134
|
-
env/
|
135
|
-
venv/
|
136
|
-
ENV/
|
137
|
-
env.bak/
|
138
|
-
venv.bak/
|
139
|
-
|
140
|
-
# Spyder project settings
|
141
|
-
.spyderproject
|
142
|
-
.spyproject
|
143
|
-
|
144
|
-
# Rope project settings
|
145
|
-
.ropeproject
|
146
|
-
|
147
|
-
# mkdocs documentation
|
148
|
-
/site
|
149
|
-
|
150
|
-
# mypy
|
151
|
-
.mypy_cache/
|
152
|
-
.dmypy.json
|
153
|
-
dmypy.json
|
154
|
-
|
155
|
-
# Pyre type checker
|
156
|
-
.pyre/
|
157
|
-
|
158
|
-
# pytype static type analyzer
|
159
|
-
.pytype/
|
160
|
-
|
161
|
-
# Cython debug symbols
|
162
|
-
cython_debug/
|
163
|
-
|
164
|
-
# PyCharm
|
165
|
-
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
166
|
-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
167
|
-
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
168
|
-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
169
|
-
#.idea/
|
170
|
-
|
171
|
-
# Ruff stuff:
|
172
|
-
.ruff_cache/
|
173
|
-
|
174
|
-
# PyPI configuration file
|
175
|
-
.pypirc
|
176
|
-
secrets
|
177
|
-
|
178
|
-
prompt_suggestions
|
179
|
-
agent-working-dir
|
180
|
-
|
181
|
-
**/*.bak
|
182
|
-
|
183
|
-
storage
|
fastmcp_agents_library_agent_github-0.5.1/fastmcp_agents/library/agent/github/agents.py.disabled
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
This agent is used to triage issues on a GitHub repository.
|
3
|
-
"""
|
4
|
-
|
5
|
-
from fastmcp_agents.core.models.server_builder import FastMCPAgents
|
6
|
-
from fastmcp_agents.library.agent.github.issue_triage import GithubIssueTriageAgent
|
7
|
-
from fastmcp_agents.library.agent.github.shared.mcp import github_mcp_server
|
8
|
-
|
9
|
-
mcp_servers = {
|
10
|
-
"github": github_mcp_server,
|
11
|
-
}
|
12
|
-
|
13
|
-
|
14
|
-
server = FastMCPAgents(
|
15
|
-
name="triage-github-issue",
|
16
|
-
mcp=mcp_servers,
|
17
|
-
agents=[GithubIssueTriageAgent()],
|
18
|
-
).to_server()
|
19
|
-
|
20
|
-
|
21
|
-
if __name__ == "__main__":
|
22
|
-
server.run(transport="sse")
|
@@ -1,191 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
This agent is used to triage issues on a GitHub repository.
|
3
|
-
"""
|
4
|
-
|
5
|
-
from fastmcp import Context
|
6
|
-
from fastmcp.client.client import CallToolResult, Client
|
7
|
-
from fastmcp.client.transports import FastMCPTransport
|
8
|
-
|
9
|
-
from fastmcp_agents.core.agents.task import TaskAgent
|
10
|
-
from fastmcp_agents.core.models.server_builder import FastMCPAgents
|
11
|
-
from fastmcp_agents.library.agent.github.shared.git import quick_clone_github_repo
|
12
|
-
from fastmcp_agents.library.agent.github.shared.helpers import generate_background, get_issue_background
|
13
|
-
from fastmcp_agents.library.agent.github.shared.mcp import github_mcp_server
|
14
|
-
from fastmcp_agents.library.agent.simple_code.investigate import server_builder as code_investigate_server_builder
|
15
|
-
|
16
|
-
issue_triage_instructions = """
|
17
|
-
## Persona & Goal:
|
18
|
-
You are an expert software investigator and debugger. Your primary mission is to perform a deep, methodical analysis of issues by
|
19
|
-
understanding the exact code paths, conditions, and edge cases that lead to the bug.
|
20
|
-
|
21
|
-
{mindset_instructions}
|
22
|
-
{confidence_levels}
|
23
|
-
{section_guidelines}
|
24
|
-
|
25
|
-
## Analysis Process:
|
26
|
-
1. Initial Code Investigation
|
27
|
-
- Use the code agent to examine the relevant code files
|
28
|
-
- Look for the specific code mentioned in the issue
|
29
|
-
- Identify related code paths and dependencies
|
30
|
-
- Document the exact code structure and patterns
|
31
|
-
- Document your thought process as you examine the code
|
32
|
-
|
33
|
-
2. Behavior Hypothesis
|
34
|
-
- Formulate hypotheses about the intended behavior
|
35
|
-
- Consider mathematical correctness (e.g., division by zero is undefined)
|
36
|
-
- Consider user experience expectations
|
37
|
-
- Consider programming language conventions
|
38
|
-
- Document your reasoning for each hypothesis
|
39
|
-
- Evaluate each hypothesis against the code
|
40
|
-
|
41
|
-
3. Issue Context Analysis
|
42
|
-
- Extract key terms and patterns from the code investigation
|
43
|
-
- Use these terms to search for related issues
|
44
|
-
- Look for similar error handling patterns
|
45
|
-
- Identify broader patterns in the codebase
|
46
|
-
- Document how these findings affect your hypotheses
|
47
|
-
|
48
|
-
4. Test Analysis
|
49
|
-
- Examine test files to understand current error handling
|
50
|
-
- Look for similar test cases
|
51
|
-
- Identify gaps in test coverage
|
52
|
-
- Document existing error handling patterns
|
53
|
-
- Evaluate if tests align with your hypotheses
|
54
|
-
|
55
|
-
5. Related Issues Search
|
56
|
-
- Use specific terms from code investigation
|
57
|
-
- Search for similar error patterns
|
58
|
-
- Look for related documentation issues
|
59
|
-
- Consider feature requests that might be impacted
|
60
|
-
- Document any found relationships with confidence levels
|
61
|
-
- Use expandable sections for low confidence relationships
|
62
|
-
- Consider how related issues affect your hypotheses
|
63
|
-
- List recent issues in the repository to catch related issues that might not match search terms
|
64
|
-
- Review issue titles and bodies for semantic relationships
|
65
|
-
- Look for patterns in how issues are reported and handled
|
66
|
-
- Consider both open and recently closed issues for context
|
67
|
-
|
68
|
-
**Desired Outcome:** Produce a comprehensive analysis posted as a comment on GitHub issue `$github_issue_number`. This analysis must:
|
69
|
-
* Begin with a clear code investigation summary
|
70
|
-
* Present your hypotheses about the intended behavior
|
71
|
-
* Document your thought process and reasoning
|
72
|
-
* Explain why you believe each hypothesis is correct or incorrect
|
73
|
-
* Document exact conditions that trigger the behavior
|
74
|
-
* Include a proposed test case that verifies the correct behavior
|
75
|
-
* Explain why the behavior occurs at a code level
|
76
|
-
* Reference specific lines of code and their behavior
|
77
|
-
* Include a section on related issues found during the search
|
78
|
-
* Use specific terms from the code investigation in the analysis
|
79
|
-
* Conclude with a clear recommendation about whether this is a bug or expected behavior
|
80
|
-
"""
|
81
|
-
|
82
|
-
|
83
|
-
mcp_servers = {
|
84
|
-
"github": github_mcp_server,
|
85
|
-
}
|
86
|
-
|
87
|
-
|
88
|
-
def triage_issue(
|
89
|
-
issue_repository_owner: str,
|
90
|
-
issue_repository: str,
|
91
|
-
issue_number: int,
|
92
|
-
code_repository_owner: str | None = None,
|
93
|
-
code_repository: str | None = None,
|
94
|
-
):
|
95
|
-
"""Triage a GitHub issue."""
|
96
|
-
|
97
|
-
if code_repository_owner is None or code_repository is None:
|
98
|
-
code_repository_owner = issue_repository_owner
|
99
|
-
code_repository = issue_repository
|
100
|
-
|
101
|
-
|
102
|
-
class GithubIssueTriageAgent(TaskAgent):
|
103
|
-
"""An agent that can triage GitHub issues."""
|
104
|
-
|
105
|
-
name: str = "triage_github_issue"
|
106
|
-
|
107
|
-
instructions: str | None = issue_triage_instructions
|
108
|
-
|
109
|
-
async def __call__(
|
110
|
-
self,
|
111
|
-
ctx: Context,
|
112
|
-
issue_repository_owner: str,
|
113
|
-
issue_repository: str,
|
114
|
-
issue_number: int,
|
115
|
-
code_repository_owner: str | None = None,
|
116
|
-
code_repository: str | None = None,
|
117
|
-
):
|
118
|
-
"""Triage a GitHub issue."""
|
119
|
-
|
120
|
-
if code_repository_owner is None or code_repository is None:
|
121
|
-
code_repository_owner = issue_repository_owner
|
122
|
-
code_repository = issue_repository
|
123
|
-
|
124
|
-
issue_content, comments_content, related_issues_content = await get_issue_background(
|
125
|
-
ctx,
|
126
|
-
issue_repository_owner,
|
127
|
-
issue_repository,
|
128
|
-
issue_number,
|
129
|
-
)
|
130
|
-
|
131
|
-
background: str = generate_background(issue_content, comments_content)
|
132
|
-
|
133
|
-
code_agent_task = """
|
134
|
-
We are investigating the code base for the repository {code_repository_owner}/{code_repository}.
|
135
|
-
|
136
|
-
{background}
|
137
|
-
|
138
|
-
The codebase has been cloned to the following path: `{repo_path}`
|
139
|
-
|
140
|
-
Please investigate the codebase to understand the issue and formulate a detailed analysis of the issue.
|
141
|
-
|
142
|
-
Please provide your analysis as a single markdown block.
|
143
|
-
"""
|
144
|
-
|
145
|
-
with quick_clone_github_repo(code_repository_owner, code_repository) as repo_path:
|
146
|
-
code_agent_server = code_investigate_server_builder(root_directory=repo_path)
|
147
|
-
code_agent_client = Client[FastMCPTransport](transport=code_agent_server)
|
148
|
-
|
149
|
-
async with code_agent_client:
|
150
|
-
code_agent_response: CallToolResult = await code_agent_client.call_tool(
|
151
|
-
"ask_issue_background",
|
152
|
-
arguments={
|
153
|
-
"task": code_agent_task.format(
|
154
|
-
code_repository_owner=code_repository_owner,
|
155
|
-
code_repository=code_repository,
|
156
|
-
background=background,
|
157
|
-
repo_path=repo_path,
|
158
|
-
),
|
159
|
-
},
|
160
|
-
)
|
161
|
-
|
162
|
-
github_agent_task = """
|
163
|
-
Background:
|
164
|
-
```markdown
|
165
|
-
{background}
|
166
|
-
```
|
167
|
-
|
168
|
-
We've identified the following potential related issues:
|
169
|
-
```markdown
|
170
|
-
{github_related_issues}
|
171
|
-
```
|
172
|
-
|
173
|
-
We have dispatched a code agent to investigate the codebase related to the issue. They have provided the following analysis:
|
174
|
-
|
175
|
-
```markdown
|
176
|
-
{code_agent_response}
|
177
|
-
```
|
178
|
-
|
179
|
-
Please formulate a detailed response that can be posted as a comment on the issue.
|
180
|
-
"""
|
181
|
-
|
182
|
-
|
183
|
-
server = FastMCPAgents(
|
184
|
-
name="triage-github-issue",
|
185
|
-
mcp=mcp_servers,
|
186
|
-
agents=[GithubIssueTriageAgent()],
|
187
|
-
).to_server()
|
188
|
-
|
189
|
-
|
190
|
-
if __name__ == "__main__":
|
191
|
-
server.run(transport="sse")
|
{fastmcp_agents_library_agent_github-0.5.1 → fastmcp_agents_library_agent_github-0.5.5}/README.md
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|