github-agent 2.4.7__py3-none-any.whl → 2.4.8__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.4.7"
1
+ __version__ = "2.4.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.4.7"
42
+ __version__ = "2.4.8"
43
43
  logger = get_logger("GithubMCPServer")
44
44
  logger.setLevel(logging.INFO)
45
45
 
@@ -13,36 +13,18 @@
13
13
  # github_branches / github_commits / github_actions / github_orgs). The shared
14
14
  # :Person / :Document classes (users, release notes) are REUSED, never redefined.
15
15
 
16
+ # Shared concepts owned by the epistemic-graph ontology and referenced here, never redeclared:
17
+ # Repository, PullRequest, Release, Branch, Commit, PipelineRun. Only the GitHub-specific subclasses and properties are declared in this pack.
18
+
16
19
  :Organization a owl:Class ;
17
20
  rdfs:label "Organization" ;
18
21
  rdfs:comment "A GitHub organization that owns repositories and members (github_orgs)." .
19
22
 
20
- :Repository a owl:Class ;
21
- rdfs:subClassOf :SoftwareProject ;
22
- rdfs:label "Repository" ;
23
- rdfs:comment "A GitHub repository / codebase (github_repos)." .
24
-
25
- :PullRequest a owl:Class ;
26
- rdfs:label "Pull Request" ;
27
- rdfs:comment "A proposed change under review, from a head to a base branch (github_pulls)." .
28
-
29
23
  :Issue a owl:Class ;
30
24
  rdfs:subClassOf :WorkItem ;
31
25
  rdfs:label "Issue" ;
32
26
  rdfs:comment "A tracked work item, bug, or discussion in a repository (github_issues)." .
33
27
 
34
- :Release a owl:Class ;
35
- rdfs:label "Release" ;
36
- rdfs:comment "A tagged, published repository release with release notes (github_releases)." .
37
-
38
- :Branch a owl:Class ;
39
- rdfs:label "Branch" ;
40
- rdfs:comment "A named git branch within a repository (github_branches)." .
41
-
42
- :Commit a owl:Class ;
43
- rdfs:label "Commit" ;
44
- rdfs:comment "A git commit recorded in a repository (github_commits)." .
45
-
46
28
  :Workflow a owl:Class ;
47
29
  rdfs:label "Workflow" ;
48
30
  rdfs:comment "A GitHub Actions CI/CD workflow definition (github_actions)." .
@@ -52,13 +34,8 @@
52
34
  rdfs:label "Workflow Run" ;
53
35
  rdfs:comment "A single execution of a GitHub Actions workflow for a ref/commit (github_actions)." .
54
36
 
55
- :PipelineRun a owl:Class ;
56
- rdfs:label "Pipeline Run" ;
57
- rdfs:comment """A single CI/CD execution for a ref/commit (github_actions workflow run).
58
- Shares its class name with the twin gitlab-api producer so GitHub Actions and GitLab
59
- CI/CD unify under one node shape in the knowledge graph.""" .
60
-
61
37
  :CheckRun a owl:Class ;
38
+ rdfs:subClassOf :PipelineRun ;
62
39
  rdfs:label "Check Run" ;
63
40
  rdfs:comment """A single job/check within a PipelineRun (github_actions workflow-run job or
64
41
  GitHub Checks-API check run). Shares its class name with the twin gitlab-api producer.""" .
@@ -140,6 +117,7 @@
140
117
  :state a owl:DatatypeProperty ;
141
118
  rdfs:label "state" ;
142
119
  rdfs:comment "Lifecycle state (open, closed, merged)." ;
120
+ rdfs:domain [ a owl:Class ; owl:unionOf ( :Issue :PullRequest ) ] ;
143
121
  rdfs:range xsd:string .
144
122
 
145
123
  :number a owl:DatatypeProperty ;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-agent
3
- Version: 2.4.7
3
+ Version: 2.4.8
4
4
  Summary: GitHub Agent for MCP
5
5
  Author-email: Project Maintainers <maintainers@users.noreply.github.com>
6
6
  License: MIT
@@ -44,7 +44,7 @@ Dynamic: license-file
44
44
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/github-agent)
45
45
  ![PyPI - Implementation](https://img.shields.io/pypi/implementation/github-agent)
46
46
 
47
- *Version: 2.4.7*
47
+ *Version: 2.4.8*
48
48
 
49
49
  > **Documentation** — Installation, deployment, and usage across the MCP, API, and
50
50
  > [official documentation](https://knuckles-team.github.io/github-agent/).
@@ -1,4 +1,4 @@
1
- github_agent/__init__.py,sha256=6Ls7f3ZJxdJNWxciT1KkTqmIR_gddzXVDXxBtiav_WI,22
1
+ github_agent/__init__.py,sha256=glMuOQomGqPeJvn8UHzLa83MujqjNX2vpagybeMit4A,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=iH_NKpd8a6GtNxfZTp8Oah8VZkcXjI74KDf8P9NbtjA,17978
10
10
  github_agent/mcp_config.json,sha256=2OOXrwO1sDLyHQqpZwhvDHizPIe3by6YmK4KFE333gI,23
11
- github_agent/mcp_server.py,sha256=6Pd--MgYMT6g8nvzOpcXNToNHZr0SPdY6dfeCydkmf0,126620
11
+ github_agent/mcp_server.py,sha256=XZEV8zYUZAJk34_rtFHTKnWMGqwbYRHgd3ZMuAM59dI,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
@@ -42,7 +42,7 @@ github_agent/mcp/mcp_repo.py,sha256=ny5GdawCFZxlbjpOc3ttnn-NIs9QDQLAxRdAWEWLUdc,
42
42
  github_agent/mcp/mcp_search.py,sha256=3ZBGNKkVu5oBXgN9MBWd-ve4NDCzcwP9sY22bp4hqKs,2963
43
43
  github_agent/ontology/__init__.py,sha256=-qc7ZPSgdaCLrD1AH_7TFXWikEpSH9rVmBciCC9gtCY,552
44
44
  github_agent/ontology/certification.json,sha256=nUT_C-AtTjtb4bDAs3cDT2vlk7kK_8RPFfbyIWXCMw0,1664
45
- github_agent/ontology/github.ttl,sha256=U2jeFMGCqhsyu9G4AzTXaw1xmSWrqLlbSXTWduWxccw,9260
45
+ github_agent/ontology/github.ttl,sha256=v5lzPQkPBvjuzXYdg1rMHcsARExIsTdkshebvfnhyp8,8573
46
46
  github_agent/ontology/ingest_sources.json,sha256=70glHq2q8MEQCxD22r2VPyz_7mubibf1iygCf-sSdMs,572
47
47
  github_agent/ontology/fixtures/records.json,sha256=EvW1Swrph3DyefmeE2eI0GM0AEKp1v9LrAwiqIbS3Hs,543
48
48
  github_agent/ontology/mappings/source.yaml,sha256=f_ejdVD4JaYf5tD5UpIG9O_icnQx4yuKuVo5oyvc7UM,533
@@ -93,7 +93,7 @@ github_agent/skills/github-triage-resolver/WORKFLOW.md,sha256=orvcRmaV-qb_JKoGSw
93
93
  github_agent/skills/github-triage-resolver/references/resolution-rules.md,sha256=lGPvfLCSHpNIeh2rKWcH2k_2lla3ovgBxzwvtMmyQ-0,4133
94
94
  github_agent/skills/github-triage-resolver/scripts/classify_safe.py,sha256=8BhcDF9Q8rjJIEVOmdyO-dO-eHBjW7T-bzaYC16uY5I,9556
95
95
  github_agent/skills/github-triage-resolver/scripts/gh_write.py,sha256=SL5oA1A3lFRLepNri4CzEcuEsg9D5WKJ1000fCRKBEM,4125
96
- github_agent-2.4.7.dist-info/licenses/LICENSE,sha256=5ALbh4fIALWVsUhO7q1nFT1bQb-CL9sWKf7p3GgLEG8,1070
96
+ github_agent-2.4.8.dist-info/licenses/LICENSE,sha256=5ALbh4fIALWVsUhO7q1nFT1bQb-CL9sWKf7p3GgLEG8,1070
97
97
  scripts/security_sanitizer.py,sha256=gE65xtYMGx43oYUnK0kozBm73Hx97mCdrQUM7GGzIbk,9449
98
98
  scripts/verify_api_integration.py,sha256=3AK8HKW52o1yxCDaEUtXngnh7CjYw6NiG9Eb3EIoXNE,10256
99
99
  tests/conftest.py,sha256=kgpOLUp_q8IZaI6Xd7F1tbFuio81-_l5Gd4jaGiMrnY,3636
@@ -102,6 +102,7 @@ tests/test_api_client_endpoints.py,sha256=Hbw0vssQU5Up-KvJmUDLDCP4t2u8pU-xPfWAhF
102
102
  tests/test_api_validation.py,sha256=CRZq7kfc1U8CLZJRTGusBhTN2Tlfc1FIeDqIm895XoI,3301
103
103
  tests/test_auth_client_edge_cases.py,sha256=QjQAtjd7vDDsSSvIZuUXbd9Z58te8Xp9giPFmwJTBsA,6470
104
104
  tests/test_comment_crud.py,sha256=mHA0scds_0W0oND-VI0QMvNaYarYkHjiXd4H9-9d5kE,27341
105
+ tests/test_cq_paths.py,sha256=f4pf4NcI_SFL_7EVkK93ZMaF7W-0vQ9CTxGE9FS6Wkk,1524
105
106
  tests/test_default_content_surfaces.py,sha256=UQdDIHHd-X4lvsj2ti2QnNwtsQAayL7b003dQ8UXqMo,1403
106
107
  tests/test_fleet_name.py,sha256=qCLzYTPuiaS3y0I0NLuMRloXlf_o0sue0aVH-Sn-tYQ,1893
107
108
  tests/test_github_agent_api_brute_force_coverage.py,sha256=5jWW6oVU7cmXL2sS3OZ-3gbYGhyjlYPIWqH2rsdF2fw,7347
@@ -115,7 +116,7 @@ tests/test_kg_ingest.py,sha256=TeHjWz74LiuSxpI7N6HHrdj0H1mRsJHceQDNYvre4To,9462
115
116
  tests/test_mcp_coverage.py,sha256=W_7fbCWoFd4mDwKvah2DmQRcy0fD7tI4ykFTne69tNM,43550
116
117
  tests/test_mcp_package_dispatch.py,sha256=mzrC-jGl3DlrQx9z5uIxy1m0x9qsxfMo6eJImx844WY,22993
117
118
  tests/test_model_fields.py,sha256=GvVFFedjdL0KBl328-NZ0SM6olv7muiglsMh0Vd59As,3388
118
- tests/test_ontology_parent_link.py,sha256=gMdFdrsjYVnKii3f93hBufvfMES4we3ffH1xsH2Rnok,4352
119
+ tests/test_ontology_parent_link.py,sha256=-NrJYBVmYF9OswmRXDgvSYDhqGVZcDfQenxKUilUSsw,4210
119
120
  tests/test_org_crud.py,sha256=7WMb8eCWSsl_rCILBmsJ4OFnmwtb_GXmebf51O8xsxI,19938
120
121
  tests/test_pages.py,sha256=CGlxgPVrhvPnnXuFZwzF4VqsV4ygBDY8w8Cqr6KqJmI,18726
121
122
  tests/test_repo_secrets_characterization.py,sha256=-9NkJlROsKIYKcNEZpVYy7tkJg-lB0_8We1RvOW1EaY,6043
@@ -127,8 +128,8 @@ tests/test_skill_org_remediation_classify_fix_risk.py,sha256=0Y8289lhxtJ3pxYUHzO
127
128
  tests/test_skill_pr_review_sweep_summarize_prs.py,sha256=NrNaucQvM7K-k1WBcOBKtTGjxJbW16VgTHbC7dSsjm4,3821
128
129
  tests/test_skill_triage_resolver_classify_safe.py,sha256=B-aDeVmsKTsxYO8TwMEx-cmpVSmZdlKXw5993Da2ubc,9489
129
130
  tests/test_startup.py,sha256=Ix_g69k0tsZbY0-Vkeh8ADWojUdbYwTwwmnM4_hVuCc,1245
130
- github_agent-2.4.7.dist-info/METADATA,sha256=q_4bTKAdIUsfu9TcD7RDkkKSLb8cnvhoyRryLf-VhmI,34508
131
- github_agent-2.4.7.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
132
- github_agent-2.4.7.dist-info/entry_points.txt,sha256=Wi6GhziOqmJl-22qTYkjfVuIHEHKRrBvyyloc7NqV80,367
133
- github_agent-2.4.7.dist-info/top_level.txt,sha256=53Ecr8n7o_EMIqZClc11PBU07uQIggYZOk5WnvBbeOQ,50
134
- github_agent-2.4.7.dist-info/RECORD,,
131
+ github_agent-2.4.8.dist-info/METADATA,sha256=uAvn9bQvqFs6_Ma0RpcJHxA-HIq4rvhXUpkDIp61gNk,34508
132
+ github_agent-2.4.8.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
133
+ github_agent-2.4.8.dist-info/entry_points.txt,sha256=Wi6GhziOqmJl-22qTYkjfVuIHEHKRrBvyyloc7NqV80,367
134
+ github_agent-2.4.8.dist-info/top_level.txt,sha256=53Ecr8n7o_EMIqZClc11PBU07uQIggYZOk5WnvBbeOQ,50
135
+ github_agent-2.4.8.dist-info/RECORD,,
tests/test_cq_paths.py ADDED
@@ -0,0 +1,50 @@
1
+ """Competency-question paths of the GitHub pack (CONN-GITHUB-AGENT-CONNECTOR-CONTENT-R004)."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import re
6
+ from pathlib import Path
7
+
8
+ import pytest
9
+ import yaml
10
+
11
+ import github_agent
12
+
13
+ pytestmark = pytest.mark.spec("CONN-GITHUB-AGENT-CONNECTOR-CONTENT-R004")
14
+
15
+ PACKAGE = Path(github_agent.__file__).parent
16
+ TTL = (PACKAGE / "ontology" / "github.ttl").read_text("utf-8")
17
+ # Concepts the epistemic-graph ontology owns: referenced, never declared here.
18
+ SHARED = ("Repository", "PullRequest", "Release", "Branch", "Commit", "PipelineRun")
19
+
20
+
21
+ def _block(name: str) -> str:
22
+ match = re.search(rf"^:{name} a [^\n]*\n(?:[^\n]+\n)*", TTL, flags=re.M)
23
+ assert match, name
24
+ return match.group(0)
25
+
26
+
27
+ @pytest.mark.parametrize("name", SHARED)
28
+ def test_shared_concepts_are_not_redeclared(name: str) -> None:
29
+ assert not re.search(rf"^:{name} a owl:Class", TTL, flags=re.M), name
30
+
31
+
32
+ def test_state_is_declared_on_the_issue_type() -> None:
33
+ block = _block("state")
34
+ assert re.search(r"rdfs:domain \[ a owl:Class ; owl:unionOf \( :Issue ", block)
35
+
36
+
37
+ def test_check_run_extends_pipeline_run() -> None:
38
+ assert "rdfs:subClassOf :PipelineRun" in _block("CheckRun")
39
+
40
+
41
+ def test_no_mapping_has_a_null_ontology_class() -> None:
42
+ manifest = yaml.safe_load(
43
+ (PACKAGE.parent / "connector_manifest.yml").read_text("utf-8")
44
+ )
45
+ unmapped = [
46
+ name
47
+ for name, mapping in manifest["schema_mappings"].items()
48
+ if not mapping["ontology_class"]
49
+ ]
50
+ assert unmapped == []
@@ -32,13 +32,7 @@ PARENT_CLASSES = frozenset(
32
32
  )
33
33
  # Classes for which the parent ontology has no fitting class yet. Each is a candidate for a new
34
34
  # parent class (see the orphan mapping report); a class leaves this set when it gains a parent.
35
- PENDING_NEW_PARENT: frozenset[str] = frozenset(
36
- (
37
- "http://knuckles.team/kg#Branch",
38
- "http://knuckles.team/kg#CheckRun",
39
- "http://knuckles.team/kg#Release",
40
- )
41
- )
35
+ PENDING_NEW_PARENT: frozenset[str] = frozenset()
42
36
 
43
37
  _STRING = re.compile(r'"""(?:.|\n)*?"""|"(?:[^"\\\n]|\\.)*"')
44
38
  _IRI = re.compile(r"<([^<>\s]*)>")