feat(agent): add configurable MCP OAuth wait timeout per agent
Allow agents to set how long in-conversation OAuth prompts wait before auto-skipping, with UI in the agent editor and bounded gate behavior.
This commit is contained in:
@@ -283,10 +283,11 @@ func (s *agentService) registerMCPTools(
|
||||
var regCtx *tools.MCPOAuthSession
|
||||
if eventBus != nil && sessionID != "" && assistantMessageID != "" {
|
||||
regCtx = &tools.MCPOAuthSession{
|
||||
EventBus: eventBus,
|
||||
SessionID: sessionID,
|
||||
AssistantMessageID: assistantMessageID,
|
||||
ApprovalCtx: ctx,
|
||||
EventBus: eventBus,
|
||||
SessionID: sessionID,
|
||||
AssistantMessageID: assistantMessageID,
|
||||
ApprovalCtx: ctx,
|
||||
AuthWaitTimeoutSeconds: config.MCPAuthWaitTimeout,
|
||||
}
|
||||
}
|
||||
registered, err := tools.RegisterMCPTools(
|
||||
|
||||
@@ -227,6 +227,7 @@ func (s *sessionService) buildAgentConfig(
|
||||
HistoryTurns: customAgent.Config.HistoryTurns,
|
||||
MCPSelectionMode: customAgent.Config.MCPSelectionMode,
|
||||
MCPServices: customAgent.Config.MCPServices,
|
||||
MCPAuthWaitTimeout: customAgent.Config.MCPAuthWaitTimeout,
|
||||
Thinking: customAgent.Config.Thinking,
|
||||
RetrieveKBOnlyWhenMentioned: customAgent.Config.RetrieveKBOnlyWhenMentioned,
|
||||
LLMCallTimeout: customAgent.Config.LLMCallTimeout,
|
||||
|
||||
Reference in New Issue
Block a user