WeKnora/internal
wizardchen 9fd7a7f522 feat(mcp): prompt and resume OAuth authorization mid-conversation
When an agent invokes an OAuth-enabled MCP service that the current user has
not authorized yet, the tool call now pauses and surfaces an "Authorize" card
in the chat instead of failing with an opaque error. After the user completes
the per-user OAuth popup, the backend verifies a token exists and resumes the
paused tool call automatically.

Backend:
- Add mcp_oauth_required / mcp_oauth_resolved events and response types.
- Add OAuthPendingRequest + Gate.RequestOAuthAndWait, reusing the existing
  approval waiter, Resolve, Redis cross-instance fan-out and timeout.
- MCPTool.Execute pauses on an authorization-required error for OAuth services
  and retries once (with a fresh ctx and recycled connection) after the user
  authorizes.
- Forward the new events to the SSE stream.
- Add ResolveMCPOAuth handler + route; it verifies authorization before
  unblocking so a premature resolve cannot resume into another failure.

Frontend:
- Add McpOAuthCard with an Authorize button reusing the popup + status-poll
  flow, then resolve the paused run.
- Handle the new stream events (dedup multiple pending cards per service).
- Add resolveMCPOAuth API client and i18n keys (zh/en/ko/ru).
2026-06-29 23:22:28 +08:00
..
agent feat(mcp): prompt and resume OAuth authorization mid-conversation 2026-06-29 23:22:28 +08:00
application feat(mcp): drive auth by AuthType and auto-detect OAuth on test 2026-06-29 22:37:52 +08:00
assets feat(assets): add ASR test audio file and embed it in the application 2026-04-02 21:27:27 +08:00
common perf(common): compile LLM-JSON code-fence regexp once 2026-06-16 19:52:00 +08:00
config test: add document process task options tests 2026-05-28 20:27:53 +08:00
container feat(im): 新增QQBot即时通讯平台集成支持 2026-06-26 16:53:00 +08:00
database feat(system-info): surface DB migration errors with troubleshooting links 2026-05-14 16:34:50 +08:00
datasource fix(datasource): optimize RSS incremental sync and surface partial failures 2026-06-23 17:30:38 +08:00
errors feat(knowledge): track per-stage parsing progress with /stages API 2026-05-28 15:14:45 +08:00
event feat(mcp): prompt and resume OAuth authorization mid-conversation 2026-06-29 23:22:28 +08:00
handler feat(mcp): prompt and resume OAuth authorization mid-conversation 2026-06-29 23:22:28 +08:00
im feat(im): 新增QQBot即时通讯平台集成支持 2026-06-26 16:53:00 +08:00
infrastructure fix(web-search): improve SearXNG test connection error messages 2026-06-24 14:28:49 +08:00
logger fix(agent): remove unused RunnableByViewer gate blocking viewer chat 2026-06-23 18:21:23 +08:00
mcp feat(mcp): drive auth by AuthType and auto-detect OAuth on test 2026-06-29 22:37:52 +08:00
middleware feat(mcp): add OAuth2 authorization for MCP services 2026-06-22 20:19:31 +08:00
models fix(embedding): add SSRF validation and safe HTTP client for embedders 2026-06-26 22:41:04 +08:00
ratelimit feat(embed): add backend embed channels with auth and rate limiting (#1657) 2026-06-12 23:10:39 +08:00
router feat(mcp): prompt and resume OAuth authorization mid-conversation 2026-06-29 23:22:28 +08:00
runtime feat(system): add server startup time and uptime tracking 2026-06-04 15:48:04 +08:00
sandbox perf(sandbox): compile command-substitution regexps once 2026-06-16 19:51:32 +08:00
searchutil feat(backend): improve parent-child chunk merge and imageinfo matching 2026-06-16 01:09:07 +08:00
stream feat(redis): add REDIS_USERNAME support for Redis ACL 2026-02-04 19:38:40 +08:00
tracing/langfuse feat(observability): enhance Langfuse retrieve and rerank tracing 2026-06-16 01:09:23 +08:00
types feat(mcp): prompt and resume OAuth authorization mid-conversation 2026-06-29 23:22:28 +08:00
utils fix(agent): enforce tag scopes across knowledge tools 2026-06-29 19:17:42 +08:00