sunholo 0.116.0__tar.gz → 0.116.2__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.
Files changed (167) hide show
  1. {sunholo-0.116.0 → sunholo-0.116.2}/PKG-INFO +9 -2
  2. {sunholo-0.116.0 → sunholo-0.116.2}/README.md +6 -0
  3. {sunholo-0.116.0 → sunholo-0.116.2}/setup.py +2 -1
  4. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/cli/cli.py +3 -3
  5. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/mcp/cli.py +69 -25
  6. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo.egg-info/PKG-INFO +9 -2
  7. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo.egg-info/requires.txt +1 -0
  8. {sunholo-0.116.0 → sunholo-0.116.2}/LICENSE.txt +0 -0
  9. {sunholo-0.116.0 → sunholo-0.116.2}/MANIFEST.in +0 -0
  10. {sunholo-0.116.0 → sunholo-0.116.2}/setup.cfg +0 -0
  11. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/__init__.py +0 -0
  12. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/__init__.py +0 -0
  13. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/chat_history.py +0 -0
  14. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/dispatch_to_qa.py +0 -0
  15. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/fastapi/__init__.py +0 -0
  16. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/fastapi/base.py +0 -0
  17. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/fastapi/qna_routes.py +0 -0
  18. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/flask/__init__.py +0 -0
  19. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/flask/base.py +0 -0
  20. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/flask/qna_routes.py +0 -0
  21. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/flask/vac_routes.py +0 -0
  22. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/langserve.py +0 -0
  23. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/pubsub.py +0 -0
  24. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/route.py +0 -0
  25. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/special_commands.py +0 -0
  26. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/agents/swagger.py +0 -0
  27. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/archive/__init__.py +0 -0
  28. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/archive/archive.py +0 -0
  29. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/auth/__init__.py +0 -0
  30. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/auth/gcloud.py +0 -0
  31. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/auth/refresh.py +0 -0
  32. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/auth/run.py +0 -0
  33. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/azure/__init__.py +0 -0
  34. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/azure/auth.py +0 -0
  35. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/azure/blobs.py +0 -0
  36. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/azure/event_grid.py +0 -0
  37. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/bots/__init__.py +0 -0
  38. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/bots/discord.py +0 -0
  39. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/bots/github_webhook.py +0 -0
  40. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/bots/webapp.py +0 -0
  41. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/chunker/__init__.py +0 -0
  42. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/chunker/azure.py +0 -0
  43. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/chunker/doc_handling.py +0 -0
  44. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/chunker/encode_metadata.py +0 -0
  45. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/chunker/images.py +0 -0
  46. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/chunker/loaders.py +0 -0
  47. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/chunker/message_data.py +0 -0
  48. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/chunker/pdfs.py +0 -0
  49. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/chunker/process_chunker_data.py +0 -0
  50. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/chunker/publish.py +0 -0
  51. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/chunker/pubsub.py +0 -0
  52. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/chunker/splitter.py +0 -0
  53. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/cli/__init__.py +0 -0
  54. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/cli/chat_vac.py +0 -0
  55. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/cli/cli_init.py +0 -0
  56. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/cli/configs.py +0 -0
  57. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/cli/deploy.py +0 -0
  58. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/cli/embedder.py +0 -0
  59. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/cli/merge_texts.py +0 -0
  60. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/cli/run_proxy.py +0 -0
  61. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/cli/sun_rich.py +0 -0
  62. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/cli/swagger.py +0 -0
  63. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/cli/vertex.py +0 -0
  64. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/components/__init__.py +0 -0
  65. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/components/llm.py +0 -0
  66. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/components/retriever.py +0 -0
  67. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/components/vectorstore.py +0 -0
  68. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/custom_logging.py +0 -0
  69. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/database/__init__.py +0 -0
  70. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/database/alloydb.py +0 -0
  71. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/database/alloydb_client.py +0 -0
  72. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/database/database.py +0 -0
  73. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/database/lancedb.py +0 -0
  74. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/database/sql/sb/create_function.sql +0 -0
  75. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/database/sql/sb/create_function_time.sql +0 -0
  76. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/database/sql/sb/create_table.sql +0 -0
  77. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/database/sql/sb/delete_source_row.sql +0 -0
  78. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/database/sql/sb/return_sources.sql +0 -0
  79. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/database/sql/sb/setup.sql +0 -0
  80. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/database/static_dbs.py +0 -0
  81. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/database/uuid.py +0 -0
  82. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/discovery_engine/__init__.py +0 -0
  83. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/discovery_engine/chunker_handler.py +0 -0
  84. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/discovery_engine/create_new.py +0 -0
  85. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/discovery_engine/discovery_engine_client.py +0 -0
  86. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/discovery_engine/get_ai_search_chunks.py +0 -0
  87. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/embedder/__init__.py +0 -0
  88. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/embedder/embed_chunk.py +0 -0
  89. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/excel/__init__.py +0 -0
  90. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/excel/plugin.py +0 -0
  91. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/gcs/__init__.py +0 -0
  92. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/gcs/add_file.py +0 -0
  93. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/gcs/download_folder.py +0 -0
  94. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/gcs/download_url.py +0 -0
  95. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/gcs/extract_and_sign.py +0 -0
  96. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/gcs/metadata.py +0 -0
  97. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/genai/__init__.py +0 -0
  98. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/genai/file_handling.py +0 -0
  99. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/genai/images.py +0 -0
  100. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/genai/init.py +0 -0
  101. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/genai/process_funcs_cls.py +0 -0
  102. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/genai/safety.py +0 -0
  103. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/invoke/__init__.py +0 -0
  104. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/invoke/async_class.py +0 -0
  105. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/invoke/direct_vac_func.py +0 -0
  106. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/invoke/invoke_vac_utils.py +0 -0
  107. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/langfuse/__init__.py +0 -0
  108. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/langfuse/callback.py +0 -0
  109. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/langfuse/evals.py +0 -0
  110. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/langfuse/prompts.py +0 -0
  111. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/llamaindex/__init__.py +0 -0
  112. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/llamaindex/get_files.py +0 -0
  113. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/llamaindex/import_files.py +0 -0
  114. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/llamaindex/llamaindex_class.py +0 -0
  115. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/llamaindex/user_history.py +0 -0
  116. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/lookup/__init__.py +0 -0
  117. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/lookup/model_lookup.yaml +0 -0
  118. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/mcp/__init__.py +0 -0
  119. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/pubsub/__init__.py +0 -0
  120. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/pubsub/process_pubsub.py +0 -0
  121. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/pubsub/pubsub_manager.py +0 -0
  122. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/qna/__init__.py +0 -0
  123. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/qna/parsers.py +0 -0
  124. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/qna/retry.py +0 -0
  125. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/senses/__init__.py +0 -0
  126. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/senses/stream_voice.py +0 -0
  127. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/streaming/__init__.py +0 -0
  128. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/streaming/content_buffer.py +0 -0
  129. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/streaming/langserve.py +0 -0
  130. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/streaming/stream_lookup.py +0 -0
  131. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/streaming/streaming.py +0 -0
  132. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/summarise/__init__.py +0 -0
  133. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/summarise/summarise.py +0 -0
  134. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/terraform/__init__.py +0 -0
  135. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/terraform/tfvars_editor.py +0 -0
  136. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/tools/__init__.py +0 -0
  137. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/tools/web_browser.py +0 -0
  138. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/types.py +0 -0
  139. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/utils/__init__.py +0 -0
  140. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/utils/api_key.py +0 -0
  141. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/utils/big_context.py +0 -0
  142. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/utils/config.py +0 -0
  143. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/utils/config_class.py +0 -0
  144. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/utils/config_schema.py +0 -0
  145. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/utils/gcp.py +0 -0
  146. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/utils/gcp_project.py +0 -0
  147. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/utils/mime.py +0 -0
  148. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/utils/parsers.py +0 -0
  149. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/utils/timedelta.py +0 -0
  150. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/utils/user_ids.py +0 -0
  151. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/utils/version.py +0 -0
  152. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/vertex/__init__.py +0 -0
  153. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/vertex/extensions_call.py +0 -0
  154. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/vertex/extensions_class.py +0 -0
  155. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/vertex/genai_functions.py +0 -0
  156. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/vertex/init.py +0 -0
  157. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/vertex/memory_tools.py +0 -0
  158. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/vertex/safety.py +0 -0
  159. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo/vertex/type_dict_to_json.py +0 -0
  160. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo.egg-info/SOURCES.txt +0 -0
  161. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo.egg-info/dependency_links.txt +0 -0
  162. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo.egg-info/entry_points.txt +0 -0
  163. {sunholo-0.116.0 → sunholo-0.116.2}/sunholo.egg-info/top_level.txt +0 -0
  164. {sunholo-0.116.0 → sunholo-0.116.2}/tests/test_async.py +0 -0
  165. {sunholo-0.116.0 → sunholo-0.116.2}/tests/test_chat_history.py +0 -0
  166. {sunholo-0.116.0 → sunholo-0.116.2}/tests/test_config.py +0 -0
  167. {sunholo-0.116.0 → sunholo-0.116.2}/tests/test_unstructured.py +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.116.0
3
+ Version: 0.116.2
4
4
  Summary: Large Language Model DevOps - a package to help deploy LLMs to the Cloud.
5
5
  Home-page: https://github.com/sunholo-data/sunholo-py
6
- Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.116.0.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.116.2.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -62,6 +62,7 @@ Requires-Dist: langchain-anthropic==0.1.23; extra == "all"
62
62
  Requires-Dist: langchain-google-vertexai; extra == "all"
63
63
  Requires-Dist: langchain-unstructured; extra == "all"
64
64
  Requires-Dist: langfuse; extra == "all"
65
+ Requires-Dist: mcp; extra == "all"
65
66
  Requires-Dist: numpy; extra == "all"
66
67
  Requires-Dist: pg8000; extra == "all"
67
68
  Requires-Dist: pgvector; extra == "all"
@@ -189,6 +190,12 @@ pip install . --use-feature=in-tree-build
189
190
  pytest tests
190
191
  ```
191
192
 
193
+ ## Local dev
194
+
195
+ ```sh
196
+ uv tool install --from "sunholo[cli]" sunholo --with ".[all]"
197
+ ```
198
+
192
199
  ## Demos
193
200
 
194
201
  Using https://github.com/charmbracelet/vhs
@@ -23,6 +23,12 @@ pip install . --use-feature=in-tree-build
23
23
  pytest tests
24
24
  ```
25
25
 
26
+ ## Local dev
27
+
28
+ ```sh
29
+ uv tool install --from "sunholo[cli]" sunholo --with ".[all]"
30
+ ```
31
+
26
32
  ## Demos
27
33
 
28
34
  Using https://github.com/charmbracelet/vhs
@@ -1,6 +1,6 @@
1
1
  from setuptools import setup, find_packages
2
2
 
3
- version = '0.116.0'
3
+ version = '0.116.2'
4
4
 
5
5
  setup(
6
6
  name='sunholo',
@@ -74,6 +74,7 @@ setup(
74
74
  "langchain-google-vertexai",
75
75
  "langchain-unstructured",
76
76
  "langfuse",
77
+ "mcp",
77
78
  "numpy",
78
79
  "pg8000",
79
80
  "pgvector",
@@ -16,7 +16,6 @@ from ..terraform import setup_tfvarseditor_subparser
16
16
  from ..senses.stream_voice import setup_tts_subparser
17
17
  from ..mcp.cli import setup_mcp_subparser
18
18
 
19
-
20
19
  from ..utils import ConfigManager
21
20
  from ..utils.version import sunholo_version
22
21
 
@@ -24,7 +23,7 @@ from ..custom_logging import log
24
23
 
25
24
  from .sun_rich import console
26
25
  import sys
27
- from rich.panel import Panel
26
+
28
27
 
29
28
  def load_default_gcp_config():
30
29
  try:
@@ -43,6 +42,7 @@ class CustomHelpAction(argparse.Action):
43
42
  super().__init__(option_strings, dest, nargs=nargs, **kwargs)
44
43
 
45
44
  def __call__(self, parser, namespace, values, option_string=None):
45
+ from rich.panel import Panel
46
46
  console.print(
47
47
  Panel("Welcome to Sunholo Command Line Interface, your assistant to deploy GenAI Virtual Agent Computers (VACs) to Multivac or your own Cloud.",
48
48
  title="Sunholo GenAIOps Assistant CLI",
@@ -64,7 +64,7 @@ def main(args=None):
64
64
  """
65
65
  default_project, default_region = load_default_gcp_config()
66
66
 
67
- parser = argparse.ArgumentParser(description="sunholo CLI tool for deploying GenAI VACs", add_help=False)
67
+ parser = argparse.ArgumentParser(description=f"sunholo CLI tool for deploying GenAI VACs - [{sunholo_version()}]", add_help=False)
68
68
  parser.add_argument('-h', '--help', action=CustomHelpAction, help='Show this help message and exit')
69
69
  parser.add_argument('--debug', action='store_true', help='Enable debug output')
70
70
  parser.add_argument('--project', default=default_project, help='GCP project to list Cloud Run services from.')
@@ -3,16 +3,8 @@ import asyncio
3
3
  from typing import Any, Sequence
4
4
  from functools import lru_cache
5
5
  import subprocess
6
- from mcp.server import Server
7
- from mcp.server.stdio import stdio_server
8
- from mcp.types import (
9
- Resource,
10
- Tool,
11
- TextContent,
12
- ImageContent,
13
- EmbeddedResource,
14
- )
15
- """
6
+ from ..utils.version import sunholo_version
7
+
16
8
  try:
17
9
  from mcp.server import Server
18
10
  from mcp.server.stdio import stdio_server
@@ -23,24 +15,35 @@ try:
23
15
  ImageContent,
24
16
  EmbeddedResource,
25
17
  )
18
+
19
+ from rich import print
20
+ from ..cli.sun_rich import console
26
21
  except ImportError:
27
22
  Server = None
28
- """
23
+ console = None
29
24
 
30
25
  from pydantic import AnyUrl
31
26
 
32
27
  # Configure logging
33
28
  from ..custom_logging import setup_logging
34
- logger = setup_logging("sunholo-mcp-server")
29
+ logger = setup_logging("sunholo-mcp")
35
30
 
36
31
  class SunholoMCPServer:
37
32
  def __init__(self):
33
+ logger.info("Initializing Sunholo MCP Server")
34
+
38
35
  if Server is None:
39
36
  raise ImportError("SunholoMCPServer requires `sunholo[anthropic]` to be installed")
40
37
 
41
38
  self.server = Server("sunholo-mcp-server")
39
+ self.server.onerror = self.handle_error
40
+
42
41
  self.setup_handlers()
43
42
 
43
+ def handle_error(self, error: Exception):
44
+ """Handle server errors"""
45
+ logger.error(f"MCP Server error: {error}", exc_info=True)
46
+
44
47
  def setup_handlers(self):
45
48
  """Set up all the MCP protocol handlers"""
46
49
  self.setup_resource_handlers()
@@ -64,11 +67,13 @@ class SunholoMCPServer:
64
67
  @self.server.read_resource()
65
68
  async def read_resource(uri: AnyUrl) -> str:
66
69
  """Read Sunholo resources based on URI"""
70
+ logger.info(f"{uri} available")
71
+ console.print(f"{uri} available")
67
72
  if str(uri) == "sunholo://vacs/list":
68
73
  try:
69
74
  # Execute sunholo vac list command
70
75
  result = subprocess.run(
71
- ["sunholo", "vac", "list", "--debug"],
76
+ ["sunholo", "vac", "list"],
72
77
  capture_output=True,
73
78
  text=True
74
79
  )
@@ -101,15 +106,31 @@ class SunholoMCPServer:
101
106
  "type": "string",
102
107
  "description": "Message to send to the VAC"
103
108
  },
104
- "headless": {
105
- "type": "boolean",
106
- "description": "Whether to run in headless mode",
107
- "default": True
108
- }
109
109
  },
110
110
  "required": ["vac_name", "message"]
111
111
  }
112
112
  ),
113
+ Tool(
114
+ name="list_configs",
115
+ description="List Sunholo configurations",
116
+ inputSchema={
117
+ "type": "object",
118
+ "properties": {
119
+ "kind": {
120
+ "type": "string",
121
+ "description": "Filter configurations by kind e.g. vacConfig"
122
+ },
123
+ "vac": {
124
+ "type": "string",
125
+ "description": "Filter configurations by VAC name"
126
+ },
127
+ "validate": {
128
+ "type": "boolean",
129
+ "description": "Validate the configuration files"
130
+ }
131
+ }
132
+ }
133
+ ),
113
134
  Tool(
114
135
  name="embed_content",
115
136
  description="Embed content in a VAC's vector store",
@@ -148,15 +169,13 @@ class SunholoMCPServer:
148
169
 
149
170
  vac_name = arguments.get("vac_name")
150
171
  message = arguments.get("message")
151
- headless = arguments.get("headless", True)
152
172
 
153
173
  if not vac_name or not message:
154
174
  raise ValueError("Missing required arguments")
155
175
 
156
176
  try:
157
177
  cmd = ["sunholo", "vac", "chat", vac_name, message]
158
- if headless:
159
- cmd.append("--headless")
178
+ cmd.append("--headless")
160
179
 
161
180
  result = subprocess.run(
162
181
  cmd,
@@ -213,6 +232,25 @@ class SunholoMCPServer:
213
232
  text=f"Error embedding content: {e.stderr}"
214
233
  )
215
234
  ]
235
+ elif name == "list_configs":
236
+
237
+ # Build command
238
+ cmd = ["sunholo", "list-configs"]
239
+
240
+ if arguments.get("kind"):
241
+ cmd.extend(["--kind", arguments["kind"]])
242
+ if arguments.get("vac"):
243
+ cmd.extend(["--vac", arguments["vac"]])
244
+ if arguments.get("validate"):
245
+ cmd.append("--validate")
246
+
247
+ # Execute sunholo command
248
+ try:
249
+ result = subprocess.run(cmd, capture_output=True, text=True)
250
+ return [TextContent(type="text", text=result.stdout)]
251
+ except subprocess.CalledProcessError as e:
252
+ return [TextContent(type="text", text=f"Error: {e.stderr}")]
253
+
216
254
 
217
255
  raise ValueError(f"Unknown tool: {name}")
218
256
 
@@ -229,10 +267,16 @@ def cli_mcp(args):
229
267
  """CLI handler for the MCP server command"""
230
268
  try:
231
269
 
270
+ if not os.getenv("VAC_CONFIG_FOLDER"):
271
+ raise ValueError("sunholo configuration folder must be present in config/ or via VAC_CONFIG_FOLDER")
272
+
232
273
  # Create and run the MCP server
233
274
  server = SunholoMCPServer()
234
-
235
- logger.info("Starting Sunholo MCP server...")
275
+ msg = {"message": "Starting Sunholo MCP server..."}
276
+
277
+ logger.info(msg)
278
+ console.print(msg)
279
+
236
280
  asyncio.run(server.run())
237
281
 
238
282
  except Exception as e:
@@ -241,9 +285,9 @@ def cli_mcp(args):
241
285
 
242
286
  def setup_mcp_subparser(subparsers):
243
287
  """
244
- Sets up an argparse subparser for the 'mcp' command.
288
+ Sets up an argparse subparser for the 'mcp' command 3.
245
289
 
246
- By default will use configurations within the folder specified by '_CONFIG_FOLDER'
290
+ By default will use configurations within the folder specified by 'VAC_CONFIG_FOLDER'
247
291
 
248
292
  Example command:
249
293
  ```bash
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.116.0
3
+ Version: 0.116.2
4
4
  Summary: Large Language Model DevOps - a package to help deploy LLMs to the Cloud.
5
5
  Home-page: https://github.com/sunholo-data/sunholo-py
6
- Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.116.0.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.116.2.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -62,6 +62,7 @@ Requires-Dist: langchain-anthropic==0.1.23; extra == "all"
62
62
  Requires-Dist: langchain-google-vertexai; extra == "all"
63
63
  Requires-Dist: langchain-unstructured; extra == "all"
64
64
  Requires-Dist: langfuse; extra == "all"
65
+ Requires-Dist: mcp; extra == "all"
65
66
  Requires-Dist: numpy; extra == "all"
66
67
  Requires-Dist: pg8000; extra == "all"
67
68
  Requires-Dist: pgvector; extra == "all"
@@ -189,6 +190,12 @@ pip install . --use-feature=in-tree-build
189
190
  pytest tests
190
191
  ```
191
192
 
193
+ ## Local dev
194
+
195
+ ```sh
196
+ uv tool install --from "sunholo[cli]" sunholo --with ".[all]"
197
+ ```
198
+
192
199
  ## Demos
193
200
 
194
201
  Using https://github.com/charmbracelet/vhs
@@ -43,6 +43,7 @@ langchain-anthropic==0.1.23
43
43
  langchain-google-vertexai
44
44
  langchain-unstructured
45
45
  langfuse
46
+ mcp
46
47
  numpy
47
48
  pg8000
48
49
  pgvector
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes