puli-plg 0.1.26__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.
@@ -0,0 +1,78 @@
1
+ from dataclasses import dataclass, field
2
+ from typing import List
3
+
4
+
5
+ @dataclass
6
+ class Incident:
7
+ """Represents an incident record in the Zilliz collection."""
8
+
9
+ id: str
10
+ vector: List[float]
11
+ company: str
12
+ year: int
13
+ industries: List[str] = field(default_factory=list)
14
+ tags: List[str] = field(default_factory=list)
15
+ trigger_keywords: List[str] = field(default_factory=list)
16
+
17
+ @classmethod
18
+ def from_dict(cls, data: dict) -> "Incident":
19
+ """Create an Incident from a dictionary, handling Milvus/Zilliz types."""
20
+ return cls(
21
+ id=data.get("id"),
22
+ vector=list(data.get("vector", [])),
23
+ company=data.get("company"),
24
+ year=data.get("year"),
25
+ industries=list(data.get("industries", [])),
26
+ tags=list(data.get("tags", [])),
27
+ trigger_keywords=list(data.get("trigger_keywords", [])),
28
+ )
29
+
30
+ def to_dict(self) -> dict:
31
+ """Convert to dictionary for insertion."""
32
+ return {
33
+ "id": self.id,
34
+ "vector": self.vector,
35
+ "company": self.company,
36
+ "year": self.year,
37
+ "industries": self.industries,
38
+ "tags": self.tags,
39
+ "trigger_keywords": self.trigger_keywords,
40
+ }
41
+
42
+
43
+ @dataclass
44
+ class IncidentQueryResult:
45
+ """Represents a lightweight incident record for search/query results."""
46
+
47
+ id: str
48
+ company: str
49
+ year: int
50
+ industries: List[str] = field(default_factory=list)
51
+ tags: List[str] = field(default_factory=list)
52
+
53
+ @classmethod
54
+ def from_dict(cls, data: dict) -> "IncidentQueryResult":
55
+ """Create a QueryResult from a dictionary, handling Milvus/Zilliz types."""
56
+ return cls(
57
+ id=data.get("id"),
58
+ company=data.get("company"),
59
+ year=data.get("year"),
60
+ industries=list(data.get("industries", [])),
61
+ tags=list(data.get("tags", [])),
62
+ )
63
+
64
+ def to_dict(self) -> dict:
65
+ """Convert to dictionary for serialization."""
66
+ return {
67
+ "id": self.id,
68
+ "company": self.company,
69
+ "year": self.year,
70
+ "industries": self.industries,
71
+ "tags": self.tags,
72
+ }
73
+
74
+ def to_prompt_str(self) -> str:
75
+ """Returns a string representation of the incident query result."""
76
+ return f"Incident: {self.company} ({self.year}) " + '\n' \
77
+ + f"Tags: {', '.join(self.tags)}" + '\n' \
78
+ + f"Industries: {', '.join(self.industries)}" + '\n'
@@ -0,0 +1,14 @@
1
+ Metadata-Version: 2.4
2
+ Name: puli-plg
3
+ Version: 0.1.26
4
+ Summary: Zilliz vector database client for incident management
5
+ Requires-Python: <3.14,>=3.10
6
+ Requires-Dist: google-auth>=2.0.0
7
+ Requires-Dist: mcp[cli]>=0.1.0
8
+ Requires-Dist: openai>=1.0.0
9
+ Requires-Dist: pydantic-ai>=0.0.18
10
+ Requires-Dist: python-dotenv>=1.0.0
11
+ Requires-Dist: pyyaml>=6.0.1
12
+ Provides-Extra: dev
13
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
14
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
@@ -0,0 +1,25 @@
1
+ puli_mcp_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ puli_mcp_server/test_diff.json,sha256=Nia-fCUjE1p9TSqjyigxzQEbCue9-p33HhTmcF6dV1s,1351
3
+ puli_mcp_server/credentials/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ puli_mcp_server/embedding_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ puli_mcp_server/embedding_client/client.py,sha256=13aNY9RteC9oNr0tPNC3JTCvQbj9hITpBxUBk7J1NHY,1047
6
+ puli_mcp_server/embedding_client/config.py,sha256=LDrUpRQO-OYhYhiecL5LNyQ_Xh0uFRmf0t1PCh8ZOZw,1438
7
+ puli_mcp_server/llm_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ puli_mcp_server/llm_agent/config.py,sha256=UCl1UQrVaQfnc26fmV0wSYthWE3CwZ3dY2DA5OWSMNE,2985
9
+ puli_mcp_server/llm_agent/llm_agent.py,sha256=EC4K3uMHrYnEX3hxEmCIqyBK6j5Ga9VZleja8-dJEvQ,1449
10
+ puli_mcp_server/llm_agent/models.py,sha256=gL2JVI4FtiuaEFqFp8jSg7FyfOL44mlH5HWaNDXi5iQ,10868
11
+ puli_mcp_server/mcp_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
+ puli_mcp_server/mcp_server/models.py,sha256=TI7Qnhfb1Tt6F_5Mg_vgd6mIKLhfGYXWm9oRCiLO7-k,2302
13
+ puli_mcp_server/mcp_server/server.py,sha256=pnT3zq11jdxjqeKv0JDwZPB6NA7Yg8CCUkwSIq6b-14,4307
14
+ puli_mcp_server/proxy_client/__init__.py,sha256=-D9PvJPzK0AZrQWevsGe1BCQVcmcQk7P_81cpNARJf8,59
15
+ puli_mcp_server/proxy_client/client.py,sha256=QO1hSHqxRTEvFupRYtgvIr9abTQD7XObs9uI63o9M2M,8901
16
+ puli_mcp_server/proxy_client/config.py,sha256=QzB47oCF9KhVhkfLagNKz35CTcsjbgNaa-YyHRg-IX8,2326
17
+ puli_mcp_server/proxy_client/token_manager.py,sha256=li2sxk-EwHHgCM7WEnpW1pWfvNWqezOunQUNF24JmX8,796
18
+ puli_models/__init__.py,sha256=8qgpZupjCu4nmGZJhTcnF-DnAdfloe9CtHUZwh7T-pQ,228
19
+ puli_models/chaos_patterns.py,sha256=cwUKAFz6_G4fJn8eLO_rXe0WERErvAfwPOBLHupfLfU,2701
20
+ 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.26.dist-info/METADATA,sha256=_e1QfSKZ741GVsIS3ZJQamGaRdLqrDif5bhbUOz6Pl0,448
23
+ puli_plg-0.1.26.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
24
+ puli_plg-0.1.26.dist-info/entry_points.txt,sha256=FE5DJ7iMEWzWmTCGVJ8IMdr_xUIcHi-Nq99TkqOpRyo,73
25
+ puli_plg-0.1.26.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.28.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ puli-reviewer = puli_mcp_server.mcp_server.server:main