github-agent 0.2.11__tar.gz → 0.2.13__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.
- {github_agent-0.2.11 → github_agent-0.2.13}/PKG-INFO +3 -3
- {github_agent-0.2.11 → github_agent-0.2.13}/README.md +1 -1
- {github_agent-0.2.11 → github_agent-0.2.13}/github_agent/github_agent.py +19 -31
- {github_agent-0.2.11 → github_agent-0.2.13}/github_agent/utils.py +38 -15
- {github_agent-0.2.11 → github_agent-0.2.13}/github_agent.egg-info/PKG-INFO +3 -3
- {github_agent-0.2.11 → github_agent-0.2.13}/github_agent.egg-info/requires.txt +1 -1
- {github_agent-0.2.11 → github_agent-0.2.13}/pyproject.toml +2 -2
- {github_agent-0.2.11 → github_agent-0.2.13}/LICENSE +0 -0
- {github_agent-0.2.11 → github_agent-0.2.13}/github_agent/__init__.py +0 -0
- {github_agent-0.2.11 → github_agent-0.2.13}/github_agent.egg-info/SOURCES.txt +0 -0
- {github_agent-0.2.11 → github_agent-0.2.13}/github_agent.egg-info/dependency_links.txt +0 -0
- {github_agent-0.2.11 → github_agent-0.2.13}/github_agent.egg-info/entry_points.txt +0 -0
- {github_agent-0.2.11 → github_agent-0.2.13}/github_agent.egg-info/top_level.txt +0 -0
- {github_agent-0.2.11 → github_agent-0.2.13}/scripts/validate_a2a_agent.py +0 -0
- {github_agent-0.2.11 → github_agent-0.2.13}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: github-agent
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.13
|
|
4
4
|
Summary: GitHub Agent for MCP
|
|
5
5
|
Author-email: Audel Rouhi <knucklessg1@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: >=3.10
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: pydantic-ai-slim[a2a,ag-ui,anthropic,fastmcp,google,groq,huggingface,mistral,openai,web]>=1.
|
|
15
|
+
Requires-Dist: pydantic-ai-slim[a2a,ag-ui,anthropic,fastmcp,google,groq,huggingface,mistral,openai,web]>=1.60.0
|
|
16
16
|
Requires-Dist: pydantic-ai-skills>=v0.4.0
|
|
17
17
|
Requires-Dist: fastapi>=0.128.0
|
|
18
18
|
Requires-Dist: fastmcp
|
|
@@ -43,7 +43,7 @@ Dynamic: license-file
|
|
|
43
43
|

|
|
44
44
|

|
|
45
45
|
|
|
46
|
-
*Version: 0.2.
|
|
46
|
+
*Version: 0.2.13*
|
|
47
47
|
|
|
48
48
|
## Overview
|
|
49
49
|
|
|
@@ -39,7 +39,7 @@ from pydantic import ValidationError
|
|
|
39
39
|
from pydantic_ai.ui import SSE_CONTENT_TYPE
|
|
40
40
|
from pydantic_ai.ui.ag_ui import AGUIAdapter
|
|
41
41
|
|
|
42
|
-
__version__ = "0.2.
|
|
42
|
+
__version__ = "0.2.13"
|
|
43
43
|
|
|
44
44
|
logging.basicConfig(
|
|
45
45
|
level=logging.INFO,
|
|
@@ -363,7 +363,9 @@ def create_agent(
|
|
|
363
363
|
),
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
+
supervisor_skills = []
|
|
366
367
|
child_agents = {}
|
|
368
|
+
supervisor_skills_directories = [get_skills_path()]
|
|
367
369
|
|
|
368
370
|
for tag, (system_prompt, agent_name) in agent_defs.items():
|
|
369
371
|
tag_toolsets = []
|
|
@@ -381,21 +383,24 @@ def create_agent(
|
|
|
381
383
|
# Load specific skills for this tag
|
|
382
384
|
skill_dir_name = f"github-{tag.replace('_', '-')}"
|
|
383
385
|
|
|
386
|
+
child_skills_directories = []
|
|
387
|
+
|
|
384
388
|
# Check custom skills directory
|
|
385
389
|
if custom_skills_directory:
|
|
386
390
|
skill_dir_path = os.path.join(custom_skills_directory, skill_dir_name)
|
|
387
391
|
if os.path.exists(skill_dir_path):
|
|
388
|
-
|
|
389
|
-
logger.info(
|
|
390
|
-
f"Loaded specialized skills for {tag} from {skill_dir_path}"
|
|
391
|
-
)
|
|
392
|
+
child_skills_directories.append(skill_dir_path)
|
|
392
393
|
|
|
393
394
|
# Check default skills directory
|
|
394
395
|
default_skill_path = os.path.join(get_skills_path(), skill_dir_name)
|
|
395
396
|
if os.path.exists(default_skill_path):
|
|
396
|
-
|
|
397
|
+
child_skills_directories.append(default_skill_path)
|
|
398
|
+
|
|
399
|
+
if child_skills_directories:
|
|
400
|
+
ts = SkillsToolset(directories=child_skills_directories)
|
|
401
|
+
tag_toolsets.append(ts)
|
|
397
402
|
logger.info(
|
|
398
|
-
f"Loaded specialized skills for {tag} from {
|
|
403
|
+
f"Loaded specialized skills for {tag} from {child_skills_directories}"
|
|
399
404
|
)
|
|
400
405
|
|
|
401
406
|
# Collect tool names for logging
|
|
@@ -434,11 +439,17 @@ def create_agent(
|
|
|
434
439
|
)
|
|
435
440
|
child_agents[tag] = agent
|
|
436
441
|
|
|
442
|
+
if custom_skills_directory:
|
|
443
|
+
supervisor_skills_directories.append(custom_skills_directory)
|
|
444
|
+
supervisor_skills.append(SkillsToolset(directories=supervisor_skills_directories))
|
|
445
|
+
logger.info(f"Loaded supervisor skills from: {supervisor_skills_directories}")
|
|
446
|
+
|
|
437
447
|
supervisor = Agent(
|
|
438
448
|
name=AGENT_NAME,
|
|
439
449
|
system_prompt=SUPERVISOR_SYSTEM_PROMPT,
|
|
440
450
|
model=model,
|
|
441
451
|
model_settings=settings,
|
|
452
|
+
toolsets=supervisor_skills,
|
|
442
453
|
deps_type=Any,
|
|
443
454
|
)
|
|
444
455
|
|
|
@@ -901,7 +912,7 @@ def agent_server():
|
|
|
901
912
|
|
|
902
913
|
if hasattr(args, "help") and args.help:
|
|
903
914
|
|
|
904
|
-
|
|
915
|
+
parser.print_help()
|
|
905
916
|
|
|
906
917
|
sys.exit(0)
|
|
907
918
|
|
|
@@ -938,28 +949,5 @@ def agent_server():
|
|
|
938
949
|
)
|
|
939
950
|
|
|
940
951
|
|
|
941
|
-
def usage():
|
|
942
|
-
print(
|
|
943
|
-
f"Github Agent ({__version__}): CLI Tool\n\n"
|
|
944
|
-
"Usage:\n"
|
|
945
|
-
"--host [ Host to bind the server to ]\n"
|
|
946
|
-
"--port [ Port to bind the server to ]\n"
|
|
947
|
-
"--debug [ Debug mode ]\n"
|
|
948
|
-
"--reload [ Enable auto-reload ]\n"
|
|
949
|
-
"--provider [ LLM Provider ]\n"
|
|
950
|
-
"--model-id [ LLM Model ID ]\n"
|
|
951
|
-
"--base-url [ LLM Base URL (for OpenAI compatible providers) ]\n"
|
|
952
|
-
"--api-key [ LLM API Key ]\n"
|
|
953
|
-
"--mcp-url [ MCP Server URL ]\n"
|
|
954
|
-
"--mcp-config [ MCP Server Config ]\n"
|
|
955
|
-
"--custom-skills-directory [ Directory containing additional custom agent skills ]\n"
|
|
956
|
-
"--web [ Enable Pydantic AI Web UI ]\n"
|
|
957
|
-
"\n"
|
|
958
|
-
"Examples:\n"
|
|
959
|
-
" [Simple] github-agent \n"
|
|
960
|
-
' [Complex] github-agent --host "value" --port "value" --debug "value" --reload --provider "value" --model-id "value" --base-url "value" --api-key "value" --mcp-url "value" --mcp-config "value" --custom-skills-directory "value" --web\n'
|
|
961
|
-
)
|
|
962
|
-
|
|
963
|
-
|
|
964
952
|
if __name__ == "__main__":
|
|
965
953
|
agent_server()
|
|
@@ -2,9 +2,22 @@
|
|
|
2
2
|
# coding: utf-8
|
|
3
3
|
|
|
4
4
|
import os
|
|
5
|
+
import httpx
|
|
6
|
+
import pickle
|
|
7
|
+
import yaml
|
|
8
|
+
import logging
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from typing import Union, List, Any, Optional
|
|
11
|
+
import json
|
|
12
|
+
from importlib.resources import files, as_file
|
|
13
|
+
from pydantic_ai.models.openai import OpenAIChatModel
|
|
14
|
+
from pydantic_ai.models.google import GoogleModel
|
|
15
|
+
from pydantic_ai.models.huggingface import HuggingFaceModel
|
|
16
|
+
from pydantic_ai.models.groq import GroqModel
|
|
17
|
+
from pydantic_ai.models.mistral import MistralModel
|
|
18
|
+
from fasta2a import Skill
|
|
5
19
|
|
|
6
20
|
try:
|
|
7
|
-
|
|
8
21
|
from openai import AsyncOpenAI
|
|
9
22
|
from pydantic_ai.providers.openai import OpenAIProvider
|
|
10
23
|
except ImportError:
|
|
@@ -26,26 +39,16 @@ except ImportError:
|
|
|
26
39
|
MistralProvider = None
|
|
27
40
|
|
|
28
41
|
try:
|
|
42
|
+
from pydantic_ai.models.anthropic import AnthropicModel
|
|
29
43
|
from anthropic import AsyncAnthropic
|
|
30
44
|
from pydantic_ai.providers.anthropic import AnthropicProvider
|
|
31
45
|
except ImportError:
|
|
46
|
+
AnthropicModel = None
|
|
32
47
|
AsyncAnthropic = None
|
|
33
48
|
AnthropicProvider = None
|
|
34
49
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
import yaml
|
|
38
|
-
from pathlib import Path
|
|
39
|
-
from typing import Any, Union, List, Optional
|
|
40
|
-
import json
|
|
41
|
-
from importlib.resources import files, as_file
|
|
42
|
-
from pydantic_ai.models.openai import OpenAIChatModel
|
|
43
|
-
from pydantic_ai.models.anthropic import AnthropicModel
|
|
44
|
-
from pydantic_ai.models.google import GoogleModel
|
|
45
|
-
from pydantic_ai.models.huggingface import HuggingFaceModel
|
|
46
|
-
from pydantic_ai.models.groq import GroqModel
|
|
47
|
-
from pydantic_ai.models.mistral import MistralModel
|
|
48
|
-
from pydantic_ai_skills import Skill
|
|
50
|
+
|
|
51
|
+
logger = logging.getLogger(__name__)
|
|
49
52
|
|
|
50
53
|
|
|
51
54
|
def to_integer(string: Union[str, int] = None) -> int:
|
|
@@ -163,6 +166,9 @@ def load_model(file: str) -> Any:
|
|
|
163
166
|
def retrieve_package_name() -> str:
|
|
164
167
|
"""
|
|
165
168
|
Returns the top-level package name of the module that imported this utils.py.
|
|
169
|
+
|
|
170
|
+
Works reliably when utils.py is inside a proper package (with __init__.py or
|
|
171
|
+
implicit namespace package) and the caller does normal imports.
|
|
166
172
|
"""
|
|
167
173
|
if __package__:
|
|
168
174
|
top = __package__.partition(".")[0]
|
|
@@ -363,6 +369,16 @@ def create_model(
|
|
|
363
369
|
def extract_tool_tags(tool_def: Any) -> List[str]:
|
|
364
370
|
"""
|
|
365
371
|
Extracts tags from a tool definition object.
|
|
372
|
+
|
|
373
|
+
Found structure in debug:
|
|
374
|
+
tool_def.name (str)
|
|
375
|
+
tool_def.meta (dict) -> {'fastmcp': {'tags': ['tag']}}
|
|
376
|
+
|
|
377
|
+
This function checks multiple paths to be robust:
|
|
378
|
+
1. tool_def.meta['fastmcp']['tags']
|
|
379
|
+
2. tool_def.meta['tags']
|
|
380
|
+
3. tool_def.metadata['tags'] (legacy/alternative wrapper)
|
|
381
|
+
4. tool_def.metadata.get('meta')... (nested path)
|
|
366
382
|
"""
|
|
367
383
|
tags_list = []
|
|
368
384
|
|
|
@@ -409,3 +425,10 @@ def tool_in_tag(tool_def: Any, tag: str) -> bool:
|
|
|
409
425
|
return True
|
|
410
426
|
else:
|
|
411
427
|
return False
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
def filter_tools_by_tag(tools: List[Any], tag: str) -> List[Any]:
|
|
431
|
+
"""
|
|
432
|
+
Filters a list of tools for a given tag.
|
|
433
|
+
"""
|
|
434
|
+
return [t for t in tools if tool_in_tag(t, tag)]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: github-agent
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.13
|
|
4
4
|
Summary: GitHub Agent for MCP
|
|
5
5
|
Author-email: Audel Rouhi <knucklessg1@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: >=3.10
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: pydantic-ai-slim[a2a,ag-ui,anthropic,fastmcp,google,groq,huggingface,mistral,openai,web]>=1.
|
|
15
|
+
Requires-Dist: pydantic-ai-slim[a2a,ag-ui,anthropic,fastmcp,google,groq,huggingface,mistral,openai,web]>=1.60.0
|
|
16
16
|
Requires-Dist: pydantic-ai-skills>=v0.4.0
|
|
17
17
|
Requires-Dist: fastapi>=0.128.0
|
|
18
18
|
Requires-Dist: fastmcp
|
|
@@ -43,7 +43,7 @@ Dynamic: license-file
|
|
|
43
43
|

|
|
44
44
|

|
|
45
45
|
|
|
46
|
-
*Version: 0.2.
|
|
46
|
+
*Version: 0.2.13*
|
|
47
47
|
|
|
48
48
|
## Overview
|
|
49
49
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "github-agent"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.13"
|
|
8
8
|
readme = "README.md"
|
|
9
9
|
description = "GitHub Agent for MCP"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -18,7 +18,7 @@ classifiers = [
|
|
|
18
18
|
"Programming Language :: Python :: 3",
|
|
19
19
|
]
|
|
20
20
|
dependencies = [
|
|
21
|
-
"pydantic-ai-slim[fastmcp,openai,anthropic,
|
|
21
|
+
"pydantic-ai-slim[fastmcp,openai,groq,anthropic,mistral,google,huggingface,a2a,ag-ui,web]>=1.60.0",
|
|
22
22
|
"pydantic-ai-skills>=v0.4.0",
|
|
23
23
|
"fastapi>=0.128.0",
|
|
24
24
|
"fastmcp",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|