gitlab-api 27.3.15__tar.gz → 27.3.17__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.15 → gitlab_api-27.3.17}/PKG-INFO +8 -8
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/README.md +6 -6
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/__init__.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/__main__.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/api/api_client_base.py +3 -3
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/api/api_client_environments.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/api/api_client_issues.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/api/api_client_merge_requests.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/api/api_client_other.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/api/api_client_pipelines.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/api/api_client_projects.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/api/api_client_repositories.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/api/api_client_system.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/api/api_client_users_groups.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/api/api_client_vulnerabilities.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/auth.py +14 -14
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/connector_sources.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/gitlab_gql.py +4 -4
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/gitlab_input_models.py +3 -3
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/instances.py +4 -4
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/kg_ingest.py +2 -2
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/mcp_server.py +7 -7
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/ontology/__init__.py +2 -2
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/ontology/certification.json +2 -2
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/ontology/gitlab.ttl +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-api-development/SKILL.md +4 -4
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-issues/SKILL.md +4 -4
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-issues/WORKFLOW.md +3 -3
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-merge-request-create/SKILL.md +3 -3
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-merge-request-create/WORKFLOW.md +2 -2
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-merge-request-review/SKILL.md +7 -7
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-merge-request-review/WORKFLOW.md +6 -6
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-pipelines/SKILL.md +6 -6
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-pipelines/WORKFLOW.md +5 -5
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-vulnerabilities/SKILL.md +4 -4
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-vulnerabilities/WORKFLOW.md +3 -3
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api.egg-info/PKG-INFO +8 -8
- gitlab_api-27.3.17/gitlab_api.egg-info/entry_points.txt +8 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api.egg-info/requires.txt +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/pyproject.toml +6 -6
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/scripts/check_import_safety.py +5 -5
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_access_contracts.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_auth.py +6 -6
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_catalog_edges.py +2 -2
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_cq_paths.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_fleet_name.py +2 -2
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_gitlab_api_development_skill.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_gitlab_gql.py +3 -3
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_identity_context_scoping.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_ingest_sources.py +3 -3
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_instances.py +1 -1
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_kg_ingest.py +6 -4
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_mock_coverage.py +2 -2
- gitlab_api-27.3.17/tests/test_pages_workflow.py +26 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_tool_modes.py +1 -1
- gitlab_api-27.3.15/gitlab_api.egg-info/entry_points.txt +0 -8
- gitlab_api-27.3.15/tests/test_pages_workflow.py +0 -52
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/LICENSE +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/api/__init__.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/api_client.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/connector_prep.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/gitlab_response_models.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/mcp_config.json +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/ontology/access_contracts.ttl +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/ontology/fixtures/records.json +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/ontology/mappings/source.yaml +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/ontology/migrations/manifest.json +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/ontology/shapes/connector.shacl.ttl +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/prompts/devops_specialist.json +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-api-operations/SKILL.md +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-api-operations/agents/openai.yaml +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-api-operations/references/catalog.md +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api.egg-info/SOURCES.txt +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api.egg-info/dependency_links.txt +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api.egg-info/top_level.txt +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/scripts/security_contract.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/setup.cfg +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/__init__.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/conftest.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_api_wrapper.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_connector_prep.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_gitlab_a2a_validation.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_gitlab_api_brute_force_coverage.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_gitlab_mcp_validation.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_gitlab_models.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_init_dynamics.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_ontology_parent_link.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_startup.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/tests/test_verify_agent.py +0 -0
- {gitlab_api-27.3.15 → gitlab_api-27.3.17}/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.
|
|
3
|
+
Version: 27.3.17
|
|
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:
|
|
15
|
+
Requires-Dist: scion-sdk[graphql,mcp]<0.7.0,>=0.6.4
|
|
16
16
|
Requires-Dist: python-dotenv>=1.2.4
|
|
17
17
|
Provides-Extra: mcp
|
|
18
18
|
Provides-Extra: all
|
|
@@ -79,11 +79,11 @@ This server use dynamic Action-Routed tools to optimize token overhead and maxim
|
|
|
79
79
|
|
|
80
80
|
### Tool surface — `MCP_TOOL_MODE`
|
|
81
81
|
|
|
82
|
-
Set `MCP_TOOL_MODE` (in the shared `~/.config/
|
|
82
|
+
Set `MCP_TOOL_MODE` (in the shared `~/.config/scion-sdk/config.json` or env):
|
|
83
83
|
`condensed` (default — the action-routed tools below), `verbose` (one named 1:1 tool
|
|
84
84
|
per API method, e.g. `gitlab_get_branches(...)`, tagged `verbose`), or `both`. Filter
|
|
85
85
|
the verbose set with `--tools tag:verbose` / `MCP_ENABLED_TAGS=verbose`. See the
|
|
86
|
-
|
|
86
|
+
scion-sdk *MCP Tool Modes* guide.
|
|
87
87
|
|
|
88
88
|
### Available MCP Tools
|
|
89
89
|
|
|
@@ -367,7 +367,7 @@ When query strings or parameters are supplied, an LLM-free **Knowledge Graph res
|
|
|
367
367
|
<!-- MCP-CONFIG-EXAMPLES:START -->
|
|
368
368
|
|
|
369
369
|
> **Install the connector-focused `[mcp]` extra.** Examples use `gitlab-api[mcp]` to add
|
|
370
|
-
> FastMCP / FastAPI through `
|
|
370
|
+
> FastMCP / FastAPI through `scion-sdk`; the required Scion SDK core
|
|
371
371
|
> still carries `epistemic-graph[full]`. The `[agent-runtime]` extra additionally
|
|
372
372
|
> enables model orchestration.
|
|
373
373
|
|
|
@@ -627,7 +627,7 @@ the detailed transport contract.
|
|
|
627
627
|
| `GRAPHQLTOOL` | `True` | |
|
|
628
628
|
| `GRAPHQL_OPSTOOL` | `True` | |
|
|
629
629
|
|
|
630
|
-
#### Inherited
|
|
630
|
+
#### Inherited scion-sdk variables (apply to every connector)
|
|
631
631
|
|
|
632
632
|
| Variable | Example | Description |
|
|
633
633
|
|----------|---------|-------------|
|
|
@@ -647,7 +647,7 @@ the detailed transport contract.
|
|
|
647
647
|
| `PROVIDER` | `openai` | LLM provider for the agent |
|
|
648
648
|
| `MODEL_ID` | `gpt-4o` | Model id for the agent |
|
|
649
649
|
|
|
650
|
-
_45 package + 16 inherited variable(s). Auto-generated from `.env.example` + the shared
|
|
650
|
+
_45 package + 16 inherited variable(s). Auto-generated from `.env.example` + the shared scion-sdk set — do not edit._
|
|
651
651
|
<!-- ENV-VARS-TABLE:END -->
|
|
652
652
|
|
|
653
653
|
Every variable the server reads.
|
|
@@ -664,7 +664,7 @@ instances are configured, it falls back to the single-host `GITLAB_*` values bel
|
|
|
664
664
|
| `GITLAB_TLS_PROFILE` | Optional runtime TLS profile selector | _(unset)_ |
|
|
665
665
|
|
|
666
666
|
> Multiple instances are declared once under `gitlab_instances` in the shared
|
|
667
|
-
>
|
|
667
|
+
> scion-sdk XDG config (`~/.config/scion-sdk/config.json`) — each entry has
|
|
668
668
|
> `name`, `url`, `token`, and optional `tls_profile`. Target a tenant by **name** from the client
|
|
669
669
|
> factory; an unset instance resolves to the first configured one (else `GITLAB_URL` /
|
|
670
670
|
> `GITLAB_TOKEN`).
|
|
@@ -54,11 +54,11 @@ This server use dynamic Action-Routed tools to optimize token overhead and maxim
|
|
|
54
54
|
|
|
55
55
|
### Tool surface — `MCP_TOOL_MODE`
|
|
56
56
|
|
|
57
|
-
Set `MCP_TOOL_MODE` (in the shared `~/.config/
|
|
57
|
+
Set `MCP_TOOL_MODE` (in the shared `~/.config/scion-sdk/config.json` or env):
|
|
58
58
|
`condensed` (default — the action-routed tools below), `verbose` (one named 1:1 tool
|
|
59
59
|
per API method, e.g. `gitlab_get_branches(...)`, tagged `verbose`), or `both`. Filter
|
|
60
60
|
the verbose set with `--tools tag:verbose` / `MCP_ENABLED_TAGS=verbose`. See the
|
|
61
|
-
|
|
61
|
+
scion-sdk *MCP Tool Modes* guide.
|
|
62
62
|
|
|
63
63
|
### Available MCP Tools
|
|
64
64
|
|
|
@@ -342,7 +342,7 @@ When query strings or parameters are supplied, an LLM-free **Knowledge Graph res
|
|
|
342
342
|
<!-- MCP-CONFIG-EXAMPLES:START -->
|
|
343
343
|
|
|
344
344
|
> **Install the connector-focused `[mcp]` extra.** Examples use `gitlab-api[mcp]` to add
|
|
345
|
-
> FastMCP / FastAPI through `
|
|
345
|
+
> FastMCP / FastAPI through `scion-sdk`; the required Scion SDK core
|
|
346
346
|
> still carries `epistemic-graph[full]`. The `[agent-runtime]` extra additionally
|
|
347
347
|
> enables model orchestration.
|
|
348
348
|
|
|
@@ -602,7 +602,7 @@ the detailed transport contract.
|
|
|
602
602
|
| `GRAPHQLTOOL` | `True` | |
|
|
603
603
|
| `GRAPHQL_OPSTOOL` | `True` | |
|
|
604
604
|
|
|
605
|
-
#### Inherited
|
|
605
|
+
#### Inherited scion-sdk variables (apply to every connector)
|
|
606
606
|
|
|
607
607
|
| Variable | Example | Description |
|
|
608
608
|
|----------|---------|-------------|
|
|
@@ -622,7 +622,7 @@ the detailed transport contract.
|
|
|
622
622
|
| `PROVIDER` | `openai` | LLM provider for the agent |
|
|
623
623
|
| `MODEL_ID` | `gpt-4o` | Model id for the agent |
|
|
624
624
|
|
|
625
|
-
_45 package + 16 inherited variable(s). Auto-generated from `.env.example` + the shared
|
|
625
|
+
_45 package + 16 inherited variable(s). Auto-generated from `.env.example` + the shared scion-sdk set — do not edit._
|
|
626
626
|
<!-- ENV-VARS-TABLE:END -->
|
|
627
627
|
|
|
628
628
|
Every variable the server reads.
|
|
@@ -639,7 +639,7 @@ instances are configured, it falls back to the single-host `GITLAB_*` values bel
|
|
|
639
639
|
| `GITLAB_TLS_PROFILE` | Optional runtime TLS profile selector | _(unset)_ |
|
|
640
640
|
|
|
641
641
|
> Multiple instances are declared once under `gitlab_instances` in the shared
|
|
642
|
-
>
|
|
642
|
+
> scion-sdk XDG config (`~/.config/scion-sdk/config.json`) — each entry has
|
|
643
643
|
> `name`, `url`, `token`, and optional `tls_profile`. Target a tenant by **name** from the client
|
|
644
644
|
> factory; an unset instance resolves to the first configured one (else `GITLAB_URL` /
|
|
645
645
|
> `GITLAB_TOKEN`).
|
|
@@ -5,12 +5,12 @@ from base64 import b64encode
|
|
|
5
5
|
from typing import Any, TypeVar
|
|
6
6
|
|
|
7
7
|
import requests
|
|
8
|
-
from
|
|
9
|
-
from
|
|
8
|
+
from scion_sdk.tls.profile import ResolvedTLSProfile
|
|
9
|
+
from scion_sdk.tls.resolve import resolve_tls_profile
|
|
10
10
|
|
|
11
11
|
logger = logging.getLogger(__name__)
|
|
12
12
|
|
|
13
|
-
from
|
|
13
|
+
from scion_sdk.exceptions import (
|
|
14
14
|
AuthError,
|
|
15
15
|
MissingParameterError,
|
|
16
16
|
ParameterError,
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
Authentication priority:
|
|
4
4
|
1. **OIDC Delegation** — If ``ENABLE_DELEGATION`` is active, exchanges
|
|
5
5
|
the IdP-issued user token for a downstream GitLab access token
|
|
6
|
-
via RFC 8693 Token Exchange using ``
|
|
6
|
+
via RFC 8693 Token Exchange using ``scion_sdk.auth.delegation``.
|
|
7
7
|
2. **Fixed Credentials** — Falls back to ``GITLAB_TOKEN`` env var.
|
|
8
8
|
|
|
9
|
-
See ``docs/guides/oauth_sso.md`` in
|
|
9
|
+
See ``docs/guides/oauth_sso.md`` in scion-sdk for full details.
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
12
|
import logging
|
|
13
13
|
import threading
|
|
14
14
|
from typing import Any
|
|
15
15
|
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
from
|
|
19
|
-
from
|
|
16
|
+
from scion_sdk.config import setting
|
|
17
|
+
from scion_sdk.exceptions import AuthError, UnauthorizedError
|
|
18
|
+
from scion_sdk.tls.profile import ResolvedTLSProfile
|
|
19
|
+
from scion_sdk.tls.resolve import resolve_tls_profile
|
|
20
20
|
|
|
21
21
|
local = threading.local()
|
|
22
22
|
from gitlab_api.api_client import Api
|
|
@@ -53,7 +53,7 @@ def _resolve_unconfigured_connection(
|
|
|
53
53
|
if instance:
|
|
54
54
|
raise RuntimeError(
|
|
55
55
|
f"GitLab instance '{instance}' is not configured. Add it to "
|
|
56
|
-
"gitlab_instances in ~/.config/
|
|
56
|
+
"gitlab_instances in ~/.config/scion-sdk/config.json, or pass "
|
|
57
57
|
"a full URL / set GITLAB_URL+GITLAB_TOKEN."
|
|
58
58
|
)
|
|
59
59
|
return (
|
|
@@ -105,11 +105,11 @@ def _is_delegation_enabled(config: dict[str, Any] | None) -> bool:
|
|
|
105
105
|
|
|
106
106
|
An explicit ``config`` dict (test injection only -- no production caller
|
|
107
107
|
passes one) wins outright; otherwise reads the real ``ENABLE_DELEGATION``
|
|
108
|
-
setting through ``
|
|
108
|
+
setting through ``scion_sdk.auth.delegation.DelegationSettings``.
|
|
109
109
|
"""
|
|
110
110
|
if config is not None:
|
|
111
111
|
return bool(config.get("enable_delegation", False))
|
|
112
|
-
from
|
|
112
|
+
from scion_sdk.auth.delegation import DelegationSettings
|
|
113
113
|
|
|
114
114
|
return DelegationSettings.from_settings().enabled
|
|
115
115
|
|
|
@@ -119,18 +119,18 @@ def _delegated_token(config: dict[str, Any] | None) -> str:
|
|
|
119
119
|
|
|
120
120
|
Reads delegation settings (``OIDC_TOKEN_URL``/``OIDC_CLIENT_ID``/
|
|
121
121
|
``OIDC_CLIENT_SECRET_REF``/``AUDIENCE``/``DELEGATED_SCOPES``) from the
|
|
122
|
-
process settings via ``
|
|
123
|
-
unlike the old ``
|
|
122
|
+
process settings via ``scion_sdk.auth.delegation.DelegationSettings``;
|
|
123
|
+
unlike the old ``scion_sdk`` helper, this has no per-call ``config``
|
|
124
124
|
override for those fields, only for whether delegation is attempted at all
|
|
125
125
|
(see :func:`_is_delegation_enabled`).
|
|
126
126
|
"""
|
|
127
127
|
import httpx
|
|
128
|
-
from
|
|
128
|
+
from scion_sdk.auth.delegation import (
|
|
129
129
|
DelegationSettings,
|
|
130
130
|
current_user_token,
|
|
131
131
|
exchange_token,
|
|
132
132
|
)
|
|
133
|
-
from
|
|
133
|
+
from scion_sdk.exceptions import LoginRequiredError
|
|
134
134
|
|
|
135
135
|
settings = DelegationSettings.from_settings()
|
|
136
136
|
subject_token = current_user_token()
|
|
@@ -155,7 +155,7 @@ def get_client(
|
|
|
155
155
|
name (from the shared ``gitlab_instances`` config), accepts a bare URL, or
|
|
156
156
|
defaults to the first configured instance / ``GITLAB_URL``. Supports OIDC
|
|
157
157
|
delegation and fixed credentials (token) via
|
|
158
|
-
``
|
|
158
|
+
``scion_sdk.auth.delegation``.
|
|
159
159
|
"""
|
|
160
160
|
instance, token, tls_profile = _resolve_connection(instance, token, tls_profile)
|
|
161
161
|
|
|
@@ -6,7 +6,7 @@ Served live as ``connector://resources``. Regenerate by editing the declarations
|
|
|
6
6
|
# ruff: noqa: E501
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
|
-
from
|
|
9
|
+
from scion_sdk.ingest.live_declaration import source_meta
|
|
10
10
|
|
|
11
11
|
SOURCES = (
|
|
12
12
|
source_meta(
|
|
@@ -5,14 +5,14 @@ import logging
|
|
|
5
5
|
from dataclasses import dataclass
|
|
6
6
|
from typing import Any
|
|
7
7
|
|
|
8
|
-
from
|
|
8
|
+
from scion_sdk.exceptions import (
|
|
9
9
|
MissingParameterError,
|
|
10
10
|
ParameterError,
|
|
11
11
|
require_auth,
|
|
12
12
|
)
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
-
from
|
|
13
|
+
from scion_sdk.tls.profile import ResolvedTLSProfile
|
|
14
|
+
from scion_sdk.tls.resolve import resolve_tls_profile
|
|
15
|
+
from scion_sdk.transports.graphql import GraphQLAuth, GraphQLClient
|
|
16
16
|
|
|
17
17
|
from gitlab_api.gitlab_input_models import (
|
|
18
18
|
BranchModel,
|
|
@@ -3,9 +3,6 @@ import re
|
|
|
3
3
|
from collections.abc import Sequence
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
|
-
from agent_connector_sdk.exceptions import (
|
|
7
|
-
ParameterError,
|
|
8
|
-
)
|
|
9
6
|
from pydantic import (
|
|
10
7
|
BaseModel,
|
|
11
8
|
EmailStr,
|
|
@@ -14,6 +11,9 @@ from pydantic import (
|
|
|
14
11
|
field_validator,
|
|
15
12
|
model_validator,
|
|
16
13
|
)
|
|
14
|
+
from scion_sdk.exceptions import (
|
|
15
|
+
ParameterError,
|
|
16
|
+
)
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
def _set_truthy_attrs(target: dict[str, Any], obj: Any, names: Sequence[str]) -> None:
|
|
@@ -18,7 +18,7 @@ import os
|
|
|
18
18
|
from dataclasses import dataclass
|
|
19
19
|
from urllib.parse import urlparse
|
|
20
20
|
|
|
21
|
-
from
|
|
21
|
+
from scion_sdk.config import setting
|
|
22
22
|
|
|
23
23
|
logger = logging.getLogger(__name__)
|
|
24
24
|
|
|
@@ -89,15 +89,15 @@ def list_configured_instances() -> list[GitLabInstance]:
|
|
|
89
89
|
def _entitled(namespace: str, names: list[str]) -> list[str]:
|
|
90
90
|
"""Filter an instance-name list to what the calling identity may reach.
|
|
91
91
|
|
|
92
|
-
Routes the names through
|
|
92
|
+
Routes the names through scion-sdk' shared identity-scoped resolver
|
|
93
93
|
(CONCEPT:AU-OS.identity.identity-scoped-resource-autoload): a caller's
|
|
94
94
|
Okta/Keycloak groups decide which GitLab tenants auto-load for them. The
|
|
95
95
|
ambient ``SYSTEM_ACTOR`` (unauthenticated/local) holds ``admin`` → sees
|
|
96
96
|
all, so behaviour is unchanged until a real identity scopes it down.
|
|
97
|
-
Degrades to the full list if
|
|
97
|
+
Degrades to the full list if scion-sdk predates the resolver.
|
|
98
98
|
"""
|
|
99
99
|
try:
|
|
100
|
-
from
|
|
100
|
+
from scion_sdk.entitlements import identity_scoped_resources
|
|
101
101
|
|
|
102
102
|
return list(identity_scoped_resources(namespace, names))
|
|
103
103
|
except Exception:
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
CONCEPT:AU-KG.ingest.enterprise-source-extractor. This is the record-source twin of
|
|
4
4
|
media-downloader's blob ingestion: the package pushes its data into the ONE
|
|
5
5
|
epistemic-graph knowledge graph as **typed OWL nodes** (`:Project`, `:GitLabGroup`,
|
|
6
|
-
`:MergeRequest`, `:Issue`, …) + links through ``
|
|
6
|
+
`:MergeRequest`, `:Issue`, …) + links through ``scion_sdk.ingest`` -- the
|
|
7
7
|
generated ``SourceIngest`` client, not a local ingestion helper. Nodes carry shared
|
|
8
8
|
provenance (via ``IngestBinding``) and match the classes federated by
|
|
9
9
|
``gitlab_api.ontology``.
|
|
@@ -13,7 +13,7 @@ from __future__ import annotations
|
|
|
13
13
|
|
|
14
14
|
from typing import Any
|
|
15
15
|
|
|
16
|
-
from
|
|
16
|
+
from scion_sdk.ingest import (
|
|
17
17
|
KnowledgeIngest,
|
|
18
18
|
SourceStream,
|
|
19
19
|
)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/python
|
|
2
2
|
import warnings
|
|
3
3
|
|
|
4
|
-
from agent_connector_sdk.connector_hooks import RegistrationContext
|
|
5
4
|
from fastmcp import Context, FastMCP
|
|
6
5
|
from fastmcp.dependencies import Depends
|
|
7
6
|
from pydantic import Field
|
|
7
|
+
from scion_sdk.connector_hooks import RegistrationContext
|
|
8
8
|
|
|
9
9
|
# Filter RequestsDependencyWarning early to prevent log spam
|
|
10
10
|
with warnings.catch_warnings():
|
|
@@ -23,9 +23,9 @@ warnings.filterwarnings("ignore", message=".*urllib3.*or charset_normalizer.*")
|
|
|
23
23
|
from collections.abc import Callable
|
|
24
24
|
from typing import Any
|
|
25
25
|
|
|
26
|
-
from
|
|
27
|
-
from
|
|
28
|
-
from
|
|
26
|
+
from scion_sdk.config import setting
|
|
27
|
+
from scion_sdk.mcp.action_dispatch import resolve_action
|
|
28
|
+
from scion_sdk.mcp.concurrency import run_blocking
|
|
29
29
|
|
|
30
30
|
from gitlab_api.auth import get_client
|
|
31
31
|
|
|
@@ -454,8 +454,8 @@ def register_misc_tools(mcp: FastMCP):
|
|
|
454
454
|
) -> Any:
|
|
455
455
|
"""List the configured GitLab tenants (CONCEPT:AU-KG.backend.declared-columns-so-schema).
|
|
456
456
|
|
|
457
|
-
Multi-tenancy is driven by the shared
|
|
458
|
-
(``gitlab_instances`` in ~/.config/
|
|
457
|
+
Multi-tenancy is driven by the shared scion-sdk XDG config
|
|
458
|
+
(``gitlab_instances`` in ~/.config/scion-sdk/config.json). Every
|
|
459
459
|
gitlab-api tool targets a tenant by passing that instance NAME to the
|
|
460
460
|
client factory; this tool surfaces the available names (tokens are never
|
|
461
461
|
returned). Falls back to the single-host GITLAB_URL/GITLAB_TOKEN.
|
|
@@ -1234,7 +1234,7 @@ def register_graphql_tools(mcp: FastMCP):
|
|
|
1234
1234
|
),
|
|
1235
1235
|
) -> dict:
|
|
1236
1236
|
"""Discover the dynamic GitLab GraphQL schema including types, fields, and custom attributes in real-time."""
|
|
1237
|
-
from
|
|
1237
|
+
from scion_sdk.mcp.graphql import (
|
|
1238
1238
|
ctx_graphql_get_type_details,
|
|
1239
1239
|
ctx_graphql_list_types,
|
|
1240
1240
|
)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Data-only subpackage: it carries ``gitlab.ttl`` (the ``owl:Ontology``
|
|
4
4
|
``http://knuckles.team/kg/gitlab`` module — groups, projects, merge requests,
|
|
5
5
|
pipelines, jobs, issues, epics, milestones, commits, branches, releases and runners
|
|
6
|
-
with their review and delivery relationships) which the
|
|
7
|
-
in via the ``
|
|
6
|
+
with their review and delivery relationships) which the scion-sdk hub federates
|
|
7
|
+
in via the ``scion_sdk.ontology_providers`` entry-point. It holds no business
|
|
8
8
|
logic and no heavy imports so the hub can resolve it cheaply.
|
|
9
9
|
"""
|
|
@@ -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": "
|
|
5
|
+
"gitlab_api/ontology/gitlab.ttl": "c2f0687ebd6d70444b21488a163a181287764e3151650805a571172bbf6a08c0",
|
|
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-
|
|
32
|
+
"validated_at": "2026-10-31T04:14:54Z"
|
|
33
33
|
}
|
|
@@ -207,4 +207,4 @@
|
|
|
207
207
|
rdfs:comment """GitLab source-control and CI/CD delivery model — groups, projects,
|
|
208
208
|
merge requests, pipelines, jobs, issues, epics, milestones, commits, branches,
|
|
209
209
|
releases and runners, with their review and delivery relationships — federated into
|
|
210
|
-
the
|
|
210
|
+
the scion-sdk knowledge-graph hub.""" .
|
|
@@ -10,7 +10,7 @@ license: MIT
|
|
|
10
10
|
tags: [gitlab, rest, graphql, mcp, development, connector, test, gates]
|
|
11
11
|
tier: repository
|
|
12
12
|
metadata:
|
|
13
|
-
author:
|
|
13
|
+
author: Knuckles-Team
|
|
14
14
|
version: '0.1.0'
|
|
15
15
|
---
|
|
16
16
|
|
|
@@ -20,7 +20,7 @@ This repository owns the GitLab REST and GraphQL API facades, tenant and
|
|
|
20
20
|
authentication boundary, action-routed MCP tools, GitLab ontology and KG
|
|
21
21
|
ingestion mappings, and packaged connector content. Shared connector
|
|
22
22
|
contracts, transports, TLS profiles, and credential helpers belong to
|
|
23
|
-
`
|
|
23
|
+
`scion-sdk`; admission, serving, and durable graph state belong to
|
|
24
24
|
their owning repositories. Read `AGENTS.md` before changing code and keep
|
|
25
25
|
credentials, private endpoints, tenant data, and customer records out of
|
|
26
26
|
source, logs, fixtures, and skill content.
|
|
@@ -61,7 +61,7 @@ owning spec row in the commit trailer.
|
|
|
61
61
|
come from shared hooks; never hand-edit them.
|
|
62
62
|
- Keep `skills/**`, `ontology/**`, `connectors/**`, prompts, and
|
|
63
63
|
`mcp_config.json` coherent with package data and the
|
|
64
|
-
`
|
|
64
|
+
`scion_sdk.connector` entry point (`gitlab-mcp =
|
|
65
65
|
gitlab_api:connector`). Do not add a second publisher or runtime plane.
|
|
66
66
|
|
|
67
67
|
## Setup and gates
|
|
@@ -110,7 +110,7 @@ copy those hooks locally or bypass a failing check.
|
|
|
110
110
|
|
|
111
111
|
## Packaging and publication
|
|
112
112
|
|
|
113
|
-
`pyproject.toml` declares the `
|
|
113
|
+
`pyproject.toml` declares the `scion_sdk.connector` entry point
|
|
114
114
|
`gitlab-mcp = "gitlab_api:connector"` and packages `skills/**`, `ontology/**`,
|
|
115
115
|
`connectors/**`, prompts, and `mcp_config.json`. When packaged content changes,
|
|
116
116
|
use `uv version --bump patch` and let the lockfile update with the project; add
|
|
@@ -11,7 +11,7 @@ description: >-
|
|
|
11
11
|
license: MIT
|
|
12
12
|
tags: [gitlab, issues, tracking, triage, group, mcp]
|
|
13
13
|
metadata:
|
|
14
|
-
author:
|
|
14
|
+
author: Knuckles-Team
|
|
15
15
|
version: '0.2.0'
|
|
16
16
|
---
|
|
17
17
|
# GitLab Issues
|
|
@@ -59,7 +59,7 @@ Full env/tag matrix: the mcp-client reference `agent-tools/mcp-client/references
|
|
|
59
59
|
## Recipes (`params_json`)
|
|
60
60
|
Review open `bug` issues for a project, newest first:
|
|
61
61
|
```json
|
|
62
|
-
{"project_id":"platform/
|
|
62
|
+
{"project_id":"platform/scion-sdk","state":"opened","labels":"bug","order_by":"created_at","sort":"desc","per_page":25}
|
|
63
63
|
```
|
|
64
64
|
Review every open issue across a group / organization:
|
|
65
65
|
```json
|
|
@@ -67,11 +67,11 @@ Review every open issue across a group / organization:
|
|
|
67
67
|
```
|
|
68
68
|
Create an issue:
|
|
69
69
|
```json
|
|
70
|
-
{"project_id":"platform/
|
|
70
|
+
{"project_id":"platform/scion-sdk","data":{"title":"Fleet ontology: gitlab domain missing runners link","labels":"ontology,enhancement"}}
|
|
71
71
|
```
|
|
72
72
|
Close an issue:
|
|
73
73
|
```json
|
|
74
|
-
{"project_id":"platform/
|
|
74
|
+
{"project_id":"platform/scion-sdk","issue_iid":17,"data":{"state_event":"close"}}
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
## Gotchas
|
|
@@ -47,7 +47,7 @@ Full env/tag matrix: the mcp-client reference `agent-tools/mcp-client/references
|
|
|
47
47
|
## Recipes (`params_json`)
|
|
48
48
|
Review open `bug` issues for a project, newest first:
|
|
49
49
|
```json
|
|
50
|
-
{"project_id":"platform/
|
|
50
|
+
{"project_id":"platform/scion-sdk","state":"opened","labels":"bug","order_by":"created_at","sort":"desc","per_page":25}
|
|
51
51
|
```
|
|
52
52
|
Review every open issue across a group / organization:
|
|
53
53
|
```json
|
|
@@ -55,11 +55,11 @@ Review every open issue across a group / organization:
|
|
|
55
55
|
```
|
|
56
56
|
Create an issue:
|
|
57
57
|
```json
|
|
58
|
-
{"project_id":"platform/
|
|
58
|
+
{"project_id":"platform/scion-sdk","data":{"title":"Fleet ontology: gitlab domain missing runners link","labels":"ontology,enhancement"}}
|
|
59
59
|
```
|
|
60
60
|
Close an issue:
|
|
61
61
|
```json
|
|
62
|
-
{"project_id":"platform/
|
|
62
|
+
{"project_id":"platform/scion-sdk","issue_iid":17,"data":{"state_event":"close"}}
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
## Gotchas
|
{gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-merge-request-create/SKILL.md
RENAMED
|
@@ -10,7 +10,7 @@ description: >-
|
|
|
10
10
|
license: MIT
|
|
11
11
|
tags: [gitlab, merge-requests, create, reviewers, mcp]
|
|
12
12
|
metadata:
|
|
13
|
-
author:
|
|
13
|
+
author: Knuckles-Team
|
|
14
14
|
version: '0.1.0'
|
|
15
15
|
---
|
|
16
16
|
# GitLab Merge Request Create
|
|
@@ -57,11 +57,11 @@ Prefer the **condensed** tool; it takes `action` + a `params_json` **JSON string
|
|
|
57
57
|
## Recipes (`params_json`)
|
|
58
58
|
Open a merge request:
|
|
59
59
|
```json
|
|
60
|
-
{"project_id":"platform/
|
|
60
|
+
{"project_id":"platform/scion-sdk","data":{"source_branch":"feat/fleet-enrichment","target_branch":"main","title":"Fleet enrichment: gitlab ontology + skills","description":"Adds ontology + specialist skills.","remove_source_branch":true}}
|
|
61
61
|
```
|
|
62
62
|
Open an MR with reviewers and assignees:
|
|
63
63
|
```json
|
|
64
|
-
{"project_id":"platform/
|
|
64
|
+
{"project_id":"platform/scion-sdk","data":{"source_branch":"fix/runner-link","target_branch":"main","title":"Fix runner link","reviewer_ids":[12,34],"assignee_ids":[12],"labels":"bug","squash":true}}
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
## Gotchas
|
{gitlab_api-27.3.15 → gitlab_api-27.3.17}/gitlab_api/skills/gitlab-merge-request-create/WORKFLOW.md
RENAMED
|
@@ -46,11 +46,11 @@ Prefer the **condensed** tool; it takes `action` + a `params_json` **JSON string
|
|
|
46
46
|
## Recipes (`params_json`)
|
|
47
47
|
Open a merge request:
|
|
48
48
|
```json
|
|
49
|
-
{"project_id":"platform/
|
|
49
|
+
{"project_id":"platform/scion-sdk","data":{"source_branch":"feat/fleet-enrichment","target_branch":"main","title":"Fleet enrichment: gitlab ontology + skills","description":"Adds ontology + specialist skills.","remove_source_branch":true}}
|
|
50
50
|
```
|
|
51
51
|
Open an MR with reviewers and assignees:
|
|
52
52
|
```json
|
|
53
|
-
{"project_id":"platform/
|
|
53
|
+
{"project_id":"platform/scion-sdk","data":{"source_branch":"fix/runner-link","target_branch":"main","title":"Fix runner link","reviewer_ids":[12,34],"assignee_ids":[12],"labels":"bug","squash":true}}
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
## Gotchas
|