Commit Graph

5 Commits

Author SHA1 Message Date
mileslai b603b1dcfa fix(mcp-server): address Copilot PR review comments
- SSL verification now defaults to enabled; set WEKNORA_VERIFY_SSL=false to
  opt out (with a logged warning). Fixes MITM risk from default-off TLS.
- WEKNORA_CHAT_TIMEOUT parse is now guarded with try/except ValueError so a
  bad env value falls back to 300s instead of crashing at import.
- SSE streaming response is now closed via context manager (with response:)
  to guarantee connection pool return even on early break.
- Replace asyncio.get_event_loop() (deprecated) with asyncio.get_running_loop()
  in both chat and agent_chat handlers.
- create_session now calls resolve_kb_id() so KB names are accepted in addition
  to UUIDs (consistent with chat / hybrid_search).
- knowledge_base_ids description changed from REQUIRED to Strongly recommended
  to match actual schema optionality.
- run_sse() handle_sse rewritten as raw ASGI callable (scope, receive, send) to
  avoid accessing Starlette private _send attribute.
- Fix main.py comment: http transport is Streamable HTTP (MCP spec), not long-polling.
2026-05-29 16:40:29 +08:00
mileslai 8ffd1ee2d6 fix(mcp-server): restore all create_session parameters (kb_id, max_rounds, enable_rewrite, fallback_response, summary_model_id)
Restore parameters that were inadvertently removed during refactoring.
- kb_id: Required knowledge base ID (architectural shift from KB-agnostic back to KB-bound sessions)
- max_rounds, enable_rewrite, fallback_response: Session strategy configuration
- summary_model_id: Model for response summarization
- title, description: Optional session metadata

These parameters enable AI agents to fully configure session behavior.
2026-05-29 16:40:29 +08:00
mileslai e9a242c25f feat(mcp-server): add multi-transport support (stdio / SSE / HTTP) 2026-05-29 16:40:29 +08:00
begoniezhao f5963276d6 Refactor code for improved readability and consistency 2025-12-01 18:15:39 +08:00
言言学姐 9dda60bbec feat: 添加了配套mcp服务器包 2025-09-08 19:43:45 +08:00