gitlab-api 27.3.11__tar.gz → 27.3.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.
Files changed (83) hide show
  1. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/PKG-INFO +2 -2
  2. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/connector_sources.py +45 -0
  3. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/mcp_server.py +4 -1
  4. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/ontology/certification.json +2 -2
  5. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/ontology/gitlab.ttl +20 -0
  6. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api.egg-info/PKG-INFO +2 -2
  7. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api.egg-info/SOURCES.txt +1 -0
  8. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api.egg-info/requires.txt +1 -1
  9. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/pyproject.toml +2 -2
  10. gitlab_api-27.3.13/tests/test_catalog_edges.py +53 -0
  11. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/LICENSE +0 -0
  12. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/README.md +0 -0
  13. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/__init__.py +0 -0
  14. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/__main__.py +0 -0
  15. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/api/__init__.py +0 -0
  16. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/api/api_client_base.py +0 -0
  17. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/api/api_client_environments.py +0 -0
  18. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/api/api_client_issues.py +0 -0
  19. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/api/api_client_merge_requests.py +0 -0
  20. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/api/api_client_other.py +0 -0
  21. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/api/api_client_pipelines.py +0 -0
  22. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/api/api_client_projects.py +0 -0
  23. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/api/api_client_repositories.py +0 -0
  24. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/api/api_client_system.py +0 -0
  25. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/api/api_client_users_groups.py +0 -0
  26. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/api/api_client_vulnerabilities.py +0 -0
  27. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/api_client.py +0 -0
  28. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/auth.py +0 -0
  29. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/connector_prep.py +0 -0
  30. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/gitlab_gql.py +0 -0
  31. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/gitlab_input_models.py +0 -0
  32. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/gitlab_response_models.py +0 -0
  33. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/instances.py +0 -0
  34. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/kg_ingest.py +0 -0
  35. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/mcp_config.json +0 -0
  36. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/ontology/__init__.py +0 -0
  37. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/ontology/fixtures/records.json +0 -0
  38. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/ontology/mappings/source.yaml +0 -0
  39. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/ontology/migrations/manifest.json +0 -0
  40. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/ontology/shapes/connector.shacl.ttl +0 -0
  41. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/prompts/devops_specialist.json +0 -0
  42. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/skills/gitlab-api-operations/SKILL.md +0 -0
  43. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/skills/gitlab-api-operations/agents/openai.yaml +0 -0
  44. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/skills/gitlab-api-operations/references/catalog.md +0 -0
  45. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/skills/gitlab-issues/SKILL.md +0 -0
  46. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/skills/gitlab-issues/WORKFLOW.md +0 -0
  47. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/skills/gitlab-merge-request-create/SKILL.md +0 -0
  48. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/skills/gitlab-merge-request-create/WORKFLOW.md +0 -0
  49. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/skills/gitlab-merge-request-review/SKILL.md +0 -0
  50. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/skills/gitlab-merge-request-review/WORKFLOW.md +0 -0
  51. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/skills/gitlab-pipelines/SKILL.md +0 -0
  52. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/skills/gitlab-pipelines/WORKFLOW.md +0 -0
  53. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/skills/gitlab-vulnerabilities/SKILL.md +0 -0
  54. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api/skills/gitlab-vulnerabilities/WORKFLOW.md +0 -0
  55. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api.egg-info/dependency_links.txt +0 -0
  56. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api.egg-info/entry_points.txt +0 -0
  57. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/gitlab_api.egg-info/top_level.txt +0 -0
  58. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/scripts/check_import_safety.py +0 -0
  59. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/scripts/security_contract.py +0 -0
  60. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/setup.cfg +0 -0
  61. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/__init__.py +0 -0
  62. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/conftest.py +0 -0
  63. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_api_wrapper.py +0 -0
  64. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_auth.py +0 -0
  65. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_connector_prep.py +0 -0
  66. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_cq_paths.py +0 -0
  67. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_fleet_name.py +0 -0
  68. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_gitlab_a2a_validation.py +0 -0
  69. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_gitlab_api_brute_force_coverage.py +0 -0
  70. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_gitlab_gql.py +0 -0
  71. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_gitlab_mcp_validation.py +0 -0
  72. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_gitlab_models.py +0 -0
  73. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_identity_context_scoping.py +0 -0
  74. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_ingest_sources.py +0 -0
  75. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_init_dynamics.py +0 -0
  76. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_instances.py +0 -0
  77. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_kg_ingest.py +0 -0
  78. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_mock_coverage.py +0 -0
  79. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_ontology_parent_link.py +0 -0
  80. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_startup.py +0 -0
  81. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_tool_modes.py +0 -0
  82. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/test_verify_agent.py +0 -0
  83. {gitlab_api-27.3.11 → gitlab_api-27.3.13}/tests/verify_a2a_queries.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitlab-api
3
- Version: 27.3.11
3
+ Version: 27.3.13
4
4
  Summary: GitLab API + MCP Server
5
5
  Author-email: Repository Maintainers <maintainers@knuckles.team>
6
6
  License: MIT
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
12
12
  Requires-Python: >=3.12
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
- Requires-Dist: agent-connector-sdk[graphql,mcp]<0.6.0,>=0.5.2
15
+ Requires-Dist: agent-connector-sdk[graphql,mcp]<0.6.0,>=0.5.5
16
16
  Requires-Dist: python-dotenv>=1.2.4
17
17
  Provides-Extra: mcp
18
18
  Provides-Extra: all
@@ -24,6 +24,24 @@ SOURCES = (
24
24
  records_path="data",
25
25
  text_field="description",
26
26
  title_field="title",
27
+ edges=[
28
+ {
29
+ "relationship": "issueAuthoredBy",
30
+ "target_field": "author",
31
+ "target_type": "Person",
32
+ "target_id_key": "id",
33
+ "target_id_template": "user:{id}",
34
+ "target_fields": {"name": "name", "username": "username"},
35
+ },
36
+ {
37
+ "relationship": "issueAssignedTo",
38
+ "target_field": "assignees",
39
+ "target_type": "Person",
40
+ "target_id_key": "id",
41
+ "target_id_template": "user:{id}",
42
+ "target_fields": {"name": "name", "username": "username"},
43
+ },
44
+ ],
27
45
  ),
28
46
  source_meta(
29
47
  tool="gitlab_get_projects",
@@ -45,6 +63,24 @@ SOURCES = (
45
63
  server="gitlab-mcp",
46
64
  text_field="description",
47
65
  title_field="path_with_namespace",
66
+ edges=[
67
+ {
68
+ "relationship": "projectOwnedBy",
69
+ "target_field": "owner",
70
+ "target_type": "Person",
71
+ "target_id_key": "id",
72
+ "target_id_template": "user:{id}",
73
+ "target_fields": {"name": "name", "username": "username"},
74
+ },
75
+ {
76
+ "relationship": "partOfGroup",
77
+ "target_field": "namespace",
78
+ "target_type": "GitLabGroup",
79
+ "target_id_key": "id",
80
+ "target_id_template": "group:{id}",
81
+ "target_fields": {"name": "full_path"},
82
+ },
83
+ ],
48
84
  ),
49
85
  )
50
86
 
@@ -97,6 +133,10 @@ SCHEMA_MAPPINGS = {
97
133
  "field_sets": ["fields_1"],
98
134
  "ontology_class": "PipelineRun",
99
135
  },
136
+ "Person": {
137
+ "fields": {},
138
+ "ontology_class": "Person",
139
+ },
100
140
  "Project": {
101
141
  "field_sets": ["fields_1"],
102
142
  "ontology_class": "SoftwareProject",
@@ -134,6 +174,11 @@ RESOURCES = (
134
174
  "label": "Merge Request",
135
175
  "name": "MergeRequest",
136
176
  },
177
+ {
178
+ "id_prefix": "person",
179
+ "label": "Person",
180
+ "name": "Person",
181
+ },
137
182
  {
138
183
  "id_prefix": "pipeline",
139
184
  "label": "Pipeline",
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/python
2
2
  import warnings
3
3
 
4
+ from agent_connector_sdk.connector_hooks import RegistrationContext
4
5
  from fastmcp import Context, FastMCP
5
6
  from fastmcp.dependencies import Depends
6
7
  from pydantic import Field
@@ -1121,7 +1122,9 @@ def register_vulnerabilities_tools(mcp: FastMCP):
1121
1122
  )
1122
1123
 
1123
1124
 
1124
- def register_prompts(mcp: FastMCP):
1125
+ def register_prompts(context: RegistrationContext) -> None:
1126
+ mcp = context.server
1127
+
1125
1128
  @mcp.prompt
1126
1129
  def create_branch_prompt(
1127
1130
  new_branch: str,
@@ -2,7 +2,7 @@
2
2
  "api_version": "graphos.io/v1",
3
3
  "artifacts": {
4
4
  "gitlab_api/ontology/fixtures/records.json": "5f0417820053941933f15b3f459750753f4e8e34cf1e7853fd030c1143356b40",
5
- "gitlab_api/ontology/gitlab.ttl": "c7f170c5ba51d657be7bad3f27595c8d91639f46e3259efffd486cfb60969240",
5
+ "gitlab_api/ontology/gitlab.ttl": "4a674b5efb7f6f0f6e1f46084940ffe550f0a95d9c6338366df9da01dd8c207c",
6
6
  "gitlab_api/ontology/mappings/source.yaml": "4d845dd7df9503ae3a5d133ff00a98191d11adf3af7f6868f45c22bcbf098bb5",
7
7
  "gitlab_api/ontology/migrations/manifest.json": "442c3c53df0b42c866eef7255b1889b8ada6f9f9c5125cad65d6b50dc6362a3e",
8
8
  "gitlab_api/ontology/shapes/connector.shacl.ttl": "20d2bfc3827fd6327a3b6f25828b41d9de3f855867c46264a7e0aa7f951c76fa"
@@ -29,5 +29,5 @@
29
29
  "signer": "UNSIGNED-PREVIEW",
30
30
  "signing_public_key": "",
31
31
  "status": "source-validated",
32
- "validated_at": "2026-10-24T06:01:53Z"
32
+ "validated_at": "2026-10-24T15:46:04Z"
33
33
  }
@@ -114,6 +114,26 @@
114
114
  rdfs:comment "Links a MergeRequest, Issue, or Commit to the Person who created it." ;
115
115
  rdfs:range :Person .
116
116
 
117
+ :projectOwnedBy a owl:ObjectProperty ;
118
+ rdfs:label "project owned by" ;
119
+ rdfs:comment "Links a Project to the Person who owns it (projects.owner, user-namespace projects)." ;
120
+ rdfs:subPropertyOf :ownedBy ;
121
+ rdfs:domain :Project ;
122
+ rdfs:range :Person .
123
+
124
+ :issueAuthoredBy a owl:ObjectProperty ;
125
+ rdfs:label "issue authored by" ;
126
+ rdfs:comment "Links an Issue to the Person who opened it (issues.author)." ;
127
+ rdfs:subPropertyOf :authoredBy ;
128
+ rdfs:domain :Issue ;
129
+ rdfs:range :Person .
130
+
131
+ :issueAssignedTo a owl:ObjectProperty ;
132
+ rdfs:label "issue assigned to" ;
133
+ rdfs:comment "Links an Issue to a Person it is assigned to (issues.assignees)." ;
134
+ rdfs:domain :Issue ;
135
+ rdfs:range :Person .
136
+
117
137
  # --- fields (owl:DatatypeProperty) ---
118
138
 
119
139
  :iid a owl:DatatypeProperty ;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitlab-api
3
- Version: 27.3.11
3
+ Version: 27.3.13
4
4
  Summary: GitLab API + MCP Server
5
5
  Author-email: Repository Maintainers <maintainers@knuckles.team>
6
6
  License: MIT
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
12
12
  Requires-Python: >=3.12
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
- Requires-Dist: agent-connector-sdk[graphql,mcp]<0.6.0,>=0.5.2
15
+ Requires-Dist: agent-connector-sdk[graphql,mcp]<0.6.0,>=0.5.5
16
16
  Requires-Dist: python-dotenv>=1.2.4
17
17
  Provides-Extra: mcp
18
18
  Provides-Extra: all
@@ -59,6 +59,7 @@ tests/__init__.py
59
59
  tests/conftest.py
60
60
  tests/test_api_wrapper.py
61
61
  tests/test_auth.py
62
+ tests/test_catalog_edges.py
62
63
  tests/test_connector_prep.py
63
64
  tests/test_cq_paths.py
64
65
  tests/test_fleet_name.py
@@ -1,4 +1,4 @@
1
- agent-connector-sdk[graphql,mcp]<0.6.0,>=0.5.2
1
+ agent-connector-sdk[graphql,mcp]<0.6.0,>=0.5.5
2
2
  python-dotenv>=1.2.4
3
3
 
4
4
  [all]
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "gitlab-api"
7
- version = "27.3.11"
7
+ version = "27.3.13"
8
8
  description = "GitLab API + MCP Server"
9
9
  readme = "README.md"
10
10
  classifiers = [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Environment :: Console", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3",]
11
11
  requires-python = ">=3.12"
12
- dependencies = [ "agent-connector-sdk[graphql,mcp]>=0.5.2,<0.6.0", "python-dotenv>=1.2.4",]
12
+ dependencies = [ "agent-connector-sdk[graphql,mcp]>=0.5.5,<0.6.0", "python-dotenv>=1.2.4",]
13
13
  [[project.authors]]
14
14
  name = "Repository Maintainers"
15
15
  email = "maintainers@knuckles.team"
@@ -0,0 +1,53 @@
1
+ """Owner and assignee edges declared on the ingest sources (CONN-GITLAB-API-CONNECTOR-CONTENT-R005)."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from pathlib import Path
6
+
7
+ import pytest
8
+ from agent_connector_sdk.ingest.live_declaration import load_declaration
9
+ from agent_connector_sdk.ingest.source_sync import _edges # noqa: PLC2701
10
+
11
+ import gitlab_api
12
+
13
+ ONTOLOGY = Path(gitlab_api.__file__).parent / "ontology" / "gitlab.ttl"
14
+
15
+
16
+ def _declaration():
17
+ return load_declaration("gitlab_api")
18
+
19
+
20
+ def _domain_and_range(name: str) -> tuple[str, str]:
21
+ block = ONTOLOGY.read_text(encoding="utf-8").split(f"\n:{name} a owl:ObjectProperty")[1]
22
+ block = block.split(" .\n")[0]
23
+ return block.split("rdfs:domain :")[1].split()[0], block.split("rdfs:range :")[1].split()[0]
24
+
25
+
26
+ @pytest.mark.spec("CONN-GITLAB-API-CONNECTOR-CONTENT-R005")
27
+ def test_every_declared_edge_is_an_ontology_property_of_its_record_type() -> None:
28
+ declaration = _declaration()
29
+ seen = set()
30
+ for source in declaration.sources:
31
+ for edge in source.edges:
32
+ assert _domain_and_range(edge.relationship) == (source.record_type, edge.target_type)
33
+ assert edge.target_type in declaration.schema_mappings
34
+ seen.add((source.source_id, edge.relationship))
35
+ assert seen == {
36
+ ("issues", "issueAuthoredBy"),
37
+ ("issues", "issueAssignedTo"),
38
+ ("projects", "projectOwnedBy"),
39
+ ("projects", "partOfGroup"),
40
+ }
41
+
42
+
43
+ @pytest.mark.spec("CONN-GITLAB-API-CONNECTOR-CONTENT-R005")
44
+ def test_project_and_issue_references_become_owner_and_assignee_edges() -> None:
45
+ declaration = _declaration()
46
+ project = {"id": 213, "owner": {"id": 5, "username": "ann", "name": "Ann"}, "namespace": {"id": 9, "full_path": "homelab"}}
47
+ issue = {"id": 2, "author": {"id": 5, "username": "ann"}, "assignees": [{"id": 6, "username": "bob"}, {"id": 5}]}
48
+ projects = {(r.relationship, r.target) for _, r in _edges("213", project, declaration.source("projects"))}
49
+ issues = {(r.relationship, r.target) for _, r in _edges("2", issue, declaration.source("issues"))}
50
+ assert projects == {("projectOwnedBy", "user:5"), ("partOfGroup", "group:9")}
51
+ assert issues == {("issueAuthoredBy", "user:5"), ("issueAssignedTo", "user:6"), ("issueAssignedTo", "user:5")}
52
+ owner = next(t for t, r in _edges("213", project, declaration.source("projects")) if r.relationship == "projectOwnedBy")
53
+ assert owner.node_type == "Person" and owner.properties == {"name": "Ann", "username": "ann"}
File without changes
File without changes
File without changes