WeKnora/internal/storageurl
lyingbug 2e712a97a1
fix(mcp): return accessible image URLs from existing tools (#3650)
* 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.
2026-09-24 11:56:25 +08:00
..
mode.go fix(api): close the resource_urls=public gaps found in review 2026-08-05 14:42:51 +08:00
request.go fix(mcp): return accessible image URLs from existing tools (#3650) 2026-09-24 11:56:25 +08:00
request_test.go fix(api): address resource_urls review follow-ups 2026-08-05 14:42:51 +08:00
resolver.go refactor(storage): extract storage reference URL rewriting into internal/storageurl 2026-08-05 14:42:51 +08:00
storageurl.go refactor(resource-access): unify scoped authorization and transfer recovery (#3097) 2026-09-08 15:36:33 +08:00
storageurl_test.go refactor(storage): extract storage reference URL rewriting into internal/storageurl 2026-08-05 14:42:51 +08:00
stream.go fix(api): close the resource_urls=public gaps found in review 2026-08-05 14:42:51 +08:00
stream_test.go fix(api): close the resource_urls=public gaps found in review 2026-08-05 14:42:51 +08:00