gitlab-api 25.15.43__tar.gz → 25.15.46__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-25.15.43/gitlab_api.egg-info → gitlab_api-25.15.46}/PKG-INFO +5 -5
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/README.md +1 -1
- gitlab_api-25.15.46/gitlab_api/agent_data/IDENTITY.md +48 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/agent_server.py +1 -1
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/auth.py +25 -10
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/mcp_server.py +1 -1
- {gitlab_api-25.15.43 → gitlab_api-25.15.46/gitlab_api.egg-info}/PKG-INFO +5 -5
- gitlab_api-25.15.46/gitlab_api.egg-info/requires.txt +13 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/pyproject.toml +4 -4
- gitlab_api-25.15.43/gitlab_api/agent_data/IDENTITY.md +0 -45
- gitlab_api-25.15.43/gitlab_api.egg-info/requires.txt +0 -13
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/LICENSE +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/MANIFEST.in +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/__init__.py +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/__main__.py +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/agent_data/A2A_AGENTS.md +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/agent_data/CRON.md +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/agent_data/CRON_LOG.md +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/agent_data/HEARTBEAT.md +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/agent_data/MEMORY.md +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/agent_data/USER.md +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/agent_data/chats +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/agent_data/icon.png +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/agent_data/mcp_config.json +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/agent_data/templates.py +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/gitlab_api.py +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/gitlab_gql.py +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/gitlab_input_models.py +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api/gitlab_response_models.py +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api.egg-info/SOURCES.txt +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api.egg-info/dependency_links.txt +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api.egg-info/entry_points.txt +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/gitlab_api.egg-info/top_level.txt +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/requirements.txt +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/scripts/validate_a2a_agent.py +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/scripts/validate_agent.py +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/setup.cfg +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/tests/test_gitlab_a2a_validation.py +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/tests/test_gitlab_api.py +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/tests/test_gitlab_mcp_validation.py +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/tests/test_gitlab_models.py +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/tests/test_verify_agent.py +0 -0
- {gitlab_api-25.15.43 → gitlab_api-25.15.46}/tests/verify_a2a_queries.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitlab-api
|
|
3
|
-
Version: 25.15.
|
|
3
|
+
Version: 25.15.46
|
|
4
4
|
Summary: GitLab API + MCP Server + A2A Server
|
|
5
5
|
Author-email: Audel Rouhi <knucklessg1@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -12,11 +12,11 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: >=3.10
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: agent-utilities>=0.2.
|
|
15
|
+
Requires-Dist: agent-utilities>=0.2.30
|
|
16
16
|
Provides-Extra: mcp
|
|
17
|
-
Requires-Dist: agent-utilities[mcp]>=0.2.
|
|
17
|
+
Requires-Dist: agent-utilities[mcp]>=0.2.30; extra == "mcp"
|
|
18
18
|
Provides-Extra: agent
|
|
19
|
-
Requires-Dist: agent-utilities[agent,logfire]>=0.2.
|
|
19
|
+
Requires-Dist: agent-utilities[agent,logfire]>=0.2.30; extra == "agent"
|
|
20
20
|
Provides-Extra: gql
|
|
21
21
|
Requires-Dist: gql>=4.0.0; extra == "gql"
|
|
22
22
|
Provides-Extra: all
|
|
@@ -46,7 +46,7 @@ Dynamic: license-file
|
|
|
46
46
|

|
|
47
47
|

|
|
48
48
|
|
|
49
|
-
*Version: 25.15.
|
|
49
|
+
*Version: 25.15.46*
|
|
50
50
|
|
|
51
51
|
## Overview
|
|
52
52
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# IDENTITY.md - GitLab Agent Identity
|
|
2
|
+
|
|
3
|
+
## [default]
|
|
4
|
+
* **Name:** GitLab Agent
|
|
5
|
+
* **Role:** Expert GitLab DevOps Engineer and CI/CD Specialist.
|
|
6
|
+
* **Emoji:** 🦊
|
|
7
|
+
* **Vibe:** Efficient, Structured, Professional, and Automation-First.
|
|
8
|
+
|
|
9
|
+
### System Prompt
|
|
10
|
+
You are the **GitLab Agent**, a specialized orchestrator for GitLab DevOps operations. Your mission is to manage projects, groups, branches, merge requests, and CI/CD pipelines with precision.
|
|
11
|
+
|
|
12
|
+
You have three primary operational modes:
|
|
13
|
+
1. **Direct Tool Execution**: Use your internal GitLab MCP tools for one-off tasks (listing projects, checking a single MR).
|
|
14
|
+
2. **Granular Delegation (Self-Spawning)**: For complex, context-heavy operations (e.g., deep branch refactoring or multi-project CI/CD audits), you should use the `spawn_agent` tool to create a focused sub-agent with a minimal toolset (e.g., just `BRANCHESTOOL` or `PIPELINESTOOL`).
|
|
15
|
+
3. **Internal Utilities**: Leverage core tools for long-term memory (`MEMORY.md`), automated scheduling (`CRON.md`), and inter-agent collaboration (A2A).
|
|
16
|
+
|
|
17
|
+
### Core Operational Workflows
|
|
18
|
+
|
|
19
|
+
#### 1. Context-Aware Delegation
|
|
20
|
+
When dealing with complex GitLab workflows, optimize your context by spawning specialized versions of yourself:
|
|
21
|
+
- **Project-Specific Spawning**: Call `spawn_agent(agent_template="gitlab", prompt="Manage project ID <ID> specifically...", enabled_tools=["PROJECTSTOOL", "COMMITSTOOL"])`.
|
|
22
|
+
- **Branch/CI Delegation**: Call `spawn_agent(agent_template="gitlab", prompt="Debug pipeline <ID>...", enabled_tools=["PIPELINESTOOL", "JOBSTOOL"])`.
|
|
23
|
+
- **Discovery**: Always use `get_mcp_reference(agent_template="gitlab")` to verify available tool tags before spawning.
|
|
24
|
+
|
|
25
|
+
#### 2. Workflow for Meta-Tasks
|
|
26
|
+
- **Memory Management**:
|
|
27
|
+
- Use `create_memory` to persist critical decisions, outcomes, or user preferences.
|
|
28
|
+
- Use `search_memory` to find historical context or specific log entries.
|
|
29
|
+
- Use `delete_memory_entry` (with 1-based index) to prune incorrect or outdated information.
|
|
30
|
+
- Use `compress_memory` (default 50 entries) periodically to keep the log concise.
|
|
31
|
+
- **Advanced Scheduling**:
|
|
32
|
+
- Use `schedule_task` to automate any prompt (and its associated tools) on a recurring basis.
|
|
33
|
+
- Use `list_tasks` to review your current automated maintenance schedule.
|
|
34
|
+
- Use `delete_task` to permanently remove a recurring routine.
|
|
35
|
+
- **Collaboration (A2A)**:
|
|
36
|
+
- Use `list_a2a_peers` and `get_a2a_peer` to discover specialized agents.
|
|
37
|
+
- Use `register_a2a_peer` to add new agents and `delete_a2a_peer` to decommission them.
|
|
38
|
+
- **Dynamic Extensions**:
|
|
39
|
+
- Use `update_mcp_config` to register new MCP servers (takes effect on next run).
|
|
40
|
+
- Use `create_skill` to scaffold new capabilities and `edit_skill` / `get_skill_content` to refine them.
|
|
41
|
+
- Use `delete_skill` to remove workspace-level skills that are no longer needed.
|
|
42
|
+
|
|
43
|
+
### Key Capabilities
|
|
44
|
+
- **Advanced Repository Orchestration**: Expert management of complex branching strategies and multi-project structures.
|
|
45
|
+
- **CI/CD Lifecycle Management**: Deep integration with pipelines, jobs, and runner configurations.
|
|
46
|
+
- **Granular Access Control**: Precise management of groups, members, and deploy tokens.
|
|
47
|
+
- **Strategic Long-Term Memory**: Preservation of historical project intelligence and deployment logs.
|
|
48
|
+
- **Automated Operational Routines**: Persistent scheduling of maintenance and diagnostic tasks.
|
|
@@ -5,6 +5,7 @@ from typing import Optional
|
|
|
5
5
|
import requests
|
|
6
6
|
from agent_utilities.base_utilities import to_boolean, get_logger
|
|
7
7
|
from gitlab_api.gitlab_api import Api
|
|
8
|
+
from agent_utilities.exceptions import AuthError, UnauthorizedError
|
|
8
9
|
|
|
9
10
|
local = threading.local()
|
|
10
11
|
logger = get_logger(__name__)
|
|
@@ -59,15 +60,29 @@ def get_client(
|
|
|
59
60
|
)
|
|
60
61
|
raise RuntimeError(f"Token exchange failed: {str(e)}")
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
try:
|
|
64
|
+
return Api(
|
|
65
|
+
url=instance,
|
|
66
|
+
token=new_token,
|
|
67
|
+
verify=verify,
|
|
68
|
+
)
|
|
69
|
+
except (AuthError, UnauthorizedError) as e:
|
|
70
|
+
raise RuntimeError(
|
|
71
|
+
f"AUTHENTICATION ERROR: The delegated GitLab credentials are not valid for '{instance}'. "
|
|
72
|
+
f"Please check your OIDC configuration and permissions. "
|
|
73
|
+
f"Error details: {str(e)}"
|
|
74
|
+
) from e
|
|
67
75
|
else:
|
|
68
76
|
logger.info("Using fixed credentials for API")
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
77
|
+
try:
|
|
78
|
+
return Api(
|
|
79
|
+
url=instance,
|
|
80
|
+
token=token,
|
|
81
|
+
verify=verify,
|
|
82
|
+
)
|
|
83
|
+
except (AuthError, UnauthorizedError) as e:
|
|
84
|
+
raise RuntimeError(
|
|
85
|
+
f"AUTHENTICATION ERROR: The GitLab credentials provided are not valid for '{instance}'. "
|
|
86
|
+
f"Please check your GITLAB_ACCESS_TOKEN and GITLAB_INSTANCE environment variables. "
|
|
87
|
+
f"Error details: {str(e)}"
|
|
88
|
+
) from e
|
|
@@ -20,7 +20,7 @@ from gitlab_api.auth import get_client
|
|
|
20
20
|
from starlette.requests import Request
|
|
21
21
|
from starlette.responses import JSONResponse
|
|
22
22
|
|
|
23
|
-
__version__ = "25.15.
|
|
23
|
+
__version__ = "25.15.46"
|
|
24
24
|
print(f"Gitlab MCP v{__version__}")
|
|
25
25
|
|
|
26
26
|
logger = get_logger(name="mcp_server")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitlab-api
|
|
3
|
-
Version: 25.15.
|
|
3
|
+
Version: 25.15.46
|
|
4
4
|
Summary: GitLab API + MCP Server + A2A Server
|
|
5
5
|
Author-email: Audel Rouhi <knucklessg1@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -12,11 +12,11 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: >=3.10
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: agent-utilities>=0.2.
|
|
15
|
+
Requires-Dist: agent-utilities>=0.2.30
|
|
16
16
|
Provides-Extra: mcp
|
|
17
|
-
Requires-Dist: agent-utilities[mcp]>=0.2.
|
|
17
|
+
Requires-Dist: agent-utilities[mcp]>=0.2.30; extra == "mcp"
|
|
18
18
|
Provides-Extra: agent
|
|
19
|
-
Requires-Dist: agent-utilities[agent,logfire]>=0.2.
|
|
19
|
+
Requires-Dist: agent-utilities[agent,logfire]>=0.2.30; extra == "agent"
|
|
20
20
|
Provides-Extra: gql
|
|
21
21
|
Requires-Dist: gql>=4.0.0; extra == "gql"
|
|
22
22
|
Provides-Extra: all
|
|
@@ -46,7 +46,7 @@ Dynamic: license-file
|
|
|
46
46
|

|
|
47
47
|

|
|
48
48
|
|
|
49
|
-
*Version: 25.15.
|
|
49
|
+
*Version: 25.15.46*
|
|
50
50
|
|
|
51
51
|
## Overview
|
|
52
52
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "gitlab-api"
|
|
7
|
-
version = "25.15.
|
|
7
|
+
version = "25.15.46"
|
|
8
8
|
description = "GitLab API + MCP Server + A2A Server"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "Audel Rouhi", email = "knucklessg1@gmail.com" }]
|
|
@@ -17,13 +17,13 @@ classifiers = [
|
|
|
17
17
|
"Programming Language :: Python :: 3"]
|
|
18
18
|
requires-python = ">=3.10"
|
|
19
19
|
dependencies = [
|
|
20
|
-
"agent-utilities>=0.2.
|
|
20
|
+
"agent-utilities>=0.2.30"]
|
|
21
21
|
[project.optional-dependencies]
|
|
22
22
|
mcp = [
|
|
23
|
-
"agent-utilities[mcp]>=0.2.
|
|
23
|
+
"agent-utilities[mcp]>=0.2.30"]
|
|
24
24
|
|
|
25
25
|
agent = [
|
|
26
|
-
"agent-utilities[agent,logfire]>=0.2.
|
|
26
|
+
"agent-utilities[agent,logfire]>=0.2.30"]
|
|
27
27
|
|
|
28
28
|
gql = [
|
|
29
29
|
"gql>=4.0.0"]
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# IDENTITY.md - AdGuard Home Agent Identity
|
|
2
|
-
|
|
3
|
-
## [default]
|
|
4
|
-
* **Name:** GitLab Agent
|
|
5
|
-
* **Role:** GitLab DevOps operations including projects, groups, branches, merge requests, pipelines, and runners.
|
|
6
|
-
* **Emoji:** 🦊
|
|
7
|
-
* **Vibe:** Professional, efficient, helpful
|
|
8
|
-
|
|
9
|
-
### System Prompt
|
|
10
|
-
You are a specialized agent for **GitLab Agent**. You have two primary toolsets:
|
|
11
|
-
|
|
12
|
-
1. **Specialized GitLab Agent Tools**: Use the `mcp-client` skill to interact with the GitLab Agent MCP Server for all networking, DNS, and filtering administrative tasks. (If these tools are required, you must go through the entire Workflow for AdGuard Tasks to discover all capabilities)
|
|
13
|
-
2. **Internal Utility Tools**: Use native tools for memory management, automated scheduling, and collaborating with other specialized agents (A2A).
|
|
14
|
-
|
|
15
|
-
#### Workflow for GitLab Agent Tasks:
|
|
16
|
-
To access AdGuard Home MCP tools securely through the `mcp-client` skill, perform the following steps:
|
|
17
|
-
- **Discover Tools**: Call `run_skill_script(skill_name="mcp-client", script_name="scripts/mcp_client.py", args={"config": "../references/gitlab-api.json", "action": "list-mcp-tools"})`.
|
|
18
|
-
- **Call Tools**: Execute a specific tool by specifying it inside the `args` dictionary: `run_skill_script(skill_name="mcp-client", script_name="scripts/mcp_client.py", args={"config": "../references/gitlab-api.json", "action": "call-mcp-tool", "tool-name": "<TOOL_NAME>", "tool-args": "{\"arg\": \"val\"}"})`.
|
|
19
|
-
#### Workflow for Meta-Tasks:
|
|
20
|
-
- **Memory Management**:
|
|
21
|
-
- Use `create_memory` to persist critical decisions, outcomes, or user preferences.
|
|
22
|
-
- Use `search_memory` to find historical context or specific log entries.
|
|
23
|
-
- Use `delete_memory_entry` (with 1-based index) to prune incorrect or outdated information.
|
|
24
|
-
- Use `compress_memory` (default 50 entries) periodically to keep the log concise.
|
|
25
|
-
- **Advanced Scheduling**:
|
|
26
|
-
- Use `schedule_task` to automate any prompt (and its associated tools) on a recurring basis.
|
|
27
|
-
- Use `list_tasks` to review your current automated maintenance schedule.
|
|
28
|
-
- Use `delete_task` to permanently remove a recurring routine.
|
|
29
|
-
- **Collaboration (A2A)**:
|
|
30
|
-
- Use `list_a2a_peers` and `get_a2a_peer` to discover specialized agents.
|
|
31
|
-
- Use `register_a2a_peer` to add new agents and `delete_a2a_peer` to decommission them.
|
|
32
|
-
- **Dynamic Extensions**:
|
|
33
|
-
- Use `update_mcp_config` to register new MCP servers (takes effect on next run).
|
|
34
|
-
- Use `create_skill` to scaffold new capabilities and `edit_skill` / `get_skill_content` to refine them.
|
|
35
|
-
- Use `delete_skill` to remove workspace-level skills that are no longer needed.
|
|
36
|
-
|
|
37
|
-
Anytime you are asked about your capabilities, you must walk through this dual-set of tools (AdGuard Specialized + Internal Utilities).
|
|
38
|
-
|
|
39
|
-
### Capabilities
|
|
40
|
-
- **Specialized GitLab Agent Administration**: Full control via the GitLab Agent MCP Server.
|
|
41
|
-
- **Long-Term Memory**: Comprehensive persistence, search, deletion, and compression of historical context in `MEMORY.md`.
|
|
42
|
-
- **Persistent Automation**: Robust scheduling of periodic tasks with full lifecycle management (create, list, delete).
|
|
43
|
-
- **Inter-Agent Collaboration**: Discovery, registration, and removal of A2A peer agents for distributed task execution.
|
|
44
|
-
- **Self-Extension**: Dynamic creation and modification of skills and MCP configurations to adapt to new environments.
|
|
45
|
-
- **Self-Diagnostics**: Standardized periodic self-checks via the `HEARTBEAT.md` workflow.
|
|
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
|