gitlab-api 27.3.22__tar.gz → 27.3.24__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 (93) hide show
  1. {gitlab_api-27.3.22/gitlab_api.egg-info → gitlab_api-27.3.24}/PKG-INFO +50 -20
  2. gitlab_api-27.3.22/PKG-INFO → gitlab_api-27.3.24/README.md +47 -43
  3. gitlab_api-27.3.24/gitlab_api/__init__.py +31 -0
  4. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/kg_ingest.py +13 -2
  5. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/__init__.py +1 -1
  6. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/access_contracts.ttl +78 -76
  7. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/certification.json +3 -3
  8. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/gitlab.ttl +27 -63
  9. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/shapes/connector.shacl.ttl +2 -2
  10. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/skills/gitlab-api-development/SKILL.md +16 -0
  11. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/skills/gitlab-api-operations/SKILL.md +17 -1
  12. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/skills/gitlab-issues/SKILL.md +19 -1
  13. gitlab_api-27.3.24/gitlab_api/skills/gitlab-merge-request-create/SKILL.md +52 -0
  14. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/skills/gitlab-merge-request-review/SKILL.md +19 -1
  15. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/skills/gitlab-pipelines/SKILL.md +19 -1
  16. gitlab_api-27.3.24/gitlab_api/skills/gitlab-vulnerabilities/SKILL.md +47 -0
  17. gitlab_api-27.3.22/README.md → gitlab_api-27.3.24/gitlab_api.egg-info/PKG-INFO +73 -18
  18. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api.egg-info/SOURCES.txt +2 -0
  19. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api.egg-info/requires.txt +2 -1
  20. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/pyproject.toml +2 -2
  21. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_access_contracts.py +13 -6
  22. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_catalog_edges.py +6 -1
  23. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_cq_paths.py +5 -6
  24. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_kg_ingest.py +13 -10
  25. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_ontology_parent_link.py +9 -9
  26. gitlab_api-27.3.24/tests/test_pack_extends_core.py +48 -0
  27. gitlab_api-27.3.24/tests/test_scion_sdk_0_10_imports.py +59 -0
  28. gitlab_api-27.3.22/gitlab_api/__init__.py +0 -13
  29. gitlab_api-27.3.22/gitlab_api/skills/gitlab-merge-request-create/SKILL.md +0 -34
  30. gitlab_api-27.3.22/gitlab_api/skills/gitlab-vulnerabilities/SKILL.md +0 -30
  31. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/LICENSE +0 -0
  32. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/__main__.py +0 -0
  33. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/__init__.py +0 -0
  34. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_base.py +0 -0
  35. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_environments.py +0 -0
  36. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_issues.py +0 -0
  37. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_merge_requests.py +0 -0
  38. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_other.py +0 -0
  39. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_pipelines.py +0 -0
  40. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_projects.py +0 -0
  41. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_repositories.py +0 -0
  42. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_system.py +0 -0
  43. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_users_groups.py +0 -0
  44. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api/api_client_vulnerabilities.py +0 -0
  45. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/api_client.py +0 -0
  46. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/auth.py +0 -0
  47. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/connector_contracts.py +0 -0
  48. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/connector_prep.py +0 -0
  49. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/connector_sources.py +0 -0
  50. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/gitlab_gql.py +0 -0
  51. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/gitlab_input_models.py +0 -0
  52. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/gitlab_response_models.py +0 -0
  53. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/instances.py +0 -0
  54. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/mcp_config.json +0 -0
  55. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/mcp_server.py +0 -0
  56. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/fixtures/records.json +0 -0
  57. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/mappings/source.yaml +0 -0
  58. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/ontology/migrations/manifest.json +0 -0
  59. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/prompts/gitlab-mcp-operator.json +0 -0
  60. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/prompts/gitlab-mcp-project-administrator.json +0 -0
  61. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/prompts/gitlab-mcp-release-manager.json +0 -0
  62. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api/prompts/gitlab-mcp-triage-lead.json +0 -0
  63. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api.egg-info/dependency_links.txt +0 -0
  64. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api.egg-info/entry_points.txt +0 -0
  65. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/gitlab_api.egg-info/top_level.txt +0 -0
  66. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/scripts/check_import_safety.py +0 -0
  67. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/scripts/security_contract.py +0 -0
  68. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/setup.cfg +0 -0
  69. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/__init__.py +0 -0
  70. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/conftest.py +0 -0
  71. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_api_wrapper.py +0 -0
  72. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_auth.py +0 -0
  73. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_connector_prep.py +0 -0
  74. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_fleet_name.py +0 -0
  75. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_gitlab_a2a_validation.py +0 -0
  76. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_gitlab_api_brute_force_coverage.py +0 -0
  77. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_gitlab_api_development_skill.py +0 -0
  78. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_gitlab_gql.py +0 -0
  79. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_gitlab_mcp_validation.py +0 -0
  80. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_gitlab_models.py +0 -0
  81. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_graphql_error_category.py +0 -0
  82. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_identity_context_scoping.py +0 -0
  83. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_ingest_sources.py +0 -0
  84. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_init_dynamics.py +0 -0
  85. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_instances.py +0 -0
  86. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_mock_coverage.py +0 -0
  87. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_paged_models_have_paging_fields.py +0 -0
  88. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_pages_workflow.py +0 -0
  89. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_response_models_hide_secrets.py +0 -0
  90. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_startup.py +0 -0
  91. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_tool_modes.py +0 -0
  92. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/tests/test_verify_agent.py +0 -0
  93. {gitlab_api-27.3.22 → gitlab_api-27.3.24}/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.22
3
+ Version: 27.3.24
4
4
  Summary: GitLab API + MCP Server
5
5
  Author-email: Repository Maintainers <maintainers@knuckles.team>
6
6
  License: MIT
@@ -12,7 +12,8 @@ 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: scion-sdk[graphql,mcp]>=0.10.1
15
+ Requires-Dist: scion-sdk[graphql,mcp,requests]<0.15,>=0.14.0
16
+ Requires-Dist: pydantic[email]>=2.14.1
16
17
  Requires-Dist: python-dotenv>=1.2.4
17
18
  Provides-Extra: mcp
18
19
  Provides-Extra: all
@@ -45,8 +46,8 @@ Dynamic: license-file
45
46
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/gitlab-api)
46
47
  ![PyPI - Implementation](https://img.shields.io/pypi/implementation/gitlab-api)
47
48
 
48
- > **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
49
- > backing GitLab instance are maintained in the
49
+ > **Documentation** — Installation, deployment, and usage across the API, CLI, MCP,
50
+ > and A2A agent interfaces are maintained in the
50
51
  > [official documentation](https://knuckles-team.github.io/gitlab-api/).
51
52
 
52
53
  ---
@@ -530,6 +531,32 @@ the detailed transport contract.
530
531
 
531
532
  ---
532
533
 
534
+ ## Agent
535
+
536
+ # Set credentials
537
+ export GITLAB_URL="your_value"
538
+ export GITLAB_TOKEN="your_value"
539
+
540
+ # Connector-focused MCP server (includes the shared graph engine)
541
+ uv pip install "gitlab-api[mcp]"
542
+
543
+ # Everything (development)
544
+ uv pip install "gitlab-api[all]" # or: python -m pip install "gitlab-api[all]"
545
+ ```
546
+
547
+ ### Container images (`:mcp`)
548
+
549
+ One multi-stage `docker/Dockerfile` builds the MCP-only image (`--target mcp`):
550
+
551
+ | Image tag | Build target | Contents | Entrypoint |
552
+ |-----------|--------------|----------|------------|
553
+ | `example/gitlab-api:mcp` | `--target mcp` | `gitlab-api[mcp]` — **connector-focused**, includes `medulla`; no model-orchestration stack | `gitlab-mcp` |
554
+
555
+ ```bash
556
+ docker build --target mcp -t example/gitlab-api:mcp docker/ # connector-focused MCP server
557
+
558
+ ---
559
+
533
560
  ## Environment Variables
534
561
 
535
562
  <!-- ENV-VARS-TABLE:START -->
@@ -654,26 +681,29 @@ The full list is in the [Available MCP Tools](#available-mcp-tools) table above
654
681
  | `EUNOMIA_POLICY_FILE` | Embedded policy file | `mcp_policies.json` |
655
682
  | `EUNOMIA_REMOTE_URL` | Remote Eunomia server URL | — |
656
683
 
657
- ## Agent
684
+ ---
658
685
 
659
- # Set credentials
660
- export GITLAB_URL="your_value"
661
- export GITLAB_TOKEN="your_value"
686
+ ## Documentation
662
687
 
663
- # Connector-focused MCP server (includes the shared graph engine)
664
- uv pip install "gitlab-api[mcp]"
688
+ The complete documentation is published as the
689
+ [official documentation site](https://knuckles-team.github.io/gitlab-api/) and is
690
+ the recommended reference for installation, deployment, and day-to-day operation.
665
691
 
666
- # Everything (development)
667
- uv pip install "gitlab-api[all]" # or: python -m pip install "gitlab-api[all]"
668
- ```
692
+ ---
669
693
 
670
- ### Container images (`:mcp`)
694
+ ## Repository Owners
671
695
 
672
- One multi-stage `docker/Dockerfile` builds the MCP-only image (`--target mcp`):
696
+ <img width="100%" height="180em" src="https://github-readme-stats.vercel.app/api?username=example&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true" />
673
697
 
674
- | Image tag | Build target | Contents | Entrypoint |
675
- |-----------|--------------|----------|------------|
676
- | `example/gitlab-api:mcp` | `--target mcp` | `gitlab-api[mcp]` — **connector-focused**, includes `medulla`; no model-orchestration stack | `gitlab-mcp` |
698
+ ![GitHub followers](https://img.shields.io/github/followers/example)
699
+ ![GitHub User's stars](https://img.shields.io/github/stars/example)
677
700
 
678
- ```bash
679
- docker build --target mcp -t example/gitlab-api:mcp docker/ # connector-focused MCP server
701
+ ---
702
+
703
+ ## Contribute
704
+
705
+ Contributions are welcome! Please ensure code quality by running local checks before submitting pull requests:
706
+ - Format code using `ruff format .`
707
+ - Lint code using `ruff check .`
708
+ - Validate type-safety with `mypy .`
709
+ - Run test suites using `pytest`
@@ -1,28 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: gitlab-api
3
- Version: 27.3.22
4
- Summary: GitLab API + MCP Server
5
- Author-email: Repository Maintainers <maintainers@knuckles.team>
6
- License: MIT
7
- Classifier: Development Status :: 5 - Production/Stable
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Environment :: Console
10
- Classifier: Operating System :: POSIX :: Linux
11
- Classifier: Programming Language :: Python :: 3
12
- Requires-Python: >=3.12
13
- Description-Content-Type: text/markdown
14
- License-File: LICENSE
15
- Requires-Dist: scion-sdk[graphql,mcp]>=0.10.1
16
- Requires-Dist: python-dotenv>=1.2.4
17
- Provides-Extra: mcp
18
- Provides-Extra: all
19
- Provides-Extra: test
20
- Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
21
- Requires-Dist: pytest>=9.1.1; extra == "test"
22
- Requires-Dist: pytest-asyncio>=1.4.0; extra == "test"
23
- Requires-Dist: pytest-cov>=7.1.0; extra == "test"
24
- Dynamic: license-file
25
-
26
1
  # Gitlab Api
27
2
  ## CLI or API | MCP
28
3
 
@@ -45,8 +20,8 @@ Dynamic: license-file
45
20
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/gitlab-api)
46
21
  ![PyPI - Implementation](https://img.shields.io/pypi/implementation/gitlab-api)
47
22
 
48
- > **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
49
- > backing GitLab instance are maintained in the
23
+ > **Documentation** — Installation, deployment, and usage across the API, CLI, MCP,
24
+ > and A2A agent interfaces are maintained in the
50
25
  > [official documentation](https://knuckles-team.github.io/gitlab-api/).
51
26
 
52
27
  ---
@@ -530,6 +505,32 @@ the detailed transport contract.
530
505
 
531
506
  ---
532
507
 
508
+ ## Agent
509
+
510
+ # Set credentials
511
+ export GITLAB_URL="your_value"
512
+ export GITLAB_TOKEN="your_value"
513
+
514
+ # Connector-focused MCP server (includes the shared graph engine)
515
+ uv pip install "gitlab-api[mcp]"
516
+
517
+ # Everything (development)
518
+ uv pip install "gitlab-api[all]" # or: python -m pip install "gitlab-api[all]"
519
+ ```
520
+
521
+ ### Container images (`:mcp`)
522
+
523
+ One multi-stage `docker/Dockerfile` builds the MCP-only image (`--target mcp`):
524
+
525
+ | Image tag | Build target | Contents | Entrypoint |
526
+ |-----------|--------------|----------|------------|
527
+ | `example/gitlab-api:mcp` | `--target mcp` | `gitlab-api[mcp]` — **connector-focused**, includes `medulla`; no model-orchestration stack | `gitlab-mcp` |
528
+
529
+ ```bash
530
+ docker build --target mcp -t example/gitlab-api:mcp docker/ # connector-focused MCP server
531
+
532
+ ---
533
+
533
534
  ## Environment Variables
534
535
 
535
536
  <!-- ENV-VARS-TABLE:START -->
@@ -654,26 +655,29 @@ The full list is in the [Available MCP Tools](#available-mcp-tools) table above
654
655
  | `EUNOMIA_POLICY_FILE` | Embedded policy file | `mcp_policies.json` |
655
656
  | `EUNOMIA_REMOTE_URL` | Remote Eunomia server URL | — |
656
657
 
657
- ## Agent
658
+ ---
658
659
 
659
- # Set credentials
660
- export GITLAB_URL="your_value"
661
- export GITLAB_TOKEN="your_value"
660
+ ## Documentation
662
661
 
663
- # Connector-focused MCP server (includes the shared graph engine)
664
- uv pip install "gitlab-api[mcp]"
662
+ The complete documentation is published as the
663
+ [official documentation site](https://knuckles-team.github.io/gitlab-api/) and is
664
+ the recommended reference for installation, deployment, and day-to-day operation.
665
665
 
666
- # Everything (development)
667
- uv pip install "gitlab-api[all]" # or: python -m pip install "gitlab-api[all]"
668
- ```
666
+ ---
669
667
 
670
- ### Container images (`:mcp`)
668
+ ## Repository Owners
671
669
 
672
- One multi-stage `docker/Dockerfile` builds the MCP-only image (`--target mcp`):
670
+ <img width="100%" height="180em" src="https://github-readme-stats.vercel.app/api?username=example&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true" />
673
671
 
674
- | Image tag | Build target | Contents | Entrypoint |
675
- |-----------|--------------|----------|------------|
676
- | `example/gitlab-api:mcp` | `--target mcp` | `gitlab-api[mcp]` — **connector-focused**, includes `medulla`; no model-orchestration stack | `gitlab-mcp` |
672
+ ![GitHub followers](https://img.shields.io/github/followers/example)
673
+ ![GitHub User's stars](https://img.shields.io/github/stars/example)
677
674
 
678
- ```bash
679
- docker build --target mcp -t example/gitlab-api:mcp docker/ # connector-focused MCP server
675
+ ---
676
+
677
+ ## Contribute
678
+
679
+ Contributions are welcome! Please ensure code quality by running local checks before submitting pull requests:
680
+ - Format code using `ruff format .`
681
+ - Lint code using `ruff check .`
682
+ - Validate type-safety with `mypy .`
683
+ - Run test suites using `pytest`
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env python
2
+
3
+ from scion_sdk.connector import Connector
4
+
5
+ from gitlab_api.api_client import Api
6
+ from gitlab_api.auth import get_client
7
+
8
+ #: Operations the SDK refuses to serve unless they declare the owner-approval
9
+ #: flag (SCION-SCM-R003.3): every non-read method whose name holds the
10
+ #: ``merge`` token.
11
+ OWNER_APPROVAL_OPERATIONS: tuple[str, ...] = (
12
+ "accept_merge_request",
13
+ "approve_merge_request",
14
+ "create_merge_request",
15
+ "unapprove_merge_request",
16
+ )
17
+
18
+ connector = Connector(
19
+ verbose_targets=(
20
+ {
21
+ "client_cls": Api,
22
+ "get_client": get_client,
23
+ "manifest": [
24
+ {"method": method, "owner_approval_required": True}
25
+ for method in OWNER_APPROVAL_OPERATIONS
26
+ ],
27
+ },
28
+ ),
29
+ instructions="GitLab API MCP Server - Manage projects, issues, merge requests, branches, and more.",
30
+ tools="gitlab_api.mcp_server",
31
+ )
@@ -1,4 +1,4 @@
1
- """Epistemic-graph ingestion for GitLab records (typed graph nodes).
1
+ """Medulla ingestion for GitLab records (typed graph nodes).
2
2
 
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
@@ -11,14 +11,25 @@ provenance (via ``IngestBinding``) and match the classes federated by
11
11
 
12
12
  from __future__ import annotations
13
13
 
14
+ import hashlib
15
+ from pathlib import Path
14
16
  from typing import Any
15
17
 
16
18
  from scion_sdk.ingest import (
19
+ ContractSource,
17
20
  KnowledgeIngest,
18
21
  SourceStream,
19
22
  )
20
23
 
21
- STREAM = SourceStream.for_package(__package__.split(".")[0], "gitlab")
24
+ #: The local declaration the engine must have accepted: the connector's mappings.
25
+ _DECLARATION = Path(__file__).parent / "ontology" / "mappings" / "source.yaml"
26
+
27
+ #: The contract every binding of this connector runs under; its digest is the
28
+ #: SHA-256 of the shipped mapping declaration, so a changed declaration is
29
+ #: refused (``contract_not_accepted``) until the engine accepts the new one.
30
+ CONTRACT = ContractSource(digest=hashlib.sha256(_DECLARATION.read_bytes()).hexdigest())
31
+
32
+ STREAM = SourceStream.for_package(__package__.split(".")[0], "gitlab", CONTRACT)
22
33
 
23
34
 
24
35
  async def ingest_projects(
@@ -1,7 +1,7 @@
1
1
  """GitLab DevOps ontology contribution (CONCEPT:AU-KG.ontology.federation-provider-leg).
2
2
 
3
3
  Data-only subpackage: it carries ``gitlab.ttl`` (the ``owl:Ontology``
4
- ``http://knuckles.team/kg/gitlab`` module — groups, projects, merge requests,
4
+ ``https://knuckles-team.github.io/ontology/connector/gitlab`` module — groups, projects, merge requests,
5
5
  pipelines, jobs, issues, epics, milestones, commits, branches, releases and runners
6
6
  with their review and delivery relationships) which the scion-sdk hub federates
7
7
  in via the ``scion_sdk.ontology_providers`` entry-point. It holds no business
@@ -1,5 +1,7 @@
1
- @prefix ac: <https://knuckles-team.github.io/agent-connector-sdk/access#> .
2
- @prefix gl: <http://knuckles.team/kg#> .
1
+ @prefix swarm: <https://knuckles-team.github.io/ontology/swarm#> .
2
+ @prefix ac: <https://knuckles-team.github.io/ontology/access#> .
3
+ @prefix core: <https://knuckles-team.github.io/ontology/core#> .
4
+ @prefix : <https://knuckles-team.github.io/ontology/connector/gitlab#> .
3
5
 
4
6
  # Read contracts for the classes declared by gitlab.ttl. The MCP tools expose
5
7
  # both read and write actions, but these mappings are read-only query routes:
@@ -7,8 +9,8 @@
7
9
  # The source classes stay in GitLab's ontology namespace. No heuristic
8
10
  # crosswalk to a hub class is asserted here.
9
11
 
10
- gl:gitlabGroupAccess a ac:AccessContract ;
11
- ac:classIri gl:GitLabGroup ;
12
+ :gitlabGroupAccess a ac:AccessContract ;
13
+ ac:classIri :GitLabGroup ;
12
14
  ac:sourceId "gitlab-api" ;
13
15
  ac:entity "group" ;
14
16
  ac:keyField "id" ;
@@ -22,11 +24,11 @@ gl:gitlabGroupAccess a ac:AccessContract ;
22
24
  ac:freshnessSeconds 300 ;
23
25
  ac:costHint "medium" .
24
26
 
25
- gl:gitlabGroupWebUrlBinding a ac:PropertyBinding ;
26
- ac:contract gl:gitlabGroupAccess ; ac:property gl:webUrl ; ac:field "web_url" .
27
+ :gitlabGroupWebUrlBinding a ac:PropertyBinding ;
28
+ ac:contract :gitlabGroupAccess ; ac:property :webUrl ; ac:field "web_url" .
27
29
 
28
- gl:projectAccess a ac:AccessContract ;
29
- ac:classIri gl:Project ;
30
+ :projectAccess a ac:AccessContract ;
31
+ ac:classIri :Project ;
30
32
  ac:sourceId "gitlab-api" ;
31
33
  ac:entity "project" ;
32
34
  ac:keyField "id" ;
@@ -40,11 +42,11 @@ gl:projectAccess a ac:AccessContract ;
40
42
  ac:freshnessSeconds 300 ;
41
43
  ac:costHint "low" .
42
44
 
43
- gl:projectWebUrlBinding a ac:PropertyBinding ;
44
- ac:contract gl:projectAccess ; ac:property gl:webUrl ; ac:field "web_url" .
45
+ :projectWebUrlBinding a ac:PropertyBinding ;
46
+ ac:contract :projectAccess ; ac:property :webUrl ; ac:field "web_url" .
45
47
 
46
- gl:mergeRequestAccess a ac:AccessContract ;
47
- ac:classIri gl:MergeRequest ;
48
+ :mergeRequestAccess a ac:AccessContract ;
49
+ ac:classIri core:MergeRequest ;
48
50
  ac:sourceId "gitlab-api" ;
49
51
  ac:entity "merge_request" ;
50
52
  ac:keyField "id" ;
@@ -58,17 +60,17 @@ gl:mergeRequestAccess a ac:AccessContract ;
58
60
  ac:freshnessSeconds 60 ;
59
61
  ac:costHint "medium" .
60
62
 
61
- gl:mergeRequestIidBinding a ac:PropertyBinding ;
62
- ac:contract gl:mergeRequestAccess ; ac:property gl:iid ; ac:field "iid" .
63
+ :mergeRequestIidBinding a ac:PropertyBinding ;
64
+ ac:contract :mergeRequestAccess ; ac:property :iid ; ac:field "iid" .
63
65
 
64
- gl:mergeRequestStateBinding a ac:PropertyBinding ;
65
- ac:contract gl:mergeRequestAccess ; ac:property gl:state ; ac:field "state" .
66
+ :mergeRequestStateBinding a ac:PropertyBinding ;
67
+ ac:contract :mergeRequestAccess ; ac:property core:state ; ac:field "state" .
66
68
 
67
- gl:mergeRequestWebUrlBinding a ac:PropertyBinding ;
68
- ac:contract gl:mergeRequestAccess ; ac:property gl:webUrl ; ac:field "web_url" .
69
+ :mergeRequestWebUrlBinding a ac:PropertyBinding ;
70
+ ac:contract :mergeRequestAccess ; ac:property :webUrl ; ac:field "web_url" .
69
71
 
70
- gl:pipelineAccess a ac:AccessContract ;
71
- ac:classIri gl:Pipeline ;
72
+ :pipelineAccess a ac:AccessContract ;
73
+ ac:classIri swarm:Pipeline ;
72
74
  ac:sourceId "gitlab-api" ;
73
75
  ac:entity "pipeline" ;
74
76
  ac:keyField "id" ;
@@ -82,20 +84,20 @@ gl:pipelineAccess a ac:AccessContract ;
82
84
  ac:freshnessSeconds 60 ;
83
85
  ac:costHint "medium" .
84
86
 
85
- gl:pipelineStatusBinding a ac:PropertyBinding ;
86
- ac:contract gl:pipelineAccess ; ac:property gl:pipelineStatus ; ac:field "status" .
87
+ :pipelineStatusBinding a ac:PropertyBinding ;
88
+ ac:contract :pipelineAccess ; ac:property core:pipelineStatus ; ac:field "status" .
87
89
 
88
- gl:pipelineRefBinding a ac:PropertyBinding ;
89
- ac:contract gl:pipelineAccess ; ac:property gl:ref ; ac:field "ref" .
90
+ :pipelineRefBinding a ac:PropertyBinding ;
91
+ ac:contract :pipelineAccess ; ac:property :ref ; ac:field "ref" .
90
92
 
91
- gl:pipelineShaBinding a ac:PropertyBinding ;
92
- ac:contract gl:pipelineAccess ; ac:property gl:sha ; ac:field "sha" .
93
+ :pipelineShaBinding a ac:PropertyBinding ;
94
+ ac:contract :pipelineAccess ; ac:property :sha ; ac:field "sha" .
93
95
 
94
- gl:pipelineWebUrlBinding a ac:PropertyBinding ;
95
- ac:contract gl:pipelineAccess ; ac:property gl:webUrl ; ac:field "web_url" .
96
+ :pipelineWebUrlBinding a ac:PropertyBinding ;
97
+ ac:contract :pipelineAccess ; ac:property :webUrl ; ac:field "web_url" .
96
98
 
97
- gl:pipelineRunAccess a ac:AccessContract ;
98
- ac:classIri gl:PipelineRun ;
99
+ :pipelineRunAccess a ac:AccessContract ;
100
+ ac:classIri core:PipelineRun ;
99
101
  ac:sourceId "gitlab-api" ;
100
102
  ac:entity "pipeline" ;
101
103
  ac:keyField "id" ;
@@ -109,8 +111,8 @@ gl:pipelineRunAccess a ac:AccessContract ;
109
111
  ac:freshnessSeconds 60 ;
110
112
  ac:costHint "medium" .
111
113
 
112
- gl:jobAccess a ac:AccessContract ;
113
- ac:classIri gl:Job ;
114
+ :jobAccess a ac:AccessContract ;
115
+ ac:classIri core:Job ;
114
116
  ac:sourceId "gitlab-api" ;
115
117
  ac:entity "job" ;
116
118
  ac:keyField "id" ;
@@ -124,17 +126,17 @@ gl:jobAccess a ac:AccessContract ;
124
126
  ac:freshnessSeconds 60 ;
125
127
  ac:costHint "medium" .
126
128
 
127
- gl:jobStatusBinding a ac:PropertyBinding ;
128
- ac:contract gl:jobAccess ; ac:property gl:pipelineStatus ; ac:field "status" .
129
+ :jobStatusBinding a ac:PropertyBinding ;
130
+ ac:contract :jobAccess ; ac:property core:pipelineStatus ; ac:field "status" .
129
131
 
130
- gl:jobRefBinding a ac:PropertyBinding ;
131
- ac:contract gl:jobAccess ; ac:property gl:ref ; ac:field "ref" .
132
+ :jobRefBinding a ac:PropertyBinding ;
133
+ ac:contract :jobAccess ; ac:property :ref ; ac:field "ref" .
132
134
 
133
- gl:jobWebUrlBinding a ac:PropertyBinding ;
134
- ac:contract gl:jobAccess ; ac:property gl:webUrl ; ac:field "web_url" .
135
+ :jobWebUrlBinding a ac:PropertyBinding ;
136
+ ac:contract :jobAccess ; ac:property :webUrl ; ac:field "web_url" .
135
137
 
136
- gl:checkRunAccess a ac:AccessContract ;
137
- ac:classIri gl:CheckRun ;
138
+ :checkRunAccess a ac:AccessContract ;
139
+ ac:classIri :CheckRun ;
138
140
  ac:sourceId "gitlab-api" ;
139
141
  ac:entity "job" ;
140
142
  ac:keyField "id" ;
@@ -148,8 +150,8 @@ gl:checkRunAccess a ac:AccessContract ;
148
150
  ac:freshnessSeconds 60 ;
149
151
  ac:costHint "medium" .
150
152
 
151
- gl:issueAccess a ac:AccessContract ;
152
- ac:classIri gl:Issue ;
153
+ :issueAccess a ac:AccessContract ;
154
+ ac:classIri core:Issue ;
153
155
  ac:sourceId "gitlab-api" ;
154
156
  ac:entity "issue" ;
155
157
  ac:keyField "id" ;
@@ -163,17 +165,17 @@ gl:issueAccess a ac:AccessContract ;
163
165
  ac:freshnessSeconds 60 ;
164
166
  ac:costHint "medium" .
165
167
 
166
- gl:issueIidBinding a ac:PropertyBinding ;
167
- ac:contract gl:issueAccess ; ac:property gl:iid ; ac:field "iid" .
168
+ :issueIidBinding a ac:PropertyBinding ;
169
+ ac:contract :issueAccess ; ac:property :iid ; ac:field "iid" .
168
170
 
169
- gl:issueStateBinding a ac:PropertyBinding ;
170
- ac:contract gl:issueAccess ; ac:property gl:state ; ac:field "state" .
171
+ :issueStateBinding a ac:PropertyBinding ;
172
+ ac:contract :issueAccess ; ac:property core:state ; ac:field "state" .
171
173
 
172
- gl:issueWebUrlBinding a ac:PropertyBinding ;
173
- ac:contract gl:issueAccess ; ac:property gl:webUrl ; ac:field "web_url" .
174
+ :issueWebUrlBinding a ac:PropertyBinding ;
175
+ ac:contract :issueAccess ; ac:property :webUrl ; ac:field "web_url" .
174
176
 
175
- gl:epicAccess a ac:AccessContract ;
176
- ac:classIri gl:Epic ;
177
+ :epicAccess a ac:AccessContract ;
178
+ ac:classIri :Epic ;
177
179
  ac:sourceId "gitlab-api" ;
178
180
  ac:entity "epic" ;
179
181
  ac:keyField "id" ;
@@ -187,14 +189,14 @@ gl:epicAccess a ac:AccessContract ;
187
189
  ac:freshnessSeconds 300 ;
188
190
  ac:costHint "medium" .
189
191
 
190
- gl:epicIidBinding a ac:PropertyBinding ;
191
- ac:contract gl:epicAccess ; ac:property gl:iid ; ac:field "iid" .
192
+ :epicIidBinding a ac:PropertyBinding ;
193
+ ac:contract :epicAccess ; ac:property :iid ; ac:field "iid" .
192
194
 
193
- gl:epicWebUrlBinding a ac:PropertyBinding ;
194
- ac:contract gl:epicAccess ; ac:property gl:webUrl ; ac:field "web_url" .
195
+ :epicWebUrlBinding a ac:PropertyBinding ;
196
+ ac:contract :epicAccess ; ac:property :webUrl ; ac:field "web_url" .
195
197
 
196
- gl:milestoneAccess a ac:AccessContract ;
197
- ac:classIri gl:Milestone ;
198
+ :milestoneAccess a ac:AccessContract ;
199
+ ac:classIri core:Milestone ;
198
200
  ac:sourceId "gitlab-api" ;
199
201
  ac:entity "milestone" ;
200
202
  ac:keyField "id" ;
@@ -208,14 +210,14 @@ gl:milestoneAccess a ac:AccessContract ;
208
210
  ac:freshnessSeconds 300 ;
209
211
  ac:costHint "medium" .
210
212
 
211
- gl:milestoneStateBinding a ac:PropertyBinding ;
212
- ac:contract gl:milestoneAccess ; ac:property gl:state ; ac:field "state" .
213
+ :milestoneStateBinding a ac:PropertyBinding ;
214
+ ac:contract :milestoneAccess ; ac:property core:state ; ac:field "state" .
213
215
 
214
- gl:milestoneWebUrlBinding a ac:PropertyBinding ;
215
- ac:contract gl:milestoneAccess ; ac:property gl:webUrl ; ac:field "web_url" .
216
+ :milestoneWebUrlBinding a ac:PropertyBinding ;
217
+ ac:contract :milestoneAccess ; ac:property :webUrl ; ac:field "web_url" .
216
218
 
217
- gl:commitAccess a ac:AccessContract ;
218
- ac:classIri gl:Commit ;
219
+ :commitAccess a ac:AccessContract ;
220
+ ac:classIri core:Commit ;
219
221
  ac:sourceId "gitlab-api" ;
220
222
  ac:entity "commit" ;
221
223
  ac:keyField "id" ;
@@ -229,14 +231,14 @@ gl:commitAccess a ac:AccessContract ;
229
231
  ac:freshnessSeconds 60 ;
230
232
  ac:costHint "medium" .
231
233
 
232
- gl:commitShaBinding a ac:PropertyBinding ;
233
- ac:contract gl:commitAccess ; ac:property gl:sha ; ac:field "sha" .
234
+ :commitShaBinding a ac:PropertyBinding ;
235
+ ac:contract :commitAccess ; ac:property :sha ; ac:field "sha" .
234
236
 
235
- gl:commitWebUrlBinding a ac:PropertyBinding ;
236
- ac:contract gl:commitAccess ; ac:property gl:webUrl ; ac:field "web_url" .
237
+ :commitWebUrlBinding a ac:PropertyBinding ;
238
+ ac:contract :commitAccess ; ac:property :webUrl ; ac:field "web_url" .
237
239
 
238
- gl:branchAccess a ac:AccessContract ;
239
- ac:classIri gl:Branch ;
240
+ :branchAccess a ac:AccessContract ;
241
+ ac:classIri core:Branch ;
240
242
  ac:sourceId "gitlab-api" ;
241
243
  ac:entity "branch" ;
242
244
  ac:keyField "name" ;
@@ -250,11 +252,11 @@ gl:branchAccess a ac:AccessContract ;
250
252
  ac:freshnessSeconds 300 ;
251
253
  ac:costHint "low" .
252
254
 
253
- gl:branchWebUrlBinding a ac:PropertyBinding ;
254
- ac:contract gl:branchAccess ; ac:property gl:webUrl ; ac:field "web_url" .
255
+ :branchWebUrlBinding a ac:PropertyBinding ;
256
+ ac:contract :branchAccess ; ac:property :webUrl ; ac:field "web_url" .
255
257
 
256
- gl:releaseAccess a ac:AccessContract ;
257
- ac:classIri gl:Release ;
258
+ :releaseAccess a ac:AccessContract ;
259
+ ac:classIri core:Release ;
258
260
  ac:sourceId "gitlab-api" ;
259
261
  ac:entity "release" ;
260
262
  ac:keyField "tag_name" ;
@@ -268,8 +270,8 @@ gl:releaseAccess a ac:AccessContract ;
268
270
  ac:freshnessSeconds 300 ;
269
271
  ac:costHint "medium" .
270
272
 
271
- gl:runnerAccess a ac:AccessContract ;
272
- ac:classIri gl:Runner ;
273
+ :runnerAccess a ac:AccessContract ;
274
+ ac:classIri core:Runner ;
273
275
  ac:sourceId "gitlab-api" ;
274
276
  ac:entity "runner" ;
275
277
  ac:keyField "id" ;
@@ -283,5 +285,5 @@ gl:runnerAccess a ac:AccessContract ;
283
285
  ac:freshnessSeconds 300 ;
284
286
  ac:costHint "medium" .
285
287
 
286
- gl:runnerStateBinding a ac:PropertyBinding ;
287
- ac:contract gl:runnerAccess ; ac:property gl:state ; ac:field "status" .
288
+ :runnerStateBinding a ac:PropertyBinding ;
289
+ ac:contract :runnerAccess ; ac:property core:state ; ac:field "status" .
@@ -2,10 +2,10 @@
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": "958c1fb5041914c84fcb039b6e1a3087dc9b90f1589c92897a2623e2078ccaf0",
5
+ "gitlab_api/ontology/gitlab.ttl": "7311a57ea9ee8944fdb4aebd937fc71f0652938bb1ca3944ba1aeeb30974d06d",
6
6
  "gitlab_api/ontology/mappings/source.yaml": "4d845dd7df9503ae3a5d133ff00a98191d11adf3af7f6868f45c22bcbf098bb5",
7
7
  "gitlab_api/ontology/migrations/manifest.json": "442c3c53df0b42c866eef7255b1889b8ada6f9f9c5125cad65d6b50dc6362a3e",
8
- "gitlab_api/ontology/shapes/connector.shacl.ttl": "20d2bfc3827fd6327a3b6f25828b41d9de3f855867c46264a7e0aa7f951c76fa"
8
+ "gitlab_api/ontology/shapes/connector.shacl.ttl": "1218f4272d0e52b725be1ad7360474e09f8fcf4a8d5b27ac0e54fcd1de56f49a"
9
9
  },
10
10
  "checks": {
11
11
  "declared_tool_schema": "passed",
@@ -29,5 +29,5 @@
29
29
  "signer": "UNSIGNED-PREVIEW",
30
30
  "signing_public_key": "",
31
31
  "status": "source-validated",
32
- "validated_at": "2026-11-08T00:16:55Z"
32
+ "validated_at": "2026-12-03T19:34:11Z"
33
33
  }