mirror of
https://github.com/Tencent/WeKnora.git
synced 2026-10-24 23:12:53 +08:00
* fix(mcp): return accessible image URLs from existing tools * fix(mcp): resolve resource URLs via binding lookup and cover shared KBs - Look up the KBs that bind each reference instead of scanning every allowed KB, and cache per-KB grants for the call. Unrestricted endpoints accept any KB the caller can view, so ask answers drawing on agent-selected shared KBs get links too. - Share grant/owner-tenant resolution with scopedKBContext via authorizeKB; log non-denial authorization errors. - Drop the redundant resource-catalog re-wrap; both sources are already wrapped. - Skip the structured-content round trip when no storage reference is present, rewrite non-object results, and log marshal/decode failures. - Quote ask image lines with strconv.Quote so & stays literal, and never cut an excerpt inside a storage reference.