gitlab-api 25.15.49__tar.gz → 25.15.55__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.49/gitlab_api.egg-info → gitlab_api-25.15.55}/PKG-INFO +5 -5
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/README.md +4 -4
- gitlab_api-25.15.55/gitlab_api/agent_data/MCP_AGENTS.md +13 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/agent_data/templates.py +2 -3
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/agent_server.py +15 -49
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/api_wrapper.py +1 -1
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/auth.py +1 -1
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/gitlab_gql.py +1 -1
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/gitlab_input_models.py +1 -1
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/gitlab_response_models.py +1 -1
- gitlab_api-25.15.55/gitlab_api/mcp_config.json +12 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/mcp_server.py +381 -129
- {gitlab_api-25.15.49 → gitlab_api-25.15.55/gitlab_api.egg-info}/PKG-INFO +5 -5
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api.egg-info/SOURCES.txt +2 -1
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api.egg-info/entry_points.txt +0 -1
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/pyproject.toml +1 -2
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/test_template.py +1 -2
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/tests/test_gitlab_models.py +1 -1
- gitlab_api-25.15.49/gitlab_api/graph_config.py +0 -86
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/LICENSE +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/MANIFEST.in +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/__init__.py +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/__main__.py +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/agent_data/A2A_AGENTS.md +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/agent_data/CRON.md +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/agent_data/CRON_LOG.md +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/agent_data/HEARTBEAT.md +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/agent_data/IDENTITY.md +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/agent_data/MEMORY.md +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/agent_data/USER.md +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/agent_data/chats +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/agent_data/icon.png +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api/agent_data/mcp_config.json +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api.egg-info/dependency_links.txt +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api.egg-info/requires.txt +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/gitlab_api.egg-info/top_level.txt +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/requirements.txt +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/scripts/validate_a2a_agent.py +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/scripts/validate_agent.py +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/setup.cfg +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/tests/test_api_wrapper.py +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/tests/test_gitlab_a2a_validation.py +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/tests/test_gitlab_mcp_validation.py +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/tests/test_verify_agent.py +0 -0
- {gitlab_api-25.15.49 → gitlab_api-25.15.55}/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.55
|
|
4
4
|
Summary: GitLab API + MCP Server + A2A Server
|
|
5
5
|
Author-email: Audel Rouhi <knucklessg1@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -46,7 +46,7 @@ Dynamic: license-file
|
|
|
46
46
|

|
|
47
47
|

|
|
48
48
|
|
|
49
|
-
*Version: 25.15.
|
|
49
|
+
*Version: 25.15.55*
|
|
50
50
|
|
|
51
51
|
## Overview
|
|
52
52
|
|
|
@@ -403,7 +403,7 @@ stateDiagram-v2
|
|
|
403
403
|
DomainNode --> [*]: Domain Result
|
|
404
404
|
```
|
|
405
405
|
|
|
406
|
-
- **RouterNode**: A fast, lightweight LLM (e.g., `
|
|
406
|
+
- **RouterNode**: A fast, lightweight LLM (e.g., `nvidia/nemotron-3-super`) that classifies the user's query into one of the specialized domains.
|
|
407
407
|
- **DomainNode**: The executor node. For the selected domain, it dynamically sets environment variables to temporarily enable ONLY the tools relevant to that domain, creating a highly focused sub-agent (e.g., `gpt-4o`) to complete the request. This preserves LLM context and prevents tool hallucination.
|
|
408
408
|
|
|
409
409
|
## Usage
|
|
@@ -517,7 +517,7 @@ stateDiagram-v2
|
|
|
517
517
|
DomainNode --> [*]: Domain Result
|
|
518
518
|
```
|
|
519
519
|
|
|
520
|
-
- **RouterNode**: A fast, lightweight LLM (e.g., `
|
|
520
|
+
- **RouterNode**: A fast, lightweight LLM (e.g., `nvidia/nemotron-3-super`) that classifies the user's query into one of the specialized domains.
|
|
521
521
|
- **DomainNode**: The executor node. For the selected domain, it dynamically sets environment variables to temporarily enable ONLY the tools relevant to that domain, creating a highly focused sub-agent (e.g., `gpt-4o`) to complete the request. This preserves LLM context and prevents tool hallucination.
|
|
522
522
|
|
|
523
523
|
## Usage Example
|
|
@@ -869,7 +869,7 @@ For Testing Only: Plain text storage will also work, although **not** recommende
|
|
|
869
869
|
"env": {
|
|
870
870
|
"GITLAB_URL": "https://gitlab.com/api/v4/",
|
|
871
871
|
"GITLAB_TOKEN": "glpat-askdfalskdvjas",
|
|
872
|
-
"
|
|
872
|
+
"GITLAB_SSL_VERIFY": "True"
|
|
873
873
|
},
|
|
874
874
|
"timeout": 200000
|
|
875
875
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|

|
|
22
22
|

|
|
23
23
|
|
|
24
|
-
*Version: 25.15.
|
|
24
|
+
*Version: 25.15.55*
|
|
25
25
|
|
|
26
26
|
## Overview
|
|
27
27
|
|
|
@@ -378,7 +378,7 @@ stateDiagram-v2
|
|
|
378
378
|
DomainNode --> [*]: Domain Result
|
|
379
379
|
```
|
|
380
380
|
|
|
381
|
-
- **RouterNode**: A fast, lightweight LLM (e.g., `
|
|
381
|
+
- **RouterNode**: A fast, lightweight LLM (e.g., `nvidia/nemotron-3-super`) that classifies the user's query into one of the specialized domains.
|
|
382
382
|
- **DomainNode**: The executor node. For the selected domain, it dynamically sets environment variables to temporarily enable ONLY the tools relevant to that domain, creating a highly focused sub-agent (e.g., `gpt-4o`) to complete the request. This preserves LLM context and prevents tool hallucination.
|
|
383
383
|
|
|
384
384
|
## Usage
|
|
@@ -492,7 +492,7 @@ stateDiagram-v2
|
|
|
492
492
|
DomainNode --> [*]: Domain Result
|
|
493
493
|
```
|
|
494
494
|
|
|
495
|
-
- **RouterNode**: A fast, lightweight LLM (e.g., `
|
|
495
|
+
- **RouterNode**: A fast, lightweight LLM (e.g., `nvidia/nemotron-3-super`) that classifies the user's query into one of the specialized domains.
|
|
496
496
|
- **DomainNode**: The executor node. For the selected domain, it dynamically sets environment variables to temporarily enable ONLY the tools relevant to that domain, creating a highly focused sub-agent (e.g., `gpt-4o`) to complete the request. This preserves LLM context and prevents tool hallucination.
|
|
497
497
|
|
|
498
498
|
## Usage Example
|
|
@@ -844,7 +844,7 @@ For Testing Only: Plain text storage will also work, although **not** recommende
|
|
|
844
844
|
"env": {
|
|
845
845
|
"GITLAB_URL": "https://gitlab.com/api/v4/",
|
|
846
846
|
"GITLAB_TOKEN": "glpat-askdfalskdvjas",
|
|
847
|
-
"
|
|
847
|
+
"GITLAB_SSL_VERIFY": "True"
|
|
848
848
|
},
|
|
849
849
|
"timeout": 200000
|
|
850
850
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# MCP_AGENTS.md - Dynamic Agent Registry
|
|
2
|
+
|
|
3
|
+
This file tracks the generated agents from MCP servers. You can manually modify the 'Tools' list to customize agent expertise.
|
|
4
|
+
|
|
5
|
+
## Agent Mapping Table
|
|
6
|
+
|
|
7
|
+
| Name | Description | System Prompt | Tools | Tag | Source MCP |
|
|
8
|
+
|------|-------------|---------------|-------|-----|------------|
|
|
9
|
+
|
|
10
|
+
## Tool Inventory Table
|
|
11
|
+
|
|
12
|
+
| Tool Name | Description | Tag | Source |
|
|
13
|
+
|-----------|-------------|-----|--------|
|
|
@@ -2,7 +2,6 @@ import asyncio
|
|
|
2
2
|
from typing import Dict
|
|
3
3
|
from gitlab_api.models import PeriodicTask
|
|
4
4
|
|
|
5
|
-
# Core files we care about most
|
|
6
5
|
CORE_FILES = {
|
|
7
6
|
"IDENTITY": "IDENTITY.md",
|
|
8
7
|
"USER": "USER.md",
|
|
@@ -13,11 +12,11 @@ CORE_FILES = {
|
|
|
13
12
|
"MCP_CONFIG": "mcp_config.json",
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
|
|
17
16
|
tasks: list[PeriodicTask] = []
|
|
18
17
|
lock = asyncio.Lock()
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
|
|
21
20
|
TEMPLATES: Dict[str, str] = {
|
|
22
21
|
"IDENTITY": """# IDENTITY.md - Who I Am, Core Personality, & Boundaries
|
|
23
22
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import os
|
|
4
4
|
import sys
|
|
5
5
|
import logging
|
|
6
|
-
|
|
7
6
|
import warnings
|
|
7
|
+
|
|
8
8
|
from agent_utilities import (
|
|
9
9
|
build_system_prompt_from_workspace,
|
|
10
10
|
create_agent_parser,
|
|
@@ -13,7 +13,7 @@ from agent_utilities import (
|
|
|
13
13
|
load_identity,
|
|
14
14
|
)
|
|
15
15
|
|
|
16
|
-
__version__ = "25.15.
|
|
16
|
+
__version__ = "25.15.55"
|
|
17
17
|
|
|
18
18
|
logging.basicConfig(
|
|
19
19
|
level=logging.INFO,
|
|
@@ -22,13 +22,16 @@ logging.basicConfig(
|
|
|
22
22
|
)
|
|
23
23
|
logger = logging.getLogger(__name__)
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
initialize_workspace()
|
|
27
27
|
meta = load_identity()
|
|
28
28
|
DEFAULT_AGENT_NAME = os.getenv("DEFAULT_AGENT_NAME", meta.get("name", "Gitlab Api"))
|
|
29
29
|
DEFAULT_AGENT_DESCRIPTION = os.getenv(
|
|
30
30
|
"AGENT_DESCRIPTION",
|
|
31
|
-
meta.get(
|
|
31
|
+
meta.get(
|
|
32
|
+
"description",
|
|
33
|
+
"AI agent for GitLab Api management.",
|
|
34
|
+
),
|
|
32
35
|
)
|
|
33
36
|
DEFAULT_AGENT_SYSTEM_PROMPT = os.getenv(
|
|
34
37
|
"AGENT_SYSTEM_PROMPT",
|
|
@@ -36,68 +39,31 @@ DEFAULT_AGENT_SYSTEM_PROMPT = os.getenv(
|
|
|
36
39
|
)
|
|
37
40
|
|
|
38
41
|
|
|
39
|
-
def agent_template(mcp_url: str = None, mcp_config: str = None, **kwargs):
|
|
40
|
-
"""Factory function returning the fully initialized graph for execution."""
|
|
41
|
-
from agent_utilities import create_graph_agent
|
|
42
|
-
from gitlab_api.graph_config import TAG_PROMPTS, TAG_ENV_VARS
|
|
43
|
-
|
|
44
|
-
# In-process MCP loading: if no external URL/Config, load the local FastMCP instance
|
|
45
|
-
mcp_toolsets = []
|
|
46
|
-
effective_mcp_url = mcp_url or os.getenv("MCP_URL")
|
|
47
|
-
effective_mcp_config = mcp_config or os.getenv("MCP_CONFIG")
|
|
48
|
-
|
|
49
|
-
if not effective_mcp_url and not effective_mcp_config:
|
|
50
|
-
try:
|
|
51
|
-
from gitlab_api.mcp_server import get_mcp_instance
|
|
52
|
-
|
|
53
|
-
mcp, _, _, _ = get_mcp_instance()
|
|
54
|
-
mcp_toolsets.append(mcp)
|
|
55
|
-
logger.info("GitLab API: Using in-process MCP instance.")
|
|
56
|
-
except (ImportError, Exception) as e:
|
|
57
|
-
logger.warning(f"GitLab API: Could not load in-process MCP: {e}")
|
|
58
|
-
|
|
59
|
-
return create_graph_agent(
|
|
60
|
-
mcp_url=effective_mcp_url,
|
|
61
|
-
mcp_config=effective_mcp_config or "",
|
|
62
|
-
mcp_toolsets=mcp_toolsets,
|
|
63
|
-
name=f"{DEFAULT_AGENT_NAME} Graph Agent",
|
|
64
|
-
tag_prompts=TAG_PROMPTS,
|
|
65
|
-
tag_env_vars=TAG_ENV_VARS,
|
|
66
|
-
**kwargs,
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
|
|
70
42
|
def agent_server():
|
|
71
|
-
|
|
72
|
-
# Suppress RequestsDependencyWarning and FastMCP DeprecationWarnings
|
|
73
43
|
warnings.filterwarnings("ignore", message=".*urllib3.*or chardet.*")
|
|
74
44
|
warnings.filterwarnings("ignore", category=DeprecationWarning, module="fastmcp")
|
|
75
45
|
|
|
76
46
|
print(f"{DEFAULT_AGENT_NAME} v{__version__}", file=sys.stderr)
|
|
77
47
|
parser = create_agent_parser()
|
|
78
|
-
|
|
79
48
|
args = parser.parse_args()
|
|
80
49
|
|
|
81
50
|
if args.debug:
|
|
82
51
|
logging.getLogger().setLevel(logging.DEBUG)
|
|
83
52
|
logger.debug("Debug mode enabled")
|
|
84
53
|
|
|
85
|
-
#
|
|
86
|
-
|
|
54
|
+
# Start server using the auto-discovery pattern (from mcp_config.json)
|
|
55
|
+
create_graph_agent_server(
|
|
56
|
+
mcp_url=args.mcp_url,
|
|
57
|
+
mcp_config=args.mcp_config or "mcp_config.json",
|
|
58
|
+
host=args.host,
|
|
59
|
+
port=args.port,
|
|
87
60
|
provider=args.provider,
|
|
61
|
+
model_id=args.model_id,
|
|
62
|
+
router_model=args.model_id,
|
|
88
63
|
agent_model=args.model_id,
|
|
89
64
|
base_url=args.base_url,
|
|
90
65
|
api_key=args.api_key,
|
|
91
66
|
custom_skills_directory=args.custom_skills_directory,
|
|
92
|
-
debug=args.debug,
|
|
93
|
-
ssl_verify=not args.insecure,
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
# Start server using the pre-built graph bundle
|
|
97
|
-
create_graph_agent_server(
|
|
98
|
-
graph_bundle=graph_bundle,
|
|
99
|
-
host=args.host,
|
|
100
|
-
port=args.port,
|
|
101
67
|
enable_web_ui=args.web,
|
|
102
68
|
enable_otel=args.otel,
|
|
103
69
|
otel_endpoint=args.otel_endpoint,
|
|
@@ -14,7 +14,7 @@ logger = get_logger(__name__)
|
|
|
14
14
|
def get_client(
|
|
15
15
|
instance: str = os.getenv("GITLAB_URL", "https://gitlab.com"),
|
|
16
16
|
token: Optional[str] = os.getenv("GITLAB_TOKEN", None),
|
|
17
|
-
verify: bool = to_boolean(string=os.getenv("
|
|
17
|
+
verify: bool = to_boolean(string=os.getenv("GITLAB_SSL_VERIFY", "True")),
|
|
18
18
|
config: Optional[dict] = None,
|
|
19
19
|
) -> Api:
|
|
20
20
|
"""
|