| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: 实现 MCP Server (15 tools) | 5 个月前 | |
fix: P0 loopback security + P1 close retry + P2 bool/validation/docs P0: HTTP loopback security gap All HTTP modes now always configure TransportSecuritySettings (previously only configured for allow_remote=True). For loopback, the SDK's default middleware disables protection entirely when transport_security=None, so malicious Host headers were accepted on 127.0.0.2, localhost, ::1, etc. Fix: always pass TransportSecuritySettings with enable_dns_rebinding_protection (default True) and a merged allowed_hosts list containing: - Standard loopback entries (127.0.0.1:port, localhost:port, [::1]:port) - The actual bind host:port - User-specified --allowed-host entries Verified: correct Host → 200, malicious Host → 421 on 127.0.0.1. P1: close() retry was fake — _stop_watcher didn't return success status - _stop_watcher() now returns bool (True = fully stopped). - close() only sets _closed=True when _stop_watcher returns True. - On failure: re-registers atexit as fallback, does NOT set _closed, allowing close() to be called again to retry. P2: max_concurrent_tools=True bypassed validation bool is a subclass of int in Python (True == 1). Explicit isinstance check for bool now rejects it. P2: README "18 个工具" → "19 个工具" (5 occurrences). Tests: 158 passed (key tests). | 4 个月前 | |
feat(search): per-query and build-time retrieval strategy selection - keyword_search/_retrieve accept a strategy override (keyword / keyword+graph / semantic / hybrid) exposed through search --strategy, the REPL and the MCP keyword_search tool; unknown values fall back to the configured search.strategy, and semantic/hybrid degrade to BM25 when the vector index is unavailable, stale or empty - build --strategy sets the retrieval strategy for the built graph and persists it to config so serve inherits it; mutually exclusive with --semantic, which remains as a hybrid + index_body shortcut - docs: detailed user-guide rewrite (strategy selection, query techniques, incremental updates, semantic retrieval boundaries, AI integration, large-repo tuning, troubleshooting) plus a README entry link | 1 个月前 |