sunholo 0.143.10__py3-none-any.whl → 0.143.12__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.
@@ -1036,14 +1036,68 @@ if __name__ == "__main__":
1036
1036
 
1037
1037
  try:
1038
1038
  # Handle different MCP methods
1039
- if method == "tools/list":
1040
- # Get the server and call list_tools handler
1041
- server = self.vac_mcp_server.get_server()
1042
- tools = await server._request_handlers["tools/list"]()
1039
+ if method == "initialize":
1040
+ # Handle MCP protocol initialization
1041
+ protocol_version = params.get("protocolVersion", "2025-06-18")
1042
+ capabilities = params.get("capabilities", {})
1043
+ client_info = params.get("clientInfo", {})
1044
+
1045
+ log.info(f"MCP client initializing: {client_info} with protocol version: {protocol_version}")
1046
+
1047
+ return {
1048
+ "jsonrpc": "2.0",
1049
+ "result": {
1050
+ "protocolVersion": "2025-06-18",
1051
+ "capabilities": {
1052
+ "tools": {}
1053
+ },
1054
+ "serverInfo": {
1055
+ "name": "sunholo-vac-server",
1056
+ "version": sunholo_version()
1057
+ }
1058
+ },
1059
+ "id": request_id
1060
+ }
1061
+
1062
+ elif method == "tools/list":
1063
+ # Create mock tools list based on VACMCPServer capabilities
1064
+ tools = [
1065
+ {
1066
+ "name": "vac_stream",
1067
+ "description": "Stream responses from a Sunholo VAC (Virtual Agent Computer)",
1068
+ "inputSchema": {
1069
+ "type": "object",
1070
+ "properties": {
1071
+ "vector_name": {"type": "string", "description": "Name of the VAC to interact with"},
1072
+ "user_input": {"type": "string", "description": "The user's question or input"},
1073
+ "chat_history": {"type": "array", "description": "Previous conversation history", "default": []},
1074
+ "stream_wait_time": {"type": "number", "description": "Time to wait between stream chunks", "default": 7},
1075
+ "stream_timeout": {"type": "number", "description": "Maximum time to wait for response", "default": 120}
1076
+ },
1077
+ "required": ["vector_name", "user_input"]
1078
+ }
1079
+ }
1080
+ ]
1081
+
1082
+ # Add vac_query tool if interpreter is available
1083
+ if self.vac_mcp_server.vac_interpreter:
1084
+ tools.append({
1085
+ "name": "vac_query",
1086
+ "description": "Query a Sunholo VAC (non-streaming)",
1087
+ "inputSchema": {
1088
+ "type": "object",
1089
+ "properties": {
1090
+ "vector_name": {"type": "string", "description": "Name of the VAC to interact with"},
1091
+ "user_input": {"type": "string", "description": "The user's question or input"},
1092
+ "chat_history": {"type": "array", "description": "Previous conversation history", "default": []}
1093
+ },
1094
+ "required": ["vector_name", "user_input"]
1095
+ }
1096
+ })
1043
1097
 
1044
1098
  return {
1045
1099
  "jsonrpc": "2.0",
1046
- "result": {"tools": [tool.model_dump() for tool in tools]},
1100
+ "result": {"tools": tools},
1047
1101
  "id": request_id
1048
1102
  }
1049
1103
 
@@ -1055,8 +1109,13 @@ if __name__ == "__main__":
1055
1109
  if not tool_name:
1056
1110
  raise ValueError("Missing tool name")
1057
1111
 
1058
- server = self.vac_mcp_server.get_server()
1059
- result = await server._request_handlers["tools/call"](tool_name, arguments)
1112
+ # Call the appropriate handler method
1113
+ if tool_name == "vac_stream":
1114
+ result = await self.vac_mcp_server._handle_vac_stream(arguments)
1115
+ elif tool_name == "vac_query" and self.vac_mcp_server.vac_interpreter:
1116
+ result = await self.vac_mcp_server._handle_vac_query(arguments)
1117
+ else:
1118
+ raise ValueError(f"Unknown tool: {tool_name}")
1060
1119
 
1061
1120
  return {
1062
1121
  "jsonrpc": "2.0",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sunholo
3
- Version: 0.143.10
3
+ Version: 0.143.12
4
4
  Summary: AI DevOps - a package to help deploy GenAI to the Cloud.
5
5
  Author-email: Holosun ApS <multivac@sunholo.com>
6
6
  License: Apache License, Version 2.0
@@ -288,6 +288,7 @@ sunholo deploy my-agent
288
288
 
289
289
  - **Web Frameworks**: Flask and FastAPI templates
290
290
  - **AI Frameworks**: LangChain and LlamaIndex integration
291
+ - **MCP Integration**: Model Context Protocol server and client support
291
292
  - **Observability**: Langfuse for tracing and monitoring
292
293
  - **API Standards**: OpenAI-compatible endpoints
293
294
 
@@ -18,7 +18,7 @@ sunholo/agents/fastapi/base.py,sha256=W-cyF8ZDUH40rc-c-Apw3-_8IIi2e4Y9qRtnoVnsc1
18
18
  sunholo/agents/fastapi/qna_routes.py,sha256=lKHkXPmwltu9EH3RMwmD153-J6pE7kWQ4BhBlV3to-s,3864
19
19
  sunholo/agents/flask/__init__.py,sha256=dEoByI3gDNUOjpX1uVKP7uPjhfFHJubbiaAv3xLopnk,63
20
20
  sunholo/agents/flask/base.py,sha256=vnpxFEOnCmt9humqj-jYPLfJcdwzsop9NorgkJ-tSaU,1756
21
- sunholo/agents/flask/vac_routes.py,sha256=WfE9ga_EZq_dpW4S5aYyj7i8r59VO5FpDFdtVtqKVKI,53604
21
+ sunholo/agents/flask/vac_routes.py,sha256=kaPUDyIH5KhCgeCEtag97qErGVZfqpY1ZEiX3y1_r-s,57505
22
22
  sunholo/archive/__init__.py,sha256=qNHWm5rGPVOlxZBZCpA1wTYPbalizRT7f8X4rs2t290,31
23
23
  sunholo/archive/archive.py,sha256=PxVfDtO2_2ZEEbnhXSCbXLdeoHoQVImo4y3Jr2XkCFY,1204
24
24
  sunholo/auth/__init__.py,sha256=TeP-OY0XGxYV_8AQcVGoh35bvyWhNUcMRfhuD5l44Sk,91
@@ -175,9 +175,9 @@ sunholo/vertex/init.py,sha256=1OQwcPBKZYBTDPdyU7IM4X4OmiXLdsNV30C-fee2scQ,2875
175
175
  sunholo/vertex/memory_tools.py,sha256=tBZxqVZ4InTmdBvLlOYwoSEWu4-kGquc-gxDwZCC4FA,7667
176
176
  sunholo/vertex/safety.py,sha256=S9PgQT1O_BQAkcqauWncRJaydiP8Q_Jzmu9gxYfy1VA,2482
177
177
  sunholo/vertex/type_dict_to_json.py,sha256=uTzL4o9tJRao4u-gJOFcACgWGkBOtqACmb6ihvCErL8,4694
178
- sunholo-0.143.10.dist-info/licenses/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
179
- sunholo-0.143.10.dist-info/METADATA,sha256=z1Hb1elP_HPvx8sYN7Uz6Cxl66GKFQP64PdNZHMYHcs,18414
180
- sunholo-0.143.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
181
- sunholo-0.143.10.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
182
- sunholo-0.143.10.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
183
- sunholo-0.143.10.dist-info/RECORD,,
178
+ sunholo-0.143.12.dist-info/licenses/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
179
+ sunholo-0.143.12.dist-info/METADATA,sha256=Lr5_OPeAJfveIsbziRkxv4JFEC31OD_5tj2a4rP2gno,18486
180
+ sunholo-0.143.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
181
+ sunholo-0.143.12.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
182
+ sunholo-0.143.12.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
183
+ sunholo-0.143.12.dist-info/RECORD,,