sunholo 0.143.14__py3-none-any.whl → 0.143.16__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.
sunholo/mcp/cli.py CHANGED
@@ -312,15 +312,27 @@ def setup_mcp_subparser(subparsers):
312
312
  ```
313
313
  """
314
314
  mcp_parser = subparsers.add_parser('mcp',
315
- help='Start an Anthropic MCP server that wraps `sunholo` functionality')
315
+ help='MCP (Model Context Protocol) commands')
316
316
 
317
- mcp_parser.set_defaults(func=cli_mcp)
317
+ # Create subcommands for mcp
318
+ mcp_subparsers = mcp_parser.add_subparsers(title='mcp commands',
319
+ description='MCP subcommands',
320
+ help='MCP subcommands',
321
+ dest='mcp_command')
322
+
323
+ # mcp server command (default)
324
+ server_parser = mcp_subparsers.add_parser('server',
325
+ help='Start an Anthropic MCP server that wraps sunholo functionality')
326
+ server_parser.set_defaults(func=cli_mcp)
318
327
 
319
- # Add mcp-bridge subcommand
320
- mcp_bridge_parser = subparsers.add_parser('mcp-bridge',
328
+ # mcp bridge command
329
+ bridge_parser = mcp_subparsers.add_parser('bridge',
321
330
  help='Start a stdio-to-HTTP bridge for MCP servers')
322
- mcp_bridge_parser.add_argument('url',
331
+ bridge_parser.add_argument('url',
323
332
  nargs='?',
324
333
  default='http://127.0.0.1:1956/mcp',
325
334
  help='HTTP URL of the MCP server (default: http://127.0.0.1:1956/mcp)')
326
- mcp_bridge_parser.set_defaults(func=cli_mcp_bridge)
335
+ bridge_parser.set_defaults(func=cli_mcp_bridge)
336
+
337
+ # Set default behavior when no subcommand is provided
338
+ mcp_parser.set_defaults(func=cli_mcp)
@@ -11,7 +11,7 @@ import aiohttp
11
11
  from typing import Optional
12
12
 
13
13
  from ..custom_logging import setup_logging
14
- logger = setup_logging("mcp-bridge")
14
+ log = setup_logging("mcp-bridge")
15
15
 
16
16
  class MCPStdioHttpBridge:
17
17
  def __init__(self, http_url: str):
@@ -23,7 +23,7 @@ class MCPStdioHttpBridge:
23
23
  self.session = aiohttp.ClientSession()
24
24
 
25
25
  # Send initialization success to stderr for debugging
26
- logger.info(f"MCP stdio-to-HTTP bridge started, forwarding to: {self.http_url}")
26
+ log.info(f"MCP stdio-to-HTTP bridge started, forwarding to: {self.http_url}")
27
27
 
28
28
  try:
29
29
  await self.process_messages()
@@ -51,9 +51,9 @@ class MCPStdioHttpBridge:
51
51
  # Parse JSON-RPC message
52
52
  try:
53
53
  message = json.loads(line)
54
- logger.debug(f"Received from stdin: {message}")
54
+ log.debug(f"Received from stdin: {message}")
55
55
  except json.JSONDecodeError as e:
56
- logger.error(f"Invalid JSON: {e}")
56
+ log.error(f"Invalid JSON: {e}")
57
57
  continue
58
58
 
59
59
  # Forward to HTTP server
@@ -64,14 +64,14 @@ class MCPStdioHttpBridge:
64
64
  headers={"Content-Type": "application/json"}
65
65
  ) as response:
66
66
  result = await response.json()
67
- logger.debug(f"Received from HTTP: {result}")
67
+ log.debug(f"Received from HTTP: {result}")
68
68
 
69
69
  # Send response back to stdout
70
70
  print(json.dumps(result))
71
71
  sys.stdout.flush()
72
72
 
73
73
  except aiohttp.ClientError as e:
74
- logger.error(f"HTTP error: {e}")
74
+ log.error(f"HTTP error: {e}")
75
75
  error_response = {
76
76
  "jsonrpc": "2.0",
77
77
  "error": {
@@ -84,7 +84,7 @@ class MCPStdioHttpBridge:
84
84
  sys.stdout.flush()
85
85
 
86
86
  except Exception as e:
87
- logger.error(f"Bridge error: {e}")
87
+ log.error(f"Bridge error: {e}")
88
88
  continue
89
89
 
90
90
  async def run_bridge(http_url: str):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sunholo
3
- Version: 0.143.14
3
+ Version: 0.143.16
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
@@ -115,9 +115,9 @@ sunholo/llamaindex/user_history.py,sha256=ZtkecWuF9ORduyGB8kF8gP66bm9DdvCI-ZiK6K
115
115
  sunholo/lookup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
116
116
  sunholo/lookup/model_lookup.yaml,sha256=O7o-jP53MLA06C8pI-ILwERShO-xf6z_258wtpZBv6A,739
117
117
  sunholo/mcp/__init__.py,sha256=Bi0ZYMvWuf1AL_QSrMAREVVdTZFiIokGwrytBXKBJyc,1028
118
- sunholo/mcp/cli.py,sha256=qD38Kia5j9vIBh3X0L8cIQbCRlqzZpXUo-C_vuMZJbQ,11663
118
+ sunholo/mcp/cli.py,sha256=zVbUDrOS1kvSMYJvq7PqzYnEwwzP1sGE0YWwhpVd_VM,12255
119
119
  sunholo/mcp/mcp_manager.py,sha256=g75vv6XvM24U7uz366slE-p76Qs4AvVcsarHSF9qIvE,5061
120
- sunholo/mcp/stdio_http_bridge.py,sha256=xi9aaeueKvYT5gdBo-jmltqUNe7X9a7dCZeTz3o-CtY,3258
120
+ sunholo/mcp/stdio_http_bridge.py,sha256=IunHOtnjKAkRWef3SJnqnAL2r2qBRpCH2k_Q_y0Tdf8,3237
121
121
  sunholo/mcp/vac_mcp_server.py,sha256=WcFOgN2_lyp1vfn-KcW4GewrBidkRYDx9gzEORV6rV8,10611
122
122
  sunholo/ollama/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
123
123
  sunholo/ollama/ollama_images.py,sha256=H2cpcNu88R4TwyfL_nnqkQhdvBQ2FPCAy4Ok__0yQmo,2351
@@ -176,9 +176,9 @@ sunholo/vertex/init.py,sha256=1OQwcPBKZYBTDPdyU7IM4X4OmiXLdsNV30C-fee2scQ,2875
176
176
  sunholo/vertex/memory_tools.py,sha256=tBZxqVZ4InTmdBvLlOYwoSEWu4-kGquc-gxDwZCC4FA,7667
177
177
  sunholo/vertex/safety.py,sha256=S9PgQT1O_BQAkcqauWncRJaydiP8Q_Jzmu9gxYfy1VA,2482
178
178
  sunholo/vertex/type_dict_to_json.py,sha256=uTzL4o9tJRao4u-gJOFcACgWGkBOtqACmb6ihvCErL8,4694
179
- sunholo-0.143.14.dist-info/licenses/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
180
- sunholo-0.143.14.dist-info/METADATA,sha256=qUcap4poGN94xjE0VYCg5CdUM3TaUNJ5ZmFo1jzzZFQ,18502
181
- sunholo-0.143.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
182
- sunholo-0.143.14.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
183
- sunholo-0.143.14.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
184
- sunholo-0.143.14.dist-info/RECORD,,
179
+ sunholo-0.143.16.dist-info/licenses/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
180
+ sunholo-0.143.16.dist-info/METADATA,sha256=U3OPOEIEC-Dvnjni6sM10RgsnYk5sczbbQD2cP252Yc,18502
181
+ sunholo-0.143.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
182
+ sunholo-0.143.16.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
183
+ sunholo-0.143.16.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
184
+ sunholo-0.143.16.dist-info/RECORD,,