puli-plg 0.1.29__tar.gz → 0.1.31__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.
- {puli_plg-0.1.29 → puli_plg-0.1.31}/PKG-INFO +2 -2
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/llm_agent/models.py +6 -6
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/mcp_server/server.py +15 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/pyproject.toml +2 -2
- {puli_plg-0.1.29 → puli_plg-0.1.31}/.gitignore +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/LICENSE +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/__init__.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/embedding_client/__init__.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/embedding_client/client.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/embedding_client/config.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/llm_agent/__init__.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/llm_agent/config.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/llm_agent/llm_agent.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/mcp_server/__init__.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/mcp_server/models.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/proxy_client/__init__.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/proxy_client/client.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/proxy_client/config.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/proxy_client/token_manager.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_mcp_server/test_diff.json +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_models/__init__.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_models/chaos_patterns.py +0 -0
- {puli_plg-0.1.29 → puli_plg-0.1.31}/puli_models/incidents.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: puli-plg
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.31
|
|
4
4
|
Summary: Zilliz vector database client for incident management
|
|
5
5
|
License-File: LICENSE
|
|
6
|
-
Requires-Python: <3.
|
|
6
|
+
Requires-Python: <3.15,>=3.10
|
|
7
7
|
Requires-Dist: google-auth>=2.0.0
|
|
8
8
|
Requires-Dist: mcp[cli]>=0.1.0
|
|
9
9
|
Requires-Dist: openai>=1.0.0
|
|
@@ -67,12 +67,12 @@ def risk_meter(rate: int, total: int = 100, bar_length: int = 20, color: str = "
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
def print_logo():
|
|
70
|
-
return "██████╗ ██╗ ██╗ ██╗
|
|
71
|
-
"██╔══██╗ ██║ ██║ ██║
|
|
72
|
-
"██████╔╝ ██║ ██║ ██║
|
|
73
|
-
"██╔═══╝ ██║ ██║ ██║
|
|
74
|
-
"██║ ╚██████╔╝ ███████╗
|
|
75
|
-
"╚═╝ ╚═════╝ ╚══════╝
|
|
70
|
+
return r"██████╗ ██╗ ██╗ ██╗ ██╗" + "\n" + \
|
|
71
|
+
r"██╔══██╗ ██║ ██║ ██║ ██║" + "\n" + \
|
|
72
|
+
r"██████╔╝ ██║ ██║ ██║ ██║" + "\n" + \
|
|
73
|
+
r"██╔═══╝ ██║ ██║ ██║ ██║" + "\n" + \
|
|
74
|
+
r"██║ ╚██████╔╝ ███████╗ ██║" + "\n" + \
|
|
75
|
+
r"╚═╝ ╚═════╝ ╚══════╝ ╚═╝"
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
class LLMQueryRequest(BaseModel):
|
|
@@ -2,6 +2,7 @@ import argparse
|
|
|
2
2
|
import asyncio
|
|
3
3
|
import json
|
|
4
4
|
import logging
|
|
5
|
+
import os
|
|
5
6
|
from typing import List
|
|
6
7
|
from mcp.server.fastmcp import FastMCP, Context
|
|
7
8
|
|
|
@@ -20,6 +21,14 @@ mcp = FastMCP("code-reviewer")
|
|
|
20
21
|
# Initialize clients with remote configuration
|
|
21
22
|
proxy_client = ProxyClient()
|
|
22
23
|
|
|
24
|
+
# Resolve OpenAI API key: BYO env var takes priority over remote config
|
|
25
|
+
_byo_key = os.environ.get("BYO_OPENAI_API_KEY")
|
|
26
|
+
_remote_key = proxy_client.mcp_config.get("config", {}).get("OPENAI_API_KEY")
|
|
27
|
+
if _byo_key:
|
|
28
|
+
os.environ["OPENAI_API_KEY"] = _byo_key
|
|
29
|
+
elif _remote_key:
|
|
30
|
+
os.environ["OPENAI_API_KEY"] = _remote_key
|
|
31
|
+
|
|
23
32
|
# Initialize embedding client with remote config
|
|
24
33
|
embedding_config = EmbeddingConfig.from_remote(proxy_client.mcp_config["config"])
|
|
25
34
|
embedding_client = EmbeddingClient(config=embedding_config)
|
|
@@ -43,6 +52,12 @@ def log_configuration():
|
|
|
43
52
|
logger.info("LLM Config - Provider: %s, Model: %s, Temperature: %s",
|
|
44
53
|
llm_config.provider, llm_config.model, llm_config.temperature)
|
|
45
54
|
logger.info("System prompt length: %d characters", len(llm_config.system_prompt))
|
|
55
|
+
if _byo_key:
|
|
56
|
+
logger.info("OpenAI API key source: BYO_OPENAI_API_KEY env var")
|
|
57
|
+
elif _remote_key:
|
|
58
|
+
logger.info("OpenAI API key source: Remote config (proxy /config/mcp)")
|
|
59
|
+
else:
|
|
60
|
+
logger.warning("OpenAI API key: NOT SET - LLM and embedding calls will fail")
|
|
46
61
|
logger.info("=" * 60)
|
|
47
62
|
|
|
48
63
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "puli-plg"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.31"
|
|
4
4
|
description = "Zilliz vector database client for incident management"
|
|
5
|
-
requires-python = ">=3.10,<3.
|
|
5
|
+
requires-python = ">=3.10,<3.15"
|
|
6
6
|
dependencies = [
|
|
7
7
|
"python-dotenv>=1.0.0",
|
|
8
8
|
"openai>=1.0.0",
|
|
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
|