github-agent 2.3.1__py3-none-any.whl → 2.4.1__py3-none-any.whl

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/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.3.1"
1
+ __version__ = "2.4.1"
@@ -2,8 +2,7 @@
2
2
  "_comment": "Tier-1 mcp_tool source presets for github-agent (AU-KG.ingest.mcp-tool-connector). Syncs GitHub repositories into the KG as repository documents via the github-agent MCP server. Contributed presets win over the central MCP_TOOL_PRESETS. Extend with pull-request / issue presets as needed.",
3
3
  "github-repositories": {
4
4
  "server": "github-mcp",
5
- "tool": "github_repos",
6
- "action": "list",
5
+ "tool": "github_get_repositories",
7
6
  "records_path": "data",
8
7
  "id_field": "id",
9
8
  "title_field": "full_name",
@@ -1,8 +1,8 @@
1
1
  {
2
- "algorithm": "agent-connector-sdk:mcp-tool-schema-compat:v1",
2
+ "algorithm": "agent-connector-sdk:mcp-tool-contract-compat:v2",
3
3
  "connector": "github-agent",
4
4
  "schema_version": "1",
5
5
  "tools": {
6
- "github_repos": "125cd86b75abcb9a0ac47575ffbdda660260ded083695f69fe9725b3858cd46f"
6
+ "github_get_repositories": "ec6c06fe206534df752bc4035d4cf81c952d448441a7e9271b800175357c3360"
7
7
  }
8
8
  }
@@ -39,7 +39,7 @@ from github_agent.auth import (
39
39
  )
40
40
  from github_agent.github_response_models import PagesAlreadyEnabled, PagesNotEnabled
41
41
 
42
- __version__ = "2.3.1"
42
+ __version__ = "2.4.1"
43
43
  logger = get_logger("GithubMCPServer")
44
44
  logger.setLevel(logging.INFO)
45
45
 
@@ -3643,7 +3643,14 @@ TOOL_REGISTRY = [
3643
3643
  ]
3644
3644
 
3645
3645
 
3646
- def get_mcp_instance() -> tuple[Any, Any, Any, Any, Any]:
3646
+ def get_mcp_instance(
3647
+ *, action_dispatch: bool = False
3648
+ ) -> tuple[Any, Any, Any, Any, Any]:
3649
+ """Build the server: one tool per GitHub API operation.
3650
+
3651
+ ``action_dispatch=True`` also keeps the condensed ``github_<domain>`` action
3652
+ tools, a compatibility mode that is off by default.
3653
+ """
3647
3654
  load_config()
3648
3655
  args, mcp, middlewares = create_mcp_server(
3649
3656
  name="Github MCP",
@@ -3657,6 +3664,7 @@ def get_mcp_instance() -> tuple[Any, Any, Any, Any, Any]:
3657
3664
  get_client=get_client,
3658
3665
  service="github-agent",
3659
3666
  tool_registry=TOOL_REGISTRY,
3667
+ action_dispatch=action_dispatch,
3660
3668
  )
3661
3669
 
3662
3670
  for mw in middlewares:
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "api_version": "arbora.io/v1",
3
3
  "artifacts": {
4
- "connector_manifest.yml": "6623b7cb91f43491ee013b45588c98a5dddd975568469541b5e81a3393448c6d",
5
- "github_agent/connectors/mcp_source_presets.json": "907153ae71c042156cc521d11d57a8517fd1a332b9cc7738245f2cd57ac3d964",
6
- "github_agent/connectors/tool_schema_fingerprints.json": "a91f112bdc54280ccfefe4d475ad51848b94ef668cb6dedaed20ec1404168609",
4
+ "connector_manifest.yml": "412bbd8242cdac75754d89b9cc1fa81cec7c2f70e2b29f822eca336b1f725f25",
5
+ "github_agent/connectors/mcp_source_presets.json": "312ec35c48d40253afcd8dba445afee9f41b5ac910e11a435d7c02ee63b5967f",
6
+ "github_agent/connectors/tool_schema_fingerprints.json": "c80f708a9aac0ec9dd4352be0db40295f203f734b88193ce7f03b6c41f07be6e",
7
7
  "github_agent/ontology/fixtures/records.json": "12f5b54b0ae98770f279f99e136788d063340042a9d6ff4bac0c22a886d2dc7b",
8
8
  "github_agent/ontology/github.ttl": "ad0ad6d295143b38725866b5b5c59a824f10bfc4219794ac2d9a2274f11bbdb5",
9
9
  "github_agent/ontology/mappings/source.yaml": "7ff7a37550f825a61fe6d0f9529206f4efe2727431e32b8ab95a39a32bdced43",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-agent
3
- Version: 2.3.1
3
+ Version: 2.4.1
4
4
  Summary: GitHub Agent for MCP
5
5
  Author-email: Project Maintainers <maintainers@users.noreply.github.com>
6
6
  License: MIT
@@ -14,7 +14,7 @@ Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
15
  Requires-Dist: gql[requests]>=4.4.0
16
16
  Requires-Dist: requests>=2.34.2
17
- Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.2.1
17
+ Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.3.5
18
18
  Provides-Extra: mcp
19
19
  Provides-Extra: all
20
20
  Provides-Extra: test
@@ -45,7 +45,7 @@ Dynamic: license-file
45
45
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/github-agent)
46
46
  ![PyPI - Implementation](https://img.shields.io/pypi/implementation/github-agent)
47
47
 
48
- *Version: 2.3.1*
48
+ *Version: 2.4.1*
49
49
 
50
50
  > **Documentation** — Installation, deployment, and usage across the MCP, API, and
51
51
  > [official documentation](https://knuckles-team.github.io/github-agent/).
@@ -1,4 +1,4 @@
1
- github_agent/__init__.py,sha256=neZxeMmEfjhVZM6xetRikrBdHWt5T5ehL72ZYdPtJ-E,22
1
+ github_agent/__init__.py,sha256=LgDSW5laOqA_7i2VW0cZ9QumZREigUxs3ZCBzJ1EG0o,22
2
2
  github_agent/__main__.py,sha256=O4Xg__fMvKfUsA6m61pLV56jlYY6EORiLhgDLlp0vJ8,92
3
3
  github_agent/api_client.py,sha256=O69YfkXBKyVd59EC8szaMlw3_ZxwEEvsLSvhWlfYnvk,1581
4
4
  github_agent/auth.py,sha256=isNd6DYbl_syB_wIbC399d_-157jqH1jqJfDmBn8h-0,4671
@@ -8,7 +8,7 @@ github_agent/github_input_models.py,sha256=yqqPGHb206th736MZvbnxq9F1JRsBUBODNeNV
8
8
  github_agent/github_response_models.py,sha256=mllSt0frBgzklUtfuHywJ2Ald3m99So948Xikt3H2Tc,8859
9
9
  github_agent/kg_ingest.py,sha256=tMCy8jz8bAEEld_AhTSifdgvSsnBTrp_9DKSmworsuQ,17982
10
10
  github_agent/mcp_config.json,sha256=2OOXrwO1sDLyHQqpZwhvDHizPIe3by6YmK4KFE333gI,23
11
- github_agent/mcp_server.py,sha256=02QXz9S3nCOZE1bNcBjiwC4PkuEMMlEzZjt5s6s0CmE,126335
11
+ github_agent/mcp_server.py,sha256=SxBVM--r18lGsmzamGpesP9YOWWKTXrfztwIgfv_nxA,126620
12
12
  github_agent/api/__init__.py,sha256=ntaEPqk-dsAV3HyyDLc2hYpc9nTTyG5CKI-SVDDjc24,27
13
13
  github_agent/api/api_client_base.py,sha256=tMXKrZIXg6aQ6OK4kNKBDcNc8BrM0Vml_66SwA5ZgEw,7485
14
14
  github_agent/api/api_client_branches.py,sha256=bCmqGUWQ27GFTGxcFkQ7D-ZEltKp6APVsk_Fw9wzdjY,3940
@@ -25,8 +25,8 @@ github_agent/api/api_client_repos.py,sha256=f-gc9xPDp4bp6CYlkaszt7MGhsW21dCw4FD2
25
25
  github_agent/api/api_client_search.py,sha256=zWFexkXZYFzDvWackxM33uWdEDYsA54lWlOSf6atLVE,2232
26
26
  github_agent/api/api_client_workflows.py,sha256=Y6iHgLujZksI9jAZb1tkFnEv3f-l4bd-fiUtSu3vVw4,5799
27
27
  github_agent/connectors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
- github_agent/connectors/mcp_source_presets.json,sha256=kHFTrnHAQhVsxSHRHVeoUX_RozK5zHc4JF8s1XrD2WQ,710
29
- github_agent/connectors/tool_schema_fingerprints.json,sha256=cJPHoy6aie-DsN6cBkoZghDIXOALgzpziMfMuw9gptg,228
28
+ github_agent/connectors/mcp_source_presets.json,sha256=MS7DXEjUAlOvzY26RFr-6fQbWskQ4RpDXXwC7mO1ln8,699
29
+ github_agent/connectors/tool_schema_fingerprints.json,sha256=yA9wipqsDsndQ1K-DbQClfID9zS4gZPOfwO2xB8Hvm4,241
30
30
  github_agent/mcp/__init__.py,sha256=mO-LvCC1TIs-T9f7oDToOq7LsZUMx04Aa3h0LjIi6eA,1290
31
31
  github_agent/mcp/mcp_action.py,sha256=oz3CcAMw8Uc_MC7us_pUn4nbwdNqR_ePIjDzckID5Wo,9583
32
32
  github_agent/mcp/mcp_branch.py,sha256=lACUOIPRPiLD9lv4DzKJ2n9IvOsq97mHk8lxTat1zWk,4785
@@ -41,7 +41,7 @@ github_agent/mcp/mcp_release.py,sha256=WnuZ2wjcTBVl8Jzog_4a9HjbxDAh6aXdN-mdzDUZt
41
41
  github_agent/mcp/mcp_repo.py,sha256=ny5GdawCFZxlbjpOc3ttnn-NIs9QDQLAxRdAWEWLUdc,18344
42
42
  github_agent/mcp/mcp_search.py,sha256=3ZBGNKkVu5oBXgN9MBWd-ve4NDCzcwP9sY22bp4hqKs,2963
43
43
  github_agent/ontology/__init__.py,sha256=-qc7ZPSgdaCLrD1AH_7TFXWikEpSH9rVmBciCC9gtCY,552
44
- github_agent/ontology/certification.json,sha256=17Ojwz_F_sHzxwYvNoQHKz1sSVpTD_YKitB-CfFUWoA,1666
44
+ github_agent/ontology/certification.json,sha256=Fisfx2auUAisXHeN8AiNxMj9LHZOoGhqve5baWnSc9I,1666
45
45
  github_agent/ontology/github.ttl,sha256=socWm6ST7jnTqZFxurxYdNIY1Ivx6JaW7MiJiX3-onk,9154
46
46
  github_agent/ontology/fixtures/records.json,sha256=EvW1Swrph3DyefmeE2eI0GM0AEKp1v9LrAwiqIbS3Hs,543
47
47
  github_agent/ontology/mappings/source.yaml,sha256=f_ejdVD4JaYf5tD5UpIG9O_icnQx4yuKuVo5oyvc7UM,533
@@ -92,28 +92,28 @@ github_agent/skills/github-triage-resolver/WORKFLOW.md,sha256=orvcRmaV-qb_JKoGSw
92
92
  github_agent/skills/github-triage-resolver/references/resolution-rules.md,sha256=lGPvfLCSHpNIeh2rKWcH2k_2lla3ovgBxzwvtMmyQ-0,4133
93
93
  github_agent/skills/github-triage-resolver/scripts/classify_safe.py,sha256=8BhcDF9Q8rjJIEVOmdyO-dO-eHBjW7T-bzaYC16uY5I,9556
94
94
  github_agent/skills/github-triage-resolver/scripts/gh_write.py,sha256=SL5oA1A3lFRLepNri4CzEcuEsg9D5WKJ1000fCRKBEM,4125
95
- github_agent-2.3.1.dist-info/licenses/LICENSE,sha256=5ALbh4fIALWVsUhO7q1nFT1bQb-CL9sWKf7p3GgLEG8,1070
95
+ github_agent-2.4.1.dist-info/licenses/LICENSE,sha256=5ALbh4fIALWVsUhO7q1nFT1bQb-CL9sWKf7p3GgLEG8,1070
96
96
  scripts/security_sanitizer.py,sha256=gE65xtYMGx43oYUnK0kozBm73Hx97mCdrQUM7GGzIbk,9449
97
97
  scripts/verify_api_integration.py,sha256=3AK8HKW52o1yxCDaEUtXngnh7CjYw6NiG9Eb3EIoXNE,10256
98
98
  tests/conftest.py,sha256=kgpOLUp_q8IZaI6Xd7F1tbFuio81-_l5Gd4jaGiMrnY,3636
99
- tests/test_action_discovery.py,sha256=6PQwXpNBGNaARaao0cUYGVM_Lln9hKqm5oc_Yw9VFkc,5842
99
+ tests/test_action_discovery.py,sha256=Mh8EEr0H2G66zHkK3uobGNlCltCGPX_AyXWh1Im5YfI,6683
100
100
  tests/test_api_client_endpoints.py,sha256=Hbw0vssQU5Up-KvJmUDLDCP4t2u8pU-xPfWAhFKymyQ,6582
101
101
  tests/test_api_validation.py,sha256=CRZq7kfc1U8CLZJRTGusBhTN2Tlfc1FIeDqIm895XoI,3301
102
102
  tests/test_auth_client_edge_cases.py,sha256=QjQAtjd7vDDsSSvIZuUXbd9Z58te8Xp9giPFmwJTBsA,6470
103
- tests/test_comment_crud.py,sha256=HVFw7lRQ2aeFskyVZ7_djOlwL1m_ZIcLSUIuQbanVmo,27321
103
+ tests/test_comment_crud.py,sha256=mHA0scds_0W0oND-VI0QMvNaYarYkHjiXd4H9-9d5kE,27341
104
104
  tests/test_github_agent_api_brute_force_coverage.py,sha256=5jWW6oVU7cmXL2sS3OZ-3gbYGhyjlYPIWqH2rsdF2fw,7347
105
105
  tests/test_github_agent_brute_force_coverage.py,sha256=Z_voXtChOYRqaNEmNzMfzvwQMj2xFBn1m8mXx5ubUe8,4849
106
106
  tests/test_github_gql.py,sha256=mpn814s9UhN4jnlp1TB8XE3OZ04adR9nhfPM9j0Gpyc,1892
107
107
  tests/test_github_http.py,sha256=HcWWZsQ7ATdcWpQCTJdNDJkiwiwgujO4JgjNE1Ls64U,6977
108
108
  tests/test_hardening.py,sha256=sdlKmtk7B5yncc-r1LuFgoJfro6wNlCqY0xI73IVC4M,3710
109
109
  tests/test_init_dynamics.py,sha256=fPE_4M-bONKiqvtWLn12A0q18CUlzQhdx1UoXYkbbPk,1839
110
- tests/test_kg_ingest.py,sha256=DrTfBlHncZLyrhAWcYyWiVxVOiqI9r8f8gG2CtBJFns,9432
111
- tests/test_mcp_coverage.py,sha256=cpuqawTm9kTkQpriMqSItiAhEBZpMPXIHi5AwA3efns,43530
110
+ tests/test_kg_ingest.py,sha256=TeHjWz74LiuSxpI7N6HHrdj0H1mRsJHceQDNYvre4To,9462
111
+ tests/test_mcp_coverage.py,sha256=W_7fbCWoFd4mDwKvah2DmQRcy0fD7tI4ykFTne69tNM,43550
112
112
  tests/test_mcp_package_dispatch.py,sha256=mzrC-jGl3DlrQx9z5uIxy1m0x9qsxfMo6eJImx844WY,22993
113
113
  tests/test_model_fields.py,sha256=GvVFFedjdL0KBl328-NZ0SM6olv7muiglsMh0Vd59As,3388
114
- tests/test_org_crud.py,sha256=9eNFHDkovU39ekh2I8XwpRDKTQumVPF4UIuW3MFZw04,19918
115
- tests/test_pages.py,sha256=0V6-q59Foq5F0nC9WhbNwafdNmd8Xkfp2l5HWC5NABw,18706
116
- tests/test_repo_secrets_characterization.py,sha256=Nlv8EG7BwRGGl67pqQ0sMQwjeSfEabOwvWELsVJP2Xc,6023
114
+ tests/test_org_crud.py,sha256=7WMb8eCWSsl_rCILBmsJ4OFnmwtb_GXmebf51O8xsxI,19938
115
+ tests/test_pages.py,sha256=CGlxgPVrhvPnnXuFZwzF4VqsV4ygBDY8w8Cqr6KqJmI,18726
116
+ tests/test_repo_secrets_characterization.py,sha256=-9NkJlROsKIYKcNEZpVYy7tkJg-lB0_8We1RvOW1EaY,6043
117
117
  tests/test_skill_backlog_build_plan.py,sha256=DdvwgZKQnQ-d_SxErxKoTpjOROuCijr4q7CVAqB82BI,4569
118
118
  tests/test_skill_ci_failure_sweep_summarize_runs.py,sha256=lFHXWuIzGHCzHQpBBqF4VSHIfzO6cKVgstZHdXqE7U0,3933
119
119
  tests/test_skill_github_tools_fetch_comments.py,sha256=ofB_kQoY8HBbatEjk854lUAm6PGFEDldYQscekmGlYE,3468
@@ -122,8 +122,8 @@ tests/test_skill_org_remediation_classify_fix_risk.py,sha256=0Y8289lhxtJ3pxYUHzO
122
122
  tests/test_skill_pr_review_sweep_summarize_prs.py,sha256=NrNaucQvM7K-k1WBcOBKtTGjxJbW16VgTHbC7dSsjm4,3821
123
123
  tests/test_skill_triage_resolver_classify_safe.py,sha256=B-aDeVmsKTsxYO8TwMEx-cmpVSmZdlKXw5993Da2ubc,9489
124
124
  tests/test_startup.py,sha256=Ix_g69k0tsZbY0-Vkeh8ADWojUdbYwTwwmnM4_hVuCc,1245
125
- github_agent-2.3.1.dist-info/METADATA,sha256=nFYottx4SxeYukGEffxJV88KcBGQohhiZ4qQmpIbHFA,34535
126
- github_agent-2.3.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
127
- github_agent-2.3.1.dist-info/entry_points.txt,sha256=HGhTmPWGQVM2uJ-RfkiYdIYasr4coyzet1qKhR4AcOg,308
128
- github_agent-2.3.1.dist-info/top_level.txt,sha256=53Ecr8n7o_EMIqZClc11PBU07uQIggYZOk5WnvBbeOQ,50
129
- github_agent-2.3.1.dist-info/RECORD,,
125
+ github_agent-2.4.1.dist-info/METADATA,sha256=1muMJ5mRCN3ZLJzPowZSkg7uCSkW89eNccuz7gb4ccQ,34535
126
+ github_agent-2.4.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
127
+ github_agent-2.4.1.dist-info/entry_points.txt,sha256=HGhTmPWGQVM2uJ-RfkiYdIYasr4coyzet1qKhR4AcOg,308
128
+ github_agent-2.4.1.dist-info/top_level.txt,sha256=53Ecr8n7o_EMIqZClc11PBU07uQIggYZOk5WnvBbeOQ,50
129
+ github_agent-2.4.1.dist-info/RECORD,,
@@ -15,7 +15,7 @@ import pytest
15
15
  async def _registered_tools():
16
16
  from github_agent.mcp_server import get_mcp_instance
17
17
 
18
- mcp = get_mcp_instance()[0]
18
+ mcp = get_mcp_instance(action_dispatch=True)[0]
19
19
  if inspect.iscoroutinefunction(mcp.list_tools):
20
20
  tools = await mcp.list_tools()
21
21
  else:
@@ -156,3 +156,22 @@ def test_search_actions_matches_the_if_elif_branches():
156
156
  from github_agent import mcp_server
157
157
 
158
158
  assert set(mcp_server.SEARCH_ACTIONS) == {"repositories", "issues", "code"}
159
+
160
+
161
+ @pytest.mark.asyncio
162
+ async def test_default_surface_is_one_tool_per_api_operation():
163
+ """By default every GitHub client operation is its own typed MCP tool."""
164
+ from github_agent.mcp_server import get_mcp_instance
165
+
166
+ mcp = get_mcp_instance()[0]
167
+ tools = {tool.name: tool for tool in await mcp.local_provider.list_tools()}
168
+ operations = {name for name, tool in tools.items() if "operation" in tool.tags}
169
+ assert len(operations) == 95
170
+ assert "github_get_repositories" in operations
171
+ assert not [
172
+ name
173
+ for name, tool in tools.items()
174
+ if name not in operations and "action" in tool.parameters.get("properties", {})
175
+ ]
176
+ assert tools["github_delete_repository"].annotations.destructive_hint is True
177
+ assert tools["github_get_pages"].annotations.read_only_hint is True
@@ -442,7 +442,7 @@ def make_comment_client():
442
442
  async def get_github_comments_tool():
443
443
  from github_agent.mcp_server import get_mcp_instance
444
444
 
445
- mcp = get_mcp_instance()[0]
445
+ mcp = get_mcp_instance(action_dispatch=True)[0]
446
446
  if inspect.iscoroutinefunction(mcp.list_tools):
447
447
  tools = await mcp.list_tools()
448
448
  else:
tests/test_kg_ingest.py CHANGED
@@ -29,6 +29,7 @@ class _FakeTransport:
29
29
  self.requests: list[Any] = []
30
30
 
31
31
  async def source_status(self, connector: str, stream: str) -> Any:
32
+ del connector, stream
32
33
  return SimpleNamespace(accepted_checkpoint=None)
33
34
 
34
35
  async def submit(self, request: Any) -> Any:
@@ -347,7 +347,7 @@ def create_mock_client():
347
347
  async def get_registered_tools():
348
348
  from github_agent.mcp_server import get_mcp_instance
349
349
 
350
- mcp_data = get_mcp_instance()
350
+ mcp_data = get_mcp_instance(action_dispatch=True)
351
351
  mcp = mcp_data[0] if isinstance(mcp_data, tuple) else mcp_data
352
352
  # FastMCP list_tools can be sync or async
353
353
  import inspect
tests/test_org_crud.py CHANGED
@@ -386,7 +386,7 @@ def make_org_client():
386
386
  async def get_github_orgs_tool():
387
387
  from github_agent.mcp_server import get_mcp_instance
388
388
 
389
- mcp = get_mcp_instance()[0]
389
+ mcp = get_mcp_instance(action_dispatch=True)[0]
390
390
  if inspect.iscoroutinefunction(mcp.list_tools):
391
391
  tools = await mcp.list_tools()
392
392
  else:
tests/test_pages.py CHANGED
@@ -334,7 +334,7 @@ def make_pages_client():
334
334
  async def get_github_repos_tool():
335
335
  from github_agent.mcp_server import get_mcp_instance
336
336
 
337
- mcp = get_mcp_instance()[0]
337
+ mcp = get_mcp_instance(action_dispatch=True)[0]
338
338
  if inspect.iscoroutinefunction(mcp.list_tools):
339
339
  tools = await mcp.list_tools()
340
340
  else:
@@ -41,7 +41,7 @@ def make_secrets_client():
41
41
  async def get_github_repos_tool():
42
42
  from github_agent.mcp_server import get_mcp_instance
43
43
 
44
- mcp = get_mcp_instance()[0]
44
+ mcp = get_mcp_instance(action_dispatch=True)[0]
45
45
  if inspect.iscoroutinefunction(mcp.list_tools):
46
46
  tools = await mcp.list_tools()
47
47
  else: