gitlab-api 27.3.13__tar.gz → 27.3.14__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.
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/PKG-INFO +1 -1
- gitlab_api-27.3.14/gitlab_api/ontology/access_contracts.ttl +287 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/ontology/certification.json +1 -1
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api.egg-info/PKG-INFO +1 -1
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api.egg-info/SOURCES.txt +2 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/pyproject.toml +1 -1
- gitlab_api-27.3.14/tests/test_access_contracts.py +75 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/LICENSE +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/README.md +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/__init__.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/__main__.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/api/__init__.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/api/api_client_base.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/api/api_client_environments.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/api/api_client_issues.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/api/api_client_merge_requests.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/api/api_client_other.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/api/api_client_pipelines.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/api/api_client_projects.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/api/api_client_repositories.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/api/api_client_system.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/api/api_client_users_groups.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/api/api_client_vulnerabilities.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/api_client.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/auth.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/connector_prep.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/connector_sources.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/gitlab_gql.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/gitlab_input_models.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/gitlab_response_models.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/instances.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/kg_ingest.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/mcp_config.json +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/mcp_server.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/ontology/__init__.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/ontology/fixtures/records.json +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/ontology/gitlab.ttl +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/ontology/mappings/source.yaml +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/ontology/migrations/manifest.json +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/ontology/shapes/connector.shacl.ttl +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/prompts/devops_specialist.json +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-api-operations/SKILL.md +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-api-operations/agents/openai.yaml +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-api-operations/references/catalog.md +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-issues/SKILL.md +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-issues/WORKFLOW.md +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-merge-request-create/SKILL.md +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-merge-request-create/WORKFLOW.md +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-merge-request-review/SKILL.md +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-merge-request-review/WORKFLOW.md +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-pipelines/SKILL.md +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-pipelines/WORKFLOW.md +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-vulnerabilities/SKILL.md +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-vulnerabilities/WORKFLOW.md +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api.egg-info/dependency_links.txt +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api.egg-info/entry_points.txt +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api.egg-info/requires.txt +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api.egg-info/top_level.txt +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/scripts/check_import_safety.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/scripts/security_contract.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/setup.cfg +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/__init__.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/conftest.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_api_wrapper.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_auth.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_catalog_edges.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_connector_prep.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_cq_paths.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_fleet_name.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_gitlab_a2a_validation.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_gitlab_api_brute_force_coverage.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_gitlab_gql.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_gitlab_mcp_validation.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_gitlab_models.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_identity_context_scoping.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_ingest_sources.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_init_dynamics.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_instances.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_kg_ingest.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_mock_coverage.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_ontology_parent_link.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_startup.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_tool_modes.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/test_verify_agent.py +0 -0
- {gitlab_api-27.3.13 → gitlab_api-27.3.14}/tests/verify_a2a_queries.py +0 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
@prefix ac: <https://knuckles-team.github.io/agent-connector-sdk/access#> .
|
|
2
|
+
@prefix gl: <http://knuckles.team/kg#> .
|
|
3
|
+
|
|
4
|
+
# Read contracts for the classes declared by gitlab.ttl. The MCP tools expose
|
|
5
|
+
# both read and write actions, but these mappings are read-only query routes:
|
|
6
|
+
# callers select the listed get action through the operation's action envelope.
|
|
7
|
+
# The source classes stay in GitLab's ontology namespace. No heuristic
|
|
8
|
+
# crosswalk to a hub class is asserted here.
|
|
9
|
+
|
|
10
|
+
gl:gitlabGroupAccess a ac:AccessContract ;
|
|
11
|
+
ac:classIri gl:GitLabGroup ;
|
|
12
|
+
ac:sourceId "gitlab-api" ;
|
|
13
|
+
ac:entity "group" ;
|
|
14
|
+
ac:keyField "id" ;
|
|
15
|
+
ac:accessKind "mcp_tool" ;
|
|
16
|
+
ac:operation "gitlab_groups" ;
|
|
17
|
+
ac:parameter "action", "params_json" ;
|
|
18
|
+
ac:pagination "page" ;
|
|
19
|
+
ac:pushdown "filter", "limit", "sort" ;
|
|
20
|
+
ac:authRef "env://GITLAB_TOKEN" ;
|
|
21
|
+
ac:rateLimitPerMinute 60 ;
|
|
22
|
+
ac:freshnessSeconds 300 ;
|
|
23
|
+
ac:costHint "medium" .
|
|
24
|
+
|
|
25
|
+
gl:gitlabGroupWebUrlBinding a ac:PropertyBinding ;
|
|
26
|
+
ac:contract gl:gitlabGroupAccess ; ac:property gl:webUrl ; ac:field "web_url" .
|
|
27
|
+
|
|
28
|
+
gl:projectAccess a ac:AccessContract ;
|
|
29
|
+
ac:classIri gl:Project ;
|
|
30
|
+
ac:sourceId "gitlab-api" ;
|
|
31
|
+
ac:entity "project" ;
|
|
32
|
+
ac:keyField "id" ;
|
|
33
|
+
ac:accessKind "mcp_tool" ;
|
|
34
|
+
ac:operation "gitlab_projects" ;
|
|
35
|
+
ac:parameter "action", "params_json" ;
|
|
36
|
+
ac:pagination "page" ;
|
|
37
|
+
ac:pushdown "filter", "limit", "sort" ;
|
|
38
|
+
ac:authRef "env://GITLAB_TOKEN" ;
|
|
39
|
+
ac:rateLimitPerMinute 60 ;
|
|
40
|
+
ac:freshnessSeconds 300 ;
|
|
41
|
+
ac:costHint "low" .
|
|
42
|
+
|
|
43
|
+
gl:projectWebUrlBinding a ac:PropertyBinding ;
|
|
44
|
+
ac:contract gl:projectAccess ; ac:property gl:webUrl ; ac:field "web_url" .
|
|
45
|
+
|
|
46
|
+
gl:mergeRequestAccess a ac:AccessContract ;
|
|
47
|
+
ac:classIri gl:MergeRequest ;
|
|
48
|
+
ac:sourceId "gitlab-api" ;
|
|
49
|
+
ac:entity "merge_request" ;
|
|
50
|
+
ac:keyField "id" ;
|
|
51
|
+
ac:accessKind "mcp_tool" ;
|
|
52
|
+
ac:operation "gitlab_merge_requests" ;
|
|
53
|
+
ac:parameter "action", "params_json" ;
|
|
54
|
+
ac:pagination "page" ;
|
|
55
|
+
ac:pushdown "filter", "limit", "sort" ;
|
|
56
|
+
ac:authRef "env://GITLAB_TOKEN" ;
|
|
57
|
+
ac:rateLimitPerMinute 60 ;
|
|
58
|
+
ac:freshnessSeconds 60 ;
|
|
59
|
+
ac:costHint "medium" .
|
|
60
|
+
|
|
61
|
+
gl:mergeRequestIidBinding a ac:PropertyBinding ;
|
|
62
|
+
ac:contract gl:mergeRequestAccess ; ac:property gl:iid ; ac:field "iid" .
|
|
63
|
+
|
|
64
|
+
gl:mergeRequestStateBinding a ac:PropertyBinding ;
|
|
65
|
+
ac:contract gl:mergeRequestAccess ; ac:property gl:state ; ac:field "state" .
|
|
66
|
+
|
|
67
|
+
gl:mergeRequestWebUrlBinding a ac:PropertyBinding ;
|
|
68
|
+
ac:contract gl:mergeRequestAccess ; ac:property gl:webUrl ; ac:field "web_url" .
|
|
69
|
+
|
|
70
|
+
gl:pipelineAccess a ac:AccessContract ;
|
|
71
|
+
ac:classIri gl:Pipeline ;
|
|
72
|
+
ac:sourceId "gitlab-api" ;
|
|
73
|
+
ac:entity "pipeline" ;
|
|
74
|
+
ac:keyField "id" ;
|
|
75
|
+
ac:accessKind "mcp_tool" ;
|
|
76
|
+
ac:operation "gitlab_pipelines" ;
|
|
77
|
+
ac:parameter "action", "params_json" ;
|
|
78
|
+
ac:pagination "page" ;
|
|
79
|
+
ac:pushdown "filter", "limit", "sort" ;
|
|
80
|
+
ac:authRef "env://GITLAB_TOKEN" ;
|
|
81
|
+
ac:rateLimitPerMinute 60 ;
|
|
82
|
+
ac:freshnessSeconds 60 ;
|
|
83
|
+
ac:costHint "medium" .
|
|
84
|
+
|
|
85
|
+
gl:pipelineStatusBinding a ac:PropertyBinding ;
|
|
86
|
+
ac:contract gl:pipelineAccess ; ac:property gl:pipelineStatus ; ac:field "status" .
|
|
87
|
+
|
|
88
|
+
gl:pipelineRefBinding a ac:PropertyBinding ;
|
|
89
|
+
ac:contract gl:pipelineAccess ; ac:property gl:ref ; ac:field "ref" .
|
|
90
|
+
|
|
91
|
+
gl:pipelineShaBinding a ac:PropertyBinding ;
|
|
92
|
+
ac:contract gl:pipelineAccess ; ac:property gl:sha ; ac:field "sha" .
|
|
93
|
+
|
|
94
|
+
gl:pipelineWebUrlBinding a ac:PropertyBinding ;
|
|
95
|
+
ac:contract gl:pipelineAccess ; ac:property gl:webUrl ; ac:field "web_url" .
|
|
96
|
+
|
|
97
|
+
gl:pipelineRunAccess a ac:AccessContract ;
|
|
98
|
+
ac:classIri gl:PipelineRun ;
|
|
99
|
+
ac:sourceId "gitlab-api" ;
|
|
100
|
+
ac:entity "pipeline" ;
|
|
101
|
+
ac:keyField "id" ;
|
|
102
|
+
ac:accessKind "mcp_tool" ;
|
|
103
|
+
ac:operation "gitlab_pipelines" ;
|
|
104
|
+
ac:parameter "action", "params_json" ;
|
|
105
|
+
ac:pagination "page" ;
|
|
106
|
+
ac:pushdown "filter", "limit", "sort" ;
|
|
107
|
+
ac:authRef "env://GITLAB_TOKEN" ;
|
|
108
|
+
ac:rateLimitPerMinute 60 ;
|
|
109
|
+
ac:freshnessSeconds 60 ;
|
|
110
|
+
ac:costHint "medium" .
|
|
111
|
+
|
|
112
|
+
gl:jobAccess a ac:AccessContract ;
|
|
113
|
+
ac:classIri gl:Job ;
|
|
114
|
+
ac:sourceId "gitlab-api" ;
|
|
115
|
+
ac:entity "job" ;
|
|
116
|
+
ac:keyField "id" ;
|
|
117
|
+
ac:accessKind "mcp_tool" ;
|
|
118
|
+
ac:operation "gitlab_jobs" ;
|
|
119
|
+
ac:parameter "action", "params_json" ;
|
|
120
|
+
ac:pagination "page" ;
|
|
121
|
+
ac:pushdown "filter", "limit", "sort" ;
|
|
122
|
+
ac:authRef "env://GITLAB_TOKEN" ;
|
|
123
|
+
ac:rateLimitPerMinute 60 ;
|
|
124
|
+
ac:freshnessSeconds 60 ;
|
|
125
|
+
ac:costHint "medium" .
|
|
126
|
+
|
|
127
|
+
gl:jobStatusBinding a ac:PropertyBinding ;
|
|
128
|
+
ac:contract gl:jobAccess ; ac:property gl:pipelineStatus ; ac:field "status" .
|
|
129
|
+
|
|
130
|
+
gl:jobRefBinding a ac:PropertyBinding ;
|
|
131
|
+
ac:contract gl:jobAccess ; ac:property gl:ref ; ac:field "ref" .
|
|
132
|
+
|
|
133
|
+
gl:jobWebUrlBinding a ac:PropertyBinding ;
|
|
134
|
+
ac:contract gl:jobAccess ; ac:property gl:webUrl ; ac:field "web_url" .
|
|
135
|
+
|
|
136
|
+
gl:checkRunAccess a ac:AccessContract ;
|
|
137
|
+
ac:classIri gl:CheckRun ;
|
|
138
|
+
ac:sourceId "gitlab-api" ;
|
|
139
|
+
ac:entity "job" ;
|
|
140
|
+
ac:keyField "id" ;
|
|
141
|
+
ac:accessKind "mcp_tool" ;
|
|
142
|
+
ac:operation "gitlab_jobs" ;
|
|
143
|
+
ac:parameter "action", "params_json" ;
|
|
144
|
+
ac:pagination "page" ;
|
|
145
|
+
ac:pushdown "filter", "limit", "sort" ;
|
|
146
|
+
ac:authRef "env://GITLAB_TOKEN" ;
|
|
147
|
+
ac:rateLimitPerMinute 60 ;
|
|
148
|
+
ac:freshnessSeconds 60 ;
|
|
149
|
+
ac:costHint "medium" .
|
|
150
|
+
|
|
151
|
+
gl:issueAccess a ac:AccessContract ;
|
|
152
|
+
ac:classIri gl:Issue ;
|
|
153
|
+
ac:sourceId "gitlab-api" ;
|
|
154
|
+
ac:entity "issue" ;
|
|
155
|
+
ac:keyField "id" ;
|
|
156
|
+
ac:accessKind "mcp_tool" ;
|
|
157
|
+
ac:operation "gitlab_issues" ;
|
|
158
|
+
ac:parameter "action", "params_json" ;
|
|
159
|
+
ac:pagination "page" ;
|
|
160
|
+
ac:pushdown "filter", "limit", "sort" ;
|
|
161
|
+
ac:authRef "env://GITLAB_TOKEN" ;
|
|
162
|
+
ac:rateLimitPerMinute 60 ;
|
|
163
|
+
ac:freshnessSeconds 60 ;
|
|
164
|
+
ac:costHint "medium" .
|
|
165
|
+
|
|
166
|
+
gl:issueIidBinding a ac:PropertyBinding ;
|
|
167
|
+
ac:contract gl:issueAccess ; ac:property gl:iid ; ac:field "iid" .
|
|
168
|
+
|
|
169
|
+
gl:issueStateBinding a ac:PropertyBinding ;
|
|
170
|
+
ac:contract gl:issueAccess ; ac:property gl:state ; ac:field "state" .
|
|
171
|
+
|
|
172
|
+
gl:issueWebUrlBinding a ac:PropertyBinding ;
|
|
173
|
+
ac:contract gl:issueAccess ; ac:property gl:webUrl ; ac:field "web_url" .
|
|
174
|
+
|
|
175
|
+
gl:epicAccess a ac:AccessContract ;
|
|
176
|
+
ac:classIri gl:Epic ;
|
|
177
|
+
ac:sourceId "gitlab-api" ;
|
|
178
|
+
ac:entity "epic" ;
|
|
179
|
+
ac:keyField "id" ;
|
|
180
|
+
ac:accessKind "mcp_tool" ;
|
|
181
|
+
ac:operation "gitlab_epics" ;
|
|
182
|
+
ac:parameter "action", "params_json" ;
|
|
183
|
+
ac:pagination "page" ;
|
|
184
|
+
ac:pushdown "filter", "limit", "sort" ;
|
|
185
|
+
ac:authRef "env://GITLAB_TOKEN" ;
|
|
186
|
+
ac:rateLimitPerMinute 60 ;
|
|
187
|
+
ac:freshnessSeconds 300 ;
|
|
188
|
+
ac:costHint "medium" .
|
|
189
|
+
|
|
190
|
+
gl:epicIidBinding a ac:PropertyBinding ;
|
|
191
|
+
ac:contract gl:epicAccess ; ac:property gl:iid ; ac:field "iid" .
|
|
192
|
+
|
|
193
|
+
gl:epicWebUrlBinding a ac:PropertyBinding ;
|
|
194
|
+
ac:contract gl:epicAccess ; ac:property gl:webUrl ; ac:field "web_url" .
|
|
195
|
+
|
|
196
|
+
gl:milestoneAccess a ac:AccessContract ;
|
|
197
|
+
ac:classIri gl:Milestone ;
|
|
198
|
+
ac:sourceId "gitlab-api" ;
|
|
199
|
+
ac:entity "milestone" ;
|
|
200
|
+
ac:keyField "id" ;
|
|
201
|
+
ac:accessKind "mcp_tool" ;
|
|
202
|
+
ac:operation "gitlab_milestones" ;
|
|
203
|
+
ac:parameter "action", "params_json" ;
|
|
204
|
+
ac:pagination "page" ;
|
|
205
|
+
ac:pushdown "filter", "limit", "sort" ;
|
|
206
|
+
ac:authRef "env://GITLAB_TOKEN" ;
|
|
207
|
+
ac:rateLimitPerMinute 60 ;
|
|
208
|
+
ac:freshnessSeconds 300 ;
|
|
209
|
+
ac:costHint "medium" .
|
|
210
|
+
|
|
211
|
+
gl:milestoneStateBinding a ac:PropertyBinding ;
|
|
212
|
+
ac:contract gl:milestoneAccess ; ac:property gl:state ; ac:field "state" .
|
|
213
|
+
|
|
214
|
+
gl:milestoneWebUrlBinding a ac:PropertyBinding ;
|
|
215
|
+
ac:contract gl:milestoneAccess ; ac:property gl:webUrl ; ac:field "web_url" .
|
|
216
|
+
|
|
217
|
+
gl:commitAccess a ac:AccessContract ;
|
|
218
|
+
ac:classIri gl:Commit ;
|
|
219
|
+
ac:sourceId "gitlab-api" ;
|
|
220
|
+
ac:entity "commit" ;
|
|
221
|
+
ac:keyField "id" ;
|
|
222
|
+
ac:accessKind "mcp_tool" ;
|
|
223
|
+
ac:operation "gitlab_commits" ;
|
|
224
|
+
ac:parameter "action", "params_json" ;
|
|
225
|
+
ac:pagination "page" ;
|
|
226
|
+
ac:pushdown "filter", "limit", "sort" ;
|
|
227
|
+
ac:authRef "env://GITLAB_TOKEN" ;
|
|
228
|
+
ac:rateLimitPerMinute 60 ;
|
|
229
|
+
ac:freshnessSeconds 60 ;
|
|
230
|
+
ac:costHint "medium" .
|
|
231
|
+
|
|
232
|
+
gl:commitShaBinding a ac:PropertyBinding ;
|
|
233
|
+
ac:contract gl:commitAccess ; ac:property gl:sha ; ac:field "sha" .
|
|
234
|
+
|
|
235
|
+
gl:commitWebUrlBinding a ac:PropertyBinding ;
|
|
236
|
+
ac:contract gl:commitAccess ; ac:property gl:webUrl ; ac:field "web_url" .
|
|
237
|
+
|
|
238
|
+
gl:branchAccess a ac:AccessContract ;
|
|
239
|
+
ac:classIri gl:Branch ;
|
|
240
|
+
ac:sourceId "gitlab-api" ;
|
|
241
|
+
ac:entity "branch" ;
|
|
242
|
+
ac:keyField "name" ;
|
|
243
|
+
ac:accessKind "mcp_tool" ;
|
|
244
|
+
ac:operation "gitlab_branches" ;
|
|
245
|
+
ac:parameter "action", "params_json" ;
|
|
246
|
+
ac:pagination "page" ;
|
|
247
|
+
ac:pushdown "filter", "limit", "sort" ;
|
|
248
|
+
ac:authRef "env://GITLAB_TOKEN" ;
|
|
249
|
+
ac:rateLimitPerMinute 60 ;
|
|
250
|
+
ac:freshnessSeconds 300 ;
|
|
251
|
+
ac:costHint "low" .
|
|
252
|
+
|
|
253
|
+
gl:branchWebUrlBinding a ac:PropertyBinding ;
|
|
254
|
+
ac:contract gl:branchAccess ; ac:property gl:webUrl ; ac:field "web_url" .
|
|
255
|
+
|
|
256
|
+
gl:releaseAccess a ac:AccessContract ;
|
|
257
|
+
ac:classIri gl:Release ;
|
|
258
|
+
ac:sourceId "gitlab-api" ;
|
|
259
|
+
ac:entity "release" ;
|
|
260
|
+
ac:keyField "tag_name" ;
|
|
261
|
+
ac:accessKind "mcp_tool" ;
|
|
262
|
+
ac:operation "gitlab_releases" ;
|
|
263
|
+
ac:parameter "action", "params_json" ;
|
|
264
|
+
ac:pagination "page" ;
|
|
265
|
+
ac:pushdown "filter", "limit", "sort" ;
|
|
266
|
+
ac:authRef "env://GITLAB_TOKEN" ;
|
|
267
|
+
ac:rateLimitPerMinute 60 ;
|
|
268
|
+
ac:freshnessSeconds 300 ;
|
|
269
|
+
ac:costHint "medium" .
|
|
270
|
+
|
|
271
|
+
gl:runnerAccess a ac:AccessContract ;
|
|
272
|
+
ac:classIri gl:Runner ;
|
|
273
|
+
ac:sourceId "gitlab-api" ;
|
|
274
|
+
ac:entity "runner" ;
|
|
275
|
+
ac:keyField "id" ;
|
|
276
|
+
ac:accessKind "mcp_tool" ;
|
|
277
|
+
ac:operation "gitlab_runners" ;
|
|
278
|
+
ac:parameter "action", "params_json" ;
|
|
279
|
+
ac:pagination "page" ;
|
|
280
|
+
ac:pushdown "filter", "limit", "sort" ;
|
|
281
|
+
ac:authRef "env://GITLAB_TOKEN" ;
|
|
282
|
+
ac:rateLimitPerMinute 60 ;
|
|
283
|
+
ac:freshnessSeconds 300 ;
|
|
284
|
+
ac:costHint "medium" .
|
|
285
|
+
|
|
286
|
+
gl:runnerStateBinding a ac:PropertyBinding ;
|
|
287
|
+
ac:contract gl:runnerAccess ; ac:property gl:state ; ac:field "status" .
|
|
@@ -33,6 +33,7 @@ gitlab_api/api/api_client_system.py
|
|
|
33
33
|
gitlab_api/api/api_client_users_groups.py
|
|
34
34
|
gitlab_api/api/api_client_vulnerabilities.py
|
|
35
35
|
gitlab_api/ontology/__init__.py
|
|
36
|
+
gitlab_api/ontology/access_contracts.ttl
|
|
36
37
|
gitlab_api/ontology/certification.json
|
|
37
38
|
gitlab_api/ontology/gitlab.ttl
|
|
38
39
|
gitlab_api/ontology/fixtures/records.json
|
|
@@ -57,6 +58,7 @@ scripts/check_import_safety.py
|
|
|
57
58
|
scripts/security_contract.py
|
|
58
59
|
tests/__init__.py
|
|
59
60
|
tests/conftest.py
|
|
61
|
+
tests/test_access_contracts.py
|
|
60
62
|
tests/test_api_wrapper.py
|
|
61
63
|
tests/test_auth.py
|
|
62
64
|
tests/test_catalog_edges.py
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "gitlab-api"
|
|
7
|
-
version = "27.3.
|
|
7
|
+
version = "27.3.14"
|
|
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",]
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""GitLab's read-only source access contracts stay source-local."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
from agent_connector_sdk.access_contract import parse_access_contracts
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
ROOT = Path(__file__).resolve().parents[1]
|
|
11
|
+
CONTRACTS = ROOT / "gitlab_api" / "ontology" / "access_contracts.ttl"
|
|
12
|
+
KG = "http://knuckles.team/kg#"
|
|
13
|
+
|
|
14
|
+
EXPECTED = {
|
|
15
|
+
"GitLabGroup": ("gitlab_groups", "group", "id"),
|
|
16
|
+
"Project": ("gitlab_projects", "project", "id"),
|
|
17
|
+
"MergeRequest": ("gitlab_merge_requests", "merge_request", "id"),
|
|
18
|
+
"Pipeline": ("gitlab_pipelines", "pipeline", "id"),
|
|
19
|
+
"PipelineRun": ("gitlab_pipelines", "pipeline", "id"),
|
|
20
|
+
"Job": ("gitlab_jobs", "job", "id"),
|
|
21
|
+
"CheckRun": ("gitlab_jobs", "job", "id"),
|
|
22
|
+
"Issue": ("gitlab_issues", "issue", "id"),
|
|
23
|
+
"Epic": ("gitlab_epics", "epic", "id"),
|
|
24
|
+
"Milestone": ("gitlab_milestones", "milestone", "id"),
|
|
25
|
+
"Commit": ("gitlab_commits", "commit", "id"),
|
|
26
|
+
"Branch": ("gitlab_branches", "branch", "name"),
|
|
27
|
+
"Release": ("gitlab_releases", "release", "tag_name"),
|
|
28
|
+
"Runner": ("gitlab_runners", "runner", "id"),
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _contracts():
|
|
33
|
+
return parse_access_contracts(CONTRACTS.read_text(encoding="utf-8"))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def test_every_declared_gitlab_class_has_a_typed_read_contract() -> None:
|
|
37
|
+
contracts = _contracts()
|
|
38
|
+
by_class = {contract.class_iri.rsplit("#", 1)[-1]: contract for contract in contracts}
|
|
39
|
+
|
|
40
|
+
assert set(by_class) == set(EXPECTED)
|
|
41
|
+
for class_name, (operation, entity, key_field) in EXPECTED.items():
|
|
42
|
+
contract = by_class[class_name]
|
|
43
|
+
assert contract.class_iri == KG + class_name
|
|
44
|
+
assert contract.source_id == "gitlab-api"
|
|
45
|
+
assert contract.access_kind == "mcp_tool"
|
|
46
|
+
assert contract.operation == operation
|
|
47
|
+
assert contract.entity == entity
|
|
48
|
+
assert contract.key_field == key_field
|
|
49
|
+
assert contract.parameters == ("action", "params_json")
|
|
50
|
+
assert contract.auth_ref == "env://GITLAB_TOKEN"
|
|
51
|
+
assert contract.pagination == "page"
|
|
52
|
+
assert contract.pushdown == frozenset({"filter", "limit", "sort"})
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def test_gitlab_contracts_do_not_promote_draft_crosswalks() -> None:
|
|
56
|
+
contracts = _contracts()
|
|
57
|
+
|
|
58
|
+
assert all(contract.class_iri.startswith(KG) for contract in contracts)
|
|
59
|
+
assert all(
|
|
60
|
+
contract.class_iri not in {KG + "Incident", KG + "SoftwareProject"}
|
|
61
|
+
for contract in contracts
|
|
62
|
+
)
|
|
63
|
+
assert all(contract.source_id == "gitlab-api" for contract in contracts)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def test_gitlab_contract_artifact_is_packaged_under_ontology() -> None:
|
|
67
|
+
assert CONTRACTS.is_file()
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def test_gitlab_contract_bindings_use_declared_fields() -> None:
|
|
71
|
+
contracts = {contract.class_iri.rsplit("#", 1)[-1]: contract for contract in _contracts()}
|
|
72
|
+
|
|
73
|
+
assert (KG + "webUrl", "web_url") in contracts["Project"].predicates
|
|
74
|
+
assert (KG + "pipelineStatus", "status") in contracts["Pipeline"].predicates
|
|
75
|
+
assert (KG + "sha", "sha") in contracts["Commit"].predicates
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-api-operations/agents/openai.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-merge-request-create/SKILL.md
RENAMED
|
File without changes
|
{gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-merge-request-create/WORKFLOW.md
RENAMED
|
File without changes
|
{gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-merge-request-review/SKILL.md
RENAMED
|
File without changes
|
{gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-merge-request-review/WORKFLOW.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitlab_api-27.3.13 → gitlab_api-27.3.14}/gitlab_api/skills/gitlab-vulnerabilities/WORKFLOW.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|