sunholo 0.144.7__tar.gz → 0.144.8__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.
- {sunholo-0.144.7/src/sunholo.egg-info → sunholo-0.144.8}/PKG-INFO +1 -1
- {sunholo-0.144.7 → sunholo-0.144.8}/pyproject.toml +1 -1
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/fastapi/vac_routes.py +117 -1
- {sunholo-0.144.7 → sunholo-0.144.8/src/sunholo.egg-info}/PKG-INFO +1 -1
- {sunholo-0.144.7 → sunholo-0.144.8}/LICENSE.txt +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/MANIFEST.in +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/README.md +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/setup.cfg +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/a2a/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/a2a/agent_card.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/a2a/task_manager.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/a2a/vac_a2a_agent.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/chat_history.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/dispatch_to_qa.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/fastapi/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/fastapi/base.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/fastapi/qna_routes.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/flask/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/flask/base.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/flask/vac_routes.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/langserve.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/pubsub.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/route.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/special_commands.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/agents/swagger.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/archive/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/archive/archive.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/auth/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/auth/gcloud.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/auth/refresh.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/auth/run.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/azure/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/azure/auth.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/azure/blobs.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/azure/event_grid.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/bots/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/bots/discord.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/bots/github_webhook.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/bots/webapp.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/chunker/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/chunker/azure.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/chunker/doc_handling.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/chunker/encode_metadata.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/chunker/images.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/chunker/loaders.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/chunker/message_data.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/chunker/pdfs.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/chunker/process_chunker_data.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/chunker/publish.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/chunker/pubsub.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/chunker/splitter.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/cli/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/cli/chat_vac.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/cli/cli.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/cli/cli_init.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/cli/configs.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/cli/deploy.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/cli/embedder.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/cli/merge_texts.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/cli/run_proxy.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/cli/sun_rich.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/cli/swagger.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/cli/vertex.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/components/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/components/llm.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/components/retriever.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/components/vectorstore.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/custom_logging.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/database/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/database/alloydb.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/database/alloydb_client.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/database/database.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/database/lancedb.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/database/sql/sb/create_function.sql +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/database/sql/sb/create_function_time.sql +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/database/sql/sb/create_table.sql +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/database/sql/sb/delete_source_row.sql +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/database/sql/sb/return_sources.sql +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/database/sql/sb/setup.sql +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/database/static_dbs.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/database/uuid.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/discovery_engine/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/discovery_engine/chunker_handler.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/discovery_engine/cli.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/discovery_engine/create_new.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/discovery_engine/discovery_engine_client.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/discovery_engine/get_ai_search_chunks.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/embedder/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/embedder/embed_chunk.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/embedder/embed_metadata.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/excel/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/excel/plugin.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/gcs/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/gcs/add_file.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/gcs/download_folder.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/gcs/download_gcs_text.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/gcs/download_url.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/gcs/extract_and_sign.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/gcs/metadata.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/genai/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/genai/file_handling.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/genai/genaiv2.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/genai/images.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/genai/init.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/genai/process_funcs_cls.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/genai/safety.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/invoke/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/invoke/async_class.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/invoke/direct_vac_func.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/invoke/invoke_vac_utils.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/langchain_types.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/langfuse/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/langfuse/callback.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/langfuse/evals.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/langfuse/prompts.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/llamaindex/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/llamaindex/get_files.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/llamaindex/import_files.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/llamaindex/llamaindex_class.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/llamaindex/user_history.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/lookup/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/lookup/model_lookup.yaml +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/mcp/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/mcp/cli.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/mcp/cli_fastmcp.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/mcp/extensible_mcp_server.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/mcp/mcp_manager.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/mcp/sse_utils.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/mcp/stdio_http_bridge.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/mcp/vac_mcp_server.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/mcp/vac_mcp_server_fastmcp.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/mcp/vac_tools.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/ollama/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/ollama/ollama_images.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/pubsub/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/pubsub/process_pubsub.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/pubsub/pubsub_manager.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/qna/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/qna/parsers.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/qna/retry.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/senses/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/senses/stream_voice.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/streaming/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/streaming/content_buffer.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/streaming/langserve.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/streaming/stream_lookup.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/streaming/streaming.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/summarise/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/summarise/summarise.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/templates/agent/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/templates/agent/agent_service.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/templates/agent/app.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/templates/agent/my_log.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/templates/agent/tools/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/templates/agent/tools/your_agent.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/templates/agent/vac_service.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/templates/project/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/templates/project/app.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/templates/project/my_log.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/templates/project/vac_service.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/templates/system_services/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/templates/system_services/app.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/templates/system_services/my_log.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/terraform/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/terraform/tfvars_editor.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/tools/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/tools/web_browser.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/utils/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/utils/api_key.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/utils/big_context.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/utils/config.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/utils/config_class.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/utils/config_schema.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/utils/gcp.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/utils/gcp_project.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/utils/mime.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/utils/parsers.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/utils/proto_convert.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/utils/timedelta.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/utils/user_ids.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/utils/version.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/vertex/__init__.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/vertex/extensions_call.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/vertex/extensions_class.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/vertex/genai_functions.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/vertex/init.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/vertex/memory_tools.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/vertex/safety.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo/vertex/type_dict_to_json.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo.egg-info/SOURCES.txt +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo.egg-info/dependency_links.txt +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo.egg-info/entry_points.txt +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo.egg-info/requires.txt +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/src/sunholo.egg-info/top_level.txt +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/tests/test_async.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/tests/test_async_genai2.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/tests/test_chat_history.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/tests/test_config.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/tests/test_genai2.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/tests/test_unstructured.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/tests/test_vac_routes_fastapi.py +0 -0
- {sunholo-0.144.7 → sunholo-0.144.8}/tests/test_vac_routes_mcp.py +0 -0
@@ -727,6 +727,10 @@ class VACRoutesFastAPI:
|
|
727
727
|
log.error(f"Failed to mount MCP server: {e}")
|
728
728
|
raise RuntimeError(f"MCP server initialization failed: {e}") from e
|
729
729
|
|
730
|
+
# MCP debug endpoint - add after MCP server mounting
|
731
|
+
if self.enable_mcp_server:
|
732
|
+
self.app.get("/debug/mcp")(self.handle_mcp_debug)
|
733
|
+
|
730
734
|
# A2A agent endpoints
|
731
735
|
if self.enable_a2a_agent:
|
732
736
|
self.app.get("/.well-known/agent.json")(self.handle_a2a_agent_card)
|
@@ -1516,4 +1520,116 @@ class VACRoutesFastAPI:
|
|
1516
1520
|
"""
|
1517
1521
|
if self.vac_mcp_server:
|
1518
1522
|
return self.vac_mcp_server.list_resources()
|
1519
|
-
return []
|
1523
|
+
return []
|
1524
|
+
|
1525
|
+
async def handle_mcp_debug(self):
|
1526
|
+
"""
|
1527
|
+
Debug endpoint to check MCP server status and list tools.
|
1528
|
+
|
1529
|
+
Returns:
|
1530
|
+
JSON with MCP server status, tools list, and diagnostic information
|
1531
|
+
"""
|
1532
|
+
import json
|
1533
|
+
|
1534
|
+
has_mcp = self.vac_mcp_server is not None
|
1535
|
+
mcp_tools = []
|
1536
|
+
mcp_response = None
|
1537
|
+
|
1538
|
+
# Try to call the MCP endpoint the same way clients do
|
1539
|
+
if has_mcp:
|
1540
|
+
try:
|
1541
|
+
# Make internal request to MCP server to get tools
|
1542
|
+
import httpx
|
1543
|
+
|
1544
|
+
# Get the base URL from the current request
|
1545
|
+
from fastapi import Request
|
1546
|
+
from starlette.requests import Request as StarletteRequest
|
1547
|
+
|
1548
|
+
# Try common ports since we don't have request context
|
1549
|
+
ports_to_try = [8000, 8001, 8080, 3000, 1956]
|
1550
|
+
successful_response = None
|
1551
|
+
|
1552
|
+
for port in ports_to_try:
|
1553
|
+
try:
|
1554
|
+
base_url = f"http://localhost:{port}"
|
1555
|
+
async with httpx.AsyncClient(timeout=2.0) as client:
|
1556
|
+
response = await client.post(
|
1557
|
+
f"{base_url}/mcp/mcp",
|
1558
|
+
json={
|
1559
|
+
"jsonrpc": "2.0",
|
1560
|
+
"id": 1,
|
1561
|
+
"method": "tools/list"
|
1562
|
+
},
|
1563
|
+
headers={
|
1564
|
+
"Content-Type": "application/json",
|
1565
|
+
"Accept": "application/json, text/event-stream"
|
1566
|
+
}
|
1567
|
+
)
|
1568
|
+
|
1569
|
+
if response.status_code == 200:
|
1570
|
+
successful_response = response
|
1571
|
+
break # Found working port
|
1572
|
+
except (httpx.ConnectError, httpx.TimeoutException):
|
1573
|
+
continue # Try next port
|
1574
|
+
except Exception:
|
1575
|
+
continue # Try next port
|
1576
|
+
|
1577
|
+
if successful_response:
|
1578
|
+
# Parse SSE (Server-Sent Events) response
|
1579
|
+
text = successful_response.text
|
1580
|
+
for line in text.split('\n'):
|
1581
|
+
if line.startswith('data: '):
|
1582
|
+
# Extract JSON from the data line
|
1583
|
+
json_str = line[6:] # Remove 'data: ' prefix
|
1584
|
+
try:
|
1585
|
+
mcp_response = json.loads(json_str)
|
1586
|
+
if "result" in mcp_response and "tools" in mcp_response["result"]:
|
1587
|
+
for tool in mcp_response["result"]["tools"]:
|
1588
|
+
mcp_tools.append({
|
1589
|
+
"name": tool.get("name"),
|
1590
|
+
"description": tool.get("description", "No description")[:100] + "..." if len(tool.get("description", "")) > 100 else tool.get("description", "No description")
|
1591
|
+
})
|
1592
|
+
break # We found the data we need
|
1593
|
+
except json.JSONDecodeError:
|
1594
|
+
continue
|
1595
|
+
else:
|
1596
|
+
mcp_response = {
|
1597
|
+
"error": "Could not connect to MCP server on any common port",
|
1598
|
+
"ports_tried": ports_to_try
|
1599
|
+
}
|
1600
|
+
|
1601
|
+
except Exception as e:
|
1602
|
+
log.error(f"Error calling MCP endpoint in debug: {e}")
|
1603
|
+
mcp_response = {"error": str(e)}
|
1604
|
+
|
1605
|
+
# Fallback: try to get tools from internal MCP server state
|
1606
|
+
try:
|
1607
|
+
# Get tools from the FastMCP server directly
|
1608
|
+
if hasattr(self.vac_mcp_server, 'server'):
|
1609
|
+
mcp_server = self.vac_mcp_server.server
|
1610
|
+
if hasattr(mcp_server, '_tools'):
|
1611
|
+
for tool_name, tool_func in mcp_server._tools.items():
|
1612
|
+
mcp_tools.append({
|
1613
|
+
"name": tool_name,
|
1614
|
+
"description": getattr(tool_func, '__doc__', 'No description') or 'No description'
|
1615
|
+
})
|
1616
|
+
except Exception as inner_e:
|
1617
|
+
log.error(f"Error getting MCP tools from internal state: {inner_e}")
|
1618
|
+
|
1619
|
+
# Check for pending tools that haven't been registered yet
|
1620
|
+
pending_tools = len(self._custom_mcp_tools) if hasattr(self, '_custom_mcp_tools') else 0
|
1621
|
+
|
1622
|
+
return {
|
1623
|
+
"mcp_enabled": self.enable_mcp_server or has_mcp,
|
1624
|
+
"has_mcp_server": has_mcp,
|
1625
|
+
"mcp_tools_count": len(mcp_tools),
|
1626
|
+
"mcp_tools": [tool["name"] for tool in mcp_tools] if mcp_tools else [],
|
1627
|
+
"tool_details": mcp_tools,
|
1628
|
+
"pending_tools": pending_tools,
|
1629
|
+
"message": f"MCP server is available at /mcp endpoint with {len(mcp_tools)} tools" if has_mcp and mcp_tools else "MCP server is available at /mcp endpoint" if has_mcp else "MCP server not configured",
|
1630
|
+
"debug_info": {
|
1631
|
+
"mcp_server_type": type(self.vac_mcp_server).__name__ if self.vac_mcp_server else None,
|
1632
|
+
"has_custom_tools": len(self._custom_mcp_tools) > 0 if hasattr(self, '_custom_mcp_tools') else False,
|
1633
|
+
"has_custom_resources": len(self._custom_mcp_resources) > 0 if hasattr(self, '_custom_mcp_resources') else False
|
1634
|
+
}
|
1635
|
+
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|