puli-plg 0.1.28__py3-none-any.whl → 0.1.30__py3-none-any.whl

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.
@@ -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 "██████╗ ██╗ ██╗ ██╗ ██╗\n" + \
71
- "██╔══██╗ ██║ ██║ ██║ ██║\n" + \
72
- "██████╔╝ ██║ ██║ ██║ ██║\n" + \
73
- "██╔═══╝ ██║ ██║ ██║ ██║\n" + \
74
- "██║ ╚██████╔╝ ███████╗ ██║\n" + \
75
- "╚═╝ ╚═════╝ ╚══════╝ ╚═╝\n"
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):
@@ -1,15 +1,20 @@
1
1
  import os
2
+ import logging
2
3
  from dataclasses import dataclass, field
3
4
  from pathlib import Path
4
5
 
5
6
  from google.auth.transport.requests import Request
6
7
  from google.oauth2 import service_account
8
+ from google.auth import exceptions as google_auth_exceptions
7
9
 
8
- # Bundled service account key path (inside the package)
10
+ logger = logging.getLogger(__name__)
11
+
12
+ # User-provided service account key path (optional, for GCP Cloud Run auth)
13
+ # Set GOOGLE_APPLICATION_CREDENTIALS env var to provide your own key
9
14
  _CREDENTIALS_PATH = Path(__file__).parent.parent / "credentials" / "service-account.json"
10
15
 
11
16
  # Default Cloud Run URL
12
- _DEFAULT_PROXY_URL = "https://puli-proxy-gpvaoh5hka-uw.a.run.app"
17
+ _DEFAULT_PROXY_URL = "http://34.111.149.123"
13
18
 
14
19
 
15
20
  def _load_credentials(target_audience: str) -> service_account.IDTokenCredentials | None:
@@ -42,7 +47,16 @@ class ProxyConfig:
42
47
  return None
43
48
 
44
49
  if not self._credentials.valid:
45
- self._credentials.refresh(Request())
50
+ try:
51
+ self._credentials.refresh(Request())
52
+ except google_auth_exceptions.RefreshError as e:
53
+ logger.warning(
54
+ "Failed to refresh GCP identity token: %s. "
55
+ "Continuing without GCP auth (may fail if proxy requires it).",
56
+ e
57
+ )
58
+ self._credentials = None
59
+ return None
46
60
 
47
61
  return self._credentials.token
48
62
 
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: puli-plg
3
- Version: 0.1.28
3
+ Version: 0.1.30
4
4
  Summary: Zilliz vector database client for incident management
5
5
  License-File: LICENSE
6
- Requires-Python: <3.14,>=3.10
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
@@ -1,26 +1,24 @@
1
1
  puli_mcp_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  puli_mcp_server/test_diff.json,sha256=Nia-fCUjE1p9TSqjyigxzQEbCue9-p33HhTmcF6dV1s,1351
3
- puli_mcp_server/credentials/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
3
  puli_mcp_server/embedding_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
4
  puli_mcp_server/embedding_client/client.py,sha256=13aNY9RteC9oNr0tPNC3JTCvQbj9hITpBxUBk7J1NHY,1047
6
5
  puli_mcp_server/embedding_client/config.py,sha256=LDrUpRQO-OYhYhiecL5LNyQ_Xh0uFRmf0t1PCh8ZOZw,1438
7
6
  puli_mcp_server/llm_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
7
  puli_mcp_server/llm_agent/config.py,sha256=UCl1UQrVaQfnc26fmV0wSYthWE3CwZ3dY2DA5OWSMNE,2985
9
8
  puli_mcp_server/llm_agent/llm_agent.py,sha256=EC4K3uMHrYnEX3hxEmCIqyBK6j5Ga9VZleja8-dJEvQ,1449
10
- puli_mcp_server/llm_agent/models.py,sha256=2vFeItuOcoNNg12g9uaGAVzRpoCXcT_sKCXBQIrWvc0,11517
9
+ puli_mcp_server/llm_agent/models.py,sha256=ofSh_cRwoOWCoEEEX9Y-g4k-x2UpIzJdFKBhS4f0wuk,11546
11
10
  puli_mcp_server/mcp_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
11
  puli_mcp_server/mcp_server/models.py,sha256=TI7Qnhfb1Tt6F_5Mg_vgd6mIKLhfGYXWm9oRCiLO7-k,2302
13
12
  puli_mcp_server/mcp_server/server.py,sha256=pnT3zq11jdxjqeKv0JDwZPB6NA7Yg8CCUkwSIq6b-14,4307
14
13
  puli_mcp_server/proxy_client/__init__.py,sha256=-D9PvJPzK0AZrQWevsGe1BCQVcmcQk7P_81cpNARJf8,59
15
14
  puli_mcp_server/proxy_client/client.py,sha256=QO1hSHqxRTEvFupRYtgvIr9abTQD7XObs9uI63o9M2M,8901
16
- puli_mcp_server/proxy_client/config.py,sha256=QzB47oCF9KhVhkfLagNKz35CTcsjbgNaa-YyHRg-IX8,2326
15
+ puli_mcp_server/proxy_client/config.py,sha256=knYEjiR4DshJNdWN1PHk7bCghbYnc3n2TTVjHFs6WwA,2880
17
16
  puli_mcp_server/proxy_client/token_manager.py,sha256=li2sxk-EwHHgCM7WEnpW1pWfvNWqezOunQUNF24JmX8,796
18
17
  puli_models/__init__.py,sha256=8qgpZupjCu4nmGZJhTcnF-DnAdfloe9CtHUZwh7T-pQ,228
19
18
  puli_models/chaos_patterns.py,sha256=cwUKAFz6_G4fJn8eLO_rXe0WERErvAfwPOBLHupfLfU,2701
20
19
  puli_models/incidents.py,sha256=ysQBbG7yyLe2w6e1WhNahuohlCGp1EUzVw0LZOPXO80,2524
21
- puli_mcp_server/credentials/service-account.json,sha256=4Zng_2Y-YXzgwcaWJreGaumQ-nNYQymrUHx6D_Bj060,2399
22
- puli_plg-0.1.28.dist-info/METADATA,sha256=cyFQJ3xqCTdNtA5FVvFUF2OCe9APqRIIkNK5DCGiLVo,470
23
- puli_plg-0.1.28.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
24
- puli_plg-0.1.28.dist-info/entry_points.txt,sha256=FE5DJ7iMEWzWmTCGVJ8IMdr_xUIcHi-Nq99TkqOpRyo,73
25
- puli_plg-0.1.28.dist-info/licenses/LICENSE,sha256=cfujx4Uo5ylvFxncn43J7M6DDvwnw0cu9DBec84FcqU,5521
26
- puli_plg-0.1.28.dist-info/RECORD,,
20
+ puli_plg-0.1.30.dist-info/METADATA,sha256=sNkO4AmdygzT-rUiuEgu_tlWDI6S863Ewi5OZUIJ2ns,470
21
+ puli_plg-0.1.30.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
22
+ puli_plg-0.1.30.dist-info/entry_points.txt,sha256=FE5DJ7iMEWzWmTCGVJ8IMdr_xUIcHi-Nq99TkqOpRyo,73
23
+ puli_plg-0.1.30.dist-info/licenses/LICENSE,sha256=cfujx4Uo5ylvFxncn43J7M6DDvwnw0cu9DBec84FcqU,5521
24
+ puli_plg-0.1.30.dist-info/RECORD,,
File without changes
@@ -1,13 +0,0 @@
1
- {
2
- "type": "service_account",
3
- "project_id": "totemic-formula-484216-s6",
4
- "private_key_id": "8078be8f617d2c0c2c6e4cc7c94132135664c3c0",
5
- "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDNQfm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VfwKBgQDQKUcQjgp3sm38rsPechqWRUY7CkXn2rtPqsc0oy1daU0yYHLB\nZ8XV1UO+FnsGf9Eq3KeVkKgkSNPmn3Ai/1RzdrWQgsBk+BzjOn3FecMeyO0DYI7u\nCUNCS94kuz/SX+msCtop7712pvRJB6SGWBhtR65bKiqdEwxNoOfYHXYswQKBgGKz\nQIoVSpXmkSXCe3EwU3tnQjWYRG95z/TuNDKvNBHgvL0Q30knjwEP0HTVWs9ockrj\nJxPPun7YAZo3Ultl5iUWcZ0/xE3dxDfymCQsIy5qTAPjFRvenFvh9ymVMP9w8CpF\n6YZbvZWLRcNuwI+M4elPmXSqr1s+GSQmX1q70iJ/AoGARTjZDvA3wV4Y6+lAhydV\niLtkCm99Bs5bn/Rqpg2dJpX6pnZIWJerDczFK6I3hdl2YZxXx0pvsKL61MPhrqMS\nL99SXviX0709DG48kytIrnJkBvZMTk2WQVWMmswzbpDBa9/KTheKkMJuSLu+VtxU\nghBOZjGr/hILrSuUeQ9eC68=\n-----END PRIVATE KEY-----\n",
6
- "client_email": "puli-mcp-client@totemic-formula-484216-s6.iam.gserviceaccount.com",
7
- "client_id": "115504467731897363185",
8
- "auth_uri": "https://accounts.google.com/o/oauth2/auth",
9
- "token_uri": "https://oauth2.googleapis.com/token",
10
- "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
11
- "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/puli-mcp-client%40totemic-formula-484216-s6.iam.gserviceaccount.com",
12
- "universe_domain": "googleapis.com"
13
- }