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.
This commit is contained in:
mileslai
2026-05-26 15:11:47 +08:00
committed by lyingbug
parent e9a242c25f
commit 8ffd1ee2d6
2 changed files with 83 additions and 9 deletions
+7
View File
@@ -135,11 +135,18 @@ async def main():
from weknora_mcp_server import run_stdio, run_sse, run_http
# Select transport mode based on CLI argument or MCP_TRANSPORT env var
# - stdio: Default, used by VS Code Copilot for local integration
# - sse: Server-Sent Events over HTTP, suitable for cloud/remote deployments
# - http: HTTP long-polling, compatible with various client architectures
if args.transport == "stdio":
# Stdio mode: communication via stdin/stdout pipes (typical for CLI integrations)
await run_stdio()
elif args.transport == "sse":
# SSE mode: HTTP server with Server-Sent Events for bidirectional streaming
await run_sse(args.host, args.port)
elif args.transport == "http":
# HTTP mode: HTTP REST server with request/response model
await run_http(args.host, args.port)
except ImportError as e: